Commit | Line | Data |
---|---|---|
4362f81d PM |
1 | <?PHP |
2 | global $order; | |
3 | $order = 'ASC'; | |
4 | if (isset($_COOKIE['order'])){ | |
5 | $order = $_COOKIE['order']; | |
6 | } | |
7 | ||
8 | if (empty($_GET['run'])){ | |
9 | if ($_COOKIE['name'] == ''){ | |
10 | die('no name'); | |
11 | } | |
12 | include_once('bots.php'); | |
13 | include_once('../slack.php'); | |
14 | include_once('security.php'); | |
15 | include_once('/var/www/secure.php'); //outside webserver | |
16 | include_once('functions.php'); | |
17 | }else{ | |
18 | include_once('../slack.php'); | |
19 | include_once('/var/www/secure.php'); //outside webserver | |
20 | include_once('functions.php'); | |
21 | } | |
22 | ob_start(); | |
23 | ||
24 | $sign_email = $_COOKIE['sign_email']; | |
25 | if (isset($_GET['sign_email'])){ | |
26 | // here we use it, if it shows up next run, we block | |
27 | $sign_email = $_GET['sign_email']; | |
28 | $_COOKIE['sign_email'] = $sign_email; | |
29 | setcookie("sign_email", $sign_email); | |
30 | ||
31 | } | |
32 | ||
33 | function js_redirect($page){ // now header - prep for full auto | |
34 | $base = 'https://www.md-petition.com/admin/'; | |
35 | $url = $base.$page.'&run=1'; | |
36 | $pos = strpos($page, $_COOKIE['sign_email']); | |
37 | global $order; | |
38 | if ($pos === false) { | |
39 | // email not found - good to redirect | |
40 | //echo "<script>window.location.href = \"$url\";</script>"; | |
41 | //slack_general('js_redirect('.$page.')','automation'); | |
42 | // header('Location: '.$url); | |
43 | //slack_general('CHECK COOKIE ('.$_COOKIE['sign_email'].') PAGE ('.$page.')','md-petition-admin'); | |
44 | $order = 'ASC'; | |
45 | setcookie("order", $order); | |
46 | die(); | |
47 | } else { | |
48 | //slack_general('Loop Detected for '.$_COOKIE['sign_email'],'automation'); | |
49 | echo "<h1>Automated Loop Detected - Skip Setting - Reverse Sort (DESC)</h1>"; | |
50 | $order = 'DESC'; | |
51 | setcookie("order", $order); | |
52 | } | |
53 | ||
54 | } | |
55 | ||
56 | if ($_COOKIE['level'] == 'user'){ | |
57 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
58 | header('Location: user_home.php'); | |
59 | } | |
60 | if (isset($_GET['clear_php_session_id'])){ | |
61 | $id = $_GET['clear_php_session_id']; | |
62 | $petition->query("update presign set presign_status = 'DONE' where php_session_id = '$id' "); | |
63 | header('Location: analytics.php'); | |
64 | } | |
65 | if (isset($_GET['clear_email'])){ | |
66 | $email = $_GET['clear_email']; | |
67 | $petition->query("update presign set presign_status = 'DONE' where email_for_follow_up = '$email' "); | |
68 | header('Location: analytics.php'); | |
69 | } | |
70 | if (isset($_GET['sign_email'])){ | |
71 | $email = $_GET['sign_email']; | |
72 | $petition->query("update presign set presign_status = 'SIGNED' where email_for_follow_up = '$email' "); | |
73 | header('Location: analytics.php'); | |
74 | } | |
75 | if (isset($_GET['sign_php_session_id'])){ | |
76 | $id = $_GET['sign_php_session_id']; | |
77 | $petition->query("update presign set presign_status = 'SIGNED' where php_session_id = '$id' "); | |
78 | header('Location: analytics.php'); | |
79 | } | |
80 | if ($_COOKIE['level'] == 'manager'){ | |
81 | slack_general('ADMIN: Redirect Manager Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
82 | header('Location: manager_home.php'); | |
83 | } | |
84 | if (isset($_GET['flag_invalid_signature'])){ | |
85 | $id = $_GET['flag_invalid_signature']; | |
86 | $petition->query("update signatures set signature_status = 'flag_invalid_signature' where id = '$id' "); | |
87 | header('Location: analytics.php'); | |
88 | } | |
89 | if (isset($_GET['flag_duplicate'])){ | |
90 | $id = $_GET['flag_duplicate']; | |
91 | $petition->query("update signatures set signature_status = 'flag_duplicate' where id = '$id' "); | |
92 | header('Location: analytics.php'); | |
93 | } | |
94 | if (isset($_GET['flag_ip_address'])){ | |
95 | $ip = $_GET['flag_ip_address']; | |
96 | $petition->query("update signatures set signature_status = 'flag_ip_address' where ip_address = '$ip' "); | |
97 | header('Location: analytics.php'); | |
98 | } | |
99 | if (isset($_GET['resign_requested'])){ | |
100 | $id = $_GET['resign_requested']; | |
101 | $petition->query("update signatures set signature_status = 'resign_requested' where id = '$id' "); | |
102 | header('Location: analytics.php'); | |
103 | } | |
104 | if (isset($_GET['bot'])){ | |
105 | $id = $_GET['bot']; | |
106 | $petition->query("update signatures set signature_status = 'bot' where id = '$id' "); | |
107 | header('Location: analytics.php'); | |
108 | } | |
109 | if (isset($_GET['flag_VTRID'])){ | |
110 | $VTRID = $_GET['flag_VTRID']; | |
111 | $petition->query("update signatures set signature_status = 'flag_VTRID' where VTRID = '$VTRID' "); | |
112 | header('Location: analytics.php'); | |
113 | } | |
114 | if (isset($_GET['flag_phone'])){ | |
115 | $flag_phone = $_GET['flag_phone']; | |
116 | $petition->query("update signatures set signature_status = 'flag_phone' where contact_phone = '$flag_phone' "); | |
117 | header('Location: analytics.php'); | |
118 | } | |
119 | include_once('header.php'); | |
120 | if (isset($_GET['ip_address'])){ | |
121 | $ip = $_GET['ip_address']; | |
122 | $petition_id = $_GET['petition_id']; | |
123 | echo "<h1>Review $ip</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
124 | $q = "SELECT * FROM signatures where ip_address = '$ip' and signature_status = 'verified' and petition_id = '$petition_id' order by signature_status desc "; | |
125 | $r = $petition->query($q); | |
126 | while($d = mysqli_fetch_array($r)){ | |
127 | $color = 'white'; | |
128 | $pos = strpos($d['date_time_signed'], date('Y-m-d')); | |
129 | if ($pos !== false) { | |
130 | $color= 'yellow'; | |
131 | } | |
132 | echo "<tr style='background-color:$color;'> | |
133 | <td><b>$d[date_time_signed]</b></td> | |
134 | <td><a href='?VTRID=$d[VTRID]'>$d[VTRID]</a></td> | |
135 | <td>".id2petition($d['petition_id'])."</td> | |
136 | <td>$d[signed_name_as]</td> | |
137 | <td>$d[signed_name_as_circulator]</td> | |
138 | <td>$d[contact_phone]</td> | |
139 | <td>$d[printed_status]</td> | |
140 | <td><a href='?flag_invalid_signature=$d[id]'>flag invalid signature</a></td> | |
141 | <td><a href='?flag_VTRID=$d[VTRID]'>flag VTRID</a></td> | |
142 | <td><a href='?flag_ip_address=$d[ip_address]'>flag ip address</a></td> | |
143 | <td><a href='?flag_duplicate=$d[id]'>flag duplicate</a></td> | |
144 | <td><a href='?flag_phone=$d[contact_phone]'>contact phone</a></td> | |
145 | <td><a href='?resign_requested=$d[id]'>resign requested</a></td> | |
146 | <td><a href='?bot=$d[id]'>bot</a></td> | |
147 | </tr>"; | |
148 | } | |
149 | echo "</table>"; | |
150 | }elseif(isset($_GET['email'])){ | |
151 | $email = $_GET['email']; | |
152 | echo "<h1>Review $email</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
153 | $q = "SELECT * FROM presign where email_for_follow_up = '$email' order by id desc "; | |
154 | $r = $petition->query($q); | |
155 | while($d = mysqli_fetch_array($r)){ | |
156 | $color = 'white'; | |
157 | $test = date('Y-m-d',strtotime($d['action_on'])); | |
158 | $pos = strpos($test, date('Y-m-d')); | |
159 | if ($pos !== false) { | |
160 | $color= 'yellow'; | |
161 | } | |
162 | echo "<tr style='background-color:$color;'> | |
163 | <td style='white-space:pre;'><b>$d[action_on]</b></td> | |
164 | <td style='white-space:pre;'><a href='?php_session_id=$d[php_session_id]'>$d[php_session_id]</a></td> | |
165 | <td style='white-space:pre;'>$d[php_page]</td> | |
166 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
167 | <td style='white-space:pre;'>$d[invite]</td> | |
168 | <td style='white-space:pre;'>$d[invite_error]</td> | |
169 | <td style='white-space:pre;'>$d[name]</td> | |
170 | <td style='white-space:pre;'>$d[email_for_follow_up]</td> | |
171 | <td style='white-space:pre;'>$d[phone_for_validation]</td> | |
172 | <td style='white-space:pre;'>$d[presign_status]</td> | |
173 | <td style='white-space:pre;'>$d[ip_address]</td> | |
174 | <td style='white-space:pre;'>$d[browser_string]</td> | |
175 | </tr>"; | |
176 | } | |
177 | echo "</table><a href='?clear_email=$email'>CLEAR EMAIL</a> - <a href='?sign_email=$email'>SIGNATURE FOUND</a>"; | |
178 | }elseif(isset($_GET['php_session_id']) && empty($_GET['follow_up'])){ | |
179 | $php_session_id = $_GET['php_session_id']; | |
180 | echo "<h1>Review $php_session_id</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
181 | $q = "SELECT * FROM presign where php_session_id = '$php_session_id' order by id desc "; | |
182 | $r = $petition->query($q); | |
183 | while($d = mysqli_fetch_array($r)){ | |
184 | $color = 'white'; | |
185 | $test = date('Y-m-d',strtotime($d['action_on'])); | |
186 | $pos = strpos($test, date('Y-m-d')); | |
187 | if ($pos !== false) { | |
188 | $color= 'yellow'; | |
189 | } | |
190 | echo "<tr style='background-color:$color;'> | |
191 | <td style='white-space:pre;'><b>$d[action_on]</b></td> | |
192 | <td style='white-space:pre;'>$d[php_page]</td> | |
193 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
194 | <td style='white-space:pre;'>$d[invite]</td> | |
195 | <td style='white-space:pre;'>$d[invite_error]</td> | |
196 | <td style='white-space:pre;'>$d[name]</td> | |
197 | <td style='white-space:pre;'><a href='?email=$d[email_for_follow_up]'>$d[email_for_follow_up]</a></td> | |
198 | <td style='white-space:pre;'>$d[phone_for_validation]</td> | |
199 | <td style='white-space:pre;'>$d[presign_status]</td> | |
200 | <td style='white-space:pre;'>$d[ip_address]</td> | |
201 | <td style='white-space:pre;'>$d[browser_string]</td> | |
202 | </tr>"; | |
203 | } | |
204 | echo "</table><a href='?clear_php_session_id=$php_session_id'>CLEAR SESSION</a> - | |
205 | <a href='?sign_php_session_id=$php_session_id'>SIGNATURE FOUND</a><br> | |
206 | - <a href='?php_session_id=$php_session_id&follow_up=X'>ADD TO FOLLOW UP LIST Maryland General</a><br> | |
207 | - <a href='?php_session_id=$php_session_id&follow_up=1'>ADD TO FOLLOW UP LIST MGP</a><br> | |
208 | - <a href='?php_session_id=$php_session_id&follow_up=2'>ADD TO FOLLOW UP LIST MLP</a><br> | |
209 | - <a href='?php_session_id=$php_session_id&follow_up=3'>ADD TO FOLLOW UP LIST BTEC</a><br> | |
210 | - <a href='?php_session_id=$php_session_id&follow_up=7'>ADD TO FOLLOW UP LIST PG</a><br> | |
211 | - <a href='?php_session_id=$php_session_id&follow_up=8'>ADD TO FOLLOW UP LIST Ivey</a> | |
212 | "; | |
213 | }elseif(isset($_GET['php_session_id']) && isset($_GET['follow_up'])){ | |
214 | $php_session_id = $_GET['php_session_id']; | |
215 | echo "<h1>Adding Follow up for $php_session_id to $_GET[follow_up]</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
216 | $q = "SELECT * FROM presign where php_session_id = '$php_session_id' order by id desc "; | |
217 | $r = $petition->query($q); | |
218 | while($d = mysqli_fetch_array($r)){ | |
219 | ||
220 | $color = 'white'; | |
221 | $test = date('Y-m-d',strtotime($d['action_on'])); | |
222 | $pos = strpos($test, date('Y-m-d')); | |
223 | if ($pos !== false) { | |
224 | $color= 'yellow'; | |
225 | } | |
226 | if ($d[name] != ''){ | |
227 | $name = $d[name]; | |
228 | } | |
229 | if ($d[email_for_follow_up] != ''){ | |
230 | $email = $d[email_for_follow_up]; | |
231 | } | |
232 | echo "<tr style='background-color:$color;'> | |
233 | <td style='white-space:pre;'><b>$d[action_on]</b></td> | |
234 | <td style='white-space:pre;'>$d[php_page]</td> | |
235 | <td style='white-space:pre;'>".id2petition($d['petition'])."</td> | |
236 | <td style='white-space:pre;'>$d[invite]</td> | |
237 | <td style='white-space:pre;'>$d[invite_error]</td> | |
238 | <td style='white-space:pre;'>$d[name]</td> | |
239 | <td style='white-space:pre;'>$d[email_for_follow_up]</td> | |
240 | <td style='white-space:pre;'>$d[phone_for_validation]</td> | |
241 | <td style='white-space:pre;'>$d[presign_status]</td> | |
242 | <td style='white-space:pre;'>$d[ip_address]</td> | |
243 | <td style='white-space:pre;'>$d[browser_string]</td> | |
244 | </tr>"; | |
245 | } | |
246 | $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')."') "); | |
247 | $petition->query("update presign set presign_status = 'DONE' where php_session_id = '$php_session_id' "); | |
248 | $petition->query("update presign set presign_status = 'DONE' where email_for_follow_up = '$email' "); | |
249 | echo "</table>"; | |
250 | }elseif (isset($_GET['VTRID'])){ | |
251 | $VTRID = $_GET['VTRID']; | |
252 | $petition_id = $_GET['petition_id']; | |
253 | echo "<h1>Review $VTRID</h1><table width='100%' border='1' cellpadding='5' cellspacing='5'>"; | |
254 | $q = "SELECT * FROM signatures where VTRID = '$VTRID' and signature_status = 'verified' and petition_id = '$petition_id' order by petition_id, id DESC "; | |
255 | $r = $petition->query($q); | |
256 | $i=0; | |
257 | while($d = mysqli_fetch_array($r)){ | |
258 | $color = 'white'; | |
259 | $pos = strpos($d['date_time_signed'], date('Y-m-d')); | |
260 | if ($pos !== false) { | |
261 | $color= 'yellow'; | |
262 | } | |
263 | echo "<tr style='background-color:$color;'> | |
264 | <td><b>$d[date_time_signed]</b></td> | |
265 | <td><a href='?ip_address=$d[ip_address]'>$d[ip_address]</a></td> | |
266 | <td>".id2petition($d['petition_id'])."</td> | |
267 | <td>$d[signed_name_as]</td> | |
268 | <td>$d[signed_name_as_circulator]</td> | |
269 | <td>$d[contact_phone]</td> | |
270 | <td>$d[printed_status]</td> | |
271 | <td><a href='?flag_invalid_signature=$d[id]'>flag invalid signature</a></td> | |
272 | <td><a href='?flag_VTRID=$d[VTRID]'>flag VTRID</a></td> | |
273 | <td><a href='?flag_ip_address=$d[ip_address]'>flag ip address</a></td> | |
274 | <td><a href='?flag_duplicate=$d[id]'>flag duplicate</a></td> | |
275 | <td><a href='?flag_phone=$d[contact_phone]'>contact phone</a></td> | |
276 | <td><a href='?resign_requested=$d[id]'>resign requested</a></td> | |
277 | <td><a href='?bot=$d[id]'>bot</a></td> | |
278 | </tr>"; | |
279 | if ($i == 0){ | |
280 | js_redirect("analytics.php?flag_duplicate=$d[id]"); | |
281 | } | |
282 | $i++; | |
283 | } | |
284 | echo "</table>"; | |
285 | die(); | |
286 | } | |
287 | ?> | |
288 | ||
289 | <h1>Signature Analytics - Server Clock: <?PHP echo date('r');?></h1> | |
290 | <h2>NEVER NEVER NEVER CALL OR TEXT ANYONE - ONLY EMAIL!!!</h2> | |
291 | <h3>SysOp Says: Transparency = Trust</h3> | |
292 | <table> | |
293 | ||
294 | <tr> | |
295 | <td valign="top" colspan='2'><?PHP /* | |
296 | <h2>IP Address</h2> | |
297 | <div>Watching for duplicates.</div><ol> | |
298 | <?PHP | |
299 | $q="SELECT ip_address, petition_id,VTRID, COUNT(*) as count FROM signatures where signature_status = 'verified' group by ip_address, petition_id, VTRID"; | |
300 | $r = $petition->query($q); | |
301 | while($d = mysqli_fetch_array($r)){ | |
302 | if ($d['count'] > 1){ | |
303 | 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>"; | |
304 | } | |
305 | } | |
306 | ?></ol> | |
307 | </td><td valign="top"> */ ?> | |
308 | <h2>VTRID</h2> | |
309 | <div>Watching for duplicates.</div><ol> | |
310 | <?PHP | |
311 | $q="SELECT VTRID, petition_id, COUNT(*) as count FROM signatures where signature_status = 'verified' group by VTRID, petition_id"; | |
312 | $r = $petition->query($q); | |
313 | $i=0; | |
314 | while($d = mysqli_fetch_array($r)){ | |
315 | if ($d['count'] > 1){ | |
316 | 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>"; | |
317 | if ($i == 0){ | |
318 | js_redirect("analytics.php?VTRID=$d[VTRID]&petition_id=$d[petition_id]"); | |
319 | } | |
320 | $i++; | |
321 | } | |
322 | ||
323 | } | |
324 | ?></ol> | |
325 | </td></tr> | |
326 | ||
327 | ||
328 | <tr> | |
329 | <td valign="top" colspan='2'> | |
330 | <h2>Pre-Sign</h2> | |
331 | <div>Follow up requested - never signed.</div> | |
332 | <form method='GET'><input name='email'><input type='submit' value='SEARCH E-MAIL'></form><table> | |
333 | <?PHP | |
334 | ||
335 | ||
336 | ||
337 | $q="SELECT distinct php_session_id FROM presign where presign_status = 'NEW' and email_for_follow_up <> '' order by id $order"; | |
338 | $r = $petition->query($q); | |
339 | while($d = mysqli_fetch_array($r)){ | |
340 | $q2="SELECT * FROM presign where php_session_id = '$d[php_session_id]' order by id desc"; | |
341 | $r2 = $petition->query($q2); | |
342 | $d2 = mysqli_fetch_array($r2); | |
343 | $sig = ''; | |
344 | if ($d2['name'] != ''){ | |
345 | $q3 = "SELECT date_time_signed FROM signatures where signed_name_as = '$d2[name]'"; | |
346 | $r3 = $petition->query($q3); | |
347 | $d3 = mysqli_fetch_array($r3); | |
348 | if ($d3['date_time_signed'] != ''){ | |
349 | $sig = "<b><a href='?sign_email=$d2[email_for_follow_up]'>SIGNATURE $d3[date_time_signed]</a></b><br>"; | |
350 | js_redirect("analytics.php?sign_email=$d2[email_for_follow_up]"); | |
351 | } | |
352 | } | |
353 | $presig=''; | |
354 | $q4="SELECT * FROM presign where email_for_follow_up = '$d2[email_for_follow_up]' and php_page like '/sign.php%'"; | |
355 | $r4 = $petition->query($q4); | |
356 | $d4 = mysqli_fetch_array($r4); | |
357 | if ($d4['action_on']){ | |
358 | $presig = "<b><a href='?sign_email=$d2[email_for_follow_up]'>PRESIG $d4[action_on]</a></b><br>"; | |
359 | js_redirect("analytics.php?sign_email=$d2[email_for_follow_up]"); | |
360 | } | |
361 | $invite_error=''; | |
362 | $q4="SELECT * FROM presign where email_for_follow_up = '$d2[email_for_follow_up]' and invite_error <> '' "; | |
363 | $r4 = $petition->query($q4); | |
364 | $d4 = mysqli_fetch_array($r4); | |
365 | if ($d4['invite_error'] != ''){ | |
366 | $invite_error = "<b><a href='?clear_email=$d2[email_for_follow_up]'>$d4[invite_error]</a></b><br>"; | |
367 | js_redirect("analytics.php?clear_email=$d2[email_for_follow_up]"); | |
368 | } | |
369 | $php_session_id = $d2['php_session_id']; | |
370 | echo "<tr><td><a href='?php_session_id=$php_session_id'>$d2[action_on]</a></td><td>$presig $sig $invite_error</td> | |
371 | <td>$d2[name]</td><td><a href='?email=$d2[email_for_follow_up]'>$d2[email_for_follow_up]</a></td> | |
372 | <td>".id2petition($d2['petition'])."</td><td>$d2[invite]</td> | |
373 | <td><a href='?php_session_id=$php_session_id&follow_up=X'>General</a> | |
374 | - <a href='?php_session_id=$php_session_id&follow_up=1'>MGP</a> | |
375 | - <a href='?php_session_id=$php_session_id&follow_up=2'>MLP</a> | |
376 | - <a href='?php_session_id=$php_session_id&follow_up=3'>BTEC</a> | |
377 | - <a href='?php_session_id=$php_session_id&follow_up=7'>PG</a> | |
378 | - <a href='?php_session_id=$php_session_id&follow_up=8'>Ivey</a></td></tr>"; | |
379 | if( $presig == '' && $invite_error == '' && $sig == '' ){ | |
380 | if ($d2['invite'] == 'Ivey'){ | |
381 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=8"); | |
382 | die(); | |
383 | } | |
384 | if ($d2['invite'] == 'mlp'){ | |
385 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=2"); | |
386 | die(); | |
387 | } | |
388 | if ($d2['invite'] == 'BTEC'){ | |
389 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=3"); | |
390 | die(); | |
391 | } | |
392 | if ($d2['invite'] == 'RestorePGTermLimits'){ | |
393 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=7"); | |
394 | die(); | |
395 | } | |
396 | if (id2petition($d2['petition']) == 'RESTORE TWO TERM (8 YEAR) TERM LIMITS IN PRINCE GEORGE'){ | |
397 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=7"); | |
398 | die(); | |
399 | } | |
400 | if ($d2['invite'] == 'mgp'){ | |
401 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=1"); | |
402 | die(); | |
403 | } | |
404 | js_redirect("analytics.php?php_session_id=$php_session_id&follow_up=X"); // no invite found no petition found - send general follow/up | |
405 | } | |
406 | } | |
407 | ?></table> | |
408 | </td> | |
409 | </tr> | |
410 | <tr> | |
411 | <td valign="top" colspan='2'> | |
412 | <h2>Signatures</h2> | |
413 | <div>Last 10</div><ol> | |
414 | <?PHP | |
415 | $q="SELECT * FROM signatures where signature_status = 'verified' order by id desc limit 0, 10"; | |
416 | $r = $petition->query($q); | |
417 | while($d = mysqli_fetch_array($r)){ | |
418 | echo "<li>$d[date_time_signed] ".id2petition($d['petition_id'])." $d[signed_name_as]</li>"; | |
419 | } | |
420 | ?></ol> | |
421 | ||
422 | </td> | |
423 | ||
424 | </tr> | |
425 | <tr><td valign="top"> | |
426 | <h2>VTRID Bugs</h2> | |
427 | <div>Watching for 0</div><ol> | |
428 | <?PHP | |
429 | $q="SELECT * FROM signatures where VTRID = '0' and signature_status <> 'bot' and signature_status <> 'flag_invalid_signature' and signature_status <> 'resign_requested'"; | |
430 | $r = $petition->query($q); | |
431 | while($d = mysqli_fetch_array($r)){ | |
432 | 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>"; | |
433 | } | |
434 | ?></ol> | |
435 | </td><td valign="top"> | |
436 | <h2>Petition ID Bugs</h2> | |
437 | <div>Watching for 0</div><ol> | |
438 | <?PHP | |
439 | $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'"; | |
440 | $r = $petition->query($q); | |
441 | while($d = mysqli_fetch_array($r)){ | |
442 | 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>"; | |
443 | } | |
444 | ?></ol> | |
445 | </td></tr><tr><td valign="top"> | |
446 | <?PHP ob_start(); ?> | |
447 | <h2>resign_requested</h2> | |
448 | <div>These are most likely from early bugs</div><ol> | |
449 | <?PHP | |
450 | $q="SELECT * FROM signatures where signature_status = 'resign_requested' order by ip_address"; | |
451 | $r = $petition->query($q); | |
452 | $show = 0; | |
453 | while($d = mysqli_fetch_array($r)){ | |
454 | $show = 1; | |
455 | 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>"; | |
456 | } | |
457 | ?></ol> | |
458 | <?PHP $html = ob_get_clean(); if ( $show == 1 ){ echo $html; } ?> | |
459 | </td> | |
460 | ||
461 | <td valign="top"> | |
462 | <?PHP ob_start(); ?> | |
463 | <h2>bots</h2> | |
464 | <div>These are bots on the site.</div><ol> | |
465 | <?PHP | |
466 | $q="SELECT * FROM signatures where signature_status = 'bot' order by ip_address"; | |
467 | $r = $petition->query($q); | |
468 | $show = 0; | |
469 | while($d = mysqli_fetch_array($r)){ | |
470 | $show = 1; | |
471 | 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>"; | |
472 | } | |
473 | ?></ol> | |
474 | <?PHP $html = ob_get_clean(); if ( $show == 1 ){ echo $html; } ?> | |
475 | ||
476 | </td> | |
477 | ||
478 | ||
479 | </tr> | |
480 | ||
481 | </table> | |
482 | ||
483 | ||
484 | <?PHP | |
485 | // allow headers to be sent... | |
486 | $html = ob_get_clean(); | |
487 | echo $html; // run javascript | |
488 | ||
489 | include_once('footer.php'); | |
490 | ?> |