File size: 7.15Kb
<?php
/*
Автор: Evgenij made in AZOV
E-mail: [email protected] (Всем вопросы и тех. поддержка)
Запрещенно!!: добавлять данный скрипт в бесплатные архивы!!, продавать!!, Меняться на форумах и т.д и т.п!!, без моего согласия:)
*/
include "main/cfg.php";/////Настройки
if($sh=="") {$sh=$img_array_pred_i; $w1=$sh; }
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="top"><div class="bottomn">
<a href="index.php?style='.$style.'&ver='.$ver.'">Начало</a><br/>
<a href="'.$copy.'">На главную</a></div>
® '.$copy.'</div>';
$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;
$dir = opendir ("main/down-you");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && ($file != "all.dat"))
{$file= str_replace(".dat","",$file);
$filew = @file("main/down-you/$file.dat");
$totalw = count($filew);
$totalw=$totalw-1;
$dw = explode("||",$filew[$totalw]);
$dirr=$dw[1]; $dp=substr($dirr,1);
list($startif,$endif) = explode('.',$file);
$endif='.'.$endif.'';;
$files =@file("main/down-you/$file.dat");
if(!empty($files)) {$filews = @file("main/down-you/$file.dat");
$totalws = count($filews);
$totalws=$totalws-1;
$dws = explode("|",$filews[$totalws]);}
list ($file_ex,$endif) = explode (".",$file);
list ($d_a,$d_b) = explode (".",$file);
$endif='.'.$d_b.'';
$extu = explode('/',$dp);
$extu = $extu[count($extu)-1];
$ddirruu=substr_count($extu,"!");
if($ddirruu==2) {$namefile=$startif;} else {$namefile=latrus($startif);}$namefile=$namefile.$endif;
for ($i=0; $i<count($type_img); $i++)
{if (($endif==$type_img[$i])||($endif==$type_screenshot_img[$i]))
{$predsz=1;}}
for ($i=0; $i<count($type_music); $i++){
if ($endif=="$type_music[$i]"){$dfg=":: ";}}
for ($i=0; $i<count($type_img); $i++)
{if ($endif=="$type_img[$i]") {$dfg='<img src="'.$this_file_obmennik.'?pics=1&qq=70&a='.$dp.'/&s='.$d_a.'.'.$d_b.'&sh='.$sh.'" alt=""/><br/>'; $siska='&sh='.$sh.'';}}
{if($ver==0) {$hgg= '<div class="text"></div>';} else {$hgg= '<br/>---------<br/>';}
for ($i=0; $i<count($type_opisanie_spisok); $i++)
if ($endif=="$type_opisanie_spisok[$i]"){
$filew = @file("$dp/$dir_opisanie/$d_a.txt");
if(!empty($filew)) {$dfg="::";
$filew=fopen("$dp/$dir_opisanie/$d_a.txt", "r");
$dw = fread($filew, $TXT_simvolov*2);
$opisanie='»'.$dw.'<a href="'.$this_file_obmennik.'?file=1&filename='.$file_ex.$endif.'&dirr='.$dirr.'&style='.$style.'&ver='.$ver.$siska.'&tr='.$tr.'">...</a>'.$hgg.''; } else {$opisanie='» описания нет '.$hgg.'';}}}
for ($i=0; $i<count($type_screenshot_img); $i++)
{$file =@file("$dp/$dir_screenshot/$d_a.jpg");
if(!empty($file)) {if ($endif=="$type_screenshot_img[$i]") {$dfg='<img src="'.$this_file_obmennik.'?pics=1&qq=70&a='.$dp.'/'.$dir_screenshot.'/&s='.$d_a.'.jpg&sh='.$sh.'" alt=""/><br/>'; $siska='&sh='.$sh.'';}} }
if($sh=="No") {$dfg=":: ";}
$file_size=filesize($dp.'/'.$file_ex.$endif);
if ($file_size < 1024) $file_size = $file_size."b";
if ($file_size >= 1024) $file_size = round (($file_size/1024), 1)."Kb";
if ($file_size >= 1024) $file_size = round (($file_size/1024), 1)."Mb";
$gui[]=$dws[0].'<br/>'.$dfg.'<a href="'.$this_file_obmennik.'?filename='.$file_ex.$endif.'&dirr='.$dirr.'&style='.$style.'&ver='.$ver.$siska.'&tr='.$tr.'">'.$namefile.'</a>('.$file_size.')<br/>'.$opisanie.'
';
$opisanie='';
$dfg='::';
}}closedir ($dir);
if($ver==0) {print '<div class="bottom">';}
if($sh=="No") {$sha="Нет";} else {$sha=''.$sh.'x'.$sh.'';}
if($predsz==1) { $predpros='<small>|Предпросмотр:<a href="rat.php?style='.$style.'&ver='.$ver.'&preds=1&sh='.$sh.'&tr='.$tr.'">'.$sha.'</a></small>';} else {$predpros='';}
print '<b>TOP 20</b>'.$predpros.'';
if($ver==0) {print '</div><div class="block">';} else { print '<br/>------<br/>';}
$preds=intval($preds);
$sh=intval($sh);
if($preds==1) {if($ver==0){print '<form action ="rat.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'" method="post">
<select name="sh" multiple="false">';}
else {print '<select name="sh" multiple="false">';}
foreach($img_array_pred as $zz)
{list ($sh,$sh) = explode ("x",$zz);
if($sh=="No") {$sha="Убрать";} else {$sha=''.$sh.'x'.$sh.'';}
print '<option value="'.$sh.'">'.$sha.'</option>';}
print '</select>';
if($ver==1){print '<anchor title="ok">··»<go href="rat.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'" method="post">
<postfield name="sh" value="$sh"/>';}
if($ver==0){ print '<input type="submit" name="go" value="··»"></input></form>';}
else {print '</go></anchor><br/>';}}for ($i=0; $i<count($gui); $i++){
usort ($gui, strnatcmp);
$gui = array_reverse($gui);
$gui_count=count($gui);
if($i<=21) {print '<b>'.($i+1).') </b>Скачан:'.$gui[$i];}}
if($ver==0) {print '</div>';}
print $footer;
$style_this=substr($style,0,-4); $style_this=latrus($style_this); $style_this=str_replace('_',' ',$style_this);
if($ver==0) {print '<div class="copy">';} else {print '<br/>';}
if($ver==0){ $gg=1; $ggg='wml'; $ggg1='xhtml<a href="rat.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'&sm=yes&sh='.$sh.'">('.$style_this.')*</a>';} else {$gg=0; $ggg='xhtml('.$style_this.')'; $ggg1='wml';}
print 'Версия сайта: <a href="rat.php?style='.$style.'&ver='.$gg.'&tr='.$tr.'&sh='.$sh.'">'.$ggg.'</a> | '.$ggg1.'';
if($ver==0) { print '</div><div class="block">';}
$sm=htmlspecialchars($sm, ENT_QUOTES);
if($ver==0) {if($sm=="yes") {print '<form action ="rat.php?style='.$style.'&ver='.$ver.'&tr='.$tr.'&sh='.$sh.'" 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;
?>