Размер файла: 4.98Kb
<?php
include "../main/cfg.php";/////Настройки
$Date=date("d-m-Y");
$Time=date("H.i");
if($ver==0) {
$header ='<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title>'.$title.'</title><link rel="stylesheet" href="../main/'.$dir_style.'/'.$style.'" type="text/css"/>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" />
</head><body>';
$footer ='<div class="bottomn">
<a href="index.php?style='.$style.'&ver='.$ver.'">Начало</a><br/>
<a href="'.$copy.'">На главную</a></div>
® '.$copy.'';
$end='</div></body></html>';} else {$header ='<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.3//EN" "http://www.phone.com/dtd/wml13.dtd">
<wml>
<card id="Menu" title="'.$title.'"><p align="left">';
$footer ='<a href="index.php?style='.$style.'&ver='.$ver.'">Начало</a><br/>
<a href="'.$copy.'">На главную</a><br/>
® '.$copy.'';
$end='</p>
</card>
</wml>';}
if($ver==0) {header ("Content-type: application/xhtml+xml; charset=utf-8");} else { header ("Content-type:text/vnd.wap.wml; charset=utf-8");}
print $header;
$list=10;
$txt=htmlspecialchars($txt, ENT_QUOTES);
$files = @file("all/all.dat");
if(!empty($files)) {if($ver==0) { print '<form action ="all.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'" method="post">';} print 'Дата:<br/><select name="txt" multiple="false">';
$dir = opendir ("all");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && ($file != "all.dat"))
{$file= str_replace(".txt","",$file);
print '<option value="'.$file.'">'.$file.'</option>';}}
print '</select><br/>';
closedir ($dir);
if($ver==0) { print '<input type="submit" value="Смотреть··»"/>';
echo "</form>";} else {print '<anchor title="ok">Смотреть··»<go href="all.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'" method="post">
<postfield name="txt" value="$txt"/></go></anchor>';}
print '<br/>';
$txt = substr($HTTP_POST_VARS["txt"],0,32);
if($txt=='') {$txt=$txts;}
if($ver==0) {print '<div class="bottom">';}
if($txt=="") {print 'Выберете дату';}
if($txt==$Date) {print 'Сегодня';} else {print $txt;}
if($ver==0) {print '</div>';} else {print '<br/>---<br/>';}}else {print 'Нет ни одного заказа';}
if($txt!="") {
if($ver==0) {print '<div class="block">';}
if(($txt=="") && (empty($txt))){print 'Error'; print $end; break; }
$file = @file("all/$txt.txt");
$total = count($file);
if (empty($_GET['start_if'])) $start_if = 0;
else $start_if = $_GET['start_if'];
if ($total < $start_if + $list){ $end = $total; }
else {$end = $start_if + $list; }
for ($i = $start_if; $i < $end; $i++){
$file = @file("all/$txt.txt");
$file = array_reverse($file);
$txta = explode("|",$file[$i]);
$i2=round($i+1);
if($ver==0) {$ss='<div class="text">'; $ss1='</div>';} else {$ss=''; $ss1='<br/>------<br/>';}
print $ss.$txta[0].'<br/>'.$txta[1].'<br/>'.$txta[2].'<br/>'.$txta[3].'<br/>'.$txta[4].$ss1;}
if ($start_if != 0) {echo '<a href="all.php?start_if='.($start_if - 10).'&txts='.$txt.'&style='.$style.'&ver='.$ver.'">Назад</a> | ';}
if ($total > $start_if + $list) {echo '<a href="all.php?start_if='.($start_if + 10).'&txts='.$txt.'&style='.$style.'&ver='.$ver.'">Далее</a>';}
if($ver==0) {print '</div>';}}if($ver==0) {print '<div class="top"><div class="bottomn">';} if($ver==1){ if($total>$list) {print '<br/>---<br/>';}}
print $footer;
if($ver==0) {print '</div>';}
if($ver==0) {print '</div><div class="copy">';} else {print '<br/>';}
$style_this=substr($style,0,-4); $style_this=latrus($style_this); $style_this=str_replace('_',' ',$style_this);
if($ver==0){ $gg=1; $ggg='wml'; $ggg1='xhtml<a href="all.php?style='.$style.'&ver='.$ver.'&sm=yes&tr='.$tr.'&txts='.$txt.'">('.$style_this.')*</a>';} else {$gg=0; $ggg='xhtml('.$style_this.')'; $ggg1='wml';}
print 'Версия сайта: <a href="all.php?style='.$style.'&ver='.$gg.'&tr='.$tr.'&txts='.$txt.'">'.$ggg.'</a> | '.$ggg1.'';
$sm=htmlspecialchars($sm, ENT_QUOTES);
$style=htmlspecialchars($style, ENT_QUOTES);
if($ver==0) {if($sm=="yes") {print '<form action ="all.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'&txts='.$txt.'" method="post">
Стиль:<select name="style" multiple="false">';
$dir = opendir ("../main/css");
while ($style = readdir ($dir))
{if (( $style != ".") && ($style != "..") && ($style != ".htaccess"))
{$style_this=substr($style,0,-4); $style_this=latrus($style_this); $style_this=str_replace('_',' ',$style_this); print '<option value="'.$style.'">'.$style_this.'</option>';}}
print '</select>';
closedir ($dir);
print '<input type="submit" name="go" value="··» "></input></form>';}}
print $end;
?>