<?php
require 'config.php';
$d = $did = $_GET['d'];
$f = $fid = $_GET['f'];
$date = date('d.m.y');
$time = date('H:i');
echo $resultus;
switch ($_GET['action']) {
default:
if (!$d) {
echo '<div class="red">Произошла ошибка! Не выбран каталог</div>' ;
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
}
$title_dir = name($d);
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<img src="../images/img/lock.gif" alt=""/>' . $title_dir . '<br/>';
if (!preg_match("/[^a-z0-9_@+-]/i", $d)) {
$dir = opendir($d); //открываем текущую директорию
$k_files = 0;
while ($file = readdir($dir)) {
if ($file != '.' && $file != '..' && $file[0] != '.' && strrchr($file, '.') != '.php' && strrchr($file, '.') != '.dat') {
$a[$k_files]['name'] = $file;
$a[$k_files]['time'] = filemtime("$d/$file");
$a[$k_files]['size'] = round(filesize("$d/$file") / 1024, 2); // в килобайтах
$k_files++;
}
} //записываем все что есть в массив
closedir($dir); //Закрываем
} else {
echo 'ПАШШОЛ НАХУЙ ЕБЛАН!';
exit;
}
function sfiles($str1, $str2) {
if ($str1['time'] == $str2['time']) {
return 0;
} elseif ($str1['time'] < $str2['time']) {
return 1;
} else {
return - 1;
}
}
@usort($a, 'sfiles');
$total = sizeof($a); #считаем
$start = intval($_GET['start']);
if ($total < $start + $config['downlist']) {
$end = $total;
} else {
$end = $start + $config['downlist'];
}
for ($i = $start; $i < $end; $i++) {
$filtime = $a[$i]['time'] + 432000; //Сколько файл считать новым сейчас уст. на 5 суток
if ($filtime > $_SERVER['REQUEST_TIME']) {
echo '<img src="../images/img/new.gif" alt="image" /> <a href="down.php?action=ob&d=' . $d . '&f=' . $a[$i]['name'] . '&' . SID . '">' . $a[$i]['name'] . '</a> (' . $a[$i]['size'] . ' kb)<br/>';
} else {
echo '<img src="../images/img/new2.gif" alt="image" /> <a href="down.php?action=ob&d=' . $d . '&f=' . $a[$i]['name'] . '&' . SID . '">' . $a[$i]['name'] . '</a> (' . $a[$i]['size'] . ' kb)<br/>';
}
$filename = $a[$i]['name'];
$te = @file("data/$filename.dat");
$u = explode('|', $te[0]);
if ($u[0] == '') {
$u[0] = 0;
}
if (pathinfo($filename, PATHINFO_EXTENSION) == 'jar') {
$filename = str_replace('.jar', '.jad', $filename);
$te2 = file("data/$filename.dat");
$filename = str_replace('.jad', '.jar', $filename);
$u2 = explode('|', $te2[0]);
if ($u2[0] == '') {
$u2[0] = 0;
}
$u[0] = $u[0] + $u2[0];
}
$opis = @file("$d/$filename.dat");
$komment = explode('|:|:|:|', $opis[0]);
$opis = $komment[0];
$added = $komment[1];
if($config['skachli']==1){
echo '<a href="down.php?action=count&d=' . $d . '&f=' . $a[$i]["name"] . '&' . SID . '">Cкачиваний</a>: (' . $u[0];
$tit = @round($u[2] / $u[1], 1);
if ($u[1] == '') {
$u[1] = 0;
}
$filev = @file("data/$filename.dat");
$totalv = sizeof($filev) - 1;
$data1 = explode('|', $filev[$totalv]);
if ($data1[4] == '') {
$data1[4] = 0;
}
echo ')<br/>';}
if($config['komobm']==1){
echo '<a href="down.php?action=komm&d=' . $d . '&f=' . $a[$i]["name"] . '&' . SID . '">Комментарии</a> (' . $data1[4] . ')<br/>';
}}
if (!$total) {
echo '<b> нет файлов<br/></b>';
}
# постраничный вывод
if ($start != 0) {
echo '<div class="border"><a href="down.php?start=' . ($start - $config['downlist']) . '&d=' . $d . '&' . SID . '">Назад |</a> ';
}
if ($total > $start + $config['downlist']) {
echo ' <a href="down.php?start=' . ($start + $config['downlist']) . '&d=' . $d . '&' . SID . '">| Далее</a></div>';
}
echo '<div class="border">Всего файлов: ' . $total . '<br/></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
break;
case 'count':
$currHour = date('H');
$currDate = date('d F, Y');
$currTime = date("$currHour:i:s");
$currDate = str_replace('January', 'января', $currDate);
$currDate = str_replace('February', 'февраля', $currDate);
$currDate = str_replace('March', 'марта', $currDate);
$currDate = str_replace('April', 'апреля', $currDate);
$currDate = str_replace('May', 'мая', $currDate);
$currDate = str_replace('June', 'июня', $currDate);
$currDate = str_replace('July', 'июля', $currDate);
$currDate = str_replace('August', 'августа', $currDate);
$currDate = str_replace('September', 'сентября', $currDate);
$currDate = str_replace('October', 'октября', $currDate);
$currDate = str_replace('November', 'ноября', $currDate);
$currDate = str_replace('December', 'декабря', $currDate);
if (file_exists("$did/$fid")) {
header("Location: $did/$fid");
$f = file("data/$fid.dat");
$u = explode('|', $f[0]);
$g = trim($u[0] + 1);
$t = $g . '|' . $u[1] . '|' . $u[2] . '|' . $currDate;
$t = str_replace("\r\n", '', $t);
$rd = 0;
$file = file("data/$fid.dat");
$fp = fopen("data/$fid.dat", 'a+');
flock($fp, LOCK_EX);
ftruncate($fp, 0);
for ($i = 0, $all = sizeof($file); $i < $all; $i++) {
if ($rd != $i) {
fputs($fp, $file[$i]);
} else {
fputs($fp, "$t\r\n");
}
}
fflush($fp);
flock($fp, LOCK_UN);
fclose($fp);
chmod("data/$fid.dat", 0666);
} else {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
$resultus = '<div class="red">Ошибка, невозможно найти требуемый вам файл ' . $did . '/' . $fid . '</div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
}
break;
//////////////////////////////////////////////////////////////////
//Запись и вывод рейтинга
case 'vote':
if ($_SESSION['votus'] == $fid) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Вы уже оценили этот файл!<br/>» <a href="down.php?action=ob&d=' . $d . '&f=' . $fid . '&' . SID . '">К Описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
}
if (!file_exists("data/$fid.dat")) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Вы не можете оценивать т.к. никто еще не скачивал файл<br/>» <a href="?action=ob&d=' . $d . '&f=' . $fid . '&' . SID . '">К Описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
}
if (file_exists("$d/$fid")) {
$f = file("data/$fid.dat");
$u = explode('|', $f[0]);
$g = trim($u[1] + 1);
$g2 = trim($u[2] + intval($_POST['ocenka']));
$t = $u[0] . '|' . $g . '|' . $g2 . '|' . $u[3];
$rd = 0;
$file = file("data/$fid.dat");
$fp = fopen("data/$fid.dat", 'a+');
flock($fp, LOCK_EX);
ftruncate($fp, 0);
for ($i = 0, $all = sizeof($file); $i < $all; $i++) {
if ($rd != $i) {
fputs($fp, $file[$i]);
} else {
fputs($fp, $t);
}
}
fflush($fp);
flock($fp, LOCK_UN);
fclose($fp);
chmod("data/$fid.dat", 0666);
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Спасибо, ваша оценка: <strong>"' . $_POST['ocenka'] . '"</strong> принята<br/></div>';
$votus = $fid;
session_register('votus');
$te = file("data/$fid.dat");
$u = explode('|', $te[0]);
$tit = round($u[2] / $u[1], 1);
echo 'Всего оценивало: ' . $u[1] . '<br/>Средняя оценка: ' . $tit . '<br/>» <a href="down.php?action=ob&d=' . $d . '&f=' . $fid . '&' . SID . '">К Описанию</a><br>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
} else {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Ошибка, невозможно открыть требуемый вам файл ' . $fid . '<br/></div>' ;
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
}
break;
//////////////////////////////////////////////////////
// Вывод камментов
case 'komm':
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="input">
<form action="down.php?action=addkomm&f=' . $f . '&d=' . $d . '&' . SID . '" method="post" name="REPLIER">
<div>
Ваше имя<br/>
<input name="name" type="text" maxlength="10"><br/>
<strong>Сообщение</strong><br/>
<textarea cols="25" rows="3" name="msg"></textarea><br/>
Транслит<input name="trans" type="checkbox" value="y"><br/>
<input type="submit" value="Написать">
</div>
</form>
</div>';
$file = @array_reverse(@file("data/$f.dat"));
$total = sizeof($file) - 1;
$start = intval($_GET['start']);
if ($total < $start + $config['maxpostdown']) {
$end = $total;
} else {
$end = $start + $config['postdown'];
}
for ($i = $start; $i < $end; $i++) {
$data = explode('|', $file[$i]);
$i2 = round($i + 1);
$data[0] = preg_replace("/((https?|ftp):\/\/[[:alnum:]_=\/-]+(\\.[[:alnum:]_=\/-]+)*(\/[[:alnum:]+&._=\/%]*(\\?[[:alnum:]?+&_=\/%]*)?)?)/i", '<a href="$1">$1</a>', $data[0]);
$data[5] = str_replace("\r\n", '', $data[5]);
echo '<div class="border"><strong> ' . $data[3] . '</strong><small> (' . $data[2] . ' / ' . $data[1] . ')</small></div>' . $data[0] . '<br/>';
}
if ($start != 0) {
echo '<div class="border"><a href="down.php?action=komm&d=' . $d . '&f=' . $f . '&start=' . ($start - $config['postdown']) . '&' . SID . '">Назад</a> ';
}
if ($total > $start + $config['postdown']) {
echo ' <a href="down.php?action=komm&d=' . $d . '&f=' . $f . '&start=' . ($start + $config['postdown']) . '&' . SID . '">Далее</a><br/></div>';
}
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
break;
////////////////////////////////////////////////////////////////
// Запись комментариев
case 'addkomm':
$msg = $_POST['msg'];
$name = $_POST['name'];
$str = strlen($msg);
if (!$msg || $str < 6) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Вы не написали комментарий или он слишком короткий<br/>
» <a href="?action=komm&d=' . $d . '&f=' . $f . '&' . SID . '">Вернуться</a><br/>
» <a href="?action=ob&d=' . $d . '&f=' . $f . '&' . SID . '">К Описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
}
if (!$name) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Вы не ввели имя<br/>
» <a href="?action=komm&d=' . $d . '&f=' . $f . '&' . SID . '">Вернуться</a><br/>
» <a href="?action=ob&d=' . $d . '&f=' . $f . '&' . SID . '">К Описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
}
if (!file_exists("data/$f.dat")) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Вы не можете комментировать т.к. никто еще не скачивал файл<br/>
» <a href="?action=komm&d=' . $d . '&f=' . $f . '&' . SID . '">Вернуться</a><br/>
» <a href="?action=ob&d=' . $d . '&f=' . $f . '&' . SID . '">К описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php"); exit;
}
if ($_POST['trans'] == 'y') {
$msg = trans($msg);
}
$name = iconv_substr($name, 0, 12, 'UTF-8');
$name = trim(htmlspecialchars($name));
$msg = iconv_substr($msg, 0, 1024, 'UTF-8');
$msg = nl2br(trim(htmlspecialchars($msg)));
///////////////////////////////////////////
//приступаем к записи
$file = file("data/$f.dat");
$total = sizeof($file) - 1;
$data1 = explode('|', $file[$total]);
$me = $data1[4] + 1;
$text = $msg . '|' . $date . '|' . $time . '|' . $name . '|' . $me . '|';
$text = str_replace("\r\n", '', $text);
$fp = fopen("data/$f.dat", 'a+');
flock($fp, LOCK_EX);
fputs($fp, "$text\r\n");
flock($fp, LOCK_UN);
fclose($fp);
chmod("data/$f.dat", 0666);
$fo = file('local.dat');
$u = explode('|', $fo[0]);
$g = trim($u[5] + 1);
$t = $u[0] . '|' . $u[1] . '|' . $u[2] . '|' . $u[3] . '|' . $u[4] . '|' . $g . '|' . $u[6];
$fp = fopen('local.dat', 'a+');
flock($fp, LOCK_EX);
ftruncate($fp, 0);
fputs($fp, $t);
fflush($fp);
flock($fp, LOCK_UN);
fclose($fp);
chmod('local.dat', 0666);
$file = file("data/$f.dat");
$i = sizeof($file);
if ($i >= $config['postdown']) {
$fp = fopen("data/$f.dat", 'w');
flock($fp, LOCK_EX);
unset($file[1]);
fputs($fp, implode('', $file));
flock($fp, LOCK_UN);
fclose($fp);
chmod("data/$f.dat", 0666);
}
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Ваш комментарий успешно добавлен!<br/>
» <a href="?action=komm&d=' . $d . '&f=' . $f . '&' . SID . '">Вернуться</a><br/>
» <a href="?action=ob&d=' . $d . '&f=' . $f . '&' . SID . '">К Описанию</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
break;
///////////////////////////////////////////////////////////////
// выводим описание
case 'ob':
if (!$d || !$f) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="red">Произошла ошибка! Не выбрана категория или файл<br/></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
exit;
} //контроль
if (file_exists("$d/$f.dat")) {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<img src="../images/img/files2.gif" alt=""/> <b>'. $f .'</b><br/>';
if (!preg_match("/[^a-z0-9_@+-]/i", $d) && (!preg_match("/[^a-z0-9_@+.-]/i", $f))) {
$opis = @file_get_contents("$d/$f.dat");
$komment = explode('|:|:|:|', $opis);
if ($komment['0'] != '') {
echo 'Описание: ' . $komment['0'] . '<br/>';
}
if ($komment['1'] != '') {
echo 'Добавил: ' . $komment['1'] . '<br/>';
}
} else {
echo 'ПАШШОЛ НАХУЙ ЕБЛАН!';
exit;
}
} else {
#--------THE XSIT.RU--------------#
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('partners.gif', 'Обмен файлов');
echo '<div class="border">' . $f . '<br/></div>Описания нет<br/>';
}
$siz = round(filesize("$d/$f") / 1024, 2);
if (file_exists("$d/$f.jpg")) {
echo '<br/>Скриншот:<br/><img src="' . $d . '/' . $f . '.jpg" alt=""/>';
} elseif (file_exists("$d/$f.gif")) {
echo '<br/>Скриншот:<br/><img src="' . $d . '/' . $f . '.gif" alt=""/>';
}
if($config['arhiv_open']==1){
if (strstr("$d/$f",".zip")) { echo '<b><a href="zip.php?action=view&filearc=' . $f . '&'.SID.'">Посмотреть архив</a></b><br>';
}}
echo '<strong><a href="down.php?action=count&d=' . $d . '&f=' . $f . '&' . SID . '">Скачать</a></strong> (' . $siz . ' kb)';
$jar_file = str_replace('.jar', '', $f);
if (file_exists("$d/$jar_file.jad")) {
echo '<br/><strong><a href="down.php?action=count&d=' . $d . '&f=' . $jar_file . '.jad&' . SID . '">Скачать JAD</a></strong>';
}
$sn = explode('/', $_SERVER['SCRIPT_NAME']);
echo '<br/><input name="text" value="http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . $d . '/' . $f . '"/>';
$te = @file("data/$f.dat");
$u = explode('|', $te[0]);
if ($u[0] == '') {
$u[0] = 0;
}
if (pathinfo($f, PATHINFO_EXTENSION) == 'jar') {
$f = str_replace('.jar', '.jad', $f);
$te2 = file("data/$f.dat");
$f = str_replace('.jad', '.jar', $f);
$u2 = explode('|', $te2[0]);
if ($u2[0] == '') {
$u2[0] = 0;
}
$u[0] = $u[0] + $u2[0];
}
echo '<br/>Cкачиваний: ' . $u[0];
if (!empty($u[3])) {
echo '<br/>Последнее скачивание:<br/>' . $u[3];
}
$file = @file("data/$f.dat");
$total = sizeof($file) - 1;
$data1 = explode('|', $file[$total]);
if ($data1[4] == '') {
$data1[4] = 0;
}
$tit = @round($u[2] / $u[1], 1);
if ($u[1] == '') {
$u[1] = 0;
}
if($config['komobm']==1){
echo '<br/><a href="down.php?action=komm&d=' . $d . '&f=' . $f . '&' . SID . '">Комментарии</a> (' . $data1[4] . ')';
}
echo '<br/>Рейтинг: ' . $tit . '/<strong>' . $u[1] . '</strong><br/>
<div class="input">
<form action="down.php?action=vote&d=' . $d . '&f=' . $f . '&' . SID . '" method="post" name="vote">
<div>
Оценить<br/>
<select name="ocenka">
<option value="10">10</option>
<option value="9">9</option>
<option value="8">8</option>
<option value="7">7</option>
<option value="6">6</option>
<option value="5">5</option>
<option value="4">4</option>
<option value="3">3</option>
<option value="2">2</option>
<option value="1">1</option>
</select>
<input name="fid" type="hidden" value="' . $f . '">
<input type="submit" value="Oценить">
</div>
</form>
</div>';
echo '<img src="../images/img/back.gif" alt="image" /> <a href="down.php?d=' . $d . '&' . SID . '">Назад</a><br/>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a><br/>';
if($config['kopiring']==1){
echo '<center><b><a href="http://xsit.ru">© Power XSIT</a></b></center><br/>';}
include_once ("../themes/".$config['themes']."/foot.php");
break;
}
?>