game/cron_prizhaot.php

28 lines
1.2 KiB
PHP

<?php
const GAME = true;
setlocale(LC_CTYPE, "ru_RU.CP1251");
require_once '_incl_data/__config.php';
require_once '_incl_data/class/__db_connect.php';
if (!isset($_GET['tests']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get() != '51.89.6.100') {
exit(UserIp::get() . '<br>' . $_SERVER['SERVER_ADDR']);
}
//Ïîäàåì òóðíèð (õàîò) äëÿ 8-11 óðîâíåé
$pdo = \Core\Database::pdoinit();
$inc = $pdo->prepare(
'insert into zayvki (`comment`,`arand`,`noatack`,`city`,`creator`,`type`,`time_start`,`timeout`,`min_lvl_1`,`min_lvl_2`,`max_lvl_1`,`max_lvl_2`,`noinc`,`razdel`,`time`,`fastfight`,`priz`,`maxplayers`,`tm1max`,`tm2max`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,unix_timestamp(),?,?,?,?,?)'
)->execute(
[
"<i style='color: green;'>Àâòîçàÿâêà! <b>Òåñò ïðîøó íå çàõîäèòü</b></i>",
1, 1, 'capitalcity', 0, 33, 300, 180, 8, 8, 12, 12, 1, 5, 1, 1, 40, 0, 0,
]
);
$pdo->prepare('insert into chat (`text`,`type`,`new`,`time`) values (?,?,?,unix_timestamp())')
->execute(
["<span style='color: red'>Âíèìàíèå!!!</span> <span style='color:#cb0000'><b>Ãåðîè÷åñêîå Ñðàæåíèå</b> íà÷àëîñü.</span>", 6, 1,]
);
echo $inc ? 'true' : 'false';