Use new token location
This commit is contained in:
@@ -7,9 +7,10 @@ if (!preg_match('/^[ a-zA-Z0-9!@#\$%\^&\*\(\)_\+\-=\[\]\{\};\':",\.<>\/\?\\\\|`~
|
||||
exitWithMessage("-1");
|
||||
}
|
||||
|
||||
$conn = newConnection(1);
|
||||
$conn0 = newConnection(0);
|
||||
$conn1 = newConnection(1);
|
||||
|
||||
$stmt = $conn->prepare("SELECT id FROM userdata WHERE token = ?");
|
||||
$stmt = $conn0->prepare("SELECT id FROM users WHERE token = ?");
|
||||
$stmt->bind_param("s", $token);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
@@ -21,11 +22,12 @@ $id = $row["id"];
|
||||
$content = base64_encode($request_content);
|
||||
$time = time();
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO chats (userId, content, timestamp) VALUES (?, ?, ?)");
|
||||
$stmt = $conn1->prepare("INSERT INTO chats (userId, content, timestamp) VALUES (?, ?, ?)");
|
||||
$stmt->bind_param("isi", $id, $content, $time);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
|
||||
echo encrypt("1");
|
||||
|
||||
$conn->close();
|
||||
$conn0->close();
|
||||
$conn1->close();
|
||||
Reference in New Issue
Block a user