<?PHP
// ################################################################
// #
// #	Auto Membership Manager 2.13
// #
// #
// #	This script is licensed to a single domain only. You must
// #	purchase additional license keys for additional domains.
// #
// #
// #	PeerGoal.com
// #	http://wwww.PeerGoal.com
// #
// #	Created 	03/12/2007
// #	Modified 	04/02/2007
// #
// #
// #	Copyright 2006-2007 PeerGoal.com
// #	All Rights Reserved
// #
// #	Selling of this code in part or in whole without
// #	prior written consent is expressly forbidden!
// #
// #	Obtain written permission before redistributing this
// #	software over the Internet or in any other medium.
// #
// #	In all cases this full header must remain intact!
// #
// #
// ################################################################
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="imagetoolbar" content="no" >
<?php 
 if ($_GET['pid']) {
 	//if( ereg('member.php',$_SERVER['SCRIPT_FILENAME'] )) {$tb_page = "memberpages";} else {  $tb_page = "pages"; }
	$result = mysql_query("SELECT * FROM `".TABLE_PAGES."` WHERE `id`='".$_GET['pid']."'");
	$line = mysql_fetch_array($result);
	echo "<title>".$line['metatitle']."</title>\n";
	echo "\n<META NAME=\"description\" CONTENT=\"".$line['metadesc']."\">";
 }elseif($_GET['mid']) {
	$result = mysql_query("SELECT * FROM `".TABLE_MEMBERPAGES."` WHERE `id`='".$_GET['mid']."'");
	$line = mysql_fetch_array($result);
	echo "<title>".$line['metatitle']."</title>\n";
	echo "\n<META NAME=\"description\" CONTENT=\"".$line['metadesc']."\">";
 } elseif ($_GET['itemid']) {
	$result = mysql_query("SELECT * FROM `items` WHERE `id`='".$_GET['itemid']."' LIMIT 1");
	$line = mysql_fetch_array($result);
		echo "<title>".$line["item"]."</title>\n";
		echo "\n<META NAME=\"description\" CONTENT=\"".$line["descr"]."\">\n";
 } else {
	echo "<title>".constant('websitename')."</title>";
	echo "<META NAME=\"description\" CONTENT=\"".constant('websiteintro')."\">";
 }
?>
<link rel="stylesheet" type="text/css" href="style.css">

</head>
<body bgcolor="#FFFFFF">
	<?PHP
		//if(($_SESSION["login"] == TRUE)||(demo_mode=="on")) {
		if($_SESSION["login"] == TRUE) {
		  echo "<p>| <a href=index.php>".lang_cpviewwebsite."</a> |";
		  echo " <a href=admin/index.php?action=>".lang_cpcontrolpanel."</a> |</p>";
		}elseif(demo_mode=="on"){
		  echo "<p>| <a href=index.php>".lang_cpviewwebsite."</a> |";
		  echo " <a href=admin/index.php?action=>".lang_cpcontrolpanel."</a> |</p>";
		}
	?>
<center>
<table border="<?php echo constant('page_table_border'); ?>" cellpadding="0" cellspacing="0" width="<?php echo table_width; ?>">
<tr><td align="left">
	<h3><?PHP echo constant('websitename'); ?>	</h3>
	<h4>

	</h4>
</td></tr>

<tr>
<!--<td width="1" bgcolor="#000000"></td>-->
<td valign="top">

	<table border="1" bordercolor=#000000 width="100%" cellpadding="0" cellspacing="0">
	<tr><td width="110" valign=top> 
	<?php require_once("menu.inc.php");?>
	</td><td valign="top" align="left">


		<center>
		<table border="0" bordercolor=#000000 width="<?=table_width-110;?>" cellpadding="0" cellspacing="0">
		<tr><td valign=top> 


