if (isset($_GET['do'])) { $do = trim($_GET['do']); switch ($do) { case "download": uses("attachment"); $attachment = new Attachments(); if (empty($_GET['aid'])) { flash(); } $attach_id = intval($_GET['aid']); if (empty($attach_id)) { flash(); } require LIB_PATH . "func.download.php"; require CLASS_PATH . "js.class.php"; $filename = $attachment->getAttachFileName($attach_id); $filename = $attachment->file_url; if (!sendFile($filename)) { exit('Error occured when get files.'); } else { JS::Close(); } break; default: break; } } if (empty($_GET['id'])) { $picture_src = URL . STATICURL . "images/watermark.png"; } if (isset($_GET['source'])) {
if (isset($_GET['do'])) { $do = trim($_GET['do']); switch ($do) { case "download": uses("attachment"); $attachment = new Attachments(); if (empty($_GET['aid'])) { flash(); } $attach_id = authcode(rawurldecode($_GET['aid']), "DECODE"); if (empty($attach_id)) { flash(); } require LIB_PATH . "func.download.php"; require LIB_PATH . "js.class.php"; $filename = rawurlencode($attachment->getAttachFileName($attach_id)); $filename = $attachment->file_url; if (!sendFile($filename)) { exit('Error occured when get files.'); } else { JS::Close(); } break; default: break; } } if (empty($_GET['id'])) { $picture_src = URL . "images/watermark.png"; } if (isset($_GET['source'])) {
if ($status != 1) { flash("Bạn chưa thanh toán thành công, nên không thể tải game về máy", "content.php?id=" . $pid, 10); } uses("attachment"); $attachment = new Attachments(); if (empty($_GET['aid'])) { flash(); } $attach_id = authcode(rawurldecode($_GET['aid']), "DECODE"); if (empty($attach_id)) { flash("File game không tồn tại trên hệ thống!"); } require LIB_PATH . "download.class.php"; require LIB_PATH . "js.class.php"; $download = new Downloads('', false); $download->attach_filename = rawurlencode($attachment->getAttachFileName($attach_id)); $filename = "../" . $attachment->file_url; if (!$download->downloadfile($filename)) { die($download->geterrormsg()); } else { JS::Close(); } break; case "charging": //Băt đầu charging if ($info['iffree'] != 1) { if (empty($_SESSION['msisdn'])) { flash("Hiện tại hệ thống chưa nhận diện được số thuê bao, nên không thể thanh toán hãy liên hệ với quản trị để biết thông tin chi tiết!", "content.php?id=" . $pid, 10); } if (isset($_GET['pid'])) { $pid = intval($_GET['pid']);