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'); | |
f49d1b19 PM |
13 | if (isset($_GET['ip_address'])){ |
14 | $ip = $_GET['ip_address']; | |
4b205268 | 15 | echo "<h1>Review $ip</h1>"; |
7ce3d9ec | 16 | $q = "SELECT * FROM signatures where ip_address = '$ip' "; |
45bc6a1e | 17 | $r = $petition->query($q); |
7ce3d9ec | 18 | while($d = mysqli_fetch_array($r)){ |
ddf81026 | 19 | echo "<li><b>$d[date_time_signed]</b> <a href='?VTRID=$d[VTRID]'>$d[VTRID]</a> $d[petition_id] $d[signed_name_as] $d[signed_name_as_circulator] $d[contact_phone] $d[signature_status]</li>"; |
7ce3d9ec | 20 | } |
f49d1b19 PM |
21 | }elseif (isset($_GET['VTRID'])){ |
22 | $VTRID = $_GET['VTRID']; | |
4b205268 | 23 | echo "<h1>Review $VTRID</h1>"; |
7ce3d9ec | 24 | $q = "SELECT * FROM signatures where VTRID = '$VTRID' "; |
45bc6a1e | 25 | $r = $petition->query($q); |
7ce3d9ec | 26 | while($d = mysqli_fetch_array($r)){ |
ddf81026 | 27 | echo "<li><b>$d[date_time_signed]</b> <a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> $d[petition_id] $d[signed_name_as] $d[signed_name_as_circulator] $d[contact_phone] $d[signature__status]</li>"; |
7ce3d9ec | 28 | } |
f49d1b19 | 29 | } |
5623205d | 30 | ?> |
4b205268 | 31 | |
5623205d | 32 | <h1>Abuses</h1> |
f49d1b19 PM |
33 | <h2>IP Address List</h2> |
34 | <div>Watch for duplicates.</div> | |
5623205d | 35 | <?PHP |
3f6ea8f9 | 36 | $q="SELECT ip_address, petition_id, COUNT(*) as count FROM signatures group by ip_address"; |
5623205d PM |
37 | $r = $petition->query($q); |
38 | while($d = mysqli_fetch_array($r)){ | |
4b205268 PM |
39 | if ($d['count'] > 1){ |
40 | echo "<li><a href='?ip_address=$d[ip_address]'>$d[ip_address]</a> $d[petition_id] <b>$d[count]</b></li>"; | |
41 | } | |
5623205d PM |
42 | } |
43 | ?> | |
44 | ||
f49d1b19 PM |
45 | <h2>VTRID List</h2> |
46 | <div>Watch for duplicates.</div> | |
1b0319d4 | 47 | <?PHP |
3f6ea8f9 | 48 | $q="SELECT VTRID, petition_id, COUNT(*) as count FROM signatures group by VTRID"; |
1b0319d4 | 49 | $r = $petition->query($q); |
4b205268 PM |
50 | while($d = mysqli_fetch_array($r)){ |
51 | if ($d['count'] > 1){ | |
52 | echo "<li><a href='?VTRID=$d[VTRID]'>$d[VTRID]</a> $d[petition_id] <b>$d[count]</b></li>"; | |
53 | } | |
1b0319d4 PM |
54 | } |
55 | ?> | |
56 | ||
5623205d PM |
57 | |
58 | <?PHP | |
59 | include_once('footer.php'); | |
60 | ?> |