<?php include "dbconfig.php"; 
$dt=$_GET['dt'];
$btnSave=$_GET['btnSave'];
?>
<style>
td{
text-transform:uppercase;
font-size:12px;
}
</style>
<?php if($btnSave==""){ ?>
<form name="form1" action="delete_report.php" method="get"  class="form-horizontal" role="form">
	  <table cellpadding=0 cellspacing=0 border=1 bordercolor=#FFFFCC bgcolor="#FFFFFF" align=center class="table table-bordered table-striped">
				
		<tr>
		  <td colspan="2" bgcolor="#990000" class=color3 style="color:#FFFFFF">Print Data</td>
		  </tr>
		<tr>
          <td width="116" class=color3>Select date</td>
		  <td width="190" class=color2><input name="dt" value="" type="text" required />
              </td>
		  </tr>
       
        <tr> 
			<td class=color3></td>
			<td class=color2><input type="submit" name="btnSave" value="Get  List"  class="btn btn-info" ></td>
		</tr>
	</table>
</form>
<?php }else { ?>
<center><h2>Date : <?php echo $dt; ?> (Delete History..)</h2></center>
<br/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%"><table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td><strong>S.NO</strong></td>
    <td><strong>COLLEGE CODE</strong></td>
    <td><strong>COURSE NAME</strong></td>
    <td><strong>ROLL NO</strong></td>
    <td><strong>FORM NO</strong></td>
    <td><strong>STUDENT NAME</strong></td>
    <td><strong>FATHER NAME</strong></td>
    <td><strong>STUDENT TYPE</strong></td>
    <td><strong>GENDER</strong></td>
    <td><strong>CASTE</strong></td>
    <td><strong>SUBJECT NAME</strong></td>
    <td><strong>AADHAR NO</strong></td>
    <td><strong>aDDRESS</strong></td>
    <td><strong>eMAIL</strong></td>
    <td><strong>mOBILE</strong></td>
  </tr>
    <?php
$query = "SELECT * FROM class2_backup WHERE dt LIKE '%$dt%' and session='$session' and code='$code' order by id";
$numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query.........1");
?>
<?php 
$counter = 1;?>
 <?php
while ( $a_row = mysql_fetch_array( $result ) )
 {?>
  <tr>
    <td><?php echo $counter; ?></td>
    <td><?php echo $a_row['college']; ?></td>
    <td><?php echo $idd=$a_row['Course']; ?>	</td>
    <td><?php echo $a_row['college_roll']; ?></td>
    <td><?php echo $a_row['fno']; ?></td>
    <td><?php echo $a_row['StudentName']; ?></td>
    <td><?php echo $a_row['FatherName']; ?></td>
    <td><?php echo $a_row['Student_Type']; ?></td>
    <td><?php echo $a_row['Gender']; ?></td>
    <td><?php echo $a_row['Category']; ?></td>
    <td><?php echo $a_row['class_app']; ?></td>
    <td><?php echo $a_row['acard']; ?></td>
    <td>
	<?php echo $a_row['txtHouseNo'].'/'.$a_row['txtStreet'].'/'.$a_row['txtPostOffice'].'/'.$a_row['txtState'].'/'.$a_row['txtDistrict0'].'/'.$a_row['txtPinCode']; ?></td>
    <td><?php echo $a_row['txtEmailID']; ?></td>
    <td><?php echo $a_row['MobileNO']; ?></td>
  </tr>
  <?php $counter++; } ?>
</table><hr/><table width="100%" border="1" cellspacing="0" cellpadding="0" class="table table-bordered table-striped" bgcolor="#FFFF00">
  
  
     <tr>
   <td>Name</td>
   <td>Father Name</td>
   <td>mother name</td>
   <td>id</td>
   <td>roll no</td>
   <td>pay date</td>
   <td>pay time</td>
   <td>pay amount</td>
   <td>discount</td>
   <td>checked by</td>
   <td>college coe</td>
   <td>-</td>
   <td>-</td>
   <td>sem.</td>
   <td>Note</td>
   <td>Delete Date Time</td>
 </tr>
     <?php
   
	 
$query9 = "SELECT * FROM pay_fees_backup WHERE dt LIKE '%$dt%' and session='$session' and code='$code' order by id";
$numresults9=mysql_query($query9);
 $numrows9=mysql_num_rows($numresults9);
$result9 = mysql_query($query9) or die("Couldn't execute query2");
?>
<?php 
$counter = 1;?>
 <?php
while ( $a_row9 = mysql_fetch_row( $result9 ) )
 {
 
 ?>

 <tr>
<td><?php
$roll_no=$a_row9[1];
$queryy = "SELECT * FROM class2_backup where college_roll='$roll_no' and session='$session' and code='$code'";
$numresultsy=mysql_query($queryy);
$resulty= mysql_query($queryy) or die("Couldn't execute query3");
$a_rowop = mysql_fetch_array($resulty );
echo $a_rowop['StudentName']; ?></td>
    <td><?php echo $a_rowop['FatherName']; ?></td>
    <td><?php echo $a_rowop['MotherName']; ?></td>
     <td><?php echo $a_row9[0]; ?></td>
    <td><?php echo $a_row9[1]; ?></td>
    <td><?php echo $a_row9[2]; ?></td>
    <td><?php echo $a_row9[3]; ?></td>
    <td><?php echo $a_row9[4]; ?> </td>
    <td><?php echo $a_row9[5]; ?></td>
    <td><?php echo $a_row9[6]; ?></td>
    <td><?php echo $a_row9[7]; ?></td>
    <td><?php echo $a_row9[8]; ?></td>
    <td><?php echo $a_row9[9]; ?></td>
    <td><?php echo $a_row9[10]; ?> </td>
    <td><?php echo $a_row9[11]; ?></td>
    <td><?php echo $a_row9[12]; ?></td>
</tr>
<?php 
}
?>
  
</table></td>
    
  </tr>
</table>



<?php }
include "footer.php"; ?>