diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-02-18 23:29:31 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-02-18 23:29:31 -0800 |
commit | 895690e7e54079851d534bea2b35a25840434ac7 (patch) | |
tree | 0759ec35c368ce965380860153ac744482c299dd /pages/admin.php | |
parent | 05b682c22f2dadf483b8a2842b4065acc34872af (diff) | |
download | pathery-895690e7e54079851d534bea2b35a25840434ac7.tar.xz |
More chat fixes
Diffstat (limited to 'pages/admin.php')
-rw-r--r-- | pages/admin.php | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/pages/admin.php b/pages/admin.php index d86d042..24feda4 100644 --- a/pages/admin.php +++ b/pages/admin.php @@ -11,6 +11,7 @@ include_once('./includes/maps.php'); include_once('./includes/mapoftheday.php');
include_once('./includes/sqli.php');
include_once('./includes/playerStats.php');
+include_once('./includes/chats.php');
if ($_GET['applyall'] == 'true') {
echo "Apply-All command heard. Executing...";
@@ -43,22 +44,10 @@ else if ($_GET['deleteErrors'] == 'true') { }
else if ($_POST['muteUser'] == 'true') {
- muteUser($_POST['muteUserID'], $_POST['muteHours']);
- echo "User ID ".$_POST['muteUserID']." muted for ".$_POST['muteHours']." hours";
+ muteUser($_POST['muteUserID'], $_POST['muteMinutes']);
+ echo "User ID ".$_POST['muteUserID']." muted for ".$_POST['muteMinutes']." minutes";
}
-function muteUser($userID, $numHours) {
- global $mysqli;
- $stmt = $mysqli->prepare("UPDATE `users`
- SET `dateChatGaggedUntil` = ADDDATE(CURDATE(), INTERVAL ? HOUR)
- WHERE `ID` = ?");
- $stmt->bind_param('ii', $numHours, $userID);
- $stmt->execute();
- return;
-}
-
-
-
$sql = "SELECT `ID`, `displayName`, `dateJoined`, `dateLogin`, `email`, `isAdmin` FROM `users`";
$result = mysql_query($sql);
@@ -79,7 +68,7 @@ $result = mysql_query($sql); <input type="hidden" name="muteUser" value="true">
<input type="submit" value='MUTE USER'>
USERID:<input type="text" name="muteUserID" id="muteUserID" value="" maxlength="20" autocomplete="off" >
- LENGTH IN HOURS:<input type="text" name="muteHours" id="muteHours" value="" maxlength="20" autocomplete="off" >
+ LENGTH IN MINUTES:<input type="text" name="muteMinutes" id="muteMinutes" value="" maxlength="20" autocomplete="off" >
</form>
</center>
|