<?php include "header.php"; ?> <section class="content">
      <div class="container-fluid">
                <!-- Page Header -->
                <div class="col-lg-12">
                   
                    
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
<script language='JavaScript'>

function validate()
{
	conf = confirm("Are you sure you want to delete?");
	if (conf)
		return true
	else
		return false;
}

</script><div class="card card-danger">
              <div class="card-header">
                <h3 class="card-title"><?php echo $_GET['title']; ?>?</h3>
              </div>

<table width="100%" border="0" cellspacing="2" cellpadding="2" background="images/co-surgeons.jpg">
  
  
   
  <tr>
    <td><table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    
    <td width="50%" valign="top" align="center"><div align="center">
      <form name="myform" id="myform" method="post" action="ssave.php">
	  <table cellpadding=2 cellspacing=0 border=1 bordercolor=#FFFFCC bgcolor="#FFFFFF" align=center>
				
		<tr>
		  <td colspan="2" class=color3>Add Post</td>
		  </tr>
	
		<tr>
		  <td class=color3> Post</td>
		  <td class=color2><input  name="post" type="text" class="form-control" tabindex="3" required="required" /></td>
		  </tr>
        
        <tr> 
			<td class=color3></td>
			<td class=color2><input name="submit" class="btn btn-primary" type="submit" value="Add Record" tabindex="12"/></td>
		</tr>
	</table>
</form></div></td>
  </tr>
</table></td>
    <td valign="top"><?php
	 
$query = "SELECT * FROM post where code='$code' and session='$session' ORDER BY post";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");


?>
<div style="overflow:auto; text-align:center">
<div class="card card-success">
              <div class="card-header">
                <h3 class="card-title"><?php echo $_GET['title']; ?>?</h3>
              </div>
<?php if($numrows!=""){?>
   <table  cellpadding="1" border="1" cellspacing="1" bgcolor="#FFFFFF" align="center">
 <tr>
	
 <td align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"  ><em><strong>S.</strong></em></div></td>
  <td align="center" valign="top"  class="style1" style="font-size:12px; color:#FFFFFF">Post</td>
 
 <td align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"   ><em><strong>Update</strong></em></div></td>
 <td align="center" valign="top"  class="border"><div align="center" style="font-size:12px; color:#FFFFFF"   ><em><strong>Delete</strong></em></div></td>
 </tr>
<?php 
$counter = 1;?>
 <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
 
 
<form action="supdate.php" enctype="multipart/form-data" method="post">
<input  name="id" type="hidden" value="<?php echo $a_row[0];?>" />
 <tr>
 <td height="20" align="center" valign="top" ><div align="center" ><?php echo $counter;?></div></td>
 <td align="center" valign="top" ><input class="form-control" name="post" type="text" class="form-control"  value="<?php echo $a_row[1];?>" /></td>
 
 <td align="center" valign="top" >

 <input type="image" src="images/changestatus.gif" name="Submit2" value="Update"  ></td>
 <td align="center" valign="top" >

 
<a href="sdelete.php?id=<?php echo $a_row[0];?>" onclick='return validate();'><img src="images/out.gif" /></a></td>
 </tr>
 </form>

   
  <?php $counter++;}?>
  </table>
</div>
   <?php }?>

<?php if($numrows==""){
  echo "<div  style='border:none; text-align:center'><h3 class='logo2'>No Record Found</h3></div>";
}?></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
    <td align="center">
</td>
  </tr>
  <tr>
    <td></td>
  </tr>
</table>

</div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div><?php 
include "footer.php"; ?>