Location: PHPKode > projects > OpenDataCenter Network Management System > include/administration_page/user/view.php
<?php
// ----------------------------------------------------------------------
// Copyright (C) 2007 by GREGORY LE BRAS
// ----------------------------------------------------------------------
// LICENSE
//
// This file is part of ODCNMS - Open DataCenter Network Management System
// 
// ODCNMS is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// Foobar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with Foobar; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
// ----------------------------------------------------------------------
// Original Author of file: GREGORY LE BRAS - http://www.odcnms.org/
// ----------------------------------------------------------------------
?>
<?php
$request=mysql_query("SELECT * FROM $name_table_users WHERE id=\"$id\"") or die ("ERROR!");

while($tmp_request=mysql_fetch_array($request))
{
$user_name = $tmp_request['username'];
?>
<table class="subtitle" width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td width="80%"><h4><img src="images/user.gif" alt="user" align="top"> <?php echo $tmp_request['username']; ?></h4></td>
		<td width="10%" style="text-align:right">[ <a href="index.php?include=administration&page=user&action=edit&id=<?php echo $id; ?>"><?php echo TXT_EDIT; ?></a> ]</td>
		<td width="10%" style="text-align:right">[ <a href="index.php?include=administration&page=user&action=delete&id=<?php echo $id; ?>"><?php echo TXT_DELETE; ?></a> ]</td>
	<tr>
</table>
<table class="list" width="100%" cellspacing="2" cellpadding="3">
	<tr class="list_title">
		<td width="100%" style="font-weight:normal;"><b><?php echo TXT_STATUS; ?>:</b>
		<?php
			switch ($tmp_request['administrator'])
			{
				case '0':
					echo "<font style='padding:2px;background:#0000ff;color:#fff'>".TXT_SIMPLE_USER."</font>";					
				break;
				
				case '1':
					echo "<font style='padding:2px;background:#ff0000;color:#fff'>".TXT_ADMINISTRATOR."</font>";					
				break;
				
				case '2':
					echo "<font style='padding:2px;background:#00ff00;color:#fff'>".TXT_SUPER." ".TXT_ADMINISTRATOR."</font>";					
				break;				
			}
		?></td>
	</tr>
</table>

<br><center><a href="javascript:history.go(-1);"><?php echo TXT_BACK; ?></a></center>
<?php
}
?>
Return current item: OpenDataCenter Network Management System