Commit | Line | Data |
---|---|---|
5623205d PM |
1 | <?PHP |
2 | include_once('../slack.php'); | |
3 | include_once('security.php'); | |
4 | if ($_COOKIE['level'] == 'user'){ | |
5 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
6 | header('Location: user_home.php'); | |
7 | } | |
8 | if ($_COOKIE['level'] == 'manager'){ | |
9 | slack_general('ADMIN: Redirect Manager Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); | |
10 | header('Location: manager_home.php'); | |
11 | } | |
12 | include_once('header.php'); | |
73a94d3f PM |
13 | if (isset($_GET['flag_invalid_signature'])){ |
14 | $id = $_GET['flag_invalid_signature'] | |
15 | $petition->query("update signatures set signature_status = 'flag_invalid_signature' where id = '$id' "); | |
16 | } | |
f49d1b19 PM |
17 | if (isset($_GET['ip_address'])){ |
18 | $ip = $_GET['ip_address']; | |
3a0177c8 | 19 | echo "<h1>Review $ip</h1><table>"; |
7ce3d9ec | 20 | $q = "SELECT * FROM signatures where ip_address = '$ip' "; |
45bc6a1e | 21 | $r = $petition->query($q); |
7ce3d9ec | 22 | while($d = mysqli_fetch_array($r)){ |
73a94d3f | 23 | echo "<tr><td><b>$d[date_time_signed]</b></td><td><a href='?VTRID=$d[VTRID]'>$d[VTRID]</a></td><td>$d[petition_id]</td><td>$d[signed_name_as]</td><td>$d[signed_name_as_circulator]</td><td>$d[contact_phone]</td><td>$d[signature_status]</td><td>$d[printed_status]</tr>"; |
7ce3d9ec | 24 | } |
3a0177c8 | 25 | echo "</table>"; |
f49d1b19 PM |
26 | }elseif (isset($_GET['VTRID'])){ |
27 | $VTRID = $_GET['VTRID']; | |
3a0177c8 | 28 | echo "<h1>Review $VTRID</h1><table>"; |
7ce3d9ec | 29 | $q = "SELECT * FROM signatures where VTRID = '$VTRID' "; |
45bc6a1e | 30 | $r = $petition->query($q); |
7ce3d9ec | 31 | while($d = mysqli_fetch_array($r)){ |
73a94d3f | 32 | echo "<tr><td><b>$d[date_time_signed]</b></td><td><a href='?ip_address=$d[ip_address]'>$d[ip_address]</a></td><td>$d[petition_id]</td><td>$d[signed_name_as]</td><td>$d[signed_name_as_circulator]</td><td>$d[contact_phone]</td><td>$d[signature_status]</td><td>$d[printed_status]</td><td><a href='?flag_invalid_signature=$d[id]'>flag_invalid_signature</a></td></tr>"; |
7ce3d9ec | 33 | } |
3a0177c8 | 34 | echo "</table>"; |
f49d1b19 | 35 | } |
5623205d | 36 | ?> |
4b205268 | 37 | |
5623205d | 38 | <h1>Abuses</h1> |
f49d1b19 PM |
39 | <h2>IP Address List</h2> |
40 | <div>Watch for duplicates.</div> | |
5623205d | 41 | <?PHP |
3f6ea8f9 | 42 | $q="SELECT ip_address, petition_id, COUNT(*) as count FROM signatures group by ip_address"; |
5623205d PM |
43 | $r = $petition->query($q); |
44 | while($d = mysqli_fetch_array($r)){ | |
4b205268 PM |
45 | if ($d['count'] > 1){ |
46 | echo "<li><a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> $d[petition_id] <b>$d[count]</b></li>"; | |
47 | } | |
5623205d PM |
48 | } |
49 | ?> | |
50 | ||
f49d1b19 PM |
51 | <h2>VTRID List</h2> |
52 | <div>Watch for duplicates.</div> | |
1b0319d4 | 53 | <?PHP |
3f6ea8f9 | 54 | $q="SELECT VTRID, petition_id, COUNT(*) as count FROM signatures group by VTRID"; |
1b0319d4 | 55 | $r = $petition->query($q); |
4b205268 PM |
56 | while($d = mysqli_fetch_array($r)){ |
57 | if ($d['count'] > 1){ | |
58 | echo "<li><a href='?VTRID=$d[VTRID]'>$d[VTRID]</a> $d[petition_id] <b>$d[count]</b></li>"; | |
59 | } | |
1b0319d4 PM |
60 | } |
61 | ?> | |
62 | ||
5623205d PM |
63 | |
64 | <?PHP | |
65 | include_once('footer.php'); | |
66 | ?> |