28 lines
540 B
PHP
Executable File
28 lines
540 B
PHP
Executable File
<?php
|
|
|
|
include_once './config.php';
|
|
include_once './models/services/ModelService.php';
|
|
|
|
if ( ! is_updater() )
|
|
return header('location:http://www.slowtwitch.com');
|
|
|
|
if($_SERVER['REQUEST_METHOD']=='POST')
|
|
{
|
|
if (is_updater ())
|
|
{
|
|
$model_id = $_POST['model_id'];
|
|
$modelService = new ModelService();
|
|
$item = $modelService->getModelByID($model_id);
|
|
$item->approved = 1;
|
|
$modelService->updateModel($item);
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo $_SERVER['REQUEST_METHOD'];
|
|
}
|
|
|
|
header('location:models.php');
|
|
|
|
?>
|