Commit 2342a12c authored by Freddy's avatar Freddy

fix in telebot.php

parent a10f6d1e
......@@ -79,7 +79,6 @@ class telebot extends Passwd {
}
}
print_r($userdata);
for($i=0; count($userdata) > $i; $i++) {
$sql = "SELECT * FROM accounts WHERE userid = " . $userdata[$i]['userid'];
......@@ -124,7 +123,7 @@ class telebot extends Passwd {
$type = $tree[$i]['type'];
$timestamp = $tree[$i]['timestamp']['unix'];
$message = json_encode($tree[$i]);
$message = $this->DB->real_escape_string($message);
$sql = "SELECT * FROM `messages` WHERE `accountid` =$userid AND `wiki` LIKE '$wiki' AND `messageid` = $id;";
$result = $this->DB->query($sql);
if($result === 0) {
......@@ -132,7 +131,6 @@ class telebot extends Passwd {
} else {
$num = mysqli_num_rows($result);
}
if($num == 0) {
$sql = "INSERT INTO `messages` (`accountid`, `messageid`, `wiki`, `type`, `data`, `timestamp`, `sent`) VALUES ('" . $userid. "', '" . $id . "', '" . $wiki . "', '" . $type . "', '" . $message . "', " . $timestamp . ", 0)";
$this->DB->modify($sql);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment