<script src="<?php echo URL_ROOT ?>js/jquery.min.js"></script>
<script>
function printme(){
    window.print();
    $('#print').hide();
    window.onfocus=function(){ window.close();}
}
</script>


<?php
$record = $db->getRow("select * from paybybranch where faculty_id='".$_GET["idno"]."' and dmonth='".$_GET['month']."' and dyear='".$_GET['year']."' ");
print_r($record);
if(isset($_GET["action"]) && $_GET["action"]=="cc"){
?>

<div style="width:700px;padding:20px;border:1px solid">
	<div style="text-align:center">
		<h1 style="margin:0; padding:0"><?php echo $LinksDetails["site_name"] ?></h1>
        <img src="<?php echo $LinksDetails["logo"] ?>" style="height:65px" />
        <div>Affi. No. 330483 School No. 50395</div>
        <div><?php echo nl2br($LinksDetails["contact_content"]) ?></div>
        <div style="display: inline-block;border-top: 5px solid #000;border-bottom: 5px solid #000;border-right: 15px solid #000;border-left: 15px solid #000;border-radius: 15px;font-size: 24px;font-weight: bold;padding: 5px 15px;margin: 45px 0;">CHARACTER CERTIFICATE</div>
    </div>
    <div style="font-family: Brush Script MT;font-size: 21px;">
    This is to certify that Master/Miss <span style="font-family: serif;font-size: 14px;border-bottom: dashed 1px;width: 380px;display: inline-block;"><h3><?php echo $res["name"] ?></h3></span><br />
Son/Daughter of shri <span style="font-family: serif;font-size: 14px;border-bottom: dashed 1px;width: 280px;display: inline-block;"><h3><?php echo $res["fname"] ?></h3></span> Roll No <span style="font-family: serif;font-size: 14px;border-bottom: dashed 1px;width: 120px;display: inline-block;"><h3><?php echo $res["admissionno"] ?></h3></span><br />
has been a bonafide student of this school. He/She has passed All India Secondary <br />
/ Senior Secondary School Examination held in the month of <span style="font-family: serif;font-size: 14px;border-bottom: dashed 1px;width: 200px;display: inline-block;"></span><br />
<span style="font-family: serif;font-size: 14px;border-bottom: dashed 1px;width: 340px;display: inline-block;"></span> to the best of my knowledge, he/she bears a<br />
good moral character, during the session.<br />
<br />
We wish him/her every success in life.    <br /><br />
    </div>
    <div>
    <div style="display:inline-block; width:30%">Date ............................ </div>
    <div style="display:inline-block; width:30%; text-align:center"> Class Teacher </div>
    <div style="display:inline-block; width:30%; text-align:right"> Principal</div>
    </div>
</div>

<?php }else{ ?>

<table calss="table" border="0" width="100%" class="tc" style="margin-top:-70px"; >
   
<div class="headPrint" style="border: none;text-align:center;">
			<div class="headPrint" style="border: none;text-align:center; ">
	<!--	<div align="left">
 <span  style="font-size:16px; width:200px;    #333; class="txt""><b>website:www.kdwps.in</b></b></span>
</div>	 
		<div align="right" style="margin-top:-17px;">
 <span  style="font-size:16px; width:200px; "><b>E-mail:kdwpsjzb@gmail.com</b></span>
</div> 
	  !-->		<div style="margin-bottom:18px;"> <center><h1 style="font-size:31px;margin:5px 0px 0px 0px;color: black; font-family:Palatino; text-align: center; "><?php echo ucfirst($LinksDetails["site_name"]) ?></h1></center>
			 			 
			 </div>
			 
			  <img src="<?php echo $LinksDetails["logo"] ?>" height="80px" width="100px" style="margin-left:-50px; position: relative; top: -11px;"> 
			 <span style="font-size:21px;font-weight:800; margin-left:10px; margin-top:10px; position: relative; top: -75px; color: black;"> <?php echo ucfirst(nl2br($LinksDetails["contact_content"])) ?><br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;   An English medium co-educational school</span>
			 
<!--	 
 <div style="float:right; margin-top:-38px;">
    <b>Mob:&nbsp;7017723653,7906223629</b>
    </div>
    
    <div align="left" style="margin-top:-58px;">
    <b> Affiliation code.236-38 </b>
    </div>
    !-->
     <div align="center" style="margin-top:30px;">
    <b>Salery list of month: &nbsp;<u><?php echo $month_name = date("F", mktime(0, 0, 0, $_GET['month'], 10));    ?></u></b>
    </div>
  	<br/>	<br/>	<br/>	<br/>	<br/>	<br/>

  		<thead><tr>
						<th style="border-left:1px solid black;border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Serial No</th>
						<th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Name</th>
						<th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;"> Contcat no</th>
						<th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Designation</th>
					
						<th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">School salary</th>
                       <!-- <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Diffrence</th>!-->
                        <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">OneDay Payment</th>
                        <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Day Absent</th>
                        <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">CL Day</th>
                        <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Advance Payment</th>
                        <th style="border-top:1px solid black;border-bottom:1px solid black;border-right:1px solid black;">Gross Total</th>
                       
					</tr>
						</thead>
						<tbody>	
			
				   	<?php
				   	$sql="select * from salery where month ='".$_GET["month"]."'  ";
	$aryList=$db->getRows($sql);
	$total_amt=0;
				   	foreach($aryList as $clist){ $i++;              ?>
							<tr >
							    <td style="border-left:1px solid black; border-bottom:1px solid black;border-right:1px solid black;"><?php echo $i; ?></td>
						<td  style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $db->getVal("select name from staff where idno='".$clist["idno"]."' "); ?></td>
						<td  style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $db->getVal("select mobile from staff where idno='".$clist["idno"]."' "); ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $db->getVal("select designation from staff where idno='".$clist["idno"]."' ");  ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $db->getVal("select salery from staff where idno='".$clist["idno"]."' ");  ?>
                       <!-- <td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo  $clist["diffrence"]   ?></td>  !-->
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $clist["one_day_payment"]   ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $clist["total_absent"]   ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $clist["total_cl"]   ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $clist["advance_payment"]   ?></td>
						<td style=" border-bottom:1px solid black;border-right:1px solid black;"><?php echo $clist["grass_total"]   ?></td>
                       
	</tr>	
                       <?php
                       
                    $total_amt+=$clist["grass_total"];
                       } ?>
				</tbody>				
	 <tfoot>
                	<tr>
                    	<td colspan="8" style=" border-bottom:1px solid black;border-left:1px solid black;"><strong style="font-size: 20px;">Gross Total</strong></td>
                        <td style=" border-bottom:1px solid black;bor"></td>
                        <td style=" border-bottom:1px solid black;border-right:1px solid black;"><strong style="font-size: 20px;"><?php echo  $total_amt;    ?></strong></td>
                    </tr>
                </tfoot>					
</table>
<?php } ?>
</form>
<script>window.print() </script>