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