Location: PHPKode > scripts > Net Shoubox > net-shoubox/showarchive.php
<?php
//////
//
// Net Shout
//
// www.php-net.net/
//
/////
require_once "net_config.php";
echo '<link href="./shout.css" rel="stylesheet" type="text/css">';
echo '<meta http-equiv="refresh" content="120;URL=\'./show.php\'" />';

function filter($message){
$filters=mysql_query("SELECT * FROM net_filter");
while($filter=mysql_fetch_array($filters)){
htmlspecialchars(stripslashes(extract($filter)));
$message=eregi_replace($find,$replacewith,$message);
}
return($message);
}

$showquery = mysql_query("SELECT * FROM net_shout ORDER BY shoutID DESC ");

if(mysql_num_rows($showquery) == '0'){
$message = "No have posts now :( add one now :) <br />";
$message = str_replace(":)","<img src='http://php-net.net/images/smiles/icon_smile.gif' border='0'>",$message);
$message = str_replace(":(","<img src='http://php-net.net/images/smiles/icon_mad.gif' border='0' />",$message);
echo $message ;
}

echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><span class=\"shoutwindow\">";

while($row = mysql_fetch_array($showquery)){

$message=filter($message);
$message = wordwrap( $row['shoutMessage'], 17, " ", 1);
$row['shoutName'] = wordwrap( $row['shoutName'], 10, " ", 1);
$message = str_replace(":)","<img src='http://php-net.net/images/smiles/icon_smile.gif' border='0' />",$message);
$message = str_replace(":D","<img src='http://php-net.net/images/smiles/icon_biggrin.gif' border='0' />",$message);
$message = str_replace("8D","<img src='http://php-net.net/images/smiles/icon_cool.gif' border='0' />",$message);
$message = str_replace(":(!","<img src='http://php-net.net/images/smiles/icon_mad.gif' border='0' />",$message);
$message = str_replace(":(","<img src='http://php-net.net/images/smiles/icon_sad.gif' border='0' />",$message);
$message = str_replace(":P","<img src='http://php-net.net/images/smiles/icon_razz.gif' border='0' />",$message);
$message = str_replace(";)","<img src='http://php-net.net/images/smiles/icon_wink.gif' border='0' />",$message);
echo "<tr>
<td title=\"Posted $row[shoutDate],$row[shoutTime], IP Logged\" bgcolor=\"$background\"><b>".$row['shoutName']."</b><br />
".$message."<br />
</td>
</tr>";

}
echo '</span></table><!-- //DO NOT REMOVE!!! -->
<span style="font-size:8pt;"><a href="http://php-net.net/">empowered by Net shout .5</a></span>
<!-- //END OF DO NOT REMOVE!!! -->';
mysql_close($db);
?>
Return current item: Net Shoubox