forked from Innoz-Technologies/SMSGyan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devotional.php
158 lines (147 loc) · 5.58 KB
/
devotional.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
if ($spell_checked == 'koran verse' || $spell_checked == 'quran verse' || $spell_checked == 'verse' || $spell_checked == 'quran' || $spell_checked == 'koran'||$spell_checked == 'verses') {
mysql_close();
include 'lib/configdb2.php';
echo $query = "select * from devotional where religion='islam' and type='quran verses' order by rand() limit 1";
$result = mysql_query($query);
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_array($result);
$text = $row["text"];
$id = $row["id"];
$total_return = $text;
$options_list[] = "Read another";
$list[] = array("content" => "quran verse");
}
mysql_close();
include 'lib/appconfigdb.php';
if ($total_return) {
$source_machine = $machine_id;
$current_file = "/temp/$numbers";
file_put_contents(DATA_PATH . $current_file, $total_return);
$to_logserver['source'] = 'devotional';
include 'allmanip.php';
putOutput($total_return);
exit();
}
}
if ($spell_checked == "dev" || $spell_checked == "devotional") {
$total_return = "Select Your Religion";
$options_list[] = "Hindu";
$list[] = array("content" => "__religion__hindu__");
$options_list[] = "Islam";
$list[] = array("content" => "__religion__islam__");
$options_list[] = "Christian";
$list[] = array("content" => "__religion__christian__");
if ($total_return) {
include 'allmanip.php';
$to_logserver['source'] = 'devotional';
putOutput($total_return);
exit();
}
}
if (preg_match("~__religion__(.+)__~Usi", $req, $match)) {
$religion = $match[1];
if ($religion == "hindu") {
$total_return = "Hindu Devotional Songs,Stories,Bhagavad Gita,Quotes!!!";
$options_list[] = "Songs";
$list[] = array("content" => "__dev__hindu__song__");
$options_list[] = "Stories";
$list[] = array("content" => "__dev__hindu__story__");
$options_list[] = "Bhagavad Gita";
$list[] = array("content" => "__dev__hindu__bhagavad gita__");
$options_list[] = "Quotes";
$list[] = array("content" => "__dev__hindu__quotes__");
}
if ($religion == "islam") {
$total_return = "Islam Devotional Songs,Stories,Quaran Verses,Hadith!!!";
$options_list[] = "Song";
$list[] = array("content" => "__dev__islam__song__");
$options_list[] = "Stories";
$list[] = array("content" => "__dev__islam__story__");
$options_list[] = "Quran Verses";
$list[] = array("content" => "__dev__islam__quran verses__");
$options_list[] = "Hadith";
$list[] = array("content" => "__dev__islam__hadith__");
}
if ($religion == "christian") {
$total_return = "Christian Devotional Songs,Stories,Bible Verses!!!";
$options_list[] = "Song";
$list[] = array("content" => "__dev__christian__song__");
$options_list[] = "Stories";
$list[] = array("content" => "__dev__christian__story__");
$options_list[] = "Bible Verses";
$list[] = array("content" => "__dev__christian__bible verse__");
}
if ($total_return) {
include 'allmanip.php';
$to_logserver['source'] = 'devotional';
putOutput($total_return);
exit();
}
}
if (preg_match("~__dev__(.+)__(.+)__~Usi", $req, $match)) {
$religion = $match[1];
$type = $match[2];
mysql_close();
include 'lib/configdb2.php';
echo $query = "select * from devotional where religion='$religion' and type='$type' order by rand() limit 1";
$result = mysql_query($query);
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_array($result);
$text = $row["text"];
$type = $row["type"];
$id = $row["id"];
$religion = $row["religion"];
}
$total_return = $text;
$options_list[] = "Read Another";
$list[] = array("content" => "__readanother__" . $religion . "__" . $type . "__" . $id . "__");
mysql_close();
include 'lib/appconfigdb.php';
if ($total_return) {
$source_machine = $machine_id;
$current_file = "/temp/$numbers";
file_put_contents(DATA_PATH . $current_file, $total_return);
include 'allmanip.php';
$to_logserver['source'] = 'devotional';
putOutput($total_return);
exit();
}
}
if (preg_match("~__readanother__(.+)__(.+)__(.+)__~Usi", $req, $match)) {
$religion = $match[1];
$type = $match[2];
$id = $match[3];
mysql_close();
include 'lib/configdb2.php';
echo $query = "select * from devotional where religion='$religion' and type='$type' and id>$id";
$result = mysql_query($query);
if (mysql_num_rows($result) == 0) {
echo $query = "select * from devotional where religion='$religion' and type='$type'";
$result = mysql_query($query);
}
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_array($result);
$text = $row["text"];
$type = $row["type"];
$id = $row["id"];
$religion = $row["religion"];
$total_return = $text;
$options_list[] = "Read Another";
$list[] = array("content" => "__readanother__" . $religion . "__" . $type . "__" . $id . "__");
}
var_dump($options_list);
var_dump($list);
mysql_close();
include 'lib/appconfigdb.php';
if ($total_return) {
$source_machine = $machine_id;
$current_file = "/temp/$numbers";
file_put_contents(DATA_PATH . $current_file, $total_return);
include 'allmanip.php';
$to_logserver['source'] = 'devotional';
putOutput($total_return);
exit();
}
}
?>