| 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 : /Inetpub/www/myoffice/2564/modules/tkk6/ |
Upload File : |
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>
<TABLE cellSpacing=0 cellPadding=0 width=100% height=500 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<?
if($_GET[op] == "tkk6_read"){
//////////////////////////////////////////// กรณีแก้ไข 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]);
?>
<TABLE width="100%" align=center cellSpacing=1 cellPadding=1 border=0 >
<tr bgcolor="#336633" height=25>
<td width="5%" align=center ><font color="#FFFFFF"><B>ประเภท</B></font></td>
<td align=center width="30%"><font color="#FFFFFF"><B>เรื่อง</B></font></td>
<td width="20%" align=center ><font color="#FFFFFF"><B>ผู้ส่งเรื่อง</B></font></td>
<td width="20%" align=center ><font color="#FFFFFF"><B>ผู้ผ่านเรื่อง</B></font></td>
<td width="15%" align=center ><font color="#FFFFFF"><B>สถานะ</B></font></td>
<td width="15%" align=center ><font color="#FFFFFF"><B>แฟ้มเสนอ</B></font></td>
<?
// CheckUser($_SESSION['user_user']);
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
$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[tkk6] = $db->select_query("SELECT * FROM ".TB_TKK6." WHERE cat='".$arr[user][id]."' ORDER BY id DESC LIMIT 1 ");
while($arr[tkk6] = $db->fetch($res[tkk6]))
{
?>
<?
if(($arr[tkk6][comment1]!=อนุญาต) OR ($arr[tkk6][comment1]!=ไม่อนุญาต)){
?>
<td width="80" align=center ><font color="#FFFFFF"><B>ยกเลิก</B></font></td>
<? }}?>
</tr>
<?
//แสดงข่าวสาร/ประชาสัมพันธ์
if($_GET[category]){
$SQLwhere = " category='".$_GET[category]."' ";
$SQLwhere2 = " WHERE category='".$_GET[category]."' ";
}
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$limit = 10 ;
$SUMPAGE = $db->num_rows(TB_TKK6,"id","$SQLwhere");
$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 ;
$res[tkk6] = $db->select_query("SELECT * FROM ".TB_TKK6." $SQLwhere2 ORDER BY id DESC LIMIT $goto, $limit ");
$count=0;
while($arr[tkk6] = $db->fetch($res[tkk6])){
?>
<tr bgcolor="#FFFFFF">
<td align="center" ><IMG SRC="myoffice/100.png"></td>
<?
if(($arr[tkk6][la]=='ป่วย') OR ($arr[tkk6][la]=='กิจส่วนตัว') OR ($arr[tkk6][la]=='คลอดบุตร')){
?>
<td ><A HREF="javascript:NewWindow('popup2.php?name=tkk6&file=readtkk6_1&id=<?echo $arr[tkk6][id];?>','acepopup','1024','720','center','front');"><?echo $arr[tkk6][topic];?></A>
</td>
<? }?>
<?
if($arr[tkk6][la]=='พักผ่อน'){
?>
<td ><A HREF="javascript:NewWindow('popup2.php?name=tkk6&file=readtkk6&id=<?echo $arr[tkk6][id];?> ','acepopup','1024','720','center','front');">ลา<?echo $arr[tkk6][la];?></A>
</td>
<? }?>
<td > <CENTER><? echo $arr[tkk6][name];?><br><?echo ThaiTimeConvert($arr[tkk6][post_date],'','2');?></CENTER></td>
<td align="center" >
<?=$arr[tkk6][namecom];?><br>
<?
if($arr[tkk6][update_date]){
?>
<?echo ThaiTimeConvert($arr[tkk6][update_date],'','2');?>
<? } else {
echo "-";
}?>
</td>
<td align="center" >
<?
if($arr[tkk6][comment1]==B){
?>
ผู้รับงานแทน
<?}?>
<?
if($arr[tkk6][comment1]==A){
?>
นำส่งผู้รับงานแทน
<?}?>
<?
if($arr[tkk6][comment1]==2){
?>
รับมอบงาน
<?}?>
<?
if($arr[tkk6][comment1]==1){
?>
เสนอแฟ้มลา
<?}?>
<?
if(($arr[tkk6][comment1]==3)OR($arr[tkk6][comment1]==4)){
?>
เจ้าหน้าที่วันลา
<?}?>
<?
if(($arr[tkk6][comment1]==5)OR($arr[tkk6][comment1]==6)){
?>
เสนอผู้อำนวยการกลุ่ม
<?}?>
<?
if(($arr[tkk6][comment1]==7)OR($arr[tkk6][comment1]==8)){
?>
เสนอรองผู้อำนวยการ
<?}?>
<?
if(($arr[tkk6][comment1]==9)OR($arr[tkk6][comment1]==10)){
?>
เสนอผู้บริหาร
<?}?>
<?
if($arr[tkk6][comment1]==อนุญาต){
?>
อนุญาต
<?}?>
<?
if($arr[tkk6][comment1]==ไม่อนุญาต){
?>
ไม่อนุญาต
<?}?>
<?
if(($arr[tkk6][comment1]==11)OR($arr[tkk6][comment1]==12)){
?>
ขอพบ
<?}?>
<?
if(($arr[tkk6][comment1]==11)OR($arr[tkk6][comment1]==13)){
?>
ขอพบ
<?}?>
</td>
<td align="center" >
<!--เสนอแฟ้มลาพักผ่อน-->
<?
if($arr[tkk6][comment1]==A){
?>
<A HREF="?name=tkk6&file=sentmom&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font></A>
<? }?>
<?
if($arr[tkk6][comment1]==B){
?>
<A HREF="?name=tkk6&file=sentmomla&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font></A>
<? }?>
<?
if($arr[tkk6][comment1]==2){
?>
<A HREF="?name=tkk6&file=sent1&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>เสนอแฟ้ม</font></A>
<? }?>
<!--เสนอแฟ้มลาป่วย กิจ คลอด-->
<?
if(($arr[tkk6][comment1]==1) AND ($arr[user][status]==1)){
?>
<A HREF="?name=tkk6&file=sent&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>เสนอแฟ้ม</font></A>
<?}?>
<?
if(($arr[tkk6][comment1]==1) AND ($arr[user][status]==4)){
?>
<A HREF="?name=tkk6&file=sentkru&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--นำส่งเจ้าหน้าที่วันลาป่วย-->
<?
if($arr[tkk6][comment1]==3){
?>
<A HREF="?name=tkk6&file=sentturagan&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<? } ?>
<!--นำส่งเจ้าหน้าที่วันลาพักผ่อน-->
<?
if($arr[tkk6][comment1]==4){
?>
<A HREF="?name=tkk6&file=sentrest&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอ ผอ.กลุ่ม ลาป่วย กิจ คลอด-->
<?
if(($arr[tkk6][comment1]==5)){
?>
<A HREF="?name=tkk6&file=readtwo&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอ ผอลกลุ่ม ลาพักผ่แน-->
<?
if(($arr[tkk6][comment1]==6)){
?>
<A HREF="?name=tkk6&file=readtworest&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอรอง ลาป่วย-->
<?
if(($arr[tkk6][comment1]==7)){
?>
<A HREF="?name=tkk6&file=readtwo&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอรอง ลาพักผ่อน-->
<?
if(($arr[tkk6][comment1]==8)){
?>
<A HREF="?name=tkk6&file=readtworest&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอ ผอ ลาป่วย-->
<?
if($arr[tkk6][comment1]==9){
?>
<A HREF="?name=tkk6&file=readod&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--เสนอ ผอ ลาผ่อน-->
<?
if($arr[tkk6][comment1]==10){
?>
<A HREF="?name=tkk6&file=readodrest&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>ดำเนินการต่อ</font.</A>
<?}?>
<!--อนุญาต-->
<?
if($arr[tkk6][comment1]==อนุญาต){
?>
<FORM NAME="myform" METHOD=POST ACTION="?name=tkk6&file=tabain2&op=tkk6_edit&action=edit&id=<? echo $arr[tkk6][id];?>" enctype="multipart/form-data">
<input type="hidden" name="CATEGORY" value="o" checked>
<INPUT TYPE="submit" value="จัดเก็บ" name="submit">
</FORM>
<?}?>
<!--ไม่อนุยาต-->
<?
if($arr[tkk6][comment1]==ไม่อนุญาต){
?>
<?
if($_SESSION['user_user']){
?>
<a href="javascript:Confirm('?name=tkk6&file=index2&op=tkk6_del&id=<? echo $arr[tkk6][id];?>&prefix=<? echo $arr[tkk6][post_date];?>','กรณีไม่อนุญาตลบวันลาออกไป');"><IMG SRC="images/delete.gif"></a>
<?
}
?>
<?}?>
<?
if($arr[tkk6][comment1]==11){
?>
<A HREF="?name=tkk6&file=sent&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>เสนอแฟ้ม</font></A>
<? }?>
<?
if($arr[tkk6][comment1]==12){
?>
<A HREF="?name=tkk6&file=sent1&op=tkk6_edit&id=<? echo $arr[tkk6][id];?>"><font color=red>เสนอแฟ้ม</font></A>
<? }?>
<?
if($arr[tkk6][comment1]==13){
?>
<a href="javascript:Confirm('?name=tkk6&file=index2&op=tkk6_del&id=<? echo $arr[tkk6][id];?>&prefix=<? echo $arr[tkk6][post_date];?>','คุณมั่นใจในการลบหัวข้อนี้ ?');"><IMG SRC="images/delete.gif" border="0" alt="ลบ" ></a>
<?}?>
<?
if($arr[tkk6][category]==o){
?>
<IMG SRC="images/tick.png">
<?}?>
</td>
<td align=center >
<!--แก้ไข-->
<?
if(($arr[tkk6][comment1]==11)OR($arr[tkk6][comment1]==12)OR($arr[tkk6][comment1]==1)){
?>
<?
if($_SESSION['user_user']){
//Admin Login Show Icon
?>
<a href="javascript:Confirm('?name=tkk6&file=index2&op=tkk6_del&id=<? echo $arr[tkk6][id];?>&prefix=<? echo $arr[tkk6][post_date];?>','ยกเลิกวันลาครั้งนี้ทั้งหมด?');"><IMG SRC="images/delete.gif"></a>
<?}?>
<?}?>
<?
if($arr[tkk6][comment1]==13){
?>
<?
if($_SESSION['user_user']){
//Admin Login Show Icon
?>
<a href="javascript:Confirm('?name=tkk6&file=index2&op=tkk6_del&id=<? echo $arr[tkk6][id];?>&prefix=<? echo $arr[tkk6][post_date];?>','คุณมั่นใจในการลบหัวข้อนี้ ?');"><IMG SRC="images/delete.gif" border="0" alt="ลบ" ></a>
<?}?>
<?}?>
<?
if(($arr[tkk6][comment1]==2)OR($arr[tkk6][comment1]==A)){
?>
<?
if($_SESSION['user_user']){
//Admin Login Show Icon
?>
<a href="javascript:Confirm('?name=tkk6&file=index2&op=tkk6_del&id=<? echo $arr[tkk6][id];?>&prefix=<? echo $arr[tkk6][post_date];?>','คุณมั่นใจในการลบหัวข้อนี้ ?');"><IMG SRC="images/delete.gif" border="0" alt="ลบ" ></a>
<?}?>
<?}?>
</td>
</TR>
<?
$count++;
if (($count%1) == 0) { echo ""; $count=0; }
}
$db->closedb ();
//จบการแสดงข่าวสาร
?>
<!-- End tkk3 -->
</table>
</form>
</TR>
</TD>
</TABLE>
<BR>
<table border="0" cellpadding="0" cellspacing="1" width="100%" align=center>
<tr>
<td>
<?
SplitPage($page,$totalpage,"?name=tkk6&op=tkk6_read&category=".$_GET[category]."");
echo $ShowSumPages ;
echo $ShowPages ;
// CheckUser($_SESSION['user_user']);
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
$arr[user] = $db->fetch($res[user]);
?>
<meta http-equiv="refresh" content="60 ;url=?name=tkk6&op=tkk6_read&category=<?=$arr[user][id];?>">
<?
}
?>
<?
}else{
//กรณีไม่ผ่าน
$ProcessOutput = $PermissionFalse ;
}
echo $ProcessOutput ;
}
?>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>