36 $arr[
'file'] = strtr(
$arr[
'file'], $replace_path);
37 $arr[
'request'] = strtr(
$arr[
'request'], $replace_path);
42 $sth =
$dbh->prepare(
"INSERT INTO `modals` (`request`, `file`, `groups`, `owner_group`) VALUES (:request, :file, :groups, :owner_group)");
43 $arr[
'groups'] = json_encode(
$arr[
'groups']);
44 $sth->bindValue(
':request',
$arr[
'request']);
45 $sth->bindValue(
':file',
$arr[
'file']);
46 $sth->bindValue(
':groups',
$arr[
'groups']);
47 $sth->bindValue(
':owner_group',
$arr[
'owner_group']);
49 return $dbh->lastInsertId();
66 if (file_exists(
$file) && (
$data = file_get_contents(
$file)) && strpos(
$data,
'Wrong\Models\Actions::find(0)') !==
false) {
67 $data = str_replace(
'Wrong\Models\Actions::find(0)',
'Wrong\Models\Actions::find(' .
$action_id .
')',
$data);
69 $file->flock(LOCK_EX);
73 $file->flock(LOCK_UN);
if(!in_array($_POST['template_id'], array_column(Wrong\Models\Templates::all_available(), 'id'))) $modal_id
if(!($row=Wrong\Models\Crontabs::find($_POST['id']))) if(! $user->access() ->write($row)) $sth
if($_POST['code']==file_get_contents($_SERVER['DOCUMENT_ROOT'] . $row->file)) $file
Connect создает подключение к базе данных
static getInstance($ignore_error=false)
Controller контроллер для запросов к БД
static find($value, $column='id', $table='')
Path удаляет и очищает каталоги
Modals контроллер управления моделями групп пользователей, расширяет Controller.
static create($arr, $replace_path=[])
static set_action($action_id, $modal_id)
Templates контроллер управления моделями выборок, расширяет Controller.
static all_available($value='', $column='id', $table='')
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']
ModelsInterface интерфейс управления моделями