'])){ header("location: error.php?error=gid"); exit; } $gid = mysql_real_escape_string($_GET['gid']); # CHECK TO MAKE SURE THE GALLERY ISN'T PRIVATE : IF IT IS REDIRECT TO THE CORRECT PAGE $gal_result = mysql_query("SELECT * FROM photo_galleries where id = '$gid'", $db); $gal_rows = mysql_num_rows($gal_result); $gal = mysql_fetch_object($gal_result); if($gal->pub_pri == 1){ header("location: pri.php?gal=" . $gal->rdmcode . "&gid=" . $gal->id); exit; } //ADDED IN PS350 TO CHECK TO SEE IF THE GALLERY REQUIRES MEMBERSHIP if($gal->yearly == 1){ if($gal->yearly == 1 && $_SESSION['sub_type'] != "yearly"){ $no_view = 1; $mes = "galyearly"; $t = "y"; } else { if($gal->monthly == 1 && $_SESSION['sub_type'] == "monthly"){ $no_view = 0; } else { if($gal->yearly == 1 && $_SESSION['sub_type'] == "yearly"){ $no_view = 0; } else { if($gal->free == 1 && $_SESSION['sub_type'] == "free") $no_view = 0; } } } } if($gal->monthly == 1){ if($gal->monthly == 1 && $_SESSION['sub_type'] != "monthly"){ $no_view = 1; $mes = "galmonthly"; $t = "m"; } else { if($gal->monthly == 1 && $_SESSION['sub_type'] == "monthly"){ $no_view = 0; } else { if($gal->yearly == 1 && $_SESSION['sub_type'] == "yearly"){ $no_view = 0; } else { if($gal->free == 1 && $_SESSION['sub_type'] == "free") $no_view = 0; } } } } if($gal->free == 1){ if($gal->free == 1 && $_SESSION['sub_type'] != "free"){ $no_view = 1; $mes = "galfree"; $t = "f"; } else { if($gal->monthly == 1 && $_SESSION['sub_type'] == "monthly"){ $no_view = 0; } else { if($gal->yearly == 1 && $_SESSION['sub_type'] == "yearly"){ $no_view = 0; } else { if($gal->free == 1 && $_SESSION['sub_type'] == "free") $no_view = 0; } } } } // REDIRECT TO SIGNUP PAGE IF IT DOES REQUIRE MEMBERSHIP if($no_view == 1){ session_register("pub_gid"); $_SESSION['pub_gid'] = $gal->id; header("location: subscribe.php?t=$t&message=$mes"); exit; } // ADDED TO ALLOW SEARCHING OF MEMBERSHIP GALLERY if($no_view == 0){ if(!$_SESSION['galsearch_access']){ session_register("galsearch_access"); } $_SESSION['galsearch_access'] = $gal->id; } if($gal->title == ""){ $page_title = ""; // PAGE TITLE FOR THIS PAGE - IF BLANK USE DEFAULT TITLE } else { $page_title = $gal->title; } $meta_keywords = ""; // KEYWORD METATAGS FOR THIS PAGE - IF BLANK USE DEFAULT //if($gal->description == ""){ $meta_description = ""; // DESCRIPTION METATAGS FOR THIS PAGE - IF BLANK USE DEFAULT //} else { //$meta_description = $gal->description; //} include( "config_public.php" ); if($_GET['gid']){ $gid = $gid; } else { $gid = 99999999999999999999999999; } // VISITOR ID if(!$_SESSION['visitor_id']){ session_register("visitor_id"); $_SESSION['visitor_id'] = random_gen(16,""); } //UNSET ANY IMAGE VIEWING unset($_SESSION['pub_gid']); unset($_SESSION['pub_pid']); ?>
|
|