| Server IP : 172.67.187.206 / Your IP : 162.159.115.42 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/www/myschool/triamudom/check/information/ |
Upload File : |
<?php
header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename="report_teacher.xls"');#ชื่อไฟล์
session_start();
$path = "../";
include ($path.'include/config_db.php');
include ($path.'include/class_db.php');
include ($path.'include/class_display.php');
include ($path.'include/function.php');
$CLASS['db'] = new db();
$CLASS['db']->connect();
$CLASS['disp'] = new display();
$db = $CLASS['db'];
$disp = $CLASS['disp'];
//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
$tb_department_id = $_REQUEST['tb_department_id'];
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
$fetch_public = $db->fetch_array($db->query("select * from tb_public"));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php print $fetch_public['tb_public_title_admin'];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
color:#666666;
font-family: Tahoma;
}
table {
font-family: Tahoma;
font-size: 12px;
color:#666666;
}
.style1 {
font-size: 18px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="100%" border="1" cellspacing="2" cellpadding="2">
<tr align="center" bgcolor="#CCCCCC" class="style1">
<td width="6%" align="center" nowrap="nowrap"><strong>ลำดับที่</strong></td>
<td width="14%" align="center" nowrap="nowrap"><strong>ภาพประจำตัว</strong></td>
<td width="14%" nowrap="nowrap"><strong>เลขประจำตำแหน่ง</strong></td>
<td width="21%" nowrap="nowrap"><strong>ชื่อ - สกุล</strong></td>
<td width="17%" align="center" nowrap="nowrap"><strong>ตำแหน่งทางวิชาการ</strong></td>
<td width="20%" align="center" nowrap="nowrap"><strong>บัตรประชาชน</strong></td>
<td width="20%" align="center" nowrap="nowrap"><strong>รับรองข้อมูล</strong></td>
</tr>
<?php
if($tb_department_id){
$sql_search .= " where tb_department_id='".$tb_department_id."' and tb_teacher_status='1' ";
}else{
$sql_search .= " where tb_teacher_status='1' ";
}
$query_teacher_card = $db->query("select * from tb_teachers $sql_search order by tb_teacher_id asc");
$i =1;
while($fetch_teacher_card = $db->fetch_array($query_teacher_card)){
$displayimg = $disp->display_teachertimepic($fetch_teacher_card['tb_teacher_number']);
?>
<tr class="style1">
<td align="center"><?php print $i;?>.</td>
<td align="center"><?php if($displayimg){?>
<img src="../id-plan/file_uploads/<?php print $disp->display_teachertimepic($fetch_teacher_card['tb_teacher_number'])?>" width="100" border="1" />
<?php }else{?>
<img src="../id-plan/file_uploads/photo.png" width="100" />
<?php }?></td>
<td align="center"><?php print $fetch_teacher_card['tb_teacher_number'];?></td>
<td><?php print $fetch_teacher_card['tb_teacher_name'];?></td>
<td align="center"><?php print $disp->display_academicname($fetch_teacher_card['tb_academic_id']);?></td>
<td align="center"><?php print $fetch_teacher_card['tb_teacher_idcard'];?></td>
<td align="center"> </td>
</tr>
<?php
$i++;
}
?>
</table>
</body>
</html>