Location: PHPKode > projects > ProPHP > ProPHP/content/public/scripts.php
<?php
/*****************************************************************
************* BKWORKS PRO PHP V 0.5 BETA 1 ***********************
******************** BRYAN KOOIENGA ******************************
****************** DECEMBER 20, 2007 *****************************
*****************************************************************/

if(!defined("INDEX")) { # Check to see if it's being called by the Index page
	die("Hacking Attempt Detected."); // If not, end the script.
}
/***************************************************************
Beginning to check and see if the user is logged in. */
if($_SESSION['user'] != "") { # If they are, then...
	$query = "SELECT site_number FROM sites WHERE site_url = '$username'"; # Get their user ID from the database. Site_id is possibly outdated, but we make do with what works.
	$results = mysql_query($query) or die("Can't query because " . mysql_error()); # MySQL stuff. Actually asking the database for it's stored information
	$results = mysql_fetch_array($results); # Taking the information we're given and bringing it down to one row.
	$site_num = $results['site_number']; # Finalize getting their user ID
	$query = "SELECT install_url FROM settings"; # This is asking the database for it's hidden information.
	$results = mysql_query($query) or die("Can't query on line " . __LINE__  . " because " . mysql_error()); # Actually asking for the information
	$site_url = mysql_fetch_array($results); # Bring the results down to one row
	$site_url = $site_url['install_url']; # Take the information we requested and add it to a variable
	?>
	<h3>Get Ad Scripts</h3>
	<p>We'd like to remind you that this is an AD-SWAP network, meaning that you also have to serve ads up on your site!<br />
	Sites that continue to serve up 0 ads WILL BE DELETED!<br />
	  Code to serve up 468 X 60 ads:
	  <br />
	<textarea readonly="readonly" cols="75" rows="3"><script language="javascript" src="<?php echo $site_url; ?>/show.php?customer=<?php echo $site_num; ?>&amp;height=60&amp;width=468" type="text/javascript"></script></textarea><br />
    <img src="ads/placeholder_468x60.jpg" height="60" width="468" /></img>
    <br><br /><br /><br /><br /><br />
	Code to serve up 120 X 240 ads:<br />
	<textarea readonly="readonly" cols="75" rows="3"><script language="javascript" src="<?php echo $site_url; ?>/show.php?customer=<?php echo $site_num; ?>&amp;height=240&amp;width=120" type="text/javascript"></script></textarea><br />
    <img src="ads/placeholder_120x240.jpg" height="240" width="120" /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
	Code to serve up 120 X 600 ads:<br />
	<textarea readonly="readonly" cols="75" rows="3"><script language="javascript" src="<?php echo $site_url; ?>/show.php?customer=<?php echo $site_num; ?>&ampheight=120&ampwidth=600" type="text/javascript"></script></textarea><br />
   <img src="ads/placeholder_600x120.jpg" width="600" height="120" /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<?php
} else { # The user isn't logged in
	include("content/homepage/index.php"); # Include the login page
}
?>
Return current item: ProPHP