X-Git-Url: http://git.hcoop.net/clinton/MarylandElectronicPetitionSignature.git/blobdiff_plain/74de7e62baaeb4ea4963a0442dcd9bfa550ef043..8cc862dded131738786a5e46c725d47bde4e1d08:/admin/report.php diff --git a/admin/report.php b/admin/report.php index 3546af2..0518595 100644 --- a/admin/report.php +++ b/admin/report.php @@ -40,6 +40,119 @@ $javascript=''; legend{ border: solid 1px blue; background-color:white; margin:10px; padding:10px; } td{ white-space: pre; } +$q"; +$r = $petition->query($q); +while($d = mysqli_fetch_array($r)){ + $pID = $d['petition_id']; + echo "
"; + $chart=''; + $chart2=''; + $chart3=''; + $q3 = "SELECT just_date FROM signatures where petition_id = '$pID' and just_date <> '0000-00-00' group by just_date"; + //echo "
  • $q3
  • "; + $r3 = $petition->query($q3); + $total=0; + $goal = $d['signature_goal']; + if ($goal == 0){ + $goal = 10000; + } + while ($d3 = mysqli_fetch_array($r3)){ + $just_date = $d3['just_date']; + $q2 = "SELECT * FROM signatures where petition_id = '$pID' and just_date = '$just_date' and signature_status = 'verified' "; + //echo "
  • $q2
  • "; + $r2 = $petition->query($q2); + $count = mysqli_num_rows($r2); + $chart .= '{ label: "'.$just_date.'", y: '.intval($count).' }, '; + $total = $total + intval($count); + $chart2 .= '{ label: "'.$just_date.'", y: '.intval($total).' }, '; + $goal = $goal - intval($count); + $chart3 .= '{ label: "'.$just_date.'", y: '.intval($goal).' }, '; + } + $chart = rtrim(trim($chart), ","); + $chart2 = rtrim(trim($chart2), ","); + $chart3 = rtrim(trim($chart3), ","); + + ob_start(); ?> + + var chart = new CanvasJS.Chart("chartContainer", { + theme:"light2", + animationEnabled: true, + exportEnabled: true, + title:{ + text: " MD-Petition.com Signature Tracker" + }, + axisY :{ + includeZero: false, + title: "Number of Signatures", + suffix: "", + scaleBreaks: { + autoCalculate: true + } + }, + toolTip: { + shared: "true" + }, + legend:{ + cursor:"pointer", + itemclick : toggleDataSeries + }, + data: [{ + type: "line", + visible: true, + showInLegend: true, + yValueFormatString: "#####", + name: "Total Signatures Count", + dataPoints: [ + + ] + },{ + type: "line", + visible: true, + showInLegend: true, + yValueFormatString: "#####", + name: "Signatures Remaining to Goal", + dataPoints: [ + + ] + },{ + type: "column", + visible: true, + showInLegend: true, + yValueFormatString: "#####", + name: "New Daily Signatures", + dataPoints: [ + + ] + }] + } + + + ); + chart.render(); + + + + + + + + + + + + + + + +
    query($q); while($d = mysqli_fetch_array($r)){ - echo "
    $d[petition_name] - Unprinted -
    + echo "
    $d[petition_name] - Unprinted Check All Uncheck All "; @@ -59,87 +171,68 @@ while($d = mysqli_fetch_array($r)){ unset($hide); $hide = array(); $pID = $d['petition_id']; - $q2="SELECT * FROM signatures where petition_id = '$pID' and printed_status = '' and signature_status <> 'deleted' order by signature_status, id desc"; + $q2="SELECT * FROM signatures where petition_id = '$pID' and printed_status = '' and signature_status = 'verified' order by signature_status, id desc"; $r2 = $petition->query($q2); while($d2 = mysqli_fetch_array($r2)){ if ($d2['signature_status'] == 'verified'){ - echo "$d2[ip_address]$d2[date_time_signed]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]-Flag for Review$d2[printed_status]"; + $id = $d2['id']; + echo " + $d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]-Flag for Review$d2[printed_status]"; }else{ - echo "Override or Delete$d2[ip_address]$d2[date_time_signed]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]$d2[printed_status]"; + echo " + Override or Delete$d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]$d2[printed_status]"; } } echo '
    '; -$chart=''; -$chart2=''; -$q = "SELECT just_date FROM signatures where petition_id = '$pID' and just_date <> '0000-00-00' group by just_date"; -$r = $core->query($q); -$total=0; -while ($d = mysqli_fetch_array($r)){ - $q2 = "SELECT * FROM signatures where petition_id = '$pID' and just_date = '$d[just_date]' "; - $r2 = $core->query($q2); - $count = mysqli_num_rows($r2); - $chart .= '{ label: "'.$d['just_date'].'", y: '.intval($count).' }, '; - $total = $total + intval($count); - $chart2 .= '{ label: "'.$d['just_date'].'", y: '.intval($total).' }, '; -} -$chart = rtrim(trim($chart), ","); -$chart2 = rtrim(trim($chart2), ","); + - ob_start(); ?> - var chart = new CanvasJS.Chart("chartContainer", { - theme:"light2", - animationEnabled: true, - exportEnabled: true, - title:{ - text: " MD-Petition.com Signature Tracker" - }, - axisY :{ - includeZero: false, - title: "Number of Signatures", - suffix: "", - scaleBreaks: { - autoCalculate: true - } - }, - toolTip: { - shared: "true" - }, - legend:{ - cursor:"pointer", - itemclick : toggleDataSeries - }, - data: [{ - type: "spline", - visible: true, - showInLegend: true, - yValueFormatString: "#####", - name: "Total Signatures", - dataPoints: [ - - ] - },{ - type: "bar", - visible: true, - showInLegend: true, - yValueFormatString: "#####", - name: "New Signatures", - dataPoints: [ - - ] - }] -} - - - ); -chart.render(); - + + + + + +
    +query($q); +while($d = mysqli_fetch_array($r)){ + echo "
    $d[petition_name] - Flagged for Deletion or Override + Check All + Uncheck All + "; + echo ""; + unset($hide); + $hide = array(); + $pID = $d['petition_id']; + $q2="SELECT * FROM signatures where petition_id = '$pID' and printed_status = '' and signature_status <> 'deleted' and signature_status <> 'verified' order by signature_status, id desc"; + $r2 = $petition->query($q2); + while($d2 = mysqli_fetch_array($r2)){ + if ($d2['signature_status'] == 'verified'){ + echo " + "; + }else{ + echo " + "; + } + } + echo '
    $d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]-Flag for Review$d2[printed_status]
    Override or Delete$d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]$d2[printed_status]
    '; + } ?>
    + + +
    .render(); } $r = $petition->query($q); while($d = mysqli_fetch_array($r)){ - echo "
    $d[petition_name] - Printed + echo "
    $d[petition_name] - Printed Check All Uncheck All "; @@ -162,9 +255,9 @@ while($d = mysqli_fetch_array($r)){ $r2 = $petition->query($q2); while($d2 = mysqli_fetch_array($r2)){ if ($d2['signature_status'] == 'verified'){ - echo "$d2[ip_address]$d2[date_time_signed]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]-Flag for Review$d2[printed_status]"; + echo "$d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]-Flag for Review$d2[printed_status]"; }else{ - echo "Override or Delete$d2[ip_address]$d2[date_time_signed]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]$d2[printed_status]"; + echo "Override or Delete$d2[ip_address]$d2[date_time_signed]$d2[VoterList_table]$d2[signed_name_as]$d2[signed_name_as_circulator]$d2[contact_phone]$d2[signature_status]$d2[printed_status]"; } } echo '
    ';