<?session_start();
include("mysql.php");
if($_SESSION[navn] && $_SESSION[kode]){
$result2 = mysql_query("SELECT * FROM admin WHERE navn='$_SESSION[navn]'");
if($row = mysql_fetch_array($result2)){
require("sqlhaha.php");
if ($action == "editnews") {
start_sql();
stop_sql();
?>
<form method="post" action="retcrew.php?action=changenews">
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]IRL Navn:[/b]<input type="text" value="<?=$row["irl"]?>" name="irl" size="20">
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]Alder:[/b]<input type="text" value="<?=$row["alder"]?>" name="alder" size="20">
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]Ynglings ting:[/b]<input type="text" value="<?=$row["ting"]?>" name="ting" size="20">
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]Yngling BG:[/b]<input type="text" value="<?=$row["bg"]?>" name="bg" size="20">
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]Mail:[/b]<input type="text" value="<?=$row["mail"]?>" name="mail" size="20">
<font face='Arial' style='font-size: 11px' color='#737D8C'>
<font face='Arial' style='font-size: 11px' color='#737D8C'>[b]Info om dig selv:[/b]
<font face='Arial' style='font-size: 11px' color='#737D8C'><textarea name="info" cols="35" rows="9"><?=$row["info"]?></textarea>
<input type="submit" name="Submit" value="Ret profil">
</form>
<?
} else {
echo "<a href=\\"login.php\\">Login</a>";
}
?>
<?
if ($action == "changenews") {
start_sql();
sql_spoerg("update admin set alder='$alder', bg='$bg', ting='$ting', irl='$irl', info='$info', mail='$mail' where navn='$editnavn'");
stop_sql();
echo " <font face='Arial' style='font-size: 11px' color='#737D8C'><center>[b]Din profil er rettet[/b]</center>";
}
?>
<?
}
} else {
echo "<a href=\\"login.php\\">Login</a>";
}
?>