header ("Content-type: text/html; charset=windows-1251"); function getfiles($srcdir,$f) { $handle=opendir($srcdir); while ($file=readdir($handle)) { if ($file!='..' && !is_dir($file) && ereg("^$f-",$file)) { $fa[]=$file; } } closedir($handle); return $fa; } function dexplode($fa,$chan) { $fa=str_replace($chan."-",'',$fa); return array(substr($fa,4,2),substr($fa,2,2),substr($fa,0,2)); } $c=$_GET['c']; if ($c=='') { $c='list'; } if ($c=='list') { echo ""; echo "
\n";
echo "Основной чат \n"; foreach($files as $fa) { $adat=dexplode($fa,$chan); $dat=$adat[0].".".$adat[1].".".$adat[2]; echo "$dat | "; } echo " |