Tagwall Hjælp.
Hej eksperter..Jeg sidder her med et tagwall script:
<?php
include("connect.php");
include("functions.php");
//Hvis feltet besked er tomt, sakl der ikke lægges noget i DB'en
if(isset($_POST["tagwall"])) {
if(trim($_POST["besked"]) == "") {
header("Location:". $_SERVER["PHP_SELF"] ."");
exit;
}
if(trim($_POST["navn"]) == "") {
$_POST["navn"] = "Anonym";
}
mysql_query("INSERT INTO `tagwall` (`navn`, `email`, `url`, `tekst`, `tid`, `ip`) VALUES (". toData($_POST["navn"]) .",". toData($_POST["email"]) .",". toData($_POST["homepage"]) .",". toData($_POST["besked"]) .",". toData(time()) .",". toData($_SERVER["REMOTE_ADDR"]) .")") or die (mysql_error());
header("Location:". $_SERVER["PHP_SELF"] ."");
exit;
}
?>
<html><head><title>Tagwall<?php
if(isset($_GET["vis"])) {
echo", vis=". $_GET["vis"];
}
?></title></head>
<style type="text/css">
body {color: black; font-family: verdana;}
td, th {font-family: verdana; font-size: 0.8em;}
a:link {color: #660000; text-decoration: underline;}
a:visited {color: #660000; text-decoration: underline;}
a:hover {color: #006699; text-decoration: none;}
a.top:link {color: #FFCC00; text-decoration: underline;}
a.top:visited {color: #FFCC00; text-decoration: underline;}
a.top:hover {color: #FFCC00; text-decoration: none;}
.input {color: black; background-color: #ffffff; border-color: black; border-width: 1px;}
.submit { border-color: black; border-width: 1px; font-size: 0.8em;}
.small {font-size: 0.7em;}
.small2 {font-size: 0.7em; padding-left: 8px;}
.left {padding-left: 8px;}
.tr {background-color: #666666; color: white;}
</style>
<body background="../images/index1_07.gif" properties="fixed">
<center>
<div class="big"><img src="tag.gif" width="160" height="48"></div>
<?php
$start = 0;
if(isset($_GET["vis"]) && $_GET["vis"] >= 0 && is_numeric($_GET["vis"])) {
$start = $_GET["vis"];
}
$indlaeg = mysql_query("SELECT * FROM `". $tablename ."` ORDER BY `tid` DESC LIMIT ". $start.",". $antalviste ."") or die (mysql_error());
if(mysql_num_rows($indlaeg) == 0) {
echo"<br>\nDesværre ingen indlæg at vise<br>";
}else{
echo"<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">";
while($vis = mysql_fetch_object($indlaeg)) {
echo"<tr class=\"tr\">\n";
echo" <td class=\"small\">Indlæg af ". toHtml($vis->navn) ."</td>\n";
echo" <td class=\"small2\">email: ". lj_web_link($vis->email, "top") ."</td>\n";
echo" <td class=\"small2\">www: ". lj_web_link($vis->url, "top") ."</span></td>\n";
echo"</tr><tr>\n";
echo" <td valign=\"top\" class=\"small2\" colspan=\"3\">Skrevet ". tidspunkt($vis->tid) ."<br>\n";
echo"<div class=\"left\">". br(lj_web_link(toHtml($vis->tekst), "")) ."</div></td>\n";
echo"</tr>\n";
}
echo"</table>\n";
}
mysql_free_result($indlaeg);
$ialt = mysql_query("SELECT `id` FROM `". $tablename ."`") or die (mysql_error());
$antal = mysql_num_rows($ialt);
//Skal der være links for frem og tilbage?
if(mysql_num_rows($ialt) > $antalviste) {
if(!isset($_GET["vis"]) || !is_numeric($_GET["vis"]) || $_GET["vis"] < 0) {
$back = " ";
$next = pagelink($antalviste, "frem") ." ". pagelink(($antal-$antalviste), ">>");
$info = "1 - ". $antalviste ." af ". $antal;
}else{
$info = ($_GET["vis"]+1) ." - ". ($_GET["vis"]+$antalviste) ." af ". $antal;
if($_GET["vis"] <= $antalviste || $_GET["vis"] >= $antal) {
$link = "";
}else{
$link = ($_GET["vis"]-$antalviste);
}
$back = pagelink("", "<<") ." ". pagelink($link, "tilbage");
if(($_GET["vis"]+$antalviste) >= $antal) {
$next = " ";
$info = ($_GET["vis"]+1) ." - ". $antal ." af ". $antal;
}else{
$next = pagelink(($_GET["vis"]+$antalviste), "frem");
if($_GET["vis"] < ($antal-$antalviste)) {
$next = $next ." ". pagelink(($antal-$antalviste), ">>");
}
}
}
?>
<table width="480" border="0"><tr>
<td width="33%" class="small"><?php echo $back; ?></td>
<td width="34%" class="small" align="center"><?php echo $info; ?></td>
<td width="33%" class="small" align="right"><?php echo $next; ?></td>
</tr></table>
<?php
mysql_free_result($ialt);
//Slut på tjek om der var nogle indlæg at vise
}
?>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="hidden" name="tagwall" value="tagwall">
<table border="0" cellspacing="2" cellpadding="0"><tr>
<td>Your name:<br>
<input type="text" name="navn" size="32" class="input"></td>
</tr><tr>
<td>Your email:<br>
<input type="text" name="email" size="32" class="input"></td>
</tr><tr>
<td>Your Homepage:<br>
<input type="text" name="homepage" size="32" class="input"></td>
</tr><tr>
<td>Tag:<br>
<textarea cols="40" rows="6" name="besked" class="input"></textarea><center>
<input type="submit" value="Add Tag" class="submit"></center></td>
</tr></table>
</form>
</center>
</body></html>
-------------------------
Problemet er at Tag'sne er OVER input felterne.. og vil gerne ha rykket dem ned under? er der nogen der kan hjælpe mig med det? :P
