phplemon

AdQuick 2.2.3 - "Ad Network" PHP Script
$249

AdQuick allows you to run your own ad network similar to websites such as adengage.com, buysellads.com and adster.com.

AdQuick will allow you to bring together advertisers and publishers, and you the script owner will take a cut from every ad sold through your adbrite clone website.

AdQuick can also be used as a stand alone Ad Server for your own advertising needs.


- Free Installation + Free Updates & Support For Life
- Buy AdQuick and BlogQuick Together For $399 - Click Here
- AdQuick Web Hosting - From Only $3.71 Per Month - Click Here

How To Only Allow Logged In Users To View Your New Pages.

If you have created a new page on your AdQuick website, using the AdQuick template system, as explained on this guide, www.phplemon.com/create-new-page.php - You will know that the new page is visible to anyone using your website.

It is possible to only allow logged in users to view these new pages with a simple line of code.

If you followed the guide at www.phplemon.com/create-new-page.php, you will know that the blank template for the new .php file looks like this,

 

<?php
include ("include/config.php");

$smarty->assign('right_panel', 'off');

//// ******* just change the name 'blank.tpl' as you need
$content = $smarty->fetch('blank.tpl');
//// ********************

$smarty->assign('content',$content);
$smarty->display('master_page.tpl');
?>

 

All you need to do is add this line of code,

if(!isset($_SESSION[uid])) { header("location: account.php"); exit(); }

So your new .php page should look like,

 

<?php
include ("include/config.php");
if(!isset($_SESSION[uid])) { header("location: account.php"); exit(); }

$smarty->assign('right_panel', 'off');

//// ******* just change the name 'blank.tpl' as you need
$content = $smarty->fetch('blank.tpl');
//// ********************

$smarty->assign('content',$content);
$smarty->display('master_page.tpl');
?>