Commit | Line | Data |
---|---|---|
5623205d | 1 | <?PHP |
d34d08c1 | 2 | include_once('bots.php'); |
5623205d PM |
3 | include_once('../slack.php'); |
4 | include_once('security.php'); | |
c7d45ac6 | 5 | include_once('/var/www/secure.php'); //outside webserver |
6c9432fc | 6 | include_once('functions.php'); |
2bfe8168 PM |
7 | |
8 | function js_redirect($page){ | |
9 | $base = 'https://www.md-petition.com/admin/'; | |
10 | $url = $base.$page; | |
11 | echo "<script>window.location.href = \"$url\";</script>"; | |
12 | die(); | |
13 | } | |
14 | ||
5623205d PM |
15 | if ($_COOKIE['level'] == 'user'){ |
16 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
17 | header('Location: user_home.php'); | |
18 | } | |
28de89d0 PM |
19 | if (isset($_GET['clear_php_session_id'])){ |
20 | $id = $_GET['clear_php_session_id']; | |
21 | $petition->query("update presign set presign_status = 'DONE' where php_session_id = '$id' "); | |
cdaa5f15 | 22 | header('Location: analytics.php'); |
28de89d0 | 23 | } |
53ff5c98 PM |
24 | if (isset($_GET['clear_email'])){ |
25 | $email = $_GET['clear_email']; | |
5afbd813 | 26 | $petition->query("update presign set presign_status = 'DONE' where email_for_follow_up = '$email' "); |
53ff5c98 PM |
27 | header('Location: analytics.php'); |
28 | } | |
980cb9f6 PM |
29 | if (isset($_GET['sign_email'])){ |
30 | $email = $_GET['sign_email']; | |
5afbd813 | 31 | $petition->query("update presign set presign_status = 'SIGNED' where email_for_follow_up = '$email' "); |
980cb9f6 PM |
32 | header('Location: analytics.php'); |
33 | } | |
9e6d5e27 PM |
34 | if (isset($_GET['sign_php_session_id'])){ |
35 | $id = $_GET['sign_php_session_id']; | |
36 | $petition->query("update presign set presign_status = 'SIGNED' where php_session_id = '$id' "); | |
cdaa5f15 | 37 | header('Location: analytics.php'); |
9e6d5e27 | 38 | } |
5623205d PM |
39 | if ($_COOKIE['level'] == 'manager'){ |
40 | slack_general('ADMIN: Redirect Manager Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
41 | header('Location: manager_home.php'); | |
42 | } | |
73a94d3f | 43 | if (isset($_GET['flag_invalid_signature'])){ |
68e387b9 | 44 | $id = $_GET['flag_invalid_signature']; |
73a94d3f | 45 | $petition->query("update signatures set signature_status = 'flag_invalid_signature' where id = '$id' "); |
cdaa5f15 | 46 | header('Location: analytics.php'); |
73a94d3f | 47 | } |
68e387b9 PM |
48 | if (isset($_GET['flag_duplicate'])){ |
49 | $id = $_GET['flag_duplicate']; | |
50 | $petition->query("update signatures set signature_status = 'flag_duplicate' where id = '$id' "); | |
cdaa5f15 | 51 | header('Location: analytics.php'); |
68e387b9 PM |
52 | } |
53 | if (isset($_GET['flag_ip_address'])){ | |
54 | $ip = $_GET['flag_ip_address']; | |
55 | $petition->query("update signatures set signature_status = 'flag_ip_address' where ip_address = '$ip' "); | |
cdaa5f15 | 56 | header('Location: analytics.php'); |
68e387b9 | 57 | } |
dcc3fc26 PM |
58 | if (isset($_GET['resign_requested'])){ |
59 | $id = $_GET['resign_requested']; | |
60 | $petition->query("update signatures set signature_status = 'resign_requested' where id = '$id' "); | |
cdaa5f15 | 61 | header('Location: analytics.php'); |
dcc3fc26 | 62 | } |
3f8c226b PM |
63 | if (isset($_GET['bot'])){ |
64 | $id = $_GET['bot']; | |
65 | $petition->query("update signatures set signature_status = 'bot' where id = '$id' "); | |
cdaa5f15 | 66 | header('Location: analytics.php'); |
3f8c226b | 67 | } |
68e387b9 PM |
68 | if (isset($_GET['flag_VTRID'])){ |
69 | $VTRID = $_GET['flag_VTRID']; | |
70 | $petition->query("update signatures set signature_status = 'flag_VTRID' where VTRID = '$VTRID' "); | |
cdaa5f15 | 71 | header('Location: analytics.php'); |
68e387b9 | 72 | } |
587d1da3 PM |
73 | if (isset($_GET['flag_phone'])){ |
74 | $flag_phone = $_GET['flag_phone']; | |
75 | $petition->query("update signatures set signature_status = 'flag_phone' where contact_phone = '$flag_phone' "); | |
cdaa5f15 | 76 | header('Location: analytics.php'); |
587d1da3 | 77 | } |
c7d45ac6 | 78 | include_once('header.php'); |
f49d1b19 PM |
79 | if (isset($_GET['ip_address'])){ |
80 | $ip = $_GET['ip_address']; | |
2a00571e | 81 | $petition_id = $_GET['petition_id']; |
68e387b9 | 82 | echo "<h1>Review $ip</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; |
2a00571e | 83 | $q = "SELECT * FROM signatures where ip_address = '$ip' and signature_status = 'verified' and petition_id = '$petition_id' order by signature_status desc "; |
45bc6a1e | 84 | $r = $petition->query($q); |
7ce3d9ec | 85 | while($d = mysqli_fetch_array($r)){ |
4fca24b9 PM |
86 | $color = 'white'; |
87 | $pos = strpos($d['date_time_signed'], date('Y-m-d')); | |
88 | if ($pos !== false) { | |
89 | $color= 'yellow'; | |
90 | } | |
91 | echo "<tr style='background-color:$color;'> | |
68e387b9 PM |
92 | <td><b>$d[date_time_signed]</b></td> |
93 | <td><a href='?VTRID=$d[VTRID]'>$d[VTRID]</a></td> | |
6c9432fc | 94 | <td>".id2petition($d['petition_id'])."</td> |
68e387b9 PM |
95 | <td>$d[signed_name_as]</td> |
96 | <td>$d[signed_name_as_circulator]</td> | |
97 | <td>$d[contact_phone]</td> | |
68e387b9 | 98 | <td>$d[printed_status]</td> |
dcc3fc26 PM |
99 | <td><a href='?flag_invalid_signature=$d[id]'>flag invalid signature</a></td> |
100 | <td><a href='?flag_VTRID=$d[VTRID]'>flag VTRID</a></td> | |
101 | <td><a href='?flag_ip_address=$d[ip_address]'>flag ip address</a></td> | |
102 | <td><a href='?flag_duplicate=$d[id]'>flag duplicate</a></td> | |
103 | <td><a href='?flag_phone=$d[contact_phone]'>contact phone</a></td> | |
ff3013b8 | 104 | <td><a href='?resign_requested=$d[id]'>resign requested</a></td> |
3f8c226b | 105 | <td><a href='?bot=$d[id]'>bot</a></td> |
68e387b9 | 106 | </tr>"; |
7ce3d9ec | 107 | } |
3a0177c8 | 108 | echo "</table>"; |
d6495122 PM |
109 | }elseif(isset($_GET['email'])){ |
110 | $email = $_GET['email']; | |
111 | echo "<h1>Review $email</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
112 | $q = "SELECT * FROM presign where email_for_follow_up = '$email' order by id desc "; | |
113 | $r = $petition->query($q); | |
114 | while($d = mysqli_fetch_array($r)){ | |
115 | $color = 'white'; | |
116 | $test = date('Y-m-d',strtotime($d['action_on'])); | |
117 | $pos = strpos($test, date('Y-m-d')); | |
118 | if ($pos !== false) { | |
119 | $color= 'yellow'; | |
120 | } | |
121 | echo "<tr style='background-color:$color;'> | |
122 | <td style='white-space:pre;'><b>$d[action_on]</b></td> | |
617b4302 | 123 | <td style='white-space:pre;'><a href='?php_session_id=$d[php_session_id]'>$d[php_session_id]</a></td> |
d6495122 PM |
124 | <td style='white-space:pre;'>$d[php_page]</td> |
125 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
126 | <td style='white-space:pre;'>$d[invite]</td> | |
127 | <td style='white-space:pre;'>$d[invite_error]</td> | |
128 | <td style='white-space:pre;'>$d[name]</td> | |
129 | <td style='white-space:pre;'>$d[email_for_follow_up]</td> | |
130 | <td style='white-space:pre;'>$d[phone_for_validation]</td> | |
131 | <td style='white-space:pre;'>$d[presign_status]</td> | |
132 | <td style='white-space:pre;'>$d[ip_address]</td> | |
133 | <td style='white-space:pre;'>$d[browser_string]</td> | |
134 | </tr>"; | |
135 | } | |
980cb9f6 | 136 | echo "</table><a href='?clear_email=$email'>CLEAR EMAIL</a> - <a href='?sign_email=$email'>SIGNATURE FOUND</a>"; |
971585e7 | 137 | }elseif(isset($_GET['php_session_id']) && empty($_GET['follow_up'])){ |
b331a809 PM |
138 | $php_session_id = $_GET['php_session_id']; |
139 | echo "<h1>Review $php_session_id</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
140 | $q = "SELECT * FROM presign where php_session_id = '$php_session_id' order by id desc "; | |
141 | $r = $petition->query($q); | |
142 | while($d = mysqli_fetch_array($r)){ | |
143 | $color = 'white'; | |
eea234c3 PM |
144 | $test = date('Y-m-d',strtotime($d['action_on'])); |
145 | $pos = strpos($test, date('Y-m-d')); | |
b331a809 PM |
146 | if ($pos !== false) { |
147 | $color= 'yellow'; | |
148 | } | |
149 | echo "<tr style='background-color:$color;'> | |
eea234c3 PM |
150 | <td style='white-space:pre;'><b>$d[action_on]</b></td> |
151 | <td style='white-space:pre;'>$d[php_page]</td> | |
152 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
153 | <td style='white-space:pre;'>$d[invite]</td> | |
973dd966 | 154 | <td style='white-space:pre;'>$d[invite_error]</td> |
eea234c3 | 155 | <td style='white-space:pre;'>$d[name]</td> |
d6495122 | 156 | <td style='white-space:pre;'><a href='?email=$d[email_for_follow_up]'>$d[email_for_follow_up]</a></td> |
eea234c3 PM |
157 | <td style='white-space:pre;'>$d[phone_for_validation]</td> |
158 | <td style='white-space:pre;'>$d[presign_status]</td> | |
159 | <td style='white-space:pre;'>$d[ip_address]</td> | |
160 | <td style='white-space:pre;'>$d[browser_string]</td> | |
971585e7 PM |
161 | </tr>"; |
162 | } | |
980cb9f6 | 163 | echo "</table><a href='?clear_php_session_id=$php_session_id'>CLEAR SESSION</a> - |
707c5a7b | 164 | <a href='?sign_php_session_id=$php_session_id'>SIGNATURE FOUND</a><br> |
7cdb2650 | 165 | - <a href='?php_session_id=$php_session_id&follow_up=X'>ADD TO FOLLOW UP LIST Maryland General</a><br> |
707c5a7b PM |
166 | - <a href='?php_session_id=$php_session_id&follow_up=1'>ADD TO FOLLOW UP LIST MGP</a><br> |
167 | - <a href='?php_session_id=$php_session_id&follow_up=2'>ADD TO FOLLOW UP LIST MLP</a><br> | |
168 | - <a href='?php_session_id=$php_session_id&follow_up=3'>ADD TO FOLLOW UP LIST BTEC</a><br> | |
169 | - <a href='?php_session_id=$php_session_id&follow_up=7'>ADD TO FOLLOW UP LIST PG</a><br> | |
e511d315 PM |
170 | - <a href='?php_session_id=$php_session_id&follow_up=8'>ADD TO FOLLOW UP LIST Ivey</a> |
171 | "; | |
971585e7 PM |
172 | }elseif(isset($_GET['php_session_id']) && isset($_GET['follow_up'])){ |
173 | $php_session_id = $_GET['php_session_id']; | |
174 | echo "<h1>Adding Follow up for $php_session_id to $_GET[follow_up]</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
175 | $q = "SELECT * FROM presign where php_session_id = '$php_session_id' order by id desc "; | |
176 | $r = $petition->query($q); | |
971585e7 | 177 | while($d = mysqli_fetch_array($r)){ |
f8753855 | 178 | |
971585e7 PM |
179 | $color = 'white'; |
180 | $test = date('Y-m-d',strtotime($d['action_on'])); | |
181 | $pos = strpos($test, date('Y-m-d')); | |
182 | if ($pos !== false) { | |
183 | $color= 'yellow'; | |
184 | } | |
f8753855 PM |
185 | if ($d[name] != ''){ |
186 | $name = $d[name]; | |
187 | } | |
188 | if ($d[email_for_follow_up] != ''){ | |
189 | $email = $d[email_for_follow_up]; | |
190 | } | |
971585e7 PM |
191 | echo "<tr style='background-color:$color;'> |
192 | <td style='white-space:pre;'><b>$d[action_on]</b></td> | |
193 | <td style='white-space:pre;'>$d[php_page]</td> | |
194 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
195 | <td style='white-space:pre;'>$d[invite]</td> | |
196 | <td style='white-space:pre;'>$d[invite_error]</td> | |
197 | <td style='white-space:pre;'>$d[name]</td> | |
198 | <td style='white-space:pre;'>$d[email_for_follow_up]</td> | |
199 | <td style='white-space:pre;'>$d[phone_for_validation]</td> | |
200 | <td style='white-space:pre;'>$d[presign_status]</td> | |
201 | <td style='white-space:pre;'>$d[ip_address]</td> | |
202 | <td style='white-space:pre;'>$d[browser_string]</td> | |
b331a809 PM |
203 | </tr>"; |
204 | } | |
ef2c1da5 | 205 | $petition->query("insert into follow_up (name, email, php_session, petition_id, date_sent) values ('$name','$email','$php_session_id','$_GET[follow_up]','".date('Y-m-d')."') "); |
b739e778 | 206 | $petition->query("update presign set presign_status = 'DONE' where php_session_id = '$php_session_id' "); |
d75dee31 | 207 | $petition->query("update presign set presign_status = 'DONE' where email_for_follow_up = '$email' "); |
1f0c4bd2 | 208 | echo "</table>"; |
f49d1b19 PM |
209 | }elseif (isset($_GET['VTRID'])){ |
210 | $VTRID = $_GET['VTRID']; | |
2a00571e | 211 | $petition_id = $_GET['petition_id']; |
68e387b9 | 212 | echo "<h1>Review $VTRID</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; |
2a00571e | 213 | $q = "SELECT * FROM signatures where VTRID = '$VTRID' and signature_status = 'verified' and petition_id = '$petition_id' order by petition_id, id DESC "; |
45bc6a1e | 214 | $r = $petition->query($q); |
6ecdab3a | 215 | $i=0; |
7ce3d9ec | 216 | while($d = mysqli_fetch_array($r)){ |
4fca24b9 PM |
217 | $color = 'white'; |
218 | $pos = strpos($d['date_time_signed'], date('Y-m-d')); | |
219 | if ($pos !== false) { | |
220 | $color= 'yellow'; | |
221 | } | |
222 | echo "<tr style='background-color:$color;'> | |
68e387b9 PM |
223 | <td><b>$d[date_time_signed]</b></td> |
224 | <td><a href='?ip_address=$d[ip_address]'>$d[ip_address]</a></td> | |
b6545efe | 225 | <td>".id2petition($d['petition_id'])."</td> |
68e387b9 PM |
226 | <td>$d[signed_name_as]</td> |
227 | <td>$d[signed_name_as_circulator]</td> | |
228 | <td>$d[contact_phone]</td> | |
68e387b9 | 229 | <td>$d[printed_status]</td> |
dcc3fc26 PM |
230 | <td><a href='?flag_invalid_signature=$d[id]'>flag invalid signature</a></td> |
231 | <td><a href='?flag_VTRID=$d[VTRID]'>flag VTRID</a></td> | |
232 | <td><a href='?flag_ip_address=$d[ip_address]'>flag ip address</a></td> | |
233 | <td><a href='?flag_duplicate=$d[id]'>flag duplicate</a></td> | |
234 | <td><a href='?flag_phone=$d[contact_phone]'>contact phone</a></td> | |
ff3013b8 | 235 | <td><a href='?resign_requested=$d[id]'>resign requested</a></td> |
3f8c226b | 236 | <td><a href='?bot=$d[id]'>bot</a></td> |
6ecdab3a PM |
237 | </tr>"; |
238 | if ($i == 0){ | |
239 | js_redirect("analytics.php?flag_duplicate=$d[id]"); | |
240 | } | |
241 | $i++; | |
7ce3d9ec | 242 | } |
3a0177c8 | 243 | echo "</table>"; |
2bfe8168 | 244 | die(); |
f49d1b19 | 245 | } |
5623205d | 246 | ?> |
4b205268 | 247 | |
025fe4dd | 248 | <h1>Signature Analytics - Server Clock: <?PHP echo date('r');?></h1> |
d5dffc27 | 249 | <h2>NEVER NEVER NEVER CALL OR TEXT ANYONE - ONLY EMAIL!!!</h2> |
cdaa5f15 | 250 | <h3>SysOp Says: Transparency = Trust</h3> |
a0b1579f PM |
251 | <table> |
252 | ||
253 | <tr> | |
1f8109a1 | 254 | <td valign="top" colspan='2'><?PHP /* |
a0b1579f PM |
255 | <h2>IP Address</h2> |
256 | <div>Watching for duplicates.</div><ol> | |
257 | <?PHP | |
258 | $q="SELECT ip_address, petition_id,VTRID, COUNT(*) as count FROM signatures where signature_status = 'verified' group by ip_address, petition_id, VTRID"; | |
259 | $r = $petition->query($q); | |
260 | while($d = mysqli_fetch_array($r)){ | |
261 | if ($d['count'] > 1){ | |
262 | echo "<li><a href='?ip_address=$d[ip_address]&petition_id=$d[petition_id]'>$d[ip_address]</a> ".id2petition($d['petition_id'])." <b>$d[count]</b> $d[signed_name_as]</li>"; | |
263 | } | |
264 | } | |
1f8109a1 PM |
265 | ?></ol> |
266 | </td><td valign="top"> */ ?> | |
a0b1579f PM |
267 | <h2>VTRID</h2> |
268 | <div>Watching for duplicates.</div><ol> | |
269 | <?PHP | |
270 | $q="SELECT VTRID, petition_id, COUNT(*) as count FROM signatures where signature_status = 'verified' group by VTRID, petition_id"; | |
271 | $r = $petition->query($q); | |
c948926c | 272 | $i=0; |
a0b1579f PM |
273 | while($d = mysqli_fetch_array($r)){ |
274 | if ($d['count'] > 1){ | |
275 | echo "<li><a href='?VTRID=$d[VTRID]&petition_id=$d[petition_id]'>$d[VTRID]</a> ".id2petition($d['petition_id'])." <b>$d[count]</b> $d[signed_name_as]</li>"; | |
c948926c PM |
276 | if ($i == 0){ |
277 | js_redirect("analytics.php?VTRID=$d[VTRID]&petition_id=$d[petition_id]"); | |
278 | } | |
279 | $i++; | |
a0b1579f | 280 | } |
c948926c | 281 | |
a0b1579f PM |
282 | } |
283 | ?></ol> | |
284 | </td></tr> | |
285 | ||
286 | ||
d1dcf736 | 287 | <tr> |
fcb27806 | 288 | <td valign="top" colspan='2'> |
d1dcf736 | 289 | <h2>Pre-Sign</h2> |
617b4302 | 290 | <div>Follow up requested - never signed.</div> |
1f8109a1 | 291 | <form method='GET'><input name='email'><input type='submit' value='SEARCH E-MAIL'></form><table> |
d1dcf736 | 292 | <?PHP |
6792c2dd | 293 | $q="SELECT distinct php_session_id FROM presign where presign_status = 'NEW' and email_for_follow_up <> '' order by id"; |
d1dcf736 PM |
294 | $r = $petition->query($q); |
295 | while($d = mysqli_fetch_array($r)){ | |
296 | $q2="SELECT * FROM presign where php_session_id = '$d[php_session_id]' order by id desc"; | |
297 | $r2 = $petition->query($q2); | |
298 | $d2 = mysqli_fetch_array($r2); | |
bfa39749 PM |
299 | $sig = ''; |
300 | if ($d2['name'] != ''){ | |
301 | $q3 = "SELECT date_time_signed FROM signatures where signed_name_as = '$d2[name]'"; | |
302 | $r3 = $petition->query($q3); | |
303 | $d3 = mysqli_fetch_array($r3); | |
020ef085 | 304 | if ($d3['date_time_signed'] != ''){ |
b82d1c75 | 305 | $sig = "<b><a href='?sign_email=$d2[email_for_follow_up]'>SIGNATURE $d3[date_time_signed]</a></b><br>"; |
b61373ea | 306 | js_redirect("analytics.php?sign_email=$d2[email_for_follow_up]"); |
020ef085 | 307 | } |
bfa39749 | 308 | } |
3bfc2070 | 309 | $presig=''; |
c22e5d57 | 310 | $q4="SELECT * FROM presign where email_for_follow_up = '$d2[email_for_follow_up]' and php_page like '/sign.php%'"; |
3bfc2070 PM |
311 | $r4 = $petition->query($q4); |
312 | $d4 = mysqli_fetch_array($r4); | |
18be5f6c | 313 | if ($d4['action_on']){ |
b82d1c75 | 314 | $presig = "<b><a href='?sign_email=$d2[email_for_follow_up]'>PRESIG $d4[action_on]</a></b><br>"; |
b61373ea | 315 | js_redirect("analytics.php?sign_email=$d2[email_for_follow_up]"); |
3bfc2070 | 316 | } |
18be5f6c PM |
317 | $invite_error=''; |
318 | $q4="SELECT * FROM presign where email_for_follow_up = '$d2[email_for_follow_up]' and invite_error <> '' "; | |
319 | $r4 = $petition->query($q4); | |
320 | $d4 = mysqli_fetch_array($r4); | |
321 | if ($d4['invite_error'] != ''){ | |
b82d1c75 | 322 | $invite_error = "<b><a href='?clear_email=$d2[email_for_follow_up]'>$d4[invite_error]</a></b><br>"; |
b61373ea | 323 | js_redirect("analytics.php?clear_email=$d2[email_for_follow_up]"); |
18be5f6c | 324 | } |
ef385212 | 325 | $php_session_id = $d2['php_session_id']; |
4619b9ca PM |
326 | echo "<tr><td><a href='?php_session_id=$php_session_id'>$d2[action_on]</a></td><td>$presig $sig $invite_error</td> |
327 | <td>$d2[name]</td><td><a href='?email=$d2[email_for_follow_up]'>$d2[email_for_follow_up]</a></td> | |
328 | <td>".id2petition($d2['petition'])."</td><td>$d2[invite]</td> | |
ef385212 PM |
329 | <td><a href='?php_session_id=$php_session_id&follow_up=X'>General</a> |
330 | - <a href='?php_session_id=$php_session_id&follow_up=1'>MGP</a> | |
331 | - <a href='?php_session_id=$php_session_id&follow_up=2'>MLP</a> | |
332 | - <a href='?php_session_id=$php_session_id&follow_up=3'>BTEC</a> | |
333 | - <a href='?php_session_id=$php_session_id&follow_up=7'>PG</a> | |
334 | - <a href='?php_session_id=$php_session_id&follow_up=8'>Ivey</a></td></tr>"; | |
4619b9ca PM |
335 | if( $presig == '' && $invite_error == '' && $sig == '' ){ |
336 | if ($d2['invite'] == 'Ivey'){ | |
337 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=8"); | |
338 | } | |
205eb53b PM |
339 | if ($d2['invite'] == 'mlp'){ |
340 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=2"); | |
341 | } | |
342 | if ($d2['invite'] == 'BTEC'){ | |
343 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=3"); | |
344 | } | |
345 | if ($d2['invite'] == 'RestorePGTermLimits'){ | |
346 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=7"); | |
347 | } | |
508a8904 PM |
348 | if ($d2['invite'] == 'mgp'){ |
349 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=1"); | |
350 | } | |
4619b9ca | 351 | } |
d1dcf736 | 352 | } |
1f8109a1 | 353 | ?></table> |
d1dcf736 | 354 | </td> |
fcb27806 PM |
355 | </tr> |
356 | <tr> | |
357 | <td valign="top" colspan='2'> | |
cdaa5f15 | 358 | <h2>Signatures</h2> |
d1dcf736 PM |
359 | <div>Last 10</div><ol> |
360 | <?PHP | |
361 | $q="SELECT * FROM signatures where signature_status = 'verified' order by id desc limit 0, 10"; | |
362 | $r = $petition->query($q); | |
363 | while($d = mysqli_fetch_array($r)){ | |
364 | echo "<li>$d[date_time_signed] ".id2petition($d['petition_id'])." $d[signed_name_as]</li>"; | |
365 | } | |
0b1ed2a4 | 366 | ?></ol> |
7f0c66a3 | 367 | |
d1dcf736 | 368 | </td> |
797efc8e | 369 | |
d1dcf736 | 370 | </tr> |
a0b1579f | 371 | <tr><td valign="top"> |
cdaa5f15 PM |
372 | <h2>VTRID Bugs</h2> |
373 | <div>Watching for 0</div><ol> | |
e0bd2eda | 374 | <?PHP |
e8d1541d | 375 | $q="SELECT * FROM signatures where VTRID = '0' and signature_status <> 'bot' and signature_status <> 'flag_invalid_signature' and signature_status <> 'resign_requested'"; |
e0bd2eda PM |
376 | $r = $petition->query($q); |
377 | while($d = mysqli_fetch_array($r)){ | |
55fd7459 | 378 | echo "<li>$d[date_time_signed] <a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> <a target='_Blank' href='https://ipinfo.io/$d[ip_address]'>IP INFO</a> $d[petition_id] $d[signed_name_as]</li>"; |
9b75965d | 379 | } |
cc84dbb5 | 380 | ?></ol> |
797efc8e | 381 | </td><td valign="top"> |
cdaa5f15 PM |
382 | <h2>Petition ID Bugs</h2> |
383 | <div>Watching for 0</div><ol> | |
9b75965d | 384 | <?PHP |
e8d1541d | 385 | $q="SELECT * FROM signatures where (petition_id = '0' or petition_id = '') and signature_status <> 'bot' and signature_status <> 'flag_invalid_signature' and signature_status <> 'resign_requested'"; |
9b75965d | 386 | $r = $petition->query($q); |
4931af50 | 387 | while($d = mysqli_fetch_array($r)){ |
55fd7459 | 388 | echo "<li>$d[date_time_signed] <a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> <a target='_Blank' href='https://ipinfo.io/$d[ip_address]'>IP INFO</a> $d[petition_id] $d[signed_name_as]</li>"; |
4931af50 PM |
389 | } |
390 | ?></ol> | |
e8d1541d | 391 | </td></tr><tr><td valign="top"> |
cdaa5f15 | 392 | <?PHP ob_start(); ?> |
4931af50 | 393 | <h2>resign_requested</h2> |
3f8c226b | 394 | <div>These are most likely from early bugs</div><ol> |
4931af50 | 395 | <?PHP |
68fde5b1 | 396 | $q="SELECT * FROM signatures where signature_status = 'resign_requested' order by ip_address"; |
4931af50 | 397 | $r = $petition->query($q); |
cdaa5f15 | 398 | $show = 0; |
9b75965d | 399 | while($d = mysqli_fetch_array($r)){ |
cdaa5f15 | 400 | $show = 1; |
55fd7459 | 401 | echo "<li>$d[date_time_signed] <a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> <a target='_Blank' href='https://ipinfo.io/$d[ip_address]'>IP INFO</a> <a href='?VTRID=$d[VTRID]'>$d[VTRID]</a> $d[petition_id] $d[signed_name_as]</li>"; |
e0bd2eda | 402 | } |
3f8c226b | 403 | ?></ol> |
cdaa5f15 | 404 | <?PHP $html = ob_get_clean(); if ( $show == 1 ){ echo $html; } ?> |
3f8c226b PM |
405 | </td> |
406 | ||
407 | <td valign="top"> | |
cdaa5f15 | 408 | <?PHP ob_start(); ?> |
3f8c226b PM |
409 | <h2>bots</h2> |
410 | <div>These are bots on the site.</div><ol> | |
411 | <?PHP | |
68fde5b1 | 412 | $q="SELECT * FROM signatures where signature_status = 'bot' order by ip_address"; |
3f8c226b | 413 | $r = $petition->query($q); |
cdaa5f15 | 414 | $show = 0; |
3f8c226b | 415 | while($d = mysqli_fetch_array($r)){ |
cdaa5f15 | 416 | $show = 1; |
ab89bfc5 | 417 | echo "<li>$d[date_time_signed] <a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> <a target='_Blank' href='https://ipinfo.io/$d[ip_address]'>IP INFO</a> <a href='?VTRID=$d[VTRID]'>$d[VTRID]</a> $d[petition_id] $d[signed_name_as]</li>"; |
3f8c226b | 418 | } |
cc84dbb5 | 419 | ?></ol> |
cdaa5f15 PM |
420 | <?PHP $html = ob_get_clean(); if ( $show == 1 ){ echo $html; } ?> |
421 | ||
797efc8e | 422 | </td> |
5623205d | 423 | |
9b75965d | 424 | |
05fddd22 | 425 | </tr> |
05fddd22 | 426 | |
05fddd22 | 427 | </table> |
9b75965d PM |
428 | |
429 | ||
5623205d PM |
430 | <?PHP |
431 | include_once('footer.php'); | |
432 | ?> |