Tämä on vieraskirja jossa ei ole admin osiota...
ensiksikkin
read.php > 777
write.php > 777
index.php >
read.php
<?php include('config.php'); $fields = file("$db"); $fields = array_reverse($fields); $maxlines = count($fields); $pages = ceil($maxlines / $maxperpage); print "<div>\n"; print "<table width=\"480\" border=\"0\" cellspacing=\"1\" bgcolor=\"#BBBBBB\">\n"; print "<tr><td bgcolor=\"#D5EAFF\" valign=\"middle\">\n"; for ($i=1; $i <= $pages; $i++) { print ("<FONT class='leipa'><a href=\"page=" . $i . "\">" . $i . "</a> \n"); } print "<FONT class='leipa'><a href=\"page=0.2\">Kaikki </a>\n"; print "</td></tr>\n"; print "</table><br>\n"; $page = $_GET['page']; if ($page == 0.2) { $i = 0; $max = $maxlines; } else { if ($page == 1) { $i = 0; $max = $maxperpage - 1; } else { $i = $page * $maxperpage - $maxperpage; $max = $page * $maxperpage - 1; } } if (empty($page)) { $i = 0; $max = $maxperpage - 1; } while ($i <= $max) { if (empty($fields[$i])) { print " "; $i++; } else { list($rand_key, $time, $ip, $name, $mail, $www, $data) = explode("$sprtr", $fields[$i]); $i++; print "<table width=\"480\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"#BBBBBB\">\n"; print "<tr><td bgcolor=\"#D5EAFF\"><FONT class='leipa'>\n"; print "$time\n"; print " - $name\n"; if (!empty($mail)) { print " - ( <a href=\"mailto:$mail\">email</a> |\n"; } else { print " - ( email |\n"; } if (!empty($www)) { print " <a href=\"http://$www\">www</a> )\n"; } else { print " www )\n"; } print "</td></tr><tr><td bgcolor=\"#EAF4FF\"><FONT class='leipa'>\n"; print $data; print "</td></tr>\n"; print "</table><br>\n"; } } print "<table width=\"480\" border=\"0\" cellspacing=\"1\" bgcolor=\"#BBBBBB\">\n"; print "<tr><td valign=\"middle\"bgcolor=\"#D5EAFF\">\n"; for ($i=1; $i <= $pages; $i++) { print ("<FONT class='leipa'><a href=\"page=" . $i . "\">" . $i . "</a> \n"); } print "<FONT class='leipa'><a href=\"page=0.2\">Kaikki </a>\n"; print "</td></tr>\n"; print "</table>\n"; print "</div>\n"; ?>
index.php
<!-- sijoita tämä sinne missä viestit näkyy ja kirjoitus lomake on! --> <CENTER><div class="center"> <p class="eka"><B>Vieraskirja</B></p> <p class="toka"> <a href="#kirjoita"> - Kirjoita vieraskirjaan - </a><br><br> <?php include('read.php'); ?><br><br><br> <a name="kirjoita"> Kirjoita vieraskirjaan </a><br> <form action="write.php" method="post"> <table border="0" cellpadding="3" cellspacing="0" width="300"> <tr> <td width="100" height="20" align="left"><b><FONT class="leipa">Nimi: *</FONT></b></td> <td width="200" height="20" align="right"><input type="text" maxlength="30" name="name" size="30"></td> </tr> <tr> <td width="100" height="20" align="left"><b><FONT class="leipa">E-mail:</FONT></b></td> <td width="200" height="20" align="right"><input type="text" maxlength="60" name="mail" size="30"></td> </tr> <tr> <td width="100" height="20" align="left"><b><FONT class="leipa">WWW:</FONT></b></td> <td width="200" height="20" align="right"><FONT class="leipa"><input value="http://" type="text" maxlength="60" name="www" size="30"></td> </tr> <tr> <td width="100" height="20" align="left"><b><FONT class="leipa">Viesti: *</FONT></b></td> <td width="200" height="20" align="right"> </td> </tr> <tr> <td width="300" height="100" colspan="2" align="center"><textarea rows="8" cols="34" name="data"></textarea></td> </tr> <tr> <td colspan="2" width="200" height="20" align="center"><input type="submit" value=" Lähetä "></td> </tr> </table> </form> </p> </div> </CENTER>
write.php
(puuttuu!)
Aihe on jo aika vanha, joten et voi enää vastata siihen.