diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-01-31 04:10:59 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-01-31 04:10:59 -0800 |
commit | 27f1a758f0f312e6dedb18f47ce86a6fd1d05d12 (patch) | |
tree | 05dce0efa9ccede3b84437ce067152ac7cf313f5 /pages/admin.php | |
parent | 2fb5da215a7b286b71f8c4d0126c72a06e41935e (diff) | |
download | pathery-27f1a758f0f312e6dedb18f47ce86a6fd1d05d12.tar.xz |
Error logging. .htaccess cacheing. Modified doredirect to use $mydomain
Diffstat (limited to 'pages/admin.php')
-rw-r--r-- | pages/admin.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pages/admin.php b/pages/admin.php index 630879a..bda527d 100644 --- a/pages/admin.php +++ b/pages/admin.php @@ -30,11 +30,17 @@ if ($_GET['applyall'] == 'true') { else if ($_GET['recalcStats'] == 'true') {
echo "Recalculating all player stats...";
flush(); //This sends the above echo
-
recalculateStatsForAllPlayers();
-
echo "Complete!";
}
+else if ($_GET['deleteErrors'] == 'true') {
+ echo "Deleting error log...";
+ flush(); //This sends the above echo
+ $today = date("Y-m-d H:i:s");
+ file_put_contents("includes/errorlogs.txt", "LOG START $today \n");
+
+ echo "Log restarted!";
+}
$sql = "SELECT `ID`, `displayName`, `dateJoined`, `dateLogin`, `email`, `isAdmin` FROM `users`";
@@ -47,7 +53,10 @@ echo ' <p>Buttons:<br />
<input type="button" value="Apply all achievements" onClick="parent.location=\'admin?applyall=true\'">
<input type="button" value="Recalculate all player stats" onClick="parent.location=\'admin?recalcStats=true\'">
+ <input type="button" value="Delete Errorlog" onClick="parent.location=\'admin?deleteErrors=true\'">
</p>
+<p>Links: <a href="errorlogs">View Errorlog.txt</a></p>
+
<p>Hello admins, this is our current userlist.</p>
</center>
<table style="padding-left:20px;">
|