File size: 1.49Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE); /////////////// игнорируем ошибки
header("Content-type:text/vnd.wap.wml;charset=utf-8"); //////// тип и кодировка документа
include 'dan.php';
include 'kto.php';
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">
<wml><card id=\"mas\" title=\"Галерея\"><p align=\"left\">";
///////////// выводим вмл заголовок
if($npo==""){$npo=0;}
$kp=0;
$ntf=0;
$dir = opendir ("$foto");
while ( $file = readdir ($dir) )
{
if (( $file != ".") && ($file != ".."))
{
$pv=strrpos($file, ".");
$uzers= substr($file, 0, $pv);
$ntf=$ntf+1;
if($uzers!="" & $kp<10 & $npo<$ntf){
print "
<anchor title=\"open\">$uzers
<go href=\"sgfoto.php\" method=\"post\">
<postfield name=\"file\" value=\"$file\"/>
</go></anchor><br/>";
$kp=$kp+1;}
} }
closedir ($dir);
$npo=$npo+10;
if($kp>=10){print"<br/><anchor title=\"spisok\">Далее
<go href=\"gfoto.php\" method=\"post\">
<postfield name=\"npo\" value=\"$npo\"/>
</go></anchor><br/>";}
print "<br/><a href=\"index.php\">Вход в чат</a>
<br/><a href=\"$gl\">На главную</a><br/>
</p></card></wml>";
?>