. */ include("./include/include.php"); page_header(); $period['all'] = "This includes all applications made, independent of the acceptance status of the participant."; $period['accepted'] = "This includes only applications that are either accepted, pending or confirmed."; $period['arrived'] = "This includes only applications of people that did register with the local organisers."; if( isset($_GET['period']) AND array_key_exists($_GET['period'], $period) ) $_SESSION['statistics_period'] = $_GET['period']; if( !isset($_SESSION['statistics_period']) ) $_SESSION['statistics_period'] = "all"; echoln("

Statistics

"); echoln("On this page, you can show some statistics about this application. The statistics are not real-time, but generated at regular intervals."); $query = "SELECT `selection` FROM `statistics` GROUP BY `selection` ORDER BY `selection`"; if( @mysql_num_rows( $res=doquery($query) )>0 ) { echoln("

Selection:

"); echoln("Applications included in the statistics:"); echoln(""); if( !in_array($_SESSION['statistics_period'], $options) ) $_SESSION['statistics_period'] = $options[0]; } $query = "SELECT `id`, `title`, `date`, `html`, `image_height`, `image_width` FROM `statistics` WHERE `selection`='".addslashes($_SESSION['statistics_period'])."' ORDER BY `title`"; if( @mysql_num_rows( $res=doquery($query) )>0 ) { echoln("Statistics of:"); echoln(""); mysql_data_seek($res, 0); while( $row=mysql_fetch_array($res) ) { echoln("

".$row['title'].($_SESSION['statistics_period']=="all"?"":" (".$_SESSION['statistics_period']." only)")."

"); echoln("".date("d.m.Y H:i:s T", strtotime($row['date'])).""); echoln(""); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln("
"); echoln(" \"".$row['title']."\""); echoln(" "); echoln(" ".$row['html']); echoln("
"); echoln("Top"); } }else { echoln("

No statistics available currently."); echoln("
At the moment no statistics are available. This can be caused by the fact that too little applications exist currently to generate statistics, or because they are being regenerated at the moment. Please try again later."); } page_footer(); ?>