Skip to content

Commit

Permalink
Merge pull request #2 from hawaiianchimp/develop
Browse files Browse the repository at this point in the history
Improving the stats and statistics
  • Loading branch information
seantomburke committed Feb 22, 2013
2 parents 29349fc + 5daddcb commit 8edbce5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
3 changes: 0 additions & 3 deletions event.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,8 @@

$bottom_stats = $majors_stat->display();

if($scan['eid'] != 0)
{
$box_stat = new Box('Statistics', $bottom_stats);
$stat_display = '<div class="separator"></div>'.$box_stat->display("full");
}
$content = $box->display().$stat_display;

$page->setContent($content);
Expand Down
48 changes: 44 additions & 4 deletions scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,61 @@
</div>';
}
}

$total_count = $page->DB->countOf('scans', 'eid = "'.$_GET['eid'].'"');

$bottom .= '
<form id="select_event" action="'.$_SERVER['PHP_SELF'].'" method="GET">
<div class="row '.$error_class_event_menu.'">
<label for="eid">Event</label>'
<label for="eid" class="fieldname">Event</label>'
.$event_menu->display().'
</div>
</form>
<script>
$("#eid").change(function () {
$("#select_event").submit();
});
</script>
<div class=" ">
</script>';
if($scan['eid'] != 0)
{

$bottom .= ' <div class="row">
<label class="fieldname">Date</label>
<div class="textarea">
'.date('l, M d, Y',strtotime($event->date)).'
</div>
</div>
<div class="row">
<label class="fieldname">Time</label>
<div class="textarea">
'.date('g:i a',strtotime($event->time)).'
</div>
</div>
<div class="row">
<label class="fieldname">Host</label>
<div class="textarea">
'.$event->host.'
</div>
</div>
<div class="row">
<label class="fieldname">Prize</label>
<div class="textarea">
'.$event->prize.'
</div>
</div>
<div class="row">
<label class="fieldname">Description</label>
<div class="textarea">
'.$event->description.'
</div>
</div>
<div class="row">
<label class="fieldname">Total Participants</label>
<div class="textarea">
'.$total_count.'
</div>
</div>';
}
$bottom .= ' <div class=" ">
<div class="separator"></div>
<form action="'.$_SERVER['PHP_SELF'].'" method="GET">
<div class="row">
Expand Down

0 comments on commit 8edbce5

Please sign in to comment.