<?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>
 		<td align="left" width="15%" valign="center"  rowspan='1'></td>

  <th colspan="2" ><center><font face="QTAbbie" size="11px" color="#3e4095">I<span style="color: red">E</span>TI</br>ALUMNI ASSOCIATION</font></center></th>
 		<td align="left" width="15%" valign="center"  rowspan='1'><center><img border="0" src="http://cms.image.ac.in/images/college-1.jpg" /></center></td>

</tr>


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

	</table>
	
</br>
 <table  border="0" cellpadding="1" cellspacing="1" width="100%" align="center"  >

<tr>
<td colspan="6"><center><div style="width:500px;height:30px; solid #000;"><b>MEMBERSHIP FORM</b></div></center></td>
</tr>
<tr>
	<td  width="40%">Name in Block Letter</td>
	<td width="15%"><div style="width:180px;height:27px; padding-top:13px; border:3px solid #000;"><center><font  size="3"><?php echo $row['student_surname'] ?></font></center></div></td>
	<td width="15%"><div style="width:180px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo $row['student_firstname'] ?></font></center></div></td>
	<td width="15%"><div style="width:180px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo $row['student_lastname'] ?></font></center></div></td>
<td   width="15%" rowspan="3" colspan="2"  ><center><img src="<?php echo $imgfile; ?>" width="100" height="100" alt="<?php echo $imgfile; ?>" style="padding: 5px 0px 3px 80px;" /></center></td>
</tr>
<tr>
	<td></td>
	<td><center><font size="1">Surname</font></center></td>
	<td><center><font size="1">Firstname</font></center></td>
	<td ><center><font size="1">LastName</font></center></td>
</tr>	

<tr>
	<td colspan="4" height="20"></td>
</tr>	
																																																																						
<tr>
	<td >Date Of Birth</td>
	<td ><div    style="width:180px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo date("d-m-Y",strtotime($row['student_birthdate'])); ?></font></center></div></td>
	<td ><center>Year Of Admission</center></td>
	<td ><div    style="width:140px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo date("Y",strtotime($row['student_admdate'])); ?></font></center></div></td>
	<td width="15%">Branch</td>
	<td colspan="2" ><div    style="width:140px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo $row['branch_name'] ?></font></center></div></td>

																																																																				
</tr>
<tr>
	<td colspan="6" height="20"></td>
</tr>	
<tr >
	<td>Enrollment No</td>
	<td colspan="1" ><div    style="width:180px;height:27px; padding-top:13px; border:3px solid #000;"><center><font size="3"><?php echo $row['student_gturegno'] ?></font></center></div></td>
	<td width="15%"><center> Year Of Passing</center></td>
	<td width="15%"><div style="width:140px;height:27px; padding-top:13px; border:3px solid #000;"><center> <font size="3"><?php echo date("Y"); ?></font></center></div> </td>
	</tr>
<tr>
	<td colspan="6" height="10"></td>
</tr>	
<tr >
	
<td  height="30">Address</td>
<td colspan="5" ><div    style="width:700px;height:27px; padding-top:13px; border:3px solid #000;"><center><font color="black" size="3" ><?php 
         	 		$a = $row['student_address'];
					$b = preg_replace('~\b(\w)(\w+)~e', '"$1".strtolower("$2")', $a);
					echo $b;
         	  ?></br></font></center></div></td>
</tr>
<tr>         	  
<td  height="30">Office Address</td>
<td colspan="5" ><div    style="width:700px;height:27px; padding-top:13px; border:3px solid #000;"></div></td>
</tr>

<tr>
	<td colspan="6" height="30"></td>
	</tr>	
<tr>
	<td></td>

	<td colspan="1"><center>Student Number</center></td>
	<td colspan="1"><div style="width:180px;height:20px;   border:3px solid #000;"><center><font size="3"><?php echo $row['student_mobilestudents'] ?></font></center></div></td>
	<td ><center>Parents Number</center></td>
<td colspan="3"><div style="width:180px;height:20px;   border:3px solid #000;"><center><font size="3"><?php echo $row['student_mobilestudents'] ?></font></center></div></td>
</tr>

<tr>
	<td></td>
	
	<td><center>Email</center></td>
	<td colspan="4"><div style="width:560px;height:20px;   border:3px solid #000;"><center><font size="3"><?php echo $row['student_emailid'] ?></font></center></div></td>
</tr>
<tr>
	<td colspan="6" height="30"></td>
	</tr>	
<tr>
		<td colspan="6">
		
			<hr style="color: #000000; height: 2px; margin-top: -3px;">
		</td>
</tr>	
<tr>
<td colspan="6"><center><div style="width:500px;height:30px; solid #000;"><b>MEMBERSHIP FEE</b></div></center></td>
</tr>
<tr>
<td colspan="6"><ul><li>Associate Membership: Rs.200/- per annum</li></ul></td>
</tr>	
<tr>
<td colspan="6"><ul><li>Life Membership: Rs.1000/- per annum</li></ul></td>
</tr>	
<tr>
<td colspan="6">Cash/Cheque/Draft No: _________________ Dated: _____________ Amount:_______________Drawn
On: ____________________ in favor of Alumni Association, Image Engineering & Technical Institute.
Thank you for supporting ALUMNI Association by becoming a paying member. The ALUMNI association is a great way to
keep in touch with old friends, re-live memories, and to continue support academics and special programs</td>
</tr>	
<tr>
		<td colspan="6">
		
			<hr style="color: #000000; height: 2px; margin-top: 10px;">
		</td>
</tr>	
<tr>
<td colspan="6"><center><div style="width:500px;height:30px; solid #000;"><b>TERMS of AGREEMENT</b></div></center></td>
</tr>
<tr>
<td colspan="6">I Ms. / Mr.<b> <?php echo $name ?></b> wish to become an Associate / Lifetime membership of
the Association. / Others member of the IETI Alumni Association. All the details furnished in this form are true to my
knowledge. If any discrepancy is found in the details furnished by me, the Alumni Association can disqualify my application.</td>
</tr>
<tr>
	<td>Place</td>
	<td colspan="5"></td>
</tr>
<tr>
	<td>Date</td>
	<td colspan="4"></td>
	<td><font size=1">Signature of the Applicant</font></td>
	
</tr>
<tr>
		<td colspan="6" >
		
			<hr style="color: #000000; height: 2px; margin-top: 10px;">
		</td>
</tr>		
<tr>
<td colspan="6"><center><div style="width:500px;height:30px; solid #000;"><b>FOR OFFICE USE</b></div></center></td>
</tr>		
<tr>
	<td colspan="6"> Form received through: _____________________________Receipt No. ________________ Dated: _________________
Entered in roster of Alumni at number: _____________________.</td>
</tr>	
<tr>
	<td colspan="6">Date :</tr>
	
</tr>
<tr>
	<td colspan="5"></td>
	<td><font size=1">Signature of Secretary</font></td>
</tr>
	
</table>

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