From d156fc32c374ab5572c975302118f761c6f45c9c Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Thu, 21 May 2020 17:07:21 -0400 Subject: [PATCH] Update report.php --- admin/report.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/report.php b/admin/report.php index 0f2fbb2..557a2ae 100644 --- a/admin/report.php +++ b/admin/report.php @@ -5,13 +5,17 @@ slack_general('ADMIN: Reports Loaded ('.$_COOKIE['name'].') ('.$_COOKIE['level'] $group_id = $_COOKIE['group_id']; $q="SELECT * FROM petitions where group_id = '$group_id' and admin_status = 'approved'"; $r = $petition->query($q); +$hide = array(); while($d = mysqli_fetch_array($r)){ echo "

$d[petition_name]

"; $pID = $d['petition_id']; - $q2="SELECT * FROM signatures where petition_id = '$pID'"; + $q2="SELECT * FROM signatures where petition_id = '$pID' order by id desc"; $r2 = $petition->query($q2); while($d2 = mysqli_fetch_array($r2)){ - echo "
  • $d2[date_time_signed] $d2[signed_name_as] $d2[signed_name_as_circulator] $d2[contact_phone]
  • "; + if (!in_array($d2['VTRID'], $hide)) { + $hide[] = $d2['VTRID']; + echo "
  • $d2[date_time_signed] $d2[signed_name_as] $d2[signed_name_as_circulator] $d2[contact_phone]
  • "; + } } } -- 2.20.1