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