Location: PHPKode > scripts > WH Social > wh_social/modules/guestbook/guestbook.php
<?php

    echo '<div class="content_left">
    <div id="breadcrumb">
        <ul class="crumbs">
            <li class="first"><a href="index.php" style="z-index:9;"><span></span>' . $lang['index'] . '</a></li>
            <li><a href="guestbook.php" style="z-index:8;">' . $lang['guestbook'] . '</a></li>
        </ul>
    </div>
    </div>

    <div class="content_right">';

        include('modules/search.inc.php');
    echo '</div>

    <div class="clear_long"></div>';

    $ret = 1;

    echo '<div class="main_menu">';

        $ret = include 'framework/templates/'.$main_content['menu'];
    echo '<div id="line"></div>';

        $ret = include 'framework/templates/'.$main_content['infos'];
    echo '</div>';

    echo '<div class="main_content">';

    if((isset($_GET['id'])) && (is_numeric($_GET['id']))) {

	$id = mysql_real_escape_string($_GET['id']);
	$id = intval($_GET['id']);

		}else{

		$id = (int)$_SESSION['id'];
		}

    echo '<p class="p_space"><a href="entry.php?id=' . $id . '" class="buttons">' . $lang['new_gb_entry'] . '</a></p>';

    $sql = "SELECT * FROM guestbook WHERE id2 = '" . $id . "' ORDER BY id DESC LIMIT 3";

    $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{

        echo '<span class="viewmore" id="updates">';

    	while($row = mysql_fetch_assoc($result)) {

            include_once('framework/filter.php');
            include_once('framework/functions/badwords.php');
            include_once('framework/functions/smileys.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">&nbsp;</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">&nbsp;</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>';
            }

        echo '<div id="more' . $id . '" class="morebox">
        <a href="#" class="more" id="' . $id . '">' . $lang['more'] . '</a>
        </div></span>';
        }

?>
Return current item: WH Social