<?php require "_header.php";?>
<script language="javascript" type="text/javascript">
document.getElementById("main-content").style.display = 'none';
</script>
<style type="text/css">
	.table-report{
		font-family:Verdana, Geneva, sans-serif;
		font-size:12px;
		text-align:left;
		border-right:0px none;
		border-bottom:0px none;
	}
	.table-report-inner{
		font-family:Verdana, Geneva, sans-serif;
		font-size:12px;
	}
	.table-report tr{
		padding:2px 2px 2px 2px;
	}
	.table-report td{
		padding:2px 2px 2px 2px;
		border-top:0px none;
		border-left:0px none;
	}
	.table-report th{
		padding:2px 2px 2px 2px;
		font-weight:bold;
		text-align:left;
		border-top:0px none;
		border-left:0px none;
	}	
	.college_name{
		font-family:"QTAbbie" !important;;
		font-size:22px;	
		font-weight:bold;
		padding:3px 3px 3px 3px;
		text-align:center;
		color: #3e4095;
	}
	.college_address{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:13px;	
		text-align:center;
		padding:2px 2px 2px 2px;
		color: #3e4095;
	}
</style>
<?php
ob_start();
  $branch_id 		= Escape($_REQUEST['branch_hidden']);
	$semester_id	= Escape($_REQUEST['semester_hidden']);
	$div_id		    = Escape($_REQUEST['division_id']);
	$shift		    = Escape($_REQUEST['shift']);
	$student_id   = Escape($_REQUEST['student_hidden']);
	
	$branch_disp   = Escape($_REQUEST['branch_disp']);
	$semester_disp = Escape($_REQUEST['semester_disp']);
	//$date 		   = Escape($_REQUEST['date']);
	
	//$where .= " AND sm.student_gturegno=".$_POST['student_gturegno'];

	$qry ="SELECT 
			sm.*,
			
			sd.cur_semesterid,
			sd.cur_branchid,
			student_admdate,
		
			student_gturegno,
			
			student_mobilestudents,
			student_mobileparents,
			semester_name,
			branch.branch_name,
			sm.student_admby,
			sm.tfw_scheme ,
			sd.cur_divison,
			student_birthdate
		FROM
			cms_studentmaster sm,
			cms_studentdetail sd,
			cms_semestermaster sem,
			cms_branchmaster branch
		WHERE 
		
			sm.student_id = sd.student_id AND
			sd.cur_semesterid = sem.semester_id AND
		
			sd.cur_branchid = branch.branch_id "	;
			
	if($branch_id != "" &&  $branch_id != "All"){
	  $where.= " AND sd.cur_branchid = ".$branch_id;
	}
	if($semester_id != "" && $semester_id != "undefined"){
		$where.= " AND sd.cur_semesterid = ".$semester_id;
	}
	if($div_id != ""){
		$where.= " AND sd.cur_divison = '".$div_id."'";
	}
		if($student_id != "" ){
	  $where.= " AND sd.student_id = ".$student_id;
	}
	if($shift != ""){
		$where.= " AND sm.shift = '".$shift."'";
	}
	//$where .= " AND sm.student_gturegno=".$_POST['student_gturegno'];
	$qry.=	$where;	
	
	//echo $qry; exit;
	$i=0;		
																																																																			
  $rs = dbQuery($qry);
	$total= dbRows($rs);
	$HeadData = array("count" => $total, "data" => array());
	$sr=1;
	if(dbRows($rs) > 0)
	{
		while($row = dbArray($rs))
		{
			$student_photo=$row['student_photo'];
			if(!file_exists($StudentImagePath.$student_photo) || $student_photo=="") 
			{
				$imgfile = "http://cms.image.ac.in/photo/college/1/student/default.gif";
			}
			else
			{	
			$StudentImagePath1 = "http://cms.image.ac.in/photo/college/1/student/";
			$imgfile = $StudentImagePath1.$student_photo;
			}
			$name = $row["student_surname"]." ".$row["student_firstname"]." ".$row["student_lastname"]; 
			$qtip = $row["student_gturegno"];
			$branchname=$row["branch_name"];
			
			$HeadData["data"][$i] = $temparray;   
			$i++;
			$sr++;
			
				
?>
<div id="main-report">
<table  border="0" cellpadding="2" cellspacing="2" style="font-size:16px; color:#000;" width='100%'>
 <tr>
 
  <th><center><font face="QTAbbie" size="6px" color="#3e4095">IM<span style="color: red">A</span>GE ENGINEERING & TECHNICAL INSTITUTE . ASHALALI, KHEDA</font></center></th>
 	
</tr>

	<tr>
		<td>
		<hr style="color: #000000; height: 2px; margin-bottom: -5px;">
			<hr style="color: #000000; height: 2px; margin-top: -3px;">
		</td>
</tr>	

	</table>
	

 <table  border="0" cellpadding="1" cellspacing="1" width="80%" align="center"  >

<tr>
<td colspan="6"><center><div style="width:500px;height:50px; solid #000;"><font size="3"><b>NO DUE CLEARANCE FORM FOR STUDENT</b></font></div></center></td>

</tr>
<tr>
	<td height="40px"  width="13%"><font size="3">Name in Block Letter</font></td>
	<td height="40px" colspan="5"><font size="3"><?php echo $name ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
</tr>

																																																																						
<tr height="40px">
	<td height="40px"><font size="3">Date Of Birth</font></td>
	<td height="40px" width="15%"><font size="3"><?php echo date("d-m-Y",strtotime($row['student_birthdate'])); ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
	<td  height="40px"width="25%"><font size="3"><center>Enrollment No</center></font></td>
	<td height="40px"><font size="3"><?php echo $row['student_gturegno'] ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
	<td height="40px"><font size="3"><center>Specialization</center></font></td>
	<td height="40px"><font size="3"><?php echo $row['branch_name'] ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
</tr>	

<tr height="40px">

	<td height="40px"><font size="3">Address</font></td>
	<td height="40px" colspan="5"><font color="black" size="3" ><?php 
         	 		$a = $row['student_address'];
					$b = preg_replace('~\b(\w)(\w+)~e', '"$1".strtolower("$2")', $a);
					echo $b;
         	  ?></br><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
</tr>
<tr height="40px">
	<td height="40px"><font size="3">Ph. No(R)</font></td>
	<td height="40px" width="15%"><font size="3"><?php echo $row['student_mobilestudents'] ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
	<td height="40px"><font size="3"><center>Cell Phone No</center></font></td>
	<td height="40px"><font size="3"><?php echo $row['student_mobileparents'] ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
	<td height="40px"><font size="3"><center>Email ID</center></font></td>
	<td height="40px"><font size="3"><?php echo $row['student_emailid'] ?><hr style="color: #000000; height: 1px; margin-top: 3px;"></font></td>
</tr>
<tr height="40px">
	<td height="40px" colspan="6">	<hr style="color: #000000; height: 2px; margin-bottom: -5px;">
			<hr style="color: #000000; height: 2px; margin-top: -3px;"></td>
</tr>	

<tr height="30px">
<td height="40px" colspan="6"><div style="width:700px;height:20px; solid #000;"><font size="3">It is to certify that, no dues to be recovered from the above mentioned student.
</font></div></td>
</tr>
									
<tr>
<td height="40px" colspan="6"><div style="width:700px;height:40px; solid #000;"><font size="3"><b>[To be filled by concerned authority]
</b></font></div></td>
</tr>

<tr colspan="6">
	<td colspan="6" height="40px"><center>
				<table  class="table-report"  border="1" cellpadding="1" cellspacing="1" width="80%" align="center"  >
					<tr height="50px">
								<th ><font size="3">Sr.No</font></th>
								<th><font size="3">Name of Department/Section</font></th>
								<th><font size="3">Authorized Signature with date</font></th>
					</tr>	
					<tr height="50px">
								<td><font size="3">1</font></td>
								<td><font size="3">Graduating Department</font></td>
								<td></td>
					</tr>
					<tr height="50px">
								<td><font size="3">2</font></td>
								<td><font size="3">Account Office</font></td>
								<td></td>
					</tr>
					
					<tr height="50px">
								<td><font size="3">3</font></td>
								<td><font size="3">Library</font></td>
								<td></td>
					</tr>
					<tr height="50px">
								<td><font size="3">4</font></td>
								<td><font size="3">Administration Section</font></td>
								<td></td>
					</tr>
					<tr height="50px">
								<td><font size="3">5</font></td>
								<td><font size="3">Alumni Association</font></td>
								<td></td>
					</tr>
					
				</table>
</center>					
</td>
</tr>
<tr height="40px">
	<td height="40px" colspan="6">	<hr style="color: #000000; height: 2px; margin-bottom: -5px;">
<hr style="color: #000000; height: 2px; margin-top: -3px;"></td>
</tr>	
<tr height="40px">
<td height="40px" colspan="6"><div style="width:900px;height:40px; solid #000;"><font size="3"><p>I have received following documents in original and in good condition. No other documents in original are to be received from the Institute. I shall not have any claim in this regard in future.</p>
</font></div></td>
</tr>
<tr height="40px">
<td height="40px" colspan="6"><div style="width:900px;height:40px; solid #000;"><font size="3"><p>I do not have any thing due to be received from the Institute.</p>
</font></div></td>
</tr>
<tr colspan="6">
	<td height="40px" colspan="6"><center>
				<table class="table-report"  border="1" cellpadding="1" cellspacing="1" width="80%" align="center"   >
					<tr height="30px">
								<th><font size="3">Sr.No</font></th>
								<th><font size="3">Name of Document</font></th>
								<th><font size="3">Sr. No. & Other information of the documents</font></th>
					</tr>	
					<tr height="30px">
								<td><font size="3">1</font></td>
								<td><font size="3"></font></td>
								<td></td>
					</tr>
					<tr height="30px">
								<td><font size="3">2</font></td>
								<td><font size="3"></font></td>
								<td></td>
					</tr>
					<tr height="30px">
								<td><font size="3">3</font></td>
								<td><font size="3"></font></td>
								<td></td>
					</tr>
					<tr height="30px">
								<td><font size="3">4</font></td>
								<td><font size="3"></font></td>
								<td></td>
					</tr>
					
					
				</table>
</center>					
</td>
<tr height="35px">
			<td ></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			
</tr>	

</tr>
<tr height="30px">
			<td height="30px">Date:_________________ </td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"><center>_______________________</center></td>
			
</tr>	
<tr >
			<td height="30px" ></td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"></td>
			<td height="30px"><center>Signature of the Student</center></td>
			
</tr>	
<tr >
	<td colspan="6" height="30px"><div style="width:900px;height:40px; solid #000;"><font size="2"><p>I am happy to inform you that (Tick the appropriate statement)</p>
</font></div></td>
</tr>
<tr colspan="6">
	<td colspan="6"><center>
				<table  border="0" cellpadding="1" cellspacing="1" width="80%" align="center"  >
					<tr height="30px">
								<th height="30px" width="5%"><font size="3"><input type="checkbox"></font></th>
								<td height="30px"><font size="4">I have got admission for higher studies. (Submit a copy of the admission letter).</font></td>
								
					</tr>	
					<tr height="30px">
								<th height="30px"><font size="3"><input type="checkbox"></font></th>
								<td height="30px"><font size="4">I wish to go abroad for higher studies. I have applied for the admission. (Send a copy of admission letter as soon as the admission is confirmed).</font></td>
								
					</tr>
					<tr height="30px">
								<th height="30px"><font size="3"><input type="checkbox"></font></th>
								<td height="30px"><font size="4">I got job. (Submit a copy of appointment letter).</font></td>
								
					</tr>
					<tr height="30px">
								<th height="30px"><font size="3"><input type="checkbox"></font></th>
								<td height="30px"><font size="4">I am searching in for the job. (Send a copy of appointment letter as soon as the job is confirmed).</font></td>
							
					</tr>
					
					</table>
</center>					
</td>
</tr>
<tr height="40px">
	<td colspan="6" height="30px"><div style="width:900px;height:80px; padding-top:20px; solid #000;"><font size="3"><p>Note: This form to be submitted to <b>Mr. Indrajit Sodhaparmar </b>(Clerk) <b> Mr. Dhrupal Patel</b> (Clerk)/ of Administration section.</p>
</font></div></td>
</tr>	
</table>

</div>
<?php
    }
	}
	$HtmlCode = ob_get_contents();
	ob_end_flush();
	
	$header_row_string="";
	$HtmlUrl = "student-clearance-report.html";
	$HtmlPath =	"report/".$HtmlUrl;
	createHTMLReportPage($header_row_string,$HtmlUrl,$HtmlPath,$HtmlCode,false);
?>

<br/>

<form name="frm" id="frm" action="" method="post">		
    
    <input type="hidden"   name="txtFile" id="txtFile" value="<?php echo $HtmlUrl ;?>" />
    <!--input type="button"  name="btnPrint" id="btnPrint" value="Print" onClick="SetPageAction('PRINT');"/-->
    <input type="button"  name="btnPdf" id="btnPdf" value="Create PDF" onClick="SetPageAction('PDF');"/>
  <input type="button" name="btnHtml" id="btnHtml" value="Create HTML" onClick="SetPageAction('HTML');"/>
 <!--    <input type="button" name="btnWord" id="btnWord" value="Create WORD" onClick="SetPageAction('WORD');"/>
    <input type="button" name="btnExcel" id="btnExcel" value="Create EXCEL" onClick="SetPageAction('Excel');"/-->

</form>
<script language="javascript" type="text/javascript">
function SetPageAction(varAction) {
	if(varAction=="PRINT"){			
		document.frm.action="print/create-print.php";
		document.frm.target = "_blank";
		document.frm.submit();
	}
	else if(varAction=="PDF"){			
		document.frm.action="convertpdf/create-pdf.php";
		document.frm.target = "_blank";
		document.frm.submit();
	}
	else if(varAction=="HTML"){
		document.frm.action="<?php echo $HtmlPath ;?>";
		document.frm.target = "_blank";
		document.frm.submit();
	}
	else if(varAction=="WORD"){
		document.frm.action="convertword/create-word.php";
		document.frm.target="_blank";
		document.frm.submit();
	}
	else if(varAction=="Excel"){
		document.frm.action="convertword/create-excel.php";
		document.frm.target="_blank";
		document.frm.submit();
	}
}
</script>
<?php 
		require "_footer.php";
?>