View file dl/load.php

File size: 2.25Kb
<?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";



/* Apstrādājam 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'));


/* Darbojamies, ja fails eksistē */
if(file_exists($d[0])){

/* Pievienojam kačājumu un pēdējo rezi vilkts */
mysql_query('UPDATE `'.$MY_pre.'faili` SET `loads`=`loads`+1, `timeload`='.$time.' WHERE `id`='.$id);

/* Links */
$sjibat_uz = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.$d[0];
header("Location: $sjibat_uz");
exit;

/* Ziņa īpašiem cilvēkiem */
}else{
echo $mudaki.'</body></html>';
}
?>