<?php include "header.php"; ?>
<div id="page-wrapper">

            <div class="row">
                <!-- Page Header -->
                <div class="col-lg-12">
                    <h1 class="page-header">-</h1><style type="text/css">
<!--
td{
	font-family:Verdana, Geneva, sans-serif; font-size:12px;}

.red{ color:#F00; font-weight:bold; font-size:12px;}
.green{ color:#090; font-weight:bold; font-size:12px;}
.y{ color:#60F; font-weight:bold; font-size:12px;}
-->
          </style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td align="center" valign="top"> <h2>Staff's Salary  Report</h2>  <table width="95%" border="1" cellspacing="1" cellpadding="1">
<?php
$query = "SELECT * FROM add_teachers where 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");
?>
 <?php if($numrows!=""){?>
  <tr bgcolor="#66FFFF">
    <td width="4%"><div align="center"><span class="style3"><strong>En</strong></span></div></td>
    <td width="4%"><div align="center"><span class="style3"><strong>Student Name</strong></span></div></td>
    <td width="4%"><div align="center"><span class="style3"><strong>Fathers Name</strong></span></div></td>
    <td width="4%"><strong> APRIL </strong></td>
    <td width="4%"><strong> MAY </strong></td>
    <td width="4%"><strong> JUNE </strong></td>
    <td width="4%"><strong> JULY </strong></td>
    <td width="4%"><strong> AUGUST </strong></td>
    <td width="4%"><strong> SEPTEMBER </strong></td>
    <td width="4%"><strong> OCTOBER </strong></td>
    <td width="4%"><strong> NOVEMBER </strong></td>
    <td width="4%"><strong> DECEMBER </strong></td>
    <td width="4%"><strong> JANUARY </strong></td>
    <td width="4%"><strong> FEBRUARY </strong></td>
    <td width="4%"><strong> MARCH </strong></div></td>
   
    
  
    
  </tr>
  <?php 
$counter = 0;?>
 <?php
while ( $a_row = mysql_fetch_row( $result ) )
 {?>
 <?php //echo $a_row[36]; 
 $en=$a_row[5]; $sr_no=$a_row[5];?>
        <?php
		$resultc = mysql_query("SELECT * FROM salary where sr_no='$en' and session='$session' and code='$code' and JANUARY!='Paid' or FEBRUARY!='Paid' or MARCH!='Paid' or APRIL!='Paid' or MAY!='Paid' or JUNE!='Paid' or JULY!='Paid' or AUGUST!='Paid' or SEPTEMBER!='Paid' or OCTOBER!='Paid' or NOVEMBER!='Paid' or DECEMBER!='Paid'");
$a_rowx = mysql_fetch_row( $resultc );

		$j1=$a_rowx[55]; //echo $j1;
		$j2=$a_rowx[56];
		$j3=$a_rowx[57];
		$j4=$a_rowx[58];
		$j5=$a_rowx[59];
		$j6=$a_rowx[60];
		$j7=$a_rowx[61];
		$j8=$a_rowx[62];
		$j9=$a_rowx[63];
		$j10=$a_rowx[64];
		$j11=$a_rowx[65];
		$j12=$a_rowx[66];

if ($j1!="Paid" or $j2!="Paid" or $j3!="Paid" or $j4!="Paid" or $j5!="Paid" or $j6!="Paid" or $j7!="Paid" or $j8!="Paid" or $j9!="Paid" or $j10!="Paid" or $j11!="Paid" or $j12!="Paid")
{
?>
  <tr>
    <td><div align="center"><?php echo $a_row[5]; ?></div></td>
    
    <td><div align="center"><SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=1200,height=600,scrollbars=yes');
return false;
}
//-->
    </SCRIPT>
      <A 
   HREF="#" onClick="popup('v_teachers_get.php?id=<?php echo $a_row[0];?>')";>
        <?php echo $a_row[7];?>
    </A></div></td>
    <td><div align="center"><?php echo $a_row[8];?></div></td>
    
    <td><?php include "sal/april.php"; ?></td>
    <td><?php include "sal/may.php"; ?></td>
    <td><?php include "sal/june.php"; ?></td>
    <td><?php include "sal/july.php"; ?></td>
    <td><?php include "sal/aug.php"; ?></td>
    <td><?php include "sal/sep.php"; ?></td>
    <td><?php include "sal/oct.php"; ?></td>
    <td><?php include "sal/nov.php"; ?></td>
    <td><?php include "sal/dec.php"; ?></td>
    <td><?php include "sal/jan.php"; ?></td>
    <td><?php include "sal/feb.php"; ?></td>
    <td><?php include "sal/mar.php"; ?></td>
    
  </tr>
  
    
  
    
  </tr>
 <?php } ?>
  <?php $counter++;}?> <tr bgcolor="#CCCCCC">
    <td width="4%"><div align="center"><span class="style3"><strong></strong></span></div></td>
    <td width="4%"><div align="center"><span class="style3"><strong></strong></span></div></td>
    <td width="4%"><div align="center"><span class="style3"><strong></strong></span></div></td>
    <td width="4%"><strong> <span class="green">(P)<?php echo $gtfee1; ?></span> <hr /> (U) <?php echo $gfees1; ?> </strong></td>
     <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee2; ?> </span><hr /> (U) <?php echo $gfees2; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P)<?php echo $gtfee3; ?> </span> <hr /> (U) <?php echo $gfees3; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee4; ?></span> <hr /> (U) <?php echo $gfees4; ?> </strong></td>
   <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee5; ?></span> <hr /> (U) <?php echo $gfees5; ?> </strong></td>
  <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee6; ?></span> <hr /> (U) <?php echo $gfees6; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee7; ?> </span><hr /> (U) <?php echo $gfees7; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee8; ?> </span><hr /> (U) <?php echo $gfees8; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee9; ?></span> <hr /> (U) <?php echo $gfees9; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee10; ?></span> <hr /> (U) <?php echo $gfees10; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee11; ?></span> <hr /> (U) <?php echo $gfees11; ?> </strong></td>
    <td width="4%"><strong> <span class="green">(P) <?php echo $gtfee12; ?></span> <hr /> (U) <?php echo $gfees12; ?> </strong></td>
   </table>
  
  <?php } ?>
  <?php if($numrows==""){?>
  <center><h4 style="color:#FF0000;">Data Not Found</h4></center>
  <?php } ?>

</table>
       

</div></div></div>
<?php 
include "footer.php"; ?>