Update report.php
[clinton/MarylandElectronicPetitionSignature.git] / admin / report.php
CommitLineData
e3599ddc
PM
1<?PHP
2include_once('security.php');
3include_once('header.php');
9970efb3 4slack_general('ADMIN: Reports Loaded ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition');
f1f9b284 5$group_id = $_COOKIE['group_id'];
66c9275f 6$q="SELECT * FROM petitions where group_id = '$group_id' and admin_status = 'approved'";
f1f9b284 7$r = $petition->query($q);
d156fc32 8$hide = array();
ef5d85f4
PM
9?>
10
184838ff 11<table border="1" cellpadding='0' cellspacing='5'>
ef5d85f4 12<?PHP
f1f9b284
PM
13while($d = mysqli_fetch_array($r)){
14 echo "<h1>$d[petition_name]</h1>";
66c9275f 15 $pID = $d['petition_id'];
d156fc32 16 $q2="SELECT * FROM signatures where petition_id = '$pID' order by id desc";
f1f9b284
PM
17 $r2 = $petition->query($q2);
18 while($d2 = mysqli_fetch_array($r2)){
d156fc32
PM
19 if (!in_array($d2['VTRID'], $hide)) {
20 $hide[] = $d2['VTRID'];
184838ff 21 echo "<tr><td><input type='checkbox'></td><td>$d2[date_time_signed]</td><td>$d2[signed_name_as]</td><td>$d2[signed_name_as_circulator]</td><td>$d2[contact_phone]</td></tr>";
d156fc32 22 }
f1f9b284
PM
23 }
24}
ef5d85f4
PM
25?>
26</table>
27 <?PHP
e3599ddc
PM
28include_once('footer.php');
29?>