discourse-legacysite-perl/site/stackreach/approve_model.php

28 lines
540 B
PHP
Raw Normal View History

2024-06-17 12:42:14 +00:00
<?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');
?>