Ёбанный вечный цикл!!!

This commit is contained in:
lopar 2018-02-16 01:43:18 +02:00
parent 9c75b04205
commit b2e77826f5
2 changed files with 4 additions and 4 deletions

View File

@ -44,9 +44,9 @@ if (!$error) {
$ip = $_SERVER['REMOTE_ADDR'];
db::c()->query('INSERT INTO `iplog` (`owner`, `ip`, `date`) VALUES (?i, "?s", ?i)', $data['id'], $ip, time());
$rs = db::c()->query('SELECT * FROM `telegraph` WHERE `owner` = ?i', $data['id'])->fetch_assoc();
while ($rs) {
addchp($rs['text'], '{[]}' . $data['login'] . '{[]}');
$rs = db::c()->query('SELECT * FROM `telegraph` WHERE `owner` = ?i', $data['id']);
while ($res = $rs->fetch_assoc()) {
addchp($res['text'], '{[]}' . $data['login'] . '{[]}');
}
db::c()->query('DELETE FROM `telegraph` WHERE `owner` = ?i', $data['id']);
header("Location: fight.php");

View File

@ -5,7 +5,7 @@ include("functions.php");
$login = urldecode(filter_input(INPUT_SERVER,'QUERY_STRING'));
$uid = isset($_SESSION['uid'])?$_SESSION['uid']:NULL;
$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,`medals`,borndate,`align`,`admin`,`realname`,`city`,`lozung`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest`
$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,`medals`,borndate,`align`,`admin`,`realname`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest`
FROM `users`
WHERE `login` = "?s"', $login)->fetch_assoc();
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();