<?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!
// #
// #
// ################################################################
?>
	<table width="110" border="0" cellpadding="0" cellspacing="0">
          <tr bgcolor="#f8a938">
            <td align="left" valign="top" class="maw"><div align="center"><strong>Main</strong></div></td>
          </tr>
		<?php
		$result = mysql_query("SELECT * FROM `pages` WHERE `id`='".$_GET['pid']."'");
		$line = mysql_fetch_array($result);
		$sql = "SELECT * FROM `pages` ORDER BY `order` ASC";		
		$re = mysql_query($sql);
		while( $row=mysql_fetch_array($re) ) {	
			?>
         		<tr bgcolor="#ced7ee">
			  <td align="left" valign="top" class="mac"> - <a href="index.php?pid=<?php echo $row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
			</tr>
			<?php 		
		}
		mysql_free_result($re);

		if (constant('contact_form')=="on") {
			?>
			<tr>
			  <td align="left" valign="top" bgcolor="#ced7ee">&nbsp;<a href="contact.php">Contact</a></td>
			</tr>
			<?php
	  	 } ?>		  


          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr bgcolor="#f8a938">
            <td align="left" valign="top" class="maw"><div align="center"><strong>Members</strong></div></td>
          </tr>
          <?php 

	if (!$_SESSION['lo']) { 

	  ?>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"> - <a href="index.php?page=member">Login</a> </td>
          </tr>
          <?php 

	} else { 

		$sql = "SELECT * FROM `memberpages` ORDER BY `order` ASC";		
		$re = mysql_query($sql);
		while( $row=mysql_fetch_array($re) ) {

			?>
			<tr bgcolor="#ced7ee">
			  <td class="mac" valign="top" align="left" > - <a href="index.php?page=member&mid=<?php echo $row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
			</tr>
			<?php 
		} 
		mysql_free_result($re);

		?>
	          <tr>
	            <td bgcolor="#FFFFFF">&nbsp;</td>
	          </tr>
	          <tr>
	            <td bgcolor="#ced7ee">&nbsp;<a href="index.php?page=member&lo=logout">Logout</a></td>
	          </tr>
	          <tr>
	            <td bgcolor="#FFFFFF">&nbsp;</td>
	          </tr>
	          <?php 
	} 

	?>
	</table>
