<?php

/***************************************************************************

 t_menu.php
 -----------
 copyright : (C) 2002-2003 The ezContents Development Team

 ***************************************************************************/

/***************************************************************************
 The ezContents Development Team offers no warranties on this script.
 The owner/licensee of the script is solely responsible for any problems
 caused by installation of the script or use of the script.

 All copyright notices regarding ezContents must remain intact on the
 scripts and in the HTML for the scripts.

 For more info on ezContents,
 visit http://www.ezcontents.org/

/***************************************************************************

/***************************************************************************
 *
 *	This program is free software; you can redistribute it and/or modify
 *	it under the terms of the License which can be found within the
 *	zipped package.
 *
 ***************************************************************************/

include_once ("rootdatapath.php");
require_once ($GLOBALS["rootdp"]."include/config.php");
require_once ($GLOBALS["rootdp"]."include/db.php");
require_once ($GLOBALS["rootdp"]."include/session.php");

include ($GLOBALS["rootdp"]."include/access.php");

include ($GLOBALS["rootdp"]."include/settings.php");
include ($GLOBALS["rootdp"]."include/functions.php");
include ("adminfunctions.php");
includeLanguageFiles('admin','adminmenu');


$GLOBALS["usergroup"] = bVerifyLogin();

force_page_refresh();
adminheader();
if (isset($HTTP_GET_VARS["RefreshMenu"])) {
	?>
	<body leftmargin=0 topmargin=0 marginwidth="0" marginheight="0" class="mainback" onload="top.mainbody.left.location='menu.php';">
	<?php
} else {
	?>
	<body leftmargin=0 topmargin=0 marginwidth="0" marginheight="0" class="mainback">
	<?php
}

$fdesc = $HTTP_GET_VARS["groupname"];
?>

<table border="0" width="100%" cellspacing="0" cellpadding="3">
	<tr>
		<td align=center>
			<table border="0" width="100%" cellspacing="3" cellpadding="3">
				<tr class="headercontent">
					<td align="center" class="header">
						<b><?php echo $GLOBALS["tsTitle"]; ?></b>
					</td>
				</tr>
				<tr class="tablecontent">
					<td>
						<?php echo '<br /><b>'.$GLOBALS["tg".$fdesc].'</b>:<br />'.$GLOBALS["tgd".$fdesc].'<br />&nbsp;'; ?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</body>
</html><?php


function bVerifyLogin()
{
	global $EZ_SESSION_VARS;

	$bUsergroup = '';
	if (($EZ_SESSION_VARS["LoginCookie"] != '') && ($EZ_SESSION_VARS["PasswordCookie"] != '')) {
		$strQuery	= "SELECT * FROM ".$GLOBALS["eztbAuthors"]." a, ".$GLOBALS["eztbUsergroups"]." u WHERE a.login='".$EZ_SESSION_VARS["LoginCookie"]."' and a.userpassword='".$EZ_SESSION_VARS["PasswordCookie"]."'";
		$result		= dbRetrieve($strQuery,true,0,0);
		$rs			= dbFetch($result);
		if ($rs["login"] == $EZ_SESSION_VARS["LoginCookie"]) { $bUsergroup = $rs["usergroup"]; }
		dbFreeResult($result);
	}
	return $bUsergroup;
} // function bVerifyLogin()

?>
