<?php
$users = array("jeroenvanvooren"); $passwords = array("jeroenvanvooren" => "**************");
if(!isset($_REQUEST['password']) && !isset($_REQUEST['username'])) { die ("<br><br><br><table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" align=\"center\" valign=\"midle\"><tr><td><fieldset><legend>Login</legend><form method=\"post\">Username: <input name=\"username\" type=\"text\" size=\"12\" maxlength=\"50\"><br>Password: <input name=\"password\" type=\"text\" size=\"12\" maxlength=\"50\"><br><input type=\"submit\" name=\"login\"></form></fieldset></td></tr></table>");
if($_REQUEST['password'] != $passwords[$_REQUEST['username']])
die ("Wrong username/password!"); else {
$_SESSION['username'] == $_REQUEST['username'];
$_SESSION['password'] == $_REQUEST['password'];
header("location: index.php"); }
if($_REQUEST['action'] == "add") {
if(isset($_REQUEST['add'])) { $access = $_REQUEST['a'].$_REQUEST['b'].$_REQUEST['c'].$_REQUEST['d'].$_REQUEST['e'].$_REQUEST['f'].$_REQUEST['g'].$_REQUEST['h'].$_REQUEST['i'].$_REQUEST['j'].$_REQUEST['k'].$_REQUEST['l'].$_REQUEST['m'].$_REQUEST['n'].$_REQUEST['o'].$_REQUEST['p'].$_REQUEST['q'].$_REQUEST['r'].$_REQUEST['s'].$_REQUEST['t'].$_REQUEST['u'];
mysql_query("INSERT INTO admins VALUES ('".$_REQUEST['steamid']."', '','".$acces."', 'ce')"); }
else {
?>
<form method="post">
<strong>ADD an admin: </strong><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="181">SteamID:</td>
<td width="840">
<input name="steamid" type="text" id="steamid" value="STEAM_0:">
(required)
</td>
</tr>
<tr>
<td width="181"> </td>
<td> </td>
</tr>
<tr>
<td width="181">Rights:</td>
<td> </td>
</tr>
<tr>
<td width="181"><div align="right">
a
<input name="a" type="checkbox" id="a" value="a">
</div></td>
<td>immunity (can't be kicked/baned/slayed/slaped and affected by other commmands)</td>
</tr>
<tr>
<td width="181"><div align="right">
b
<input name="b" type="checkbox" id="b" value="b">
</div></td>
<td>reservation (can join on reserved slots)</td>
</tr>
<tr>
<td width="181"><div align="right">
c
<input type="checkbox" name="checkbox3" value="checkbox">
</div></td>
<td>amx_kick command</td>
</tr>
<tr>
<td width="181"><div align="right">
d
<input name="d" type="checkbox" id="d" value="d">
</div></td>
<td>amx_ban and amx_unban commands</td>
</tr>
<tr>
<td width="181"><div align="right">
e
<input name="e" type="checkbox" id="e" value="e">
</div></td>
<td>amx_slay and amx_slap commands</td>
</tr>
<tr>
<td width="181"><div align="right">
f
<input name="f" type="checkbox" id="f" value="f">
</div></td>
<td>amx_map command</td>
</tr>
<tr>
<td width="181"><div align="right">
g
<input name="g" type="checkbox" id="g" value="g">
</div></td>
<td>amx_cvar command (not all cvars will be available)</td>
</tr>
<tr>
<td width="181"><div align="right">
h
<input name="h" type="checkbox" id="h" value="h">
</div></td>
<td>amx_cfg command</td>
</tr>
<tr>
<td width="181"><div align="right">
i
<input name="i" type="checkbox" id="i" value="j">
</div></td>
<td>amx_chat and other chat commands</td>
</tr>
<tr>
<td width="181"><div align="right">
j
<input name="j" type="checkbox" id="j" value="j">
</div></td>
<td>amx_vote and other vote commands</td>
</tr>
<tr>
<td width="181"><div align="right">
k
<input name="k" type="checkbox" id="k" value="k">
</div></td>
<td>access to sv_password cvar (by amx_cvar command)</td>
</tr>
<tr>
<td width="181"><div align="right">
l
<input name="l" type="checkbox" id="l" value="l">
</div></td>
<td>access to amx_rcon command and rcon_password cvar (by amx_cvar command)</td>
</tr>
<tr>
<td width="181"><div align="right">
m
<input name="m" type="checkbox" id="m" value="m">
</div></td>
<td>custom level A (for additional plugins)</td>
</tr>
<tr>
<td width="181"><div align="right">
n
<input name="n" type="checkbox" id="n" value="n">
</div></td>
<td>custom level B</td>
</tr>
<tr>
<td width="181"><div align="right">
o
<input name="o" type="checkbox" id="o" value="o">
</div></td>
<td>custom level C </td>
</tr>
<tr>
<td width="181"><div align="right">
p
<input name="p" type="checkbox" id="p" value="p">
</div></td>
<td>custom level D </td>
</tr>
<tr>
<td width="181"><div align="right">
q
<input name="q" type="checkbox" id="q" value="q">
</div></td>
<td>custom level E </td>
</tr>
<tr>
<td width="181"><div align="right">
r
<input name="r" type="checkbox" id="r" value="r">
</div></td>
<td>custom level F </td>
</tr>
<tr>
<td width="181"><div align="right">
s
<input name="s" type="checkbox" id="s" value="s">
</div></td>
<td>custom level G </td>
</tr>
<tr>
<td width="181"><div align="right">
t
<input name="t" type="checkbox" id="t" value="t">
</div></td>
<td>custom level H </td>
</tr>
<tr>
<td width="181"><div align="right">
u
<input name="u" type="checkbox" id="u" value="u">
</div></td>
<td>menu access </td>
</tr>
<tr>
<td width="181"> </td>
<td> </td>
</tr>
<tr>
<td width="181"> </td>
<td><input name="add" type="submit" id="add" value="Add admin!"></td>
</tr>
</table>
</form>
<?php
}
}
/*elseif($_REQUEST['action'] == "delete") {
}
elseif($_REQUEST['action'] == "edit") {
}*/
else {
}
?>