From 1fed640ec4a7f97e68c11f75300aadda4e75405a Mon Sep 17 00:00:00 2001 From: jonsowman Date: Mon, 23 Aug 2010 11:40:38 +0000 Subject: [PATCH] Added admin.php for showing recent predictions --- predict/admin.php | 39 +++++++++++++++++++++++++++++++++++++++ predict/preds/empty | 0 2 files changed, 39 insertions(+) create mode 100644 predict/admin.php delete mode 100644 predict/preds/empty diff --git a/predict/admin.php b/predict/admin.php new file mode 100644 index 0000000..c725203 --- /dev/null +++ b/predict/admin.php @@ -0,0 +1,39 @@ + + +CUSF Landing Predictor V2.0 Admin + + + + 14 ) { + $limit = 1; +} else { + $limit = $_GET['limit']; +} +$threshold = time() - $limit*60*60*24; + +$dirs = scandir(PREDS_PATH); +foreach( $dirs as $dir ) { + if ( is_dir(PREDS_PATH . $dir) && $dir != '.' && $dir != '..' && filemtime(PREDS_PATH.$dir) > $threshold ) + $uuid_list[] = $dir; +} + +$i=1; +echo ''; +echo ''; +foreach( $uuid_list as $uuid ) { + echo ''; + $i++; +} +echo '
IndexUUIDView
' . $i . '' . $uuid . ''; + echo 'View'; + echo '
'; + +?> + diff --git a/predict/preds/empty b/predict/preds/empty deleted file mode 100644 index e69de29..0000000