8 isset(
$user) or require
$_SERVER[
'DOCUMENT_ROOT'] .
'/page/404.php';
10 header(
"Content-type: application/json");
12 array_walk_recursive(
$_POST,
function (&$item) {
13 $item = trim(htmlspecialchars($item, ENT_QUOTES));
20 $cron = Cron\CronExpression::factory(
$_POST[
'shedule']);
21 }
catch (\Throwable $th) {
22 exit(json_encode([
'error' => $th->getMessage(),
'id' =>
$_POST[
'id']]));
27 for (
$i = 0;
$i < 25;
$i++) {
28 $shedules[] = $cron->getNextRunDate(
null,
$i)->format(
'Y-m-d H:i:s');
32 exit(json_encode([
'result' =>
'ok',
'message' =>
'Успешно',
'id' =>
$_POST[
'id'],
'shedules' =>
$shedules]));
if(empty($_POST['name'])) if(empty($_POST['type'])||!in_array($_POST['type'], ['page', 'modal', 'incode', 'select', 'action'])) $i
setcookie('FROM_UID', $uid, [ 'expires'=> time()+31536000, 'path'=> '/', 'domain'=> $_SERVER['HTTP_HOST'], 'secure'=> Wrong\Start\Env::$e->IS_SECURE, 'httponly'=> false, 'samesite'=> Wrong\Start\Env::$e->IS_SECURE ? 'None' :'Lax']) or setcookie('FROM_UID' $_SERVER['HTTP_HOST']
if(($dbh=Connect::getInstance(true) ->dbh) && $dbh->query("SHOW TABLES") ->fetchAll() && $dbh->query("SELECT COUNT(*) FROM `users`") ->fetchColumn()) if(!empty($_POST)) exit
catch(\Throwable $th) $shedules