<?php 

include("session_start.php");

include("session_check.php");

include("database.php");

include("paginator.class.php");



extract($_GET);

$cat = $_SESSION['cat'];

//echo $cat;

if($cat == "admin")

{

	//echo $cat;

	//echo $_SESSION['username'];

}



 ?>





<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Survey Application</title>

<link rel="stylesheet" type="text/css" href="css/style.css" />

<link rel="stylesheet" type="text/css" href="css/page.css">

<link href="css/admincss.css" rel="stylesheet" type="text/css">

<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="js/ddsmoothmenu.js">

</script>



<script type="text/javascript">



ddsmoothmenu.init({

	mainmenuid: "smoothmenu1", //menu DIV id

	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"

	classname: 'ddsmoothmenu', //class added to menu's outer DIV

	//customtheme: ["#1c5a80", "#18374a"],

	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]

})







</script>

</head>



<body class="body">



<div id="wrap" >

  

  

  <div id="top">

    <?php include("header.php"); ?>

    <!--<div id="ban"><table width="1004" align="left"  >

  <tr>

    <td width="234"  align="left"  valign="top" ><img src="images/logoss.jpg" border="0" /></td>

    <td  valign="top" style="padding-top:5px;" width="758"  align="right" ><table align="left" width="707">

  <tr>

    <td width="386" align="left"><div ><a href="#" id="bantext1">REQUEST A DEMO</a></div></td>

    <td width="167" align="left"><div ><a href="#" id="bantext2">DOWNLOADS</a></div></td>

    <td width="138" align="left"><div ><a href="#" id="bantext2">DOWNLOADS</a></div></td>

  </tr>

  <tr>

    <td colspan="3" align="center" class="banquot">Be Smart and Survey Smartly </td>

  </tr>

</table></td>

    

    

  </tr>

</table>

    </div>-->

    

    </div>

    </div>

   <div id="menuholder"><?php include("adminmenu.php"); ?></div>

   <div id="contholder">

   

    

    <!--<div id="nav">

     <ul>

     <li><a href="adminhome.php" id="home_on">HOME</a></li>

        <li><a href="adminproducts.php" id="products_on">PRODUCTS</a></li>

		<li><a href="adminfeatures.php" id="features_on">FEATURES</a></li>

        <li><a href="adminadvantages.php" id="advantages_on">ADVANTAGES</a></li>

        <li><a href="adminhowitworks.php" id="howitworks_on">HOW IT WORKS</a></li>

        <li><a href="adminhelp.php" id="help_on">HELP</a></li>

        <li><a href="admincontactus.php" id="contactus_on">CONTACT US</a></li>

    

    </ul>

    

    </div>-->

    

    

    	<div id="contdata">

    <?php //include("header.php"); ?><br />

<form action="" name="tree_grid" id="tree_grid" method="get">

<table border="1" cellpadding="2" cellspacing="2" width="100%" align="center" bordercolor="#bcd5e7" >

	 

     <tr> <td colspan="12" style="padding-left:10px;"><a href="super_admin.php" style="text-decoration:none; color:#000"><font class="font4"><b>  + Add Details </b></font> </a></td> </tr>

     

	 <tr>

    	<td align="center" ><font class="font4"><b>Edit</font></td>

        

        <td align="center"><font class="font4"><b>Delete</font></td>

        

        <td align="center"><font class="font4"><b>Company Name</font></td>

        <td align="center"><font class="font4"><b>Company Address</font></td>

        <td align="center"><font class="font4"><b>Complete Name</font></td>

        <td align="center"><font class="font4"><b>Username</font></td>

        <td align="center"><font class="font4"><b>Password</font>

        <td align="center"><font class="font4"><b>Email Id</font>

        <td align="center"><font class="font4"><b>Phone 1</font>

        <td align="center"><font class="font4"><b>Phone 2</font>

        <td align="center" colspan="2"><font class="font4"><b>IMEI And MAC ID</font>

        </td>

     </tr>

     <?php

	 $tot_result=mysql_query("select * from super_admin");

	 $pages = new Paginator;

     $pages->items_total = @mysql_num_rows($tot_result);

	 $pages->mid_range = 10;

     $rnum=@mysql_num_rows($tot_result);

	 $ii=0;

	 $pages->paginate();

	 $res=mysql_query("select * from super_admin $pages->limit");

	 echo"<center>";

	 echo  $pages->display_pages();

	 echo "&nbsp;&nbsp;"; // Optional call which will display the page numbers after the results.user_login_id='$logid'

	 echo $pages->display_jump_menu(); // Optional – displays the page jump menu

	 echo "<p class=\"paginate\">Page: $pages->current_page of $pages->num_pages</p>\n";

	 echo "<b><font face='Verdana' size='2'><p align='left'>Total Records: ".$rnum."</b><br>";

   while ($row =@mysql_fetch_object($res)) 

{



	echo "<tr>";

	echo "<td align='center'>"."<a href='super_admin_edit.php?id=$row->super_id' ><font class='font4'>"."<img src='images/edit.jpg' border='0'>"."</font></div></td>"; 

	

	echo "<td align='center' >"."<div align='center'>"."<a href='super_admin_delete.php?super_id=$row->super_id' ><font class='font4'>"."<img src='images/delete.jpg' border='0'>"."</a></div></td>"; 			



	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->company_name."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->company_addr."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->complete_name."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->user_name."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->password."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->email_id."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->phone1."</font></div></td>";

	echo "<td  align='center'>"."<div align='center'>"."<font class='font4'>".$row->phone2."</font></div></td>";

	echo "<td valign='top'>";

?>

	<table align="center" border="1" width="100%" bordercolor="#bcd5e7">

    	<tr>

        	<td align="center" valign="top"><b><font class="font4"> Delete </font></b></td>

        	

            <td align="center" valign="top"><font class="font4"/><b> IMEI Number </td>

          

            

         </tr>

<?php

$imei="select * from imei_details where super_id='".$row->super_id."'";



$imei_rest=mysql_query($imei);

while($row1 = @mysql_fetch_object($imei_rest))

{

echo " <tr> ";

			echo "<td align='center' >"."<div align='center'>"."<a href='super_sub_delete.php?imei_id=$row1->imei_id' ><font class='font4'>"."<img src='images/delete.jpg' border='0'>"."</a></div></td> "; 

				

		echo"	<td align='center'>"."<div align='center'>"."<font class='font4'>".$row1->imei_no."</font></div></td>

			

			

			</tr>

		

	";

}?>

</table>

<?php

echo "</td>";





echo "<td valign='top'>";

?>

	<table align="center"  border="1" width="100%" bordercolor="#bcd5e7">

    	<tr >

        	<td align="center" valign="top" ><b><font class="font4"> Delete </font></b></td>

        	

            <td align="center" valign="top"><font class="font4"/><b> Mac Address </td>

            

          

         </tr>

<?php

$mac="select * from mac_details where super_id='".$row->super_id."'";

//echo $imei;

$mac_rest=mysql_query($mac);

while($row2 = @mysql_fetch_object($mac_rest))

{

echo " <tr> ";

			echo "<td align='center' >"."<div align='center'>"."<a href='super_sub_delete.php?mac_id=$row2->mac_id' ><font class='font4'>"."<img src='images/delete.jpg' border='0'>"."</a></div></td> "; 

				

		echo"	<td align='center'>"."<div align='center'>"."<font class='font4'>".$row2->mac_no."</font></div></td>

				

			</tr>

		

	";

}?>

</table>

<?php

echo "</td>";

}



?>



</table>

</form>

		

	<?php include("footer.php"); ?>	

    

   </div>

    



    	

   </div> 



<!--<div id="footer">Copyright © 2012.Smart Survey All Rights Reserved.Website Designed & Developed by Kalpak Solutions</div>-->











</body>

</html>