Размер файла: 2.91Kb
<?php
#********************************** AgS MOD DOWNLOAD CENTR SEA *************************************#
#***************************************************************************************************#
# /||||||||||||||| ********************* /||||||||||||||| ********************* /||||||||||||||| #
# | ||||||||||||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | |||||/////||||| ********************* | |||||///////// ********************* | |||||///////// #
# | ||||| | ||||| ****** E-MAIL ******* | ||||| ****** WAP/WEB ****** | ||||| #
# | ||||| | ||||| *** [email protected] *** | ||||| * http://ags.h2m.ru * | ||||||||||||||| #
# | ||||| | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | ||||| | ||||| ********************* | |||||/////||||| ********************* |///////////||||| #
# | ||||||||||||||| ****** SKYPE ******** | ||||| | ||||| ***** MOD AUTHOR **** | ||||| #
# | |||||////|||||| ***** agrizz15 ****** | ||||| | ||||| ***** Agris Cišs **** /||||||||||||||| #
# | ||||| | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# |///// |///// ********************* |/////////////// ********************* |/////////////// #
#***************************************************************************************************#
#********************************* MOD by AgS in 2010 @ LATVIA *************************************#
require_once"system/start.php";
require_once"system/config.php";
require_once"system/db.php";
require_once"system/head.php";
require_once"lng/$setup[lng]/lng.php";
include_once"system/lib.pclzip.php";
/* Pārbaudam JAD ģenerācijas ieslēgšanu */
if($setup['jad_change']){
/* Pārbaudam datus */
$id = intval($_GET['id']);
/* Iegūstam faila info */
$d = mysql_fetch_row(mysql_query('SELECT TRIM(`path`) FROM `'.$MY_pre.'faili` WHERE `id` = '.$id.' LIMIT 1'));
/* Daram ja fails eksistē */
if(file_exists($d[0])){
/* Pievienojam kačājumu un pēdējo vilkšanas laiku */
mysql_query('UPDATE `'.$MY_pre.'faili` SET `loads`=`loads`+1, `timeload`='.$time.' WHERE `id`='.$id);
/* Iegūstam izmēru */
$filesize = filesize($d[0]);
/* Veidojam JAD no JAR faila */
$zip = new PclZip($d[0]);
$content = $zip->extract(PCLZIP_OPT_BY_NAME,'META-INF/MANIFEST.MF',PCLZIP_OPT_EXTRACT_AS_STRING);
/* JAD struktūra */
header('Content-type: text/vnd.sun.j2me.app-descriptor');
header('Content-Disposition: attachment; filename="'.basename($d[0]).'.jad";');
/* Izvadam ģenerēto failu */
echo $content[0]['content']."\n".'MIDlet-Jar-Size: '.$filesize."\n".'MIDlet-Jar-URL: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.$d[0];
/* Ziņa īpašiem cilvēkiem */
}else{echo $mudaki.'</body></html>';}
} else { header ("Location: index.php?sayer=404&".SID); exit;}
?>