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

32 lines
570 B
PHP
Raw Normal View History

2024-06-17 12:42:14 +00:00
<?php
include_once './config.php';
include_once './models/services/FrameService.php';
if (!is_updater())
return header('location:http://www.slowtwitch.com');
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
if (is_updater ())
{
$frame_id = $_POST['id'];
$frameService = new FrameService();
$item = $frameService->getFrameByID($frame_id);
$item->approved = 1;
$frameService->updateFrame($item);
}
}
else
{
echo $_SERVER['REQUEST_METHOD'];
}
header('location:frames.php');
?>