MOON
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
System: Linux vps.panamaemb.org.sg 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64
User: panama (500)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/panama/public_html_old/managesite/admin_user_list.php
<?	
	include("../include/config.php"); 
	include("../include/opner_admin.php");

	if(strlen(trim($_GET['remove'])) > 0)
	{	
		$remove = base64_decode($functions->anti_injection($_GET['remove']));	
	}
	
	$remove = ((empty($remove))?0:$remove);
	
	if(strlen(trim($_POST['btnaddauser'])) > 0)
	{
		header("location:admin_user_addnew.php");
	}

	//remove category  
	if($remove > 0)
	{
		$db_del = new database();
		$db_del->where("id=".$remove);
		$db_del->delete("admin_users");
	}
		
	$tbl_name = "admin_users";
	$targetpage = $_SERVER['PHP_SELF'];
	$limit = MY_PAGES;
	
	if(strlen(trim($_GET['page'])) > 0)
	{	$page = $functions->anti_injection($_GET['page']);	}
	
	if($page) 
		$start = ($page - 1) * $limit; 			//first item to display on this page
	else
		$start = 0;	
?>
<html>
<head>
	<title><?=SITE_ADMIN_TITLE?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<meta name="description" content="<?=META_DESCRIPTION?>" />
	<meta name="keywords" content="<?=META_KEYWORD?>" />
	<link href="css.css" rel="stylesheet" type="text/css" />
	<script src="js/MyFunctions.js"></script>
</head>
<body onLoad="javascript:showhide('admin');">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>	    
    <td width="100%"><? include("header.php")?></td>
  </tr>
  <tr>
	<td align="right" valign="top" width="100%">
		<form id="form1" name="form1" method="post">
	 	 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="inertable">
      	  	<tr>
				<td colspan="2" class="inertr" style="padding-left:7px"><img src="images/bullet_new.png" align="absmiddle" />&nbsp;&nbsp;Manage Admin users</td>
			</tr>
			<tr>
			   <td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td align="center" class="error" width="80%"><?=$_SESSION['msg'];?></td>
				<td align="right" style="padding-right:10px">
				<? if($_SESSION['admin_user_id'] == 1 ){?>
				<input type="submit" name="btnaddauser" value="Add Admin User" class="btn"/>
				<? } ?>
				</td>
			</tr>
			<tr>
			   <td height="5px;" colspan="2"></td>
			</tr>
			<tr>
				<td colspan="2" align="center">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">              	
					<tr align="right" valign="top">
						<td height="30"><? $functions->Paging($tbl_name,$targetpage,$limit,$page)?></td>
					</tr>
					<tr>
					 <td align="center" valign="top">
						<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC" class="text">
							<tr class="list-mainHeading">
								<td width="8%" align="center">Sr No.</td>
								<td width="40%" class="tdpadding">Name</td>
								<td width="37%" class="tdpadding">Email</td>
								<td width="7%" align="center">Edit</td>
								<td width="8%" align="center">Delete</td>
						  	</tr>
					<?
						$counter=1;
						$db_list = new database();
						$db_list->where("1 LIMIT $start, $limit");
						$db_list->selectstmt("admin_users");
						if($db_list->row_count > 0)
						{
							for($i=0;$i < $db_list->row_count;$i++)
							{
								$db_list->moveto($i);
								$is_superadmin1 = $db_list->f_isSuperAdmin;
					 ?>
								<tr onMouseOver="changeColor(this.id)" id="<?=$i?>" onMouseOut="defualtColor(this.id)" class="trDefualtBackgroundColor">
									<td align="center"><?=$counter+$start?></td>
									<td height="20" class="tdpadding"	><?=$db_list->f_firstname." " .$db_list->f_lastname?></td>									
									<td class="tdpadding"><?=$db_list->f_email?></td>									
									<td align="center" valign="middle"><a href="admin_user_edit.php?edit_id=<?=base64_encode($db_list->f_id)?>" title="Edit"> <img src="images/icon-edit.gif" alt="Edit" width="16" height="16" border="0" /> </a> </td>
									<?  if($db_list->f_id==1){?>
									<td align="center">&nbsp;</td>
									<? }else{ ?>
									<td align="center" valign="middle"><a href="admin_user_list.php?remove=<?=base64_encode($db_list->f_id)?>" onClick="return delete_yesno('<?=$db_list->f_firstname." " .$db_list->f_lastname?>');" title="Delete"> <img src="images/padlock-closed.gif" alt="Delete" width="16" height="16" border="0" /> </a></td>
									<? } ?>
						  </tr>
					 <?		 $counter++;
							}
						}
						else
						{
							echo "<tr><td class='error' align='middle' colspan='6' style='padding-top:20px;'>There is no record in your database</td></tr>";
						}
					  ?>	
					</table>
					 </td>
					</tr>
					<tr><td>&nbsp;</td></tr>
			   </table>
			  </td>
			</tr>
		 </table>
        </form>
    </td>
  </tr>
</table>
<? unset($_SESSION['msg']);?>
</body>
</html>