<style type="text/css">
<!--
html, body
{
font-family: sans-serif;
color: #444444;
margin: 5px;
}
.guestbook
{
background: #efefef;
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#efefef));
background: -webkit-linear-gradient(top, #ffffff, #efefef);
background: -moz-linear-gradient(top, #ffffff, #efefef);
background: -ms-linear-gradient(top, #ffffff, #efefef);
background: -o-linear-gradient(top, #ffffff, #efefef);
background: linear-gradient(top, #ffffff, #efefef);
width: 100%;
padding: 5px;
margin-bottom: 15px;
border: 1px solid #cecece;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-khtml-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
}
#gb_line
{
clear: both;
width: 100%;
height: 1px;
margin: 3px 0px 3px 0px;
border-bottom: 1px solid #cecece;
}
-->
</style>
<?php
error_reporting(E_ALL);
define('INCLUDE_CHECK',1);
define('MYSQL_CHECK',1);
require('../config.php');
require('../mysql.php');
if($language == 'de') {
require('../../language/de.php');
}elseif($language == 'en') {
require('../../language/en.php');
}
function smileys($msg) {
$msg = $msg;
$msg = str_replace(":P","<img src=\"../../style/smileys/000.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace(":)","<img src=\"../../style/smileys/001.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace(";)","<img src=\"../../style/smileys/002.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace(":(","<img src=\"../../style/smileys/003.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace("*grr*","<img src=\"../../style/smileys/004.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace("o_o","<img src=\"../../style/smileys/005.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace("*_*","<img src=\"../../style/smileys/006.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace("._.","<img src=\"../../style/smileys/007.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace("-_-","<img src=\"../../style/smileys/008.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
$msg = str_replace(":D","<img src=\"../../style/smileys/009.gif\" width=\"15\" height=\"14\" border=\"0\">",$msg);
return $msg;
}
if((isset($_GET['id'])) && (is_numeric($_GET['id']))) {
$id = mysql_real_escape_string($_GET['id']);
$id = intval($_GET['id']);
}else{
echo '<p class="false">' . $lang['invalid_id'] . '</p>';
exit();
}
$sql = "SELECT * FROM guestbook WHERE id2 = '" . $id . "' ORDER BY id DESC";
$result = mysql_query($sql) OR die(mysql_error());
if(intval(mysql_num_rows($result)) == 0) {
echo '<p class="false">' . $lang['no_gb_entries'] . '</p>';
}else{
while($row = mysql_fetch_assoc($result)) {
include_once('../filter.php');
include_once('../functions/badwords.php');
$id = (int)$row['id'];
echo '<table width="100%" cellpadding="5" cellspacing="0" class="guestbook">
<tr>
<td width="70%"><span class="blue"><u>' . htmlentities($row['name'], ENT_QUOTES) . '</u></span></td>
<td width="30%" align="right"><small>';
if($language == "de") {
echo date('d.m.Y - H:i', strtotime($row['date']));
}elseif($language == "en") {
echo date('Y-m-d - H:i', strtotime($row['date'])); }
echo ' ' . $lang['o_clock'] . '</small></td>
</tr>
<tr>
<td colspan="2"><div id="gb_line"> </div></td>
</tr>
<tr>
<td colspan="2">' . mysql_filter(filter_html(badwords(smileys(stripslashes(nl2br($row['post'])))))) . '</td>
</tr>
<tr>
<td colspan="2"><div id="gb_line"> </div></td>
</tr>
<tr>
<td width="70%" height="22" valign="bottom" align="left"><a href="' . htmlentities($row['url'], ENT_QUOTES) . '" target="_blank"><img src="../../style/buttons/homepage.png" border="0" title="Homepage"></a><a href="mailto:' . htmlentities($row['email'], ENT_QUOTES) . '"><img src="../../style/buttons/mail.png" hspace="6" border="0" title="E-Mail"></a></td>
<td width="30%" height="22" valign="bottom" align="right"><a href="#top"><img src="../../style/buttons/top.png" border="0" title="Top"></a></td>
</tr>
</table>';
}
}
?>