-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.php
96 lines (85 loc) · 1.71 KB
/
index.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
define('INDEX', TRUE);
include_once 'config.php';
include_once 'jdf.php';
include_once 'telegram.php';
include_once 'initial.php';
include_once 'btns.php';
// CallBack queries
inline_close_btn();
back_to_cats();
most_popular_products();
latest_products();
show_selected_category_products();
show_product();
download_file();
get_phone();
send_product_by_id();
submit_ticket();
submit_search();
// BOT START
if ($text == '/start') {
if (is_verified($userid)) {
$msg = $welcome_msg;
$telegram->sendMessageCURL($userid, $msg, $main_keyboard);
} else {
request_phone();
}
}
// BACK TO HOME
if ($text == $home) {
if (is_verified($userid)) {
$msg = $main_menu_msg;
$telegram->sendMessageCURL($userid, $msg, $main_keyboard);
} else {
request_phone();
}
}
// ENTER THE SHOP
if ($text == $shop) {
if (is_verified($userid)) {
show_categories_list();
} else {
request_phone();
}
}
// Check Vip
if ($text == $vip_member) {
if (is_verified($userid)) {
vip();
} else {
request_phone();
}
}
// User's transactions history
if($text == $my_transactions){
if (is_verified($userid)) {
user_purchased_products($userid);
} else {
request_phone();
}
}
// Ticket and support
if($text == $send_ticket){
if (is_verified($userid)) {
ticket();
} else {
request_phone();
}
}
// Search in products
if($text == $search_products){
if (is_verified($userid)) {
init_search();
} else {
request_phone();
}
}
// User's profile information
if($text == $account){
if(is_verified($userid)){
account_info();
}else{
request_phone();
}
}