View file sea/jad.php

File size: 1.57Kb
<?php
#-----------------------------------------------------#
#     ============ЗАГРУЗ-ЦЕНТР=============           #
#             	 Автор  :  Sea                   	  #
#               E-mail  :  [email protected]              #
#                  ICQ  :  355152215                   #
#   Вы не имеете права распространять данный скрипт.  #
#   		По всем вопросам пишите в ICQ.            #
#-----------------------------------------------------#
include 'moduls/ini.php';
include 'moduls/connect.php';
include 'moduls/fun.php';
###############Если jad выключен##########
if($setup['jad_change'] == 0) die('Not found');
###############Проверка переменных###############
is_num($id,'id');
###############Получаем инфу о файле###########
$d = mysql_fetch_array(mysql_query("SELECT * FROM `files` WHERE `id` = '".$id."'"));
$loader = strtok($ua,"(")."(".$ip.")";
$loader = substr(del($loader),0,60);
if(file_exists($d['path']))
{
	$load_write = mysql_query("UPDATE `files` SET `loads`='".($d['loads']+1)."', `timeload`='".$time."', `lastloader` = '".clean($loader)."' WHERE `id`='".$id."'");
	$dpath = trim($d['path']);
	$filesize = filesize($dpath);
	include('moduls/pclzip.lib.php');
	$open = 'META-INF/MANIFEST.MF';
	$zip = new PclZip("$dpath");
	$content = $zip->extract(PCLZIP_OPT_BY_NAME,$open,PCLZIP_OPT_EXTRACT_AS_STRING);
	$content = $content[0]['content'];
	header('Content-type: text/vnd.sun.j2me.app-descriptor');
	echo $content;
	echo 'MIDlet-Jar-Size: '.$filesize.'
MIDlet-Jar-URL: http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$dpath;
}
?>