// WR-Quickchat v. 1.2 // 12.04.06 г. // Miha-ingener@yandex.ru
#error_reporting (E_ALL);
include "config.php";
$datafile="./qchat.dat"; // имя файла данных
$msgio="0"; // направление показа сообщений 1/0
$lines=file($datafile);
$i = count($lines);
echo "document.write(\"
\");";
// выводим данные по возрастанию или убыванию
if ($msgio=="1") {$a1=0;$u=$i;} else {$a1=$i-1;$u="-1";}
do {$dt=explode("|", $lines[$a1]);
if ($msgio=="1") {$a1++;} else {$a1--;}
$dt[0]=eregi_replace("((https?|ftp)://[[:alnum:]_=/-]+(\\.[[:alnum:]_=/-]+)*(/[[:alnum:]+&._=/%]*(\\?[[:alnum:]?+&_=/%]*)?)?)", "\\1", $dt[0]);
$dt[4]=str_replace("\r\n", "
", $dt[4]);
$dtt = explode("|", $dt[4]);
echo "document.write(\"| $dt[0] |
| $dt[1] | $dt[3] $dt[4] |
|
\");";
if ($msgio=="1") {$a11=$a1; $u11=$u;} else {$a11=$u; $u11=$a1;}
} while($a11 < $u11);
echo "document.write(\"
end. \");";
?>