<?php session_start();  //Developed by ITechScripts
?>
<style type="text/css">
<!--
.style1 {
	color: #666666;
	font-weight: bold;
}
.style3 {color: #666666; font-size: 11px; font-family:Arial, Helvetica, sans-serif}
-->
</style>
<?php
require 'include/configurations.php'; // ITECHBIDS Configuration File
$mode=$_GET['mode'];
if($mode=="")
{
$mode='actv';
}
$userid=$_GET['id'];
$type=$_GET['type'];
if(!$type)
 $type='gen';


if($mode=='delete')
{
$dresult=mysql_query("delete from admin where admin_id=$userid");
$message="Deleted suessfully";
}


$cansave=$_POST['cansave'];
if($cansave==1)
{
echo '<meta http-equiv="refresh" content="0; url=addnew.php">';
exit();
 }
?>
><?php
require 'include/header.php';
?>
<br>
<?php 
	 $sql="select * from admin where status='sub'";
     $res=mysql_query($sql);
	  if(mysql_num_rows($res)>0)
	  {
?>
<table width="80%"  border="0" cellpadding="5" cellspacing="1" class="ft" align="center">
<form name="frm1" method="post" action="addnew.php">
      <tr class="ct">

        <td width="17%"><div align="center"><span height="25">Name </span></div></td>
        <td width="19%"><div align="center"><span height="25">E-mail</span></div></td>
        <td width="6%"><div align="center"><span height="25">Edit</span></div></td>
        <td width="9%"><div align="center"><span height="25">Delete</span></div></td>
        <td width="2%"><div align="right"></div></td>
      </tr>
<?
while($row=mysql_fetch_array($res))
{
?>
      <tr >

        <td>
		<?=$row['fname']; ?> <?=$row['lname']; ?></td>
        <td>
          <?=$row['email']; ?>
        </td>
        <td><div align="center" class="style3">
		 <a href="addadmin.php?id=<?=$row['admin_id']; ?>&mode=edit" style="text-decoration:none" id="link1">Edit</a></div></td>
		<td><div align="center" class="style3"><a href="adminlist.php?id=<?=$row['admin_id']; ?>&mode=delete"  id="link1" style="text-decoration:none" onClick="javascript:return condelete();">Delete</a></div></td>
      </tr>
      <?
	  }
?>
  <tr >
  <td colspan="10" align="center" >
  <input type="hidden" name="cansave" value="0">
  <input type="hidden" name="canDel" value="0">
</td>
  </tr>
  </form></table>
<?
}
?>
<?
	require 'include/footer.php';
?>