403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.155
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/webadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/triamudom/check/webadmin//display_report_dayall_prints.php
<?php
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'); 
include ($path.'include/permission_denied.php'); 
$CLASS['db']   = new db();
$CLASS['db']->connect(); 
$CLASS['disp']   = new display();
$db   = $CLASS['db']; 
$disp   = $CLASS['disp']; 

$date_day = date("Y-m-d");


$date_search = convert_date_insert($_REQUEST['date_start']);
$date_search_end = convert_date_insert($_REQUEST['date_end']);

//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//
$fetch_public = $db->fetch_array($db->query("select * from tb_public"));
//----------------------------ค่าพื้นฐานระบบเว็บไซต์-----------------------------//



//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<!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" />
<link href="css/style_admin.css" rel="stylesheet" type="text/css">
<SCRIPT type="text/javascript"  src="js/format.js"></SCRIPT>
<SCRIPT type="text/javascript"  src="js/global.js" ></SCRIPT>
<SCRIPT type="text/javascript"  src="js/dtree.js"  ></SCRIPT>
<link href="css/style_admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript"  type="text/javascript" src="../rule/js/calendar.js"></script>
<script language="JavaScript"  type="text/javascript" src="../rule/js/loadcalendar.js"></script>
<script language="JavaScript"  type="text/javascript" src="../rule/js/calendar-en.js"></script>
<link href="../rule/css/style_calendar.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style4 {font-size: 16px}
-->
</style>
</HEAD>
<BODY>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><img src="images/174738_179221222119663_7480233_n.jpg" width="100" /></td>
  </tr>
  <tr>
    <td align="center"><strong>รายงานสถิติการมาเรียนของนักเรียนโรงเรียนแกลง&quot;วิทยสถาวร&quot;</strong></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><strong>ประจำวัน <?php echo $thai_day_arr[date("w")]; ?> ที่  <?php print date("d");?>  เดือน  <?php print convert_month(date("m"),"longthai");?> พ.ศ. <?php print (date("Y")+543);?></strong></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
<br />
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#ED2E2E">
  <tr class="headTable_mpt">
    <td width="15%" align="center" nowrap="nowrap" class="rowtwoB style4">ชั้น/ห้อง</td>
    <td width="10%" align="center" nowrap="nowrap" class="rowtwoB style4">จำนวน นร. </td>
    <td width="10%" align="center" nowrap="nowrap" class="rowtwoB style4">ขาดเรียน</td>
    <td width="10%" align="center" nowrap="nowrap" class="rowtwoB style4">ลากิจ</td>
    <td width="10%" align="center" nowrap="nowrap" class="rowtwoB style4">ลาป่วย</td>
    <td width="10%" align="center" nowrap="nowrap" class="rowtwoB style4">กิจกรรม</td>
    <td width="3%" align="center" nowrap="nowrap" class="levelupyellow style4">มาเรียน</td>
    <td width="13%" align="center" nowrap="nowrap" class="rowtwoB style4">ร้อยละ</td>
    <td width="6%" align="center" nowrap="nowrap" class="levelupyellow style4">ไม่มาเรียน</td>
    <td width="13%" align="center" nowrap="nowrap" class="rowtwoB style4">ร้อยละ</td>
  </tr>
  <?php
				$sql_disroom="select * from tb_rooms where tb_room_status='1' and  tb_room_id  !='69' and  tb_room_id  !='70' and  tb_room_id  !='71' and  tb_room_id  !='72' and  tb_room_id  !='73' and  tb_room_id  !='74' order by tb_room_id asc";
				$query_disroom = $db->query($sql_disroom);
			 	$numrows = $db->num_rows($query_disroom);
				if($numrows >0){
					$i=1;
					while($fetch_disroom = $db->fetch_array($query_disroom)){
							if($date_search){
									$sql_search .= " and tb_time_date >= '".$date_search."' and tb_time_date <= '".$date_search_end."'  ";
							}else{
									$sql_search .=  " and tb_time_date ='".$date_day."' ";
							}
		
							$fetch_numstu = $db->fetch_array($db->query("select count(tb_student_degree) as num_group from tb_students  where tb_student_degree ='".$fetch_disroom['tb_room_id']."' "));
							$fetch_numruletype1 = $db->fetch_array($db->query("SELECT COUNT(tb_time_type) AS num_group FROM tb_times WHERE tb_time_type='6' and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search "));
							$fetch_numruletype2 = $db->fetch_array($db->query("SELECT COUNT(tb_time_type) AS num_group FROM tb_times  WHERE tb_time_type='2'  and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search"));
							$fetch_numruletype3 = $db->fetch_array($db->query("SELECT COUNT(tb_time_type) AS num_group FROM tb_times  WHERE tb_time_type='7' and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search"));
							$fetch_numruletype4 = $db->fetch_array($db->query("SELECT COUNT(tb_time_type) AS num_group FROM tb_times  WHERE tb_time_type='4' and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search"));
						 $fetch_numruletype5 = $db->fetch_array($db->query("SELECT COUNT(tb_time_type) AS num_group FROM tb_times  WHERE tb_time_type='5'  and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search"));
						// echo "SELECT COUNT(tb_time_type) AS num_group FROM tb_times  WHERE tb_time_type='5'  and tb_time_degree ='".$fetch_disroom['tb_room_id']."' $sql_search";
							$numlateall = $fetch_numruletype1['num_group']+$fetch_numruletype2['num_group']+$fetch_numruletype4['num_group']+$fetch_numruletype5['num_group'];
							
							
							
							$numpercen = ($numlateall*100)/$fetch_numstu['num_group'];
							$numpercenall  = 100-$numpercen;
							//แสดงผลในรวมแต่ละคอลัมภ์
							$numallcol += $fetch_numstu['num_group'];
							$numallcol1 += $fetch_numruletype1['num_group'];
							$numallcol2 += $fetch_numruletype2['num_group'];
							$numallcol3 += $fetch_numruletype3['num_group'];
							$numallcol4 += $fetch_numruletype4['num_group'];
							$numallcol5 += $fetch_numruletype5['num_group'];
							$numallcol6 += $fetch_numstu['num_group']-$numlateall;
							$numpercentotal += ($numpercenall/$numrows);
														if($i%2=="1"){
															$bg="rowone";
														}else{
															$bg="rowtwo";
														}
														$stu_norigis = $fetch_numstu['num_group']-($fetch_numstu['num_group']-$numlateall);
														///$numpercenlate = ($stu_norigis*$fetch_numstu['num_group'])/$numpercenall;
														$numpercenlate = ($stu_norigis*100)/$fetch_numstu['num_group'];
														$numpercentotallate += ($numpercenlate/$numrows);
														$numallcol7 += $fetch_numstu['num_group']-($fetch_numstu['num_group']-$numlateall);
 			  ?>
  <tr class="<?php echo $bg;?>">
    <td align="center" ><?php print $fetch_disroom['tb_room_name'];?></td>
    <td align="center" ><?php print $fetch_numstu['num_group'];?></td>
    <td align="center" ><?php print $fetch_numruletype5['num_group'];?></td>
    <td align="center" ><?php print $fetch_numruletype1['num_group'];?></td>
    <td align="center" ><?php print $fetch_numruletype4['num_group'];?></td>
    <td align="center" ><?php print $fetch_numruletype3['num_group'];?></td>
    <td align="center" ><?php print $fetch_numstu['num_group']-$numlateall;?></td>
    <td align="center" ><?php print number_format($numpercenall,2);?></td>
    <td align="center" ><?php print $stu_norigis;?></td>
    <td align="center" ><?php print number_format($numpercenlate,2);?></td>
  </tr>
  <?php
											$i++;
											}
											?>
  <tr>
    <td align="center" bgcolor="#98D562"><strong>รวม</strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol5,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol1,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol4,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol3,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol6,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numpercentotal,2);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numallcol7,0);?></strong></td>
    <td align="center" bgcolor="#98D562"><strong><?php print number_format($numpercentotallate,2);?></strong></td>
  </tr>
  <?
											}else{
										?>
  <tr>
    <td colspan="10" align="center" bgcolor="#FFFFFF" ><span class="style1">ไม่พบข้อมูล</span></td>
  </tr>
  <?php
											}
										?>
</table>
</BODY>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit