با سلام



در سایت من وقتی لینک دانلود رو توی بخش مدیریت وارد می کنم و بعد میرم روش کلیک کنم یه صفحه خالی میاره ولی لینک دانلود نمی شه نمونه پست رو لینک می کنم لطفا کمکم کنید مشکل حل کنم



کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید


فایل index.php در پوشه download:

<?

$page = array(

"name" => "صفحه اصلی",

"title" => "index",

"domain" => "download",

"access" => "all",

"script" => array(),

"load" => array(),

"method" => array(),

);

chdir("../");

include "./inc/global.php";

DAT_SetDownloadGroups();

$gCode = 0; $gSubs = $_DAT["download"]["gbasic"];

if (isset($_GET["id"])) {

while (strpos(" " . $_GET["id"], "/") != 0) { $_GET["id"] = substr($_GET["id"], 1); }

$gCodes = array_keys($_DAT["download"]["groups"]);

for ($i=0; $i<count($gCodes); $i++) {

if ($_DAT["download"]["groups"][$gCodes[$i]]["id"] == $_GET["id"]) {

$gCode = $gCodes[$i];

$gSubs = $_DAT["download"]["groups"][$gCodes[$i]]["subs"];

}

}

}

if (count($gSubs) != 0) {

$_PAGE->NewContent("body");

$_PAGE->AddContent("<table width=\"100%\" cellpadding=\"10\" cellspacing=\"0\" border=\"0\">");

for ($i=0; $i<count($gSubs); $i++) {

$sCode = $gSubs[$i];

if (($i % 2) == 0) { $_PAGE->AddContent(" <tr>"); }

$_PAGE->AddContent(" <td width=\"50%\">");

$_PAGE->AddContent("<a href=\"" . $_DAT["download"]["groups"][$sCode]["url"] . "\" style=\"font-weight: 600;\">" . $_DAT["download"]["groups"][$sCode]["ftitle"] . "</a><br>");

$_PAGE->AddContent(STR_PNumber(count($_DAT["download"]["groups"][$sCode]["allsubs"])) . " زیر شاخه" . "<br>");

$_PAGE->AddContent(STR_PNumber($_DAT["download"]["groups"][$sCode]["allfile"]) . " فایل" . "<br>");

$_PAGE->AddContent(" </td>");

if (($i % 2) == 1) { $_PAGE->AddContent(" <tr>"); }

}

$_PAGE->AddContent("</table>");

$_PAGE->AddWindow("زیر گروه ها", $_PAGE->GetContent());

}

$where = "";

if ($gCode != 0) {

$where .= "WHERE ((`f_group` = '" . $gCode . "') ";

for ($i=0; $i<count($_DAT["download"]["groups"][$gCode]["allsubs"]); $i ++) {

$where .= "OR (`f_group` = '" . $_DAT["download"]["groups"][$gCode]["allsubs"][$i] . "') ";

}

$where .= ") ";

}

$fNum = $_DB->GetCount("er_downf", $where);

if ($fNum == 0) {

$_PAGE->NewContent("comment");

$_PAGE->AddContent("تابحال فایلی برای دانلود ثبت نشده است.");

} else {

$_NUMBERS = PGB_GetNumbers($fNum, $_CFG["num_download_per_page"], $_GET["pg"]);

$files = $_DB->Query("SELECT `f_code`, `f_date`, `f_title`, `f_group`, `f_category`, `f_download` FROM `er_downf` " . $where . " ORDER BY `f_date` DESC LIMIT " . $_NUMBERS["begin"] . ", " . $_CFG["num_download_per_page"]);

$_PAGE->NewContent("body");

for ($i=0; $i<$_DB->GetResultNumber($files); $i++) {

if ($i != 0) { $_PAGE->AddContent("<br>"); }

$_PAGE->AddContent(VIW_GetDownloadTop($files, $i));

}

$_PAGE->NewContent("pagebar");

$_PAGE->AddContent(PGB_GetPagebar($_NUMBERS, URL_GetDownloadGroupURL($gCode, "<>")));

}

$title = "فایل ها";

if ($gCode != 0) {

$title .= "ی شاخه " . strip_tags($_DAT["download"]["groups"][$gCode]["fulltitle"]);

}

$_PAGE->AddWindow($title , $_PAGE->GetContent());

$_PAGE->ShowPage();

?>



فایل file.php در پوشه download:



<?

$page = array(

"name" => "مشخصات فایل",

"title" => "view file",



"domain" => "download",

"access" => "all",



"script" => array(),

"load" => array(),

"method" => array("download"),

);

chdir("../");

include "./inc/global.php";

DAT_SetDownloadGroups();

$file = $_DB->Query("SELECT * FROM `er_downf` WHERE (`f_code` = '" . $_GET["code"] . "')");

if ($_DB->GetResultNumber($file) == 0) { $_PAGE->SetMethod("download_notfound"); }

$_PAGE->NewContent("body");

$_PAGE->AddContent(VIW_GetDownloadTop($file, 0));

$_PAGE->AddContent("<div style=\"text-align: justify\">" . $_DB->GetResultValue($file, 0, "f_description") . "</div>");

$_PAGE->AddWindow("مشخصات فایل", $_PAGE->GetContent());

if (($_DB->GetResultValue($file, 0, "f_file") != "") && (file_exists($_CFG["dir_download"] . $_DB->GetResultValue($file, 0, "f_file")))) {

$_PAGE->NewContent("header");

$_PAGE->AddContent("دریافت مستقیم از سرور سایت");



$_PAGE->NewContent("body");

$_PAGE->AddContent("<table cellpadding=\"15\" cellspacing=\"0\" width=\"100%\" border=\"0\">");

$_PAGE->AddContent(" <tr>");

$_PAGE->AddContent(" <td width=\"70%\">");

$_PAGE->AddContent(" " . "فایل: " . "<span class=\"EN\" dir=\"ltr\">" . $_DB->GetResultValue($file, 0, "f_file") . "</span><br>");

$_PAGE->AddContent(" " . "حجم: " . FS_GetBestSize(filesize($_CFG["dir_download"] . $_DB->GetResultValue($file, 0, "f_file"))) . "<br>");

$_PAGE->AddContent(" </td>");

$_PAGE->AddContent(" <td width=\"30%\" align=\"center\">");

$_PAGE->AddContent(" " . "<a style=\"font-weight: 600;\" href=\"" . $_CFG["site_url"] . "download/get/" . $_DB->GetResultValue($file, 0, "f_code") . ".html\">" . "دریافت فایل" . "</a>");

$_PAGE->AddContent(" </td>");

$_PAGE->AddContent(" </tr>");

$_PAGE->AddContent("</table>");

}

$links = FUN_ResetArray(array_filter(array_unique(explode(" \n", $_DB->GetResultValue($file, 0, "f_links")))));

if (count($links) != 0) {

$_PAGE->NewContent("header");

$_PAGE->AddContent("لینک(های) دانلود از سایر سایت ها");

$_PAGE->NewContent("body");

$_PAGE->AddContent("<table cellpadding=\"5\" cellspacing=\"0\" width=\"100%\" border=\"0\">");

for ($i=0; $i<count($links); $i++) {

$_PAGE->AddContent(" <tr class=\"cListLine" . (($i % 2) + 1) . "\">");

$_PAGE->AddContent(" <td width=\"70%\">");

$_PAGE->AddContent(" <a href=\"" . $_CFG["site_url"] . "download/get/" . $_DB->GetResultValue($file, 0, "f_code") . "/" . ($i + 1) . ".html\" class=\"EN\" dir=\"ltr\"><span class=\"link\">دريافت از سرور شماره " . STR_PNumber($i+1) . "</span></a><br>");

$_PAGE->AddContent(" </td>");

$_PAGE->AddContent(" <td width=\"30%\" align=\"center\">");

$_PAGE->AddContent(" <input type=\"button\" class=\"cFormButton\" style=\"width: 125px;\" onClick=\"window.open('" . $_CFG["site_url"] . "download/report.php?code=" . $_DB->GetResultValue($file, 0, "f_code") . "&link=" . ($i + 1) . "', 'DownloadLinkError', 'dependent=yes, toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, top=0, left=0, width=504, height=300');\" value=\"گزارش اشکال در لینک\">" . "</a>");

$_PAGE->AddContent(" </td>");

$_PAGE->AddContent(" </tr>");

}

$_PAGE->AddContent("</table>");

}

$_PAGE->AddWindow("دریافت فایل", $_PAGE->GetContent());

$gCode = $_DB->GetResultValue($file, 0, "f_group");

$query = "";

$query .= "SELECT `f_code`, `f_title` FROM `er_downf` WHERE (((`f_group` = '" . $gCode . "')";

for ($i=0; $i<count($_DAT["download"]["groups"][$gCode]["allsubs"]); $i++) {

$query .= " OR (`f_group` = '" . $_DAT["download"]["groups"][$gCode]["allsubs"][$i] . "') ";

}

$query .= ") AND (`f_code` <> '" . $_DB->GetResultValue($file, 0, "f_code") . "')) ORDER BY `f_date` DESC LIMIT 10";

$rFiles = $_DB->Query($query);

if ($_DB->GetResultNumber($rFiles) != 0) {

$_PAGE->NewContent("body");

for ($i=0; $i<$_DB->GetResultNumber($rFiles); $i++) {

$_PAGE->AddContent("<img src=\"" . $_CFG["site_url"] . "img/bullet.gif\" alt=\"\" width=\"4\" height=\"7\"> ");

$_PAGE->AddContent("<a href=\"" . $_CFG["site_url"] . "download/view/" . $_DB->GetResultValue($rFiles, $i, "f_code") . ".html\">" . $_DB->GetResultValue($rFiles, $i, "f_title"). "</a><br>");

}

$_PAGE->AddWindow("فایلهای مرتبط", $_PAGE->GetContent());

}

$_PAGE->ShowPage();



?>



فایل download.php در پوشه download:



<?

$page = array(

"name" => "دریافت فایل",

"title" => "download file",



"domain" => "download",

"access" => "all",



"script" => array(),

"load" => array(),

"method" => array("download"),

);

chdir("../");

include "./inc/global.php";

DAT_SetDownloadGroups();

$file = $_DB->Query("SELECT * FROM `er_downf` WHERE (`f_code` = '" . $_GET["code"] . "')");

if ($_DB->GetResultNumber($file) == 0) { $_PAGE->SetMethod("download_notfound"); }

$links = FUN_ResetArray(array_filter(array_unique(explode(" \n", $_DB->GetResultValue($file, 0, "f_links")))));

if (!isset($_GET["link"])) {

if ($_DB->GetResultValue($file, 0, "f_file") == "") { $_PAGE->SetMethod("download_notfound"); }

$_DB->Execute("UPDATE `er_downf` SET `f_download` = `f_download` + 1 WHERE (`f_code` = '" . $_GET["code"] . "')");

header("Location: " . $_CFG["site_url"] . $_CFG["dir_download"] . $_DB->GetResultValue($file, 0, "f_file"));

} else {

$lNum = $_GET["link"] - 1;

if ($links[$lNum] == "") { $_PAGE->SetMethod("download_notfound"); }

$_DB->Execute("UPDATE `er_downf` SET `f_download` = `f_download` + 1 WHERE (`f_code` = '" . $_GET["code"] . "')");

header("Location: " . $links[$lNum]);

}

$_PAGE->ShowPage();


?>
با تشکر