Чат на коленке

This commit is contained in:
lopar 2018-03-02 01:33:18 +02:00
parent eb856a79da
commit 101be15c96
3 changed files with 5 additions and 4 deletions

View File

@ -8,8 +8,8 @@ include_once "functions.php";
header("Cache-Control: no-cache");
$header = filter_input(INPUT_GET, $_GET['header']);
$ch = filter_input(INPUT_GET, $_GET['ch']);
$header = filter_input(INPUT_GET, 'header');
$ch = filter_input(INPUT_GET, 'ch');
if ($header) {
die();

View File

@ -18,7 +18,8 @@ while ($message = $chat->fetch_assoc()) {
echo $message['msgdate'].": " . $message['msg'];
}
$msg = filter_input(INPUT_POST, $_POST['msg']);
$msg = filter_input(INPUT_POST,'msg']);
$uid = $_SESSION['uid'];
if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);

View File

@ -72,7 +72,7 @@ if (empty($user['battle']) && ($user['hp'] < @$user['maxhp'])) {
regenhp($user);
}
$inder = filter_input(INPUT_COOKIE, $_COOKIE['inder']);
$inder = filter_input(INPUT_COOKIE, 'inder');
if (!isset($banks['id'])) {
$banks = db::c()->query('SELECT `id`, `cr`, `ekr` FROM `bank` WHERE `id` = "?s" AND `owner` = "?s" LIMIT 1', $inder, $u->i()['id'])->fetch_assoc();