Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- session_start();
- include_once('db_inc.php');
- include_once($basefilepath.'functions/general.php');
- include_once($basefilepath.'classes/ado.php');
- include_once($basefilepath.'classes/core.php');
- include_once($basefilepath.'classes/user.php');
- include_once($basefilepath.'classes/file_manager.php');
- $redirect_to = $siteName."download/".$_GET['file_id']."-".urlencode($file->getFileName($_GET['file_id']));
- if(!$objuser->isUserLoggedIn()){
- $core->setMessage('You Should Be Logged In For Premium Download',-1);
- header("location:$siteName");
- exit();
- }
- if(isset($_GET['file_id'])){
- if($objuser->isPremiumUser($_SESSION['user_id'])){ // checks if the user is premium member
- if($objuser->isSubscriptionPlanValid($_SESSION['user_id'])){// checks if the plan has been expired
- if(!$objuser->isMaximumDownloadExceeded($_SESSION['user_id'])){ // checks if the max download per day exceeded
- header("location:$siteName"."includes/download_new.php?id=$_GET[file_id]&dtype=premium&extra=extra");
- exit();
- }
- else{
- $core->setMessage('Maximum Download For Today Exceeded.','-1');
- header("location:$redirect_to");
- exit();
- }
- }
- else{
- $core->setMessage('Your Premium Member Subsrciption Plan Has Been Expired.','-1');
- header("location:$redirect_to");
- exit();
- }
- }
- else{
- $core->setMessage('You Are Not A Premium Member.','-1');
- header("location:$redirect_to");
- exit();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement