<?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:1px 1px 1px 1px;
		text-align:center;
		color: #3e4095;
	}
	.college_address{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:11px;	
		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_active = 1 AND 
			sm.student_id = sd.student_id AND
			sd.cur_semesterid = sem.semester_id AND
		
			sd.cur_branchid = branch.branch_id 	 AND
			sd.year_id = ".$_SESSION["VedantnrYearId"];
			
	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))
		{
			$name = $row["student_surname"]." ".$row["student_firstname"]." ".$row["student_lastname"]; 
			$qtip = $row["student_gturegno"];
			$branchname=$row["branch_name"];
			$id = $row["student_photo"]; 
			 $path ="http://cms.image.ac.in/photo/college/1/student/";
			$HeadData["data"][$i] = $temparray;   
			$i++;
			$sr++;
?>
<div id="main-report">
<table   cellpadding="2" cellspacing="2" style="font-size:16px; color:#000;" width='100%'>
 <tr>
 		<td align="left" width="11%" valign="center"  rowspan='4'><img border="0" src="http://cms.image.ac.in/images/collage_logo1.png" /></td>
 	 <td colspan="2" align="center"><div class="college_address" style="height:15px;padding:0px">Shree Abjibapa Education & Charitable Trust Managed</div></td>
<?php if ($row['student_photo'] ='')
{
	?>	
	<td align="center" valign="center"  rowspan='4'><img border="0" src="http://cms.image.ac.in/photo/college/1/student/default.gif" /></td> 
 <?php
}
else
{
?>	
 <td align="right" width="18%" valign="center"  rowspan='4'><img border="0" height='80' width='80' src="http://cms.image.ac.in/photo/college/1/student/student_<?=$row["student_id"] ?>.jpg" /></td> 
 <?php
}
?>
</tr>
 <tr> 
    <th colspan="2" ><center><font face="QTAbbie" color="#3e4095">IMAGE ENGINEERING & TECHNICAL INSTITUTE</font></center></th>
 </tr>
  <tr>
    <td colspan="2" align="left">
      <div class="college_address" style="height:16px;padding:0px"><center>Village-Ashalali, Near Valukas Chokdi, Matar-Khambhat Road, Ta.Matar, Dist-Kheda</center></div>
    </td>
	</tr>
	<tr>
    <td colspan="2" align="left">
		  <div class="college_address" style="height:14px;border-bottom: 4px double #fff; margin-bottom:5px;">
		  <center>URL:www.image.ac.in  Email: info@image.ac.in  Ph: 02694-226051,52</center>
			</div>
																																								
    </td>
	</tr>
	<tr>
		<td colspan="4">
		<hr style="color: #000000; height: 2px; margin-bottom: -5px;">
			<hr style="color: #000000; height: 2px; margin-top: -1px;">
		</td>
</tr>	
<?php if ($row['student_techcerti'] !='')
{
	?>
<tr>
	
	<td colspan="3"><center><b>Application Form for Admission In Diploma  For year :2018-2019(C TO D )</b><center></td>
	<td>Form Fees 250</td>

</tr>
<?php
}
else
{
?>

<tr>
	
	<td colspan="3"><center><b>Application Form for Admission In Diploma  For year :2018-2019</b><center></td>
	<td>Form Fees 250</td>

</tr>
<?php
}
?>
	
	</table>
	
</br>
 <table  border="1" cellpadding="3" cellspacing="3" width="100%"  >
<tr style="background-color: #9b9493; font-weight:bold" >
	<th  height="30" style="font-weight:bold" colspan='7'>Name:(As Per 10th Mark Sheet)</th> 
</tr>	
<tr>
	<th style="font-weight:bold" width='15%' height="20"><center>Surname</center></th>
	<th style="font-weight:bold" width='50%' height="20" colspan='5'><center>Name<center></th>
	<th style="font-weight:bold" width='25%' height="20" ><center>Father Name<center></th>
	
</tr>	
<tr>
	<td align="center" height="20"><?php echo $row['student_surname'] ?></td>
	<td align="center" colspan='5' height="20"><?php echo $row['student_firstname'] ?></td>
	<td align="center" height="20"><?php echo $row['student_lastname'] ?></td>
	</tr>	
<tr>
		<th style="font-weight:bold" height="20" ><center>Gender</center></th>
		<td height="20" width="10%"><center><?php echo $row['student_gender'] ?></center></td>
		<th  height="20" style="width:10%;" ><center><b>Student Reference</b></center></th>
		<td height="20" style="width:15%;"><center><?php echo $row['student_ref'] ?></center></td>
		<th style="width:10%;" height="20" ><center><b>Date Of Birth</b></center></th>
		<td  height="20"><center><?php echo date("d-m-Y",strtotime($row['student_birthdate'])); ?><center></td>
		<td height="20" ><b>Mother Name :-</b> <?php echo $row['student_mother'];?> </td>
</tr>

<tr style="background-color: #9b9493">
	<th height="30" style="font-weight:bold" colspan='7'><center>Details Of  Qualiyfiyig Examination (S.S.C)</center></th>
</tr>	

<tr>
	<th height="20" style="font-weight:bold" ><center>Name Of Bord</center></th>
	<th height="20" style="font-weight:bold"><center>Center No:</center></th>
	<th height="20" style="font-weight:bold" ><center>Seat No:</center></th>
	<th height="20" style="font-weight:bold" colspan='4' ><center>Month & Year Of Passing</center></th>
</tr>		
<tr>
	<th height="20" ><center><?php echo $row['student_nameboard'] ?></center></th>
	<th height="20"><center><?php echo $row['student_centerno'] ?></center></th>
	<th height="20"><center><?php echo $row['student_examseatno'] ?></center></th>
	<th height="20" colspan='4' ><center><?php echo $row['passing_month']?>-<?php echo $row['student_yearofpassing']?></center></th>
</tr>
<tr>
	<th height="20" style="font-weight:bold" ><center>Maths/100</center></th>
	<th height="20" style="font-weight:bold"><center>Science/100</center></th>
	<th height="20" style="font-weight:bold"><center>English/100</center></th>
	<th height="20" style="font-weight:bold" colspan='4'><center>Total/300</center></th>
</tr>	
<tr>
	<th height="20" ><center><?php echo $row['maths_mark'] ?></center></th>
	<th height="20" ><center><?php echo $row['sci_mark'] ?></center></th>
	<th height="20" ><center><?php echo $row['eng_mark'] ?></center></th>
	<th height="20"  colspan='4' ><center><?php echo $row['total']?></center></th>
</tr>
<tr style="background-color: #9b9493">
	<th height="30" style="font-weight:bold" colspan='7'><center>Details Of  Qualiyfiyig Examination (I.T.I)</center></th>
</tr>	
<tr>
	<th height="20" style="font-weight:bold" ><center>Name Of Trade</center></th>
	<th height="20" style="font-weight:bold" ><center>Name Of I.T.I</center></th>
	<th height="20" style="font-weight:bold"><center>Seat No:</center></th>
	<th height="20" style="font-weight:bold" colspan='4'><center>Year Of Passing</center></th>
</tr>
<tr>
	<?php if($row['iti_trade'] != '')
	{
	?>
	<td height="20" ><center><?php echo $row['iti_trade'] ?></center></td>
	<td height="20" ><center><?php echo $row['iti_name'] ?></center></td>
	<td height="20" ><center><?php echo $row['iti_seat_no'] ?></center></td>
	<td height="20" colspan='4' ><center><?php echo $row['iti_year_pass']?></center></td>
	<?php
	}
	else
	{
	?>
	<td height="20"></td>
	<td height='20'></td>
	<td height='20'></td>
	<td  colspan='4' height='20' ></td>		
	<?php
	}
?>	
</tr>
<tr style="background-color: #9b9493">
	<th height="30" style="font-weight:bold" colspan='7'><center>Residential Address</center></th>
</tr>	
	
<tr>
	<td height="20" colspan='7'><?php echo $row['student_address'] ?></td>
</tr>		
<tr>
	<th height="20" style="font-weight:bold">District</th>
	<td height="20" colspan='2'><?php echo $row['dist_nameeng'] ?></td>	
	<th height="20"style="font-weight:bold">Pincode</th>
	<td height="20" colspan='3'><?php echo $row['student_pincode'] ?></td>
</tr>
<tr>
	<th height="20" style="font-weight:bold">Student Mobile</th>
	<td height="20" colspan='2'><?php echo $row['student_mobilestudents'] ?></td>	
	<th height="20" style="font-weight:bold" >Parents Mobile</th>
	<td height="20" colspan='3'><?php echo $row['student_mobileparents'] ?></td>
</tr>	
<tr>
	<th height="20" style="font-weight:bold">Category</th>
	<td height="20" colspan='2' ><?php echo $row['student_category'] ?></td>	
	<th height="20" style="font-weight:bold" >Cast</th>
	<td height="20" colspan='3'><?php echo $row['student_cast'] ?></td>
</tr>	
<tr style="background-color: #9b9493">
	<th height="30" style="font-weight:bold" colspan='7'><center>Declaration of Candidate</center></th>
</tr>
<tr>
			<td  height="20" colspan='7' style="text-align:justify"><font size='5'>i do here by declare that all the particulars started in the application form are true and
				 correct to the best of my knowledge and belife.I have read the admission rules and information Booklet,
				 and i shall abide by all the rules and other terms and condition for admission.In the event of suppression
				 or distortion of any information provided in my application form.I udnderstand that admission granted by
				 the admission committee shall be liable for cancellation. I also udnderstand that the decison of the admission
				 committee regarding my admission shall be final and i shall be liable by its decison, Further ,if admitted ,
				 I shall be liable for punishments as decide by authority. I abide to pay fees as determined by the
				 fee rgulatory Comimitte    </font> </td>
</tr>	
<tr>
			<td height='50' colspan='3'></td>
			<td height='50' colspan='4'></td>
</tr>	
<tr style="background-color: #9b9493">
			<th height="30" style="font-weight:bold" colspan='3'>Signature of Parents/Guardian</th>
			<th height="30" style="font-weight:bold" colspan='4'>Signature of Candidate</th>
</tr>	
<tr >
			<th height="30"  style="font-weight:bold" colspan='3' align="left">Place:</th>
			<th height="30" style="font-weight:bold" colspan='4' align="left">Date:</th>
</tr>
<tr style="background-color: #9b9493">
	<th height="30" style="font-weight:bold" colspan='7'><center>Document to bi Attached(Tick)</center></th>
</tr>
<tr>
				<?php  
			if($row['last_marksheet'] !='')
			{
			?>
			<td  height='20'><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height='20'></td>
			<?php
			}
			?>
			<td height="20" width='30%' >1. SSC Examination Mark Sheet(Original)</td>
			<?php  
			if($row['add_proof'] !='')
			{
			?>
			<td height='20'><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td  colspan='4' width='30%' >6. Address Proof(Elect.Bills/Ration Card)</td>
</tr>
<tr>
		<?php  
			if($row['iti_marksheet'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td >2. I.T.I Examination Mark Sheet And Certificate</td>
			<?php  
			if($row['adhar_photo'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td  colspan='4'>7. Aadhar Card</td>
</tr>
<tr>
		<?php  
			if($row['school_leaving'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td>3. Leaving Certificate</td>
			<?php  
			if($row['disability_proof'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td colspan='4'>8. Proof Of Disability</td>
</tr>
<tr>
			<?php  
			if($row['cast_certificate'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td>4. Cast Certificate if SC/ST/OBC</td>
			<?php  
			if($row['migration_certi'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td  colspan='4'>9. Migration Certificate</td>
</tr>
<tr>
			<?php  
			if($row['income_certi'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td >5. Income Certificate</td>
		<?php  
			if($row['character_certi'] !='')
			{
			?>
			<td height="20"><center>&#10004;</center></td>
			<?php
			}
			else
			{
			?>
			<td height="20"></td>
			<?php
			}
			?>
			<td  colspan='4'>10. Parent Id Proof</td>
</tr>
<tr style="background-color: black">
	<th style="font-weight:bold" colspan='7'><font color="white"><center>For Office Use Only</center></font></th>
</tr>
<tr style="background-color: #9b9493">
			<th style="font-weight:bold">Date Of Admisson</th>
			<th style="font-weight:bold" colspan='2'>Branch</th>
			<th style="font-weight:bold" colspan='4'>Varification Officer</th>
</tr>
<tr>
			<td height="30"><center><?php echo date("d-m-Y",strtotime($row['student_admdate'])); ?></center></td>
			<td  height="30" colspan='2'><center><?php echo $row['branch_name'] ?></center></td>
			<td height="20" colspan='4' ></td>
</tr>	
</table>


</div>
<?php
    }
	}
	$HtmlCode = ob_get_contents();
	ob_end_flush();
	
	$header_row_string="";
	$HtmlUrl = "student-marksheet-register.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";
?>