<?php
/* Murmur WebAdministrator - Administration of Murmur Server on web for end users.
Copyright (C) 2009 Kevin Traub
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
include 'config.php';
include 'functions.php';
if ($_SESSION['IsAdmin'] != "1") {
echo "<META HTTP-EQUIV='refresh' CONTENT='0;URL=/login.php'>";
exit();
}
$uname = $_REQUEST['uname'];
$user = $server->getRegisteredPlayers($uname);
$uid = $user[0]->playerid;
$sess = $_REQUEST['sess'];
echo basecss();
echo basemenu($logged, $meta, $serverid);
switch ($_REQUEST['Submit']) {
case 'ban' :
$bans = $server->getBans();
print_r($bans);
break;
case 'kick' :
$server->kickPlayer((int)$sess,"Kicked by Admin Control Panel");
echo "<div class='header'>Player Kicked!</div>";
echo "<META HTTP-EQUIV='refresh' CONTENT='3;URL=/liveview.php'>";
break;
case 'Send Message':
$message = $_REQUEST['message'];
$server->sendMessage((int)$sess, $message);
echo "<div class='header'>Message Sent!</div>";
break;
case 'send':
echo "<div class='header'>Send Message to Player</div>\n";
echo "<form method='POST' name='playmess' action='".$_SERVER['PHP_SELF']."'>\n";
echo "<input type='hidden' name='sess' value='$sess'>\n";
echo "<input type='hidden' name='uname' value='$uname'>\n";
echo "Message: <input type='text' name='message' size='100'><br>\n";
echo "<input type='submit' value='Send Message' name='Submit'><br><hr>\n";
echo "</form>\n";
echo "</div>\n";
break;
case 'email' :
break;
}
include 'footer.php';
?>