include "config.php";
include "functions.php";
//banned_user();
$filename = "messages.txt";
if (file_exists($filename)) {
$handle = fopen($filename, "r");
$read = file_get_contents($filename);
$array = explode("\n", $read);
$x=0;
for($i=0; $i<$numofposts; $i++) {
if ($array[$i] != NULL || $array[$i] != "") {
list($name, $msg, $date, $ip) = explode("\t", $array[$i]);
$date = str_replace(" ","/",$date);
list($year,$month,$day,$time) = explode("/", $date);
// convert text to smilies.
$msg = smiles($msg);
// Show date, Yes or No.
if ($showdate == "1") {
$title = "title=\"Posted ".$day."/".$month."/".$year." ".$time."\"";
} else {
$title = "";
}
$x++;
if ( $x % 2 != 0 ) {
echo "".wordwrap($name,18," \n",1).": ".ereg_replace("([^ \/]{22})","\\1",$msg)." |
";
} else {
echo "".wordwrap($name,18," \n",1).": ".ereg_replace("([^ \/]{22})","\\1",$msg)." |
";
}
} else {
break;
}
}
fclose($handle);
}
?>