|
i having some ddificulty with it
some how whenever i clicked the download .. i jumped to mainpage.
can someone help me ?
------------------------------------------------
function getit($lid) {
// Add a new line of code for each $lid to block for registered users only
$lidArray[] = intval;
global $prefix, $dbi,$user,$admin;
if (!is_user($user)&&in_array($lidarray)&&!is_admin($ admin)) {
$pagetitle = "-"._ACCESSDENIED."";
include("header.php");
title("$sitename: "._ACCESSDENIED."");
opentable();
echo"<center"._RESTRICTEDAREA."
"
.""._MODULEUSERS.""
.""._GOBACK."";
closetable();
include("footer.php");
die();
}
sql_query("update".$prefix."_downloads_downloads set hits=hits+1 WHERE lid=$lid",$dbi);
$result = sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid_$lid",$dbi);
Header("Location: $url");
}
//function getit($lid) {
//global $prefix,$dbi;
//$lid=intval($lid);
//$hits=intval($hits);
//sql_query("update".$prefix."_downloads_downloads set hits=hits+1 WHERE lid=$lid",$dbi);
//update_points(17);
//$result = sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid='$lid'", &dbi);
//list($url)=sql_fetch_row($result,$dbi);
//header("Location:$url");
//}
-----------------------------------------------
the one with "//" are original coding.
can anyone help me here ?
|