/* @author: Victory @site: http://dfhu.org @copyright: dfhu.org @report_bugs: bugs(at)dfhu.org @feature_request: features(at)dfhu.org @file: @license: BSD @description: This file is great. */ require "./login_is.php"; require "../includes/db.inc.php"; $db_dir = DB_DIR; if (!preg_match("/freetale(form)?.sqlite\$/", $_GET['db'])) { echo "BAD DATABSE"; exit; } $db = new DBx(DB_DIR . $_GET['db']); if (preg_match("/freetale.sqlite\$/", $_GET['db'])) { $sql = "\nSELECT id,url FROM tics \n GROUP BY id\n"; $stats_type = "replay"; } else { $sql = "\nSELECT id,url FROM actions\n GROUP BY id\n"; $stats_type = "form_view"; } $db->q($sql); // TODO: Really need to make this stop sucking so bad $template = "\n<a \n href=\"admin_{$stats_type}.php?id=%id%&url=%url%&db={$_GET['db']}\"\n >%id% %url%</a>\n<a \n href=\"admin_{$stats_type}_summary.php?url=%url%&db={$_GET['db']}\"\n >Summary</a>\n<br>"; $db->while_row($template);