- <?php
- $db = mysql_connect("---------------------------------------------");
- $rs = mysql_db_query("charlymband1","SELECT name, email, link, town, country, date_format(date, '%d.%m.%Y um %H:%i:%s') as newdate, content, comment FROM guestbook WHERE active = 1 ORDER BY date DESC");
- $rsnum = mysql_num_rows($rs);
- ?>
- <html>
- <head>
- <title>PHP/Gästebuch (v0.1)</title>
- <meta http-equiv="imagetoolbar" content="no">
- <link rel="stylesheet" type="text/css" href="../styles.css">
- <meta http-equiv="expires" content="0">
- </head>
- <body bgcolor="#003399" style="background-attachment:fixed; background-image:url(../pix/back_gaeste.gif); background-position:center; background-repeat:no-repeat;">
- <br>
- <div id="title" class="title">Gästebuch</div>
- <div id="txt" class="txt">
- <form action="add_entry.html"><input type="submit" value="neuer eintrag"></form>
- <div align="right"><a href="login.html">administration</a></div>
- Einträge bis <?php echo date("j.m.Y G:i:s") ?>:<br><br>
- <?php for($i=$part;$i<$rsnum && $i<($part+10);$i++): ?>
- <b><?php
- if (mysql_result($rs,$i,"email")!="") {
- echo "<a href=\"mailto:".mysql_result($rs,$i,"email")."\">";
- }
- echo mysql_result($rs,$i,"name");
- if (mysql_result($rs,$i,"email")!="") {
- echo "</a>";
- }
- if (mysql_result($rs,$i,"link")!="") {
- echo " (<a href=\"".mysql_result($rs,$i,"link")."\" target=\"_blank\">".mysql_result($rs,$i,"link")."</a>)";
- }
- if(mysql_result($rs,$i,"town")!="" || mysql_result($rs,$i,"country")!="") {
- echo " aus ";
- if(mysql_result($rs,$i,"town")!="") {
- echo mysql_result($rs,$i,"town");
- if (mysql_result($rs,$i,"country")!="")
- echo " in ".mysql_result($rs,$i,"country");
- } else
- echo mysql_result($rs,$i,"country");
- }
- echo " schrieb am ";
- echo mysql_result($rs,$i,"newdate"); ?> :</b>
- <br>
- <?php echo nl2br(htmlentities(mysql_result($rs,$i,"content"), ENT_QUOTES)); ?>
- <?php if(mysql_result($rs,$i,"comment")!=""):?>
- <br><br>
- <i>Anmerkung der Band: <?php echo nl2br(htmlentities(mysql_result($rs,$i,"comment"), ENT_QUOTES)); ?></i>
- <?php endif; ?>
- <br><hr><br>
- <?php endfor; ?>
- <div align="center"><?php if($part>0): ?><a href="next.php?part=<?php echo ($part-10); ?>">Neuere Einträge</a><?php endif; ?><?php if(($part>0) && ($rsnum>($part+10))):?> - <?php endif; ?><?php if($rsnum>($part+10)): ?><a href="next.php?part=<?php echo ($part+10); ?>">Ältere Einträge</a><?php endif; ?></div>
- </body>
- </html>
- <?php
- mysql_close($db);
- ?>
- </div>
Funktionierte noch vor einiger zeit. Wer kann helfen wo der fehler liegt?
Danke!
