Location: PHPKode > projects > Phpman > phpman-2.0a_RC2/admin/index.php
<?php
/**
* Administration index file
* @package phpman
* @copyright (c) 2004 Samuel Suter
* @author Samuel Suter <hide@address.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* @version 1.0
**/

require_once("../config.php");
require_once(_mlsDocroot."includes/common_header.php");
?>
<html>
	<title>phpman - Administration</title>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
	<link rel="stylesheet" href="adminstyle.css" />
	<meta name="author" content="Samuel Suter" />
</head>
<body>

<table width="100%" height="100%" class="mainadmin" cellspacing="2" cellpadding="2">
	<tr>
		<td colspan="2" class="title" height="40">phpman2 by Samuel Suter<?php if($my->_data["user_ID"]) { ?><br><small>Logged in as <?=$my->_data["username"] ?> (<?=$my->_data["name"] ?>)</small><?php } ?></td>
	</tr>
	<tr>
		<td width="150" class="navi">
		<?php if(!$_SESSION["user_ID"]) { ?>
		<form method="POST" action="index.php">
		<table border="0">
			<tr>
				<th>Username:</th>
				<td><input type="text" name="data[login][username]" size="10"></td>
			</tr>
			<tr>
				<th>Pass:</th>
				<td><input type="password" name="data[login][password]" size="10"></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" name="submit" value="Login"></td>
			</tr>
		</table>
		</form>
		<?php } elseif($_SESSION["user_ID"] AND $my->_data["admin"] == 'Y') {
			$tbl = new mlsDBtable("#__languages","language_ID",$database);
			$l = $tbl->load($my->_data["language_ID"]);
			?>
		&raquo; <a href="?page=manuals&lang=<?=$l["isocode"]?>">Edit manuals</a><br>
		&raquo; <a href="?page=users&lang=<?=$l["isocode"]?>">Edit users</a><br>
		&raquo; <a href="?page=languages&lang=<?=$l["isocode"]?>">Edit languages</a><br>
		&raquo; <a href="?page=notes&lang=<?=$l["isocode"]?>">Edit notes</a><br>
		<br>
		&raquo; <a href="?logout=true">Logout</a><br>
		<?php } ?>
		</td>
		<td width="80%" class="content">
		<?php
		if($my->_data["admin"] == 'Y') {
			if(!$_REQUEST["page"]) {
				$_REQUEST["page"] = "manuals";
			}
			if(file_exists($_REQUEST["page"].".php")) {
				include($_REQUEST["page"].".php");
			} else {
				echo "&nbsp;";
			}
		} else {
			echo "&nbsp;";
		}
		?>
		</td>
	</tr>
</table>

</body>
</html>
Return current item: Phpman