Det sjove er at alt sammen vikede på min meget gamle siden som jeg bruger nogle af tingene fra.?! min ikke her
<? if( !isset($_SESSION['type']) || $_SESSION['type'] != "admin" ){?>
<form action="login.php?do=admin" method="POST">
<table width="100%" height="25%">
<tr>
<td align="center">Username:</td>
</tr>
<tr>
<td align="center"><input type="text" name="user_name"></td>
</tr>
<tr>
<td align="center">Password:</td>
</tr>
<tr>
<td align="center"><input type="password" name="user_pass"></td>
</tr>
<tr>
<td align="center"><input type="submit" value="Login" cursor="hand;"></td>
</tr>
</table>
</form>
<? }else{ ?>
<table width="75%" border="0" align="center">
<tr>
<td align="center" width="9%"><a href="?p=admin&s=news">News</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=errors">Errors</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=fights">Fights</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=links">Links</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=users">Users</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=pictures">Pictures</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="9%"><a href="?p=admin&s=profile">Profile</a></td>
<td align="center" width="2%">-</a></td>
<td align="center" width="12%"><a href="logout.php">Logout</a></td>
</tr>
</table>
<hr>
</p>
<?
if($_GET['s'] == "news"){
?>
<form action="insert.php" method="post">
<input type="hidden" value="insert news" name="do">
<table width="253" border="0" align="center">
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM users WHERE id = '$_SESSION[userid]'") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr bgcolor="#B4B4B4">
<td align="center" colspan="2" font color="#000000">INSERT 'news'</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Game:</td>
<td align="center">
<select name="game">
<option value="">Select Page</option>
<option value="1">CS</option>
<option value="2">CSS</option>
<option value="3">DOD</option>
<option value="4">Empty</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Title:</td>
<td align="center"><input type="text" name="tittle"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Part:</td>
<td align="center"><input type="text" name="part" value="1" readonly="readonly"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Postedby:</td>
<td align="center"><input type="text" name="postedby" value="<? print $Get->user_name ?>" readonly="readonly"></td>
</tr>
<tr>
<td width="75" align="left">Time:</td>
<td align="center"><input type="text" name="time" value="<? print(date('m-d-Y')); ?>" readonly="readonly"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Text:</td>
<td align="center"><textarea name="text" style=" font-family: Arial; font-size: xx-small; text-decoration: none; border-color: #000000 #999999 #999999 #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; width: 350px; height: 100px; overflow: hidden;"></textarea></td>
</tr>
<tr bgcolor="#B4B4B4" align="center">
<td colspan="2"><input type="submit" value="Submit"></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<hr>
<form action="delete.php" method="post">
<input type="hidden" value="delete news" name="do">
<table width="489" border="0" align="center">
<tr>
<td width="74" bgcolor="#B4B4B4" scope="col" align="left">ID</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Title</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Postedby</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Press to delete</td>
</tr>
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM news") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr>
<td align="center"><input type="text" name="id" value="<?=$Get->id?>" style="width: 45px; text-align: center" readonly="readonly"></td>
<td><?=$Get->tittle?></td>
<td><?=$Get->postedby?></td>
<td colspan="2" align="center"><input type="submit" value="Delete")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}elseif($_GET['s'] == "errors"){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM error WHERE part = '1' ORDER BY `id` DESC") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
print "<tr>" . "<td><em>Error Page:</em> $Get->page</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td>$Get->text</td>" . "</tr>";
}
Db::Conn(close);
?>
</table>
<hr>
<form action="delete.php" method="post">
<input type="hidden" value="delete error" name="do">
<table width="489" border="0" align="center">
<tr>
<td width="74" bgcolor="#B4B4B4" scope="col" align="left">ID</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">page</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Press to delete</td>
</tr>
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM error") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr>
<td align="center"><input type="text" name="id" value="<? print($Get->id); ?>" readonly="readonly"></td>
<td><? print($Get->page); ?></a></td>
<td colspan="2" align="center"><input type="submit" value="Delete")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}elseif($_GET['s'] == "fights"){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM fight WHERE part = '1' ORDER BY `id` DESC") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
print "<tr>" . "<td><em>Clan:</em>$Get->game</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Time:</em>$Get->time</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Date:</em>$Get->date</td>" . "</tr>" . "<tr>" . "<td><em>Server:</em>$Get->server</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Server pass:</em>$Get->pass</td>" . "</tr>" . "<tr>" . "<td><em>E-mail:</em>$Get->email</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Name:</em>$Get->name</td>" . "</tr>" . "<tr>" . "<td><em>Phone:</em>$Get->phone</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Game:</em>$Get->game</td>" . "</tr>" . "<tr>" . "<td><em>Homepage:</em>$Get->link</td>" . "</tr>" . "<tr bgcolor=#B4B4B4>" . "<td><em>Map:</em>$Get->map</td>" . "</tr>";
}
Db::Conn(close);
?>
</table>
<hr>
<form action="delete.php" method="post">
<input type="hidden" value="delete fight" name="do">
<table width="489" border="0" align="center">
<tr>
<td width="74" bgcolor="#B4B4B4" scope="col" align="left">ID</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Clan</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Press to delete</td>
</tr>
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM fight") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr>
<td align="center"><input type="text" name="id" value="<? print($Get->id); ?>" readonly="readonly"></td>
<td><? print($Get->clan); ?></a></td>
<td colspan="2" align="center"><input type="submit" value="Delete")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}elseif($_GET['s'] == "links"){
?>
<form action="insert.php" method="post">
<input type="hidden" value="insert links" name="do">
<table width="253" border="0" align="center">
<tr bgcolor="#B4B4B4">
<td colspan="2" align="center" font color="#000000">INSERT 'link'</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Link:</td>
<td align="center"><input name="link" type="text" value="
http://"></td> </tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Link Name:</td>
<td align="center"><input type="text" name="link_name"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Part:</td>
<td align="center"><input type="text" name="part" value="1" readonly="readonly"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Text:</td>
<td align="center"><textarea name="text" style=" font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; text-decoration: none; border-color: #000000 #999999 #999999 #000000; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; width: 350px; height: 100px; overflow: hidden;"></textarea></td>
</tr>
<tr bgcolor="#B4B4B4" align="center">
<td colspan="2"><input type="submit" value="Submit"></td>
</tr>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<hr>
<form action="delete.php" method="post">
<input type="hidden" value="delete links" name="do">
<table width="489" border="0" align="center">
<tr>
<td width="74" bgcolor="#B4B4B4" scope="col" align="left">ID</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Link name</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Press to delete</td>
</tr>
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM links") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr>
<td align="center"><input type="text" name="id" value="<? print($Get->id); ?>" readonly="readonly"></td>
<td><? print($Get->link_name); ?></a></td>
<td colspan="2" align="center"><input type="submit" value="Delete")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}elseif($_GET['s'] == "users"){
?>
<form action="insert.php" method="post">
<input type="hidden" value="insert users" name="do">
<table width="253" border="0" align="center">
<tr bgcolor="#B4B4B4">
<td colspan="2" div align="center" font color="#000000">INSERT 'user'</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Username:</td>
<td align="center"><input type="text" name="user_name"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Userpass:</td>
<td align="center"><input name="user_pass" type="password"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Name:</td>
<td align="center"><input type="text" name="name"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Surname:</td>
<td align="center"><input type="text" name="surname"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">E-Mail:</td>
<td align="center"><input type="text" name="email"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Game:</td>
<td align="center"><select name="game">
<option value="">Select game</option>
<option value="1">CS</option>
<option value="2">CSS</option>
<option value="3">DOD</option>
<option value="4">Empty</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Class:</td>
<td align="center"><select name="class">
<option value="">Select Class</option>
<option value="1">Campaign Leader</option>
<option value="2">General</option>
<option value="3">Spesial Forces</option>
<option value="4">Team Leader</option>
<option value="5">Soldier</option>
<option value="6">Scout</option>
<option value="7">Empty</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Contry:</td>
<td align="center"><input type="text" name="contry"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Time Zone:</td>
<td align="center"><select name="time">
<option value="">Select Time Zone</option>
<option value="1">GMT+1</option>
<option value="2">GMT+2</option>
<option value="3">GMT+3</option>
<option value="4">GMT+4</option>
<option value="5">GMT+5</option>
<option value="6">GMT+6</option>
<option value="7">GMT+7</option>
<option value="8">GMT+8</option>
<option value="9">GMT+9</option>
<option value="10">GMT+10</option>
<option value="11">GMT+11</option>
<option value="12">GMT+12</option>
<option value="13">GMT+13</option>
<option value="14">GMT-1</option>
<option value="15">GMT-2</option>
<option value="16">GMT-3</option>
<option value="17">GMT-4</option>
<option value="18">GMT-5</option>
<option value="19">GMT-6</option>
<option value="20">GMT-7</option>
<option value="21">GMT-8</option>
<option value="22">GMT-9</option>
<option value="23">GMT-10</option>
<option value="24">GMT-11</option>
<option value="25">GMT-12</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Team:</td>
<td align="center"><select name="team">
<option value="">Select Team</option>
<option value="1">Team 1</option>
<option value="2">Team 2</option>
<option value="3">Team 3</option>
<option value="4">Team 4</option>
<option value="5">Empty</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Reg Date:</td>
<td align="center"><input type="text" name="reg"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Sex:</td>
<td align="center"><select name="sex">
<option value="" selected>Select Sex</option>
<option value="1">Male</option>
<option value="2">Female</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Part:</td>
<td align="center"><input type="text" name="part" value="1" readonly="readonly"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Clan:</td>
<td align="center"><input type="text" name="clan" value=""></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">User Type:</td>
<td align="center"><select name="state">
<option value="" selected>Select User Type</option>
<option value="1">admin</option>
<option value="2">cs</option>
<option value="3">css</option>
<option value="4">dod</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td colspan="2" align="center"><input type="submit" value="Submit")></td>
</tr>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
<?$_SESSION['secret'] = "wtf/!"?>
</form>
<hr>
<form action="delete.php" method="post">
<input type="hidden" value="delete users" name="do">
<table width="489" border="0" align="center">
<tr>
<td width="74" bgcolor="#B4B4B4" scope="col" align="left">ID</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">User Name</td>
<td width="93" bgcolor="#B4B4B4" scope="col" align="left">Press to delete</td>
</tr>
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM users") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr>
<td align="center"><input type="text" name="id" value="<? print($Get->id); ?>" readonly="readonly"></td>
<td><? print($Get->user_name); ?></a></td>
<td colspan="2" align="center"><input type="submit" value="Delete")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}elseif($_GET['s'] == "pictures"){
?>
Comming soon
<?
}elseif($_GET['s'] == "profile"){
?>
<form action="update.php" method="post">
<input type="hidden" value="update users" name="do">
<table width="253" border="0" align="center">
<?
Db::Conn(open);
$loadin = mysql_query("SELECT * FROM users WHERE part = '1' AND id = '$_SESSION[userid]'") or die("There is an Error in the database");
while($Get = mysql_fetch_object($loadin)) {
?>
<tr bgcolor="#B4B4B4">
<td colspan="2" div align="center" font color="#000000">Profile</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Username:</td>
<td align="center"><input name="user_name" type="text" value="<? print $Get->user_name ?>" readonly="readonly"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Userpass:*</td>
<td align="center"><input name="user_pass" type="password"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Name:*</td>
<td align="center"><input type="text" name="name" value="<? print $Get->name ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Surname:*</td>
<td align="center"><input type="text" name="surname" value="<? print $Get->surname ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">E-Mail:*</td>
<td align="center"><input type="text" name="email" value="<? print $Get->email ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" div align="left">Game:*</td>
<td align="center"><select name="game">
<option value=""><? print $Get->game ?></option>
<option value="1">CS</option>
<option value="2">CSS</option>
<option value="3">DOD</option>
<option value="4">Empty</option>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" div align="left">Class:*</td>
<td align="center"><select name="class">
<option value=""><? print $Get->class ?></option>
<option value="1">Campaign Leader</option>
<option value="2">General</option>
<option value="3">Spesial Forces</option>
<option value="4">Team Leader</option>
<option value="5">Soldier</option>
<option value="6">Scout</option>
<option value="7">Empty</option>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Contry:*</td>
<td align="center"><input type="text" name="contry" value="<? print $Get->contry ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Time Zone:*</td>
<td align="center"><select name="time">
<option value=""><? print $Get->time ?></option>
<option value="1">GMT+1</option>
<option value="2">GMT+2</option>
<option value="3">GMT+3</option>
<option value="4">GMT+4</option>
<option value="5">GMT+5</option>
<option value="6">GMT+6</option>
<option value="7">GMT+7</option>
<option value="8">GMT+8</option>
<option value="9">GMT+9</option>
<option value="10">GMT+10</option>
<option value="11">GMT+11</option>
<option value="12">GMT+12</option>
<option value="13">GMT+13</option>
<option value="14">GMT-1</option>
<option value="15">GMT-2</option>
<option value="16">GMT-3</option>
<option value="17">GMT-4</option>
<option value="18">GMT-5</option>
<option value="19">GMT-6</option>
<option value="20">GMT-7</option>
<option value="21">GMT-8</option>
<option value="22">GMT-9</option>
<option value="23">GMT-10</option>
<option value="24">GMT-11</option>
<option value="25">GMT-12</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" div align="left">Team:*</td>
<td align="center"><select name="team">
<option value=""><? print $Get->team ?></option>
<option value="1">Team 1</option>
<option value="2">Team 2</option>
<option value="3">Team 3</option>
<option value="4">Team 4</option>
<option value="5">Empty</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Reg Date:</td>
<td align="center"><input type="text" name="reg" readonly="readonly" value="<? print $Get->reg ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" div align="left">Sex:*</td>
<td align="center"><select name="sex">
<option value="" selected><? print $Get->sex ?></option>
<option value="1">Male</option>
<option value="2">Female</option>
</select>
</td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Part:</td>
<td align="center"><input type="text" name="part" readonly="readonly" value="<? print $Get->part ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td width="75" align="left">Clan:</td>
<td align="center"><input type="text" name="clan" value="<? print $Get->clan ?>"></td>
</tr>
<tr bgcolor="#B4B4B4">
<td colspan="2" align="center"><input type="submit" value="Update")></td>
</tr>
<?
}
Db::Conn(close);
?>
</table>
<input type="hidden" value="<?=$_SESSION['yes']?>">
</form>
<?
}}
?>
Og jeg har prøvet din post men den virker heller ikke.