<?
MYSQL_CONNECT("localhost","dbuser83","123321") or die(mysql_error());
mysql_select_db("db131");
if ($_POST[action] == "skrivbesked") {
$time = time();
mysql_query("insert into guestbook values('','$_POST[navn]','$time','$_POST[text]');");
header("location:tagwall.php");
}
elseif ($_GET[action] == "delete") {
mysql_query("delete from guestbook where beskedid='$_GET[beskedid]';");
header("location:tagwall.php?action=admin");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>:: Clan-DiC ::</title>
<style type="text/css">
<!--
body {
background-color: #3D3E44;
margin-left: 0px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 10px;
}
body,td,th {
font-family: Tahoma;
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
}
.style1 {font-size: 16px}
-->
</style></head>
<body>
<div align="center">
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top"><table width="135" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="89"> </td>
</tr>
<tr>
<td><img src="Billeder/menu.gif" width="135" height="158" border="0" usemap="#Map"></td>
</tr>
<tr>
<td height="19"> </td>
</tr>
<tr>
<td><table width="135" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="Billeder/top_left.gif" width="135" height="19"></td>
</tr>
<tr>
<td align="left" valign="top" background="Billeder/baggrund_left.gif"><table width="110" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11"> </td>
<td width="99" align="center"><script src='
http://www.chart.dk/js/unified.asp'></script><script language='javascript'>
track_visitor(125160, '');
</script>
<noscript>
<a href="
http://www.chart.dk/ref.asp?id=125160" target="_blank">
<img src="
http://cluster.chart.dk/chart.asp?id=125160" border="0" alt="Chart.dk"></a>
</noscript></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="Billeder/bottom_left.gif" width="135" height="19"></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="left" valign="top"><table width="383" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><img src="Billeder/top.gif" width="383" height="104"></td>
</tr>
<tr>
<td background="Billeder/baggrund.gif"><table width="383" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"> </td>
<td width="353" align="left" valign="middle">Tagwall<br> <br>
<form method="POST" action="tagwall.php">
<input type=hidden name=action value=skrivbesked>
Dit navn:<br> <input type="text" name="navn"><br>
Besked:<br> <textarea name=text rows="5" name="tekst" cols="30"></textarea><br><br>
<input type="submit" value="Send"> <input type="button" value="Opdater" onclick="location.reload()">
<br><br><p align="left">
<?
print "<b>Tidligere beskeder:</b><br><br>";
$res = mysql_query("select * from guestbook order by dato desc limit 10;");
while($gb = mysql_fetch_assoc($res)) {
$gb[besked] = preg_replace("/</","<",$gb[besked]);
$gb[besked] = preg_replace("/>/",">",$gb[besked]);
$gb[besked] = nl2br($gb[besked]);
if(!empty($_POST['tekst']))
$dato = date("F j, H:i",$gb[dato]+(3600*0));
print "Navn: $gb[navn]<br>
Dato: $dato<br>
Besked: $gb[besked]<hr>";
if ($_GET[action] == "admin") {
print "<br><a href=tagwall.php?action=delete&beskedid=$gb[beskedid]>Slet</a>";
}
print "<br>";
}
?> </td>
<td width="15"> </td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="Billeder/bottom.gif" width="383" height="18"></td>
</tr>
</table></td>
<td align="left" valign="top"><table width="135" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="135" height="89"> </td>
</tr>
<tr>
<td height="345"><img src="Billeder/right.gif" width="135" height="457"></td>
</tr>
</table></td>
</tr>
</table>
</div>
<map name="Map">
<area shape="rect" coords="26,35,71,44" href="index.php" target="_self">
<area shape="rect" coords="26,51,70,60" href="clan-dic.html" target="_self">
<area shape="rect" coords="26,66,70,75" href="clan-war.html" target="_self">
<area shape="rect" coords="26,81,71,91" href="kontakt.php" target="_self">
<area shape="rect" coords="26,97,71,106" href="andet.html" target="_self">
<area shape="rect" coords="25,112,70,123" href="tagwall.php" target="_self">
</map>
</body>
</html>