<? header( 'Content-type: text/html; charset=windows-1251' ); ?>
<style type="text/css">
#cont {
    margin-bottom: 5px;
}
.us {
    color: #05599B;
    text-shadow: 0 0 3px #A3D3F7;
}
#cont table {
    border-bottom: 1px dotted #cccccc;
}
</style>
<?
include 'config.php';

$id = intval($_GET['id']);
$walls = mysql_query("SELECT * FROM tb_wall WHERE tous = '$id'");
while ($wrow = mysql_fetch_array($walls)) {
    $infus = mysql_fetch_array(mysql_query("SELECT id, username, avatar FROM tb_users WHERE id = '" . $wrow['fromus'] . "'"));
    ?>
    <div id="cont">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="60"><a href="/#:id<?=$infus['id']?>"><img src="avp/<?=$infus['avatar']?>" width="40" height="40" class="avatar" /></a></td>
            <td valign="top" style="padding: 3px;"><span class="us"><?=date('d.m.Y', $wrow['date'])?> - <b><?=$infus['username']?></b></span>, <font color="#8D950B">ID: <?=$infus['id']?></font><br /><span class="comms">
            <?
            $array = explode(" ", $wrow['comment']);
            for ($i = 0, $array_num = count($array); $i < $array_num; $i++) {
                $word_split = wordwrap($array[$i], 50, "<br />", true);
                echo $word_split . ' ';
            }
            ?>
            </span></td>
        </tr>
    </table>
    </div>
    <?
}
?>