-
Notifications
You must be signed in to change notification settings - Fork 2
/
question_handling.php
48 lines (44 loc) · 1.33 KB
/
question_handling.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* Created by PhpStorm.
* User: alavi
* Date: 2/22/17
* Time: 3:36 PM
*/
function questionHandling() //handle requests from question menu button
{
global $user_id;
global $text;
global $db;
if($text == "us3R_m3nU")
{
$result = mysqli_query($db, "SELECT * FROM padporsc_bot4.users WHERE user_id = {$user_id}");
$row = mysqli_fetch_array($result);
if($row['question_string'] == "111111")
userMenu(1,1);
else
userMenu(1,0);
}
elseif ($text == "f1rst_Qu3stion" || $text == "sec0nd_Qu3stion" || $text == "th1rd_Qu3stion" || $text == "f0rth_Qu3stion" || $text == "f1fth_Qu3stion" || $text == "s1x_Qu3stion")
{
$b = 2;
if($text == "f1rst_Qu3stion")
$b = 1;
elseif ($text == "sec0nd_Qu3stion")
$b = 2;
elseif ($text == "th1rd_Qu3stion")
$b = 3;
elseif ($text == "f0rth_Qu3stion")
$b = 4;
elseif ($text == "f1fth_Qu3stion")
$b = 5;
elseif ($text == "s1x_Qu3stion")
$b = 6;
mysqli_query($db, "UPDATE padporsc_bot4.users SET current_level = 'asking_question', question_number = {$b} WHERE user_id = {$user_id}");
askQuestion($b);
}
elseif ($text == "WARMin5UPPASDP")
{
warm(0);
}
}