discourse-legacysite-perl/site/stackreach/approve_geometry.php
2024-06-17 22:42:14 +10:00

30 lines
567 B
PHP
Executable File

<?php
include_once './config.php';
include_once './models/services/GeometryService.php';
if ( ! is_updater() )
return header('location:http://www.slowtwitch.com');
if($_SERVER['REQUEST_METHOD']=='POST')
{
if (is_updater ())
{
$geometry_id = $_POST['id'];
$geometryService = new GeometryService();
$item = $geometryService->getGeometryByID($geometry_id);
$item->approved = 1;
$geometryService->updateGeometry($item);
}
}
else
{
echo $_SERVER['REQUEST_METHOD'];
}
header('location:geometries.php');
?>