nativegallery-weryskok/app/Controllers/Api/Admin/Images/SetVisibility.php
themohooks 2efc146a7e fixes
2024-07-18 16:13:50 +03:00

18 lines
No EOL
431 B
PHP

<?php
namespace App\Controllers\Api\Admin\Images;
use App\Services\{Auth, Router, GenerateRandomStr, DB, Json, EXIF};
use App\Models\{User, Vote};
class SetVisibility
{
public function __construct()
{
DB::query('UPDATE photos SET moderated=:mod, timeupload=:time WHERE id=:id', array(':id'=>$_GET['id'], ':mod'=>$_GET['mod'], ':time'=>time()));
header('Location: ' . $_SERVER['HTTP_REFERER']);
}
}