<?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:center;
		border-top:0px none;
		border-left:0px none;
	}	
	.college_name{
		font-family:QTAbbie;
		font-size:22px;	
		font-weight:bold;
		padding:2px 2px 2px 2px;
		text-align:center;
	}
	.college_address{
		font-family:Tahoma, Geneva, sans-serif;
		font-size:11px;	
		text-align:center;
		padding:2px 2px 2px 2px;
	}
</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']);
	
	$branch_disp 	  = Escape($_REQUEST['branch_disp']);
	$semester_disp	= Escape($_REQUEST['semester_disp']);
	
	//$where .= " AND sm.student_gturegno=".$_POST['student_gturegno'];
	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($shift != ""){
		$where.= " AND sm.shift = '".$shift."'";
	}

	$objStudentMgmt = new StudentMgmt();		
	$i=0;		
	
	$order_field = " sm.student_gturegno";
	$order_type = " ASC ";
	
	$rs = $objStudentMgmt->getAllRecords($limit,$start,$where,$order_field,$order_type);
	$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"];
			$add = $row["student_address"];
			$phone1 = $row["student_phoneo"];
			$phone2 = $row["student_phoner"];
			$mobile1 = $row["student_mobilestudents"];
			$mobile2 = $row["student_mobileparents"];
			$act=$row["student_active"];
   		$lea=$row["leave_type"];
			$temparray["student_id"]  = $row["student_id"];
			$temparray["student_name"]  = "<div qtip=\"".$qtip."\">".$name."</div>";	
			$HeadData["data"][$i] = $temparray;   
			$i++;
			$sr++;
?>
<div id="main-report">
<h2 align='center'>IMAGE ENGINEERING & TECHNICAL INSTITUTE-KHEDA [683]</h2>
<h3 align='center'>Student Telecalling Register</h3>

<table class="table-report" border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
  <td style="text-align:left;" width="15%" >Contact Number</td>
  <td style="text-align:left;" width="80%" colspan='5' >Name : <?php echo $name; ?></td>
  <td style="text-align:center;" width="5%" rowspan='5' colspan='6'><?php echo $qtip; ?></td>
</tr>
<tr>
  <td style="text-align:left;" width="15%" >1 : <?php echo $phone1 ?></td>
  <td style="text-align:left;" width="80%" rowspan="3" colspan='5' valign="top">Address : <?php echo $add; ?></td>
</tr>
<tr>
  <td style="text-align:left;" width="15%"  >2 : <?php echo $phone2 ?></td>
</tr>
<tr>
  <td style="text-align:left;" width="15%" >3 : <?php echo $mobile1 ?></td>
</tr>
<tr>
  <td style="text-align:left;" width="15%" >4 : <?php echo $mobile2 ?></td>
  <?php 
	if($act==1)
	{
		?>
  <td style="text-align:left;" width="80%" colspan='5'>Student Status : <?php echo "Active"; ?></td>
  <?php
	}
	else if($act==0 && $lea=='s')
	{
	?>
	<td style="text-align:left;" width="80%" colspan='5' >Student Status : <?php echo "Suspand"; ?></td>
	<?php
	}
	else if($act==0 && $lea=='d')
	{
	?>
	<td style="text-align:left;" width="80%" colspan='5' >Student Status : <?php echo "Detain"; ?></td>
	<?php
	}
	else if($act==0 && $lea=='c')
	{
	?>
	<td style="text-align:left;" width="80%" colspan='5' >Student Status : <?php echo "Cancel"; ?></td>
	<?php
	}
	?>
</tr>
</table><br>
<table class="table-report" border="1" cellpadding="0" cellspacing="0" width="100%">
<tr height='25'>
	<th width='8%'>SR NO</th>
	<th width='8%'>DATE</th>
	<th width='8%'>TIME</th>
	<th width='29%'>PURPOSE OF CALLING</th>
	<th width='20%'>REMARKS</th>
	<th width='15%'>CALLING BY</th>
	<th width='12%'>SIGN</th>
</tr>


</table>

<?php
echo "<table border='1' class='table-report'  cellpadding='0' cellspacing='0' width='100%'>";

for ($row = 1; $row <=29 ; $row ++) {
   echo "<tr>";

   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='8%'>", $row, "</td>";
	
   }
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='8%'>", ' ', "</td>";
	
   }
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='8%'>", ' ', "</td>";
	
   }
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='29%'>", ' ', "</td>";
	
   }
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25'width='20%'>", ' ', "</td>";
	
   }
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='15%'>", ' ', "</td>";
        
	
   }	
   for ($col = 1; $col <= 1; $col ++) {
        echo "<td height='25' width='12%'>", ' ', "</td>";
	
   }
   echo "</tr>";
}

echo "</table>";
?>

<br>
<table class=""  cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td height='25' colspan='4'  style="margin-top:'50px'; font-weight:bold;">
	GTU REGULAR EXAM FORM FILL UP
	<input type="checkbox" value="YES">YES
	<input type="checkbox" value="NO">NO <br><br>
	GTU REMIDIAL EXAM FORM FILL UP
	<input type="checkbox" value="YES">YES
		<input type="checkbox" value="NO">NO

	<td style="font-weight:bold;" colspan='3'>VERIFY BY PRINCIPAL:</td>

</tr>
<tr>
	<td colspan='4' height="75" style="text-align:left; font-weight:bold;" >SEMESTER:<?php echo $semester_disp; ?>
	<td colspan='3' style="text-align:right; font-weight:bold;"><?php echo $_SESSION["VedantnrYearName"]; ?></td>
</tr>
</table>
<br />

</div>
<?php

    }
	}
	$HtmlCode = ob_get_contents();
	ob_end_flush();
	$header_row_string="";
	$HtmlUrl = "student-purpose.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";
?>