| 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/bankha/modules/user/ |
Upload File : |
<?
include 'includes/connect.php';
?>
<?
$hour = +0;//ปรับให้ตรงตามต้องการ ชม. เช่น เป็นค่าบวก หรือค่าลบ เพื่อให้เวลาของ server ตรงกับเวลาจริง
$min = 0;//ปรับให้ตรงตามต้องการ นาที
$Year = date("Y")+543;
$thaimonth=array("มค.","กพ.","มีค.","เมย.","พค.","มิย.","กค.","สค.","กย.","ตค.", "พย.","ธค.");
//วันที่ วันนี้
$mtoday=date("d ",mktime( date("H")+$hour, date("i")+$min ));
$mtime=date("H:i:s",mktime( date("H")+$hour, date("i")+$min ));
$mdate=$mtoday. $thaimonth[date("m")-1]." ".$Year;
//กำหนดให้ IE อ่าน page นี้ทุกครั้ง ไม่ไปเอาจาก cache
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header("content-type: application/x-javascript; charset=utf-8");
echo "$mdate $mtime";
?>
<script language=JavaScript>
var req;
function startCallback() {
if (req.readyState == 4) {
if (req.status == 200) {
document.getElementById("time").innerHTML="วันนี้ : "+req.responseText;//รับค่ากลับมา และ แสดงผล
setTimeout("doStart()", 1000);//Auto Refresh กลับมาอ่าน เวลาทุก 1 วินาที
}
}
}
function doStart() {
req = Inint_AJAX();
var url = "time.php";
req.open("GET", url, true);
req.onreadystatechange = startCallback;//กำหนด ฟังก์ชั่นเพื่อส่งค่ากลับ
req.send(null);
};
</script>
<table width="1000" align="center">
<tr>
<td width="8%" valign="top">
<?
$timeoutseconds=10*60;
$_SESSION['timestamp2']=time();
$timeout=$_SESSION['timestamp2'] - $timeoutseconds;
////////////////////// เพิ่ม สมาชิกออนไลน์ ////////////////////////////
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user2] = $db->select_query("SELECT * FROM ".TB_useronline." WHERE useronline='".$_SESSION['user_user']."' ");
$rows[user2] = $db->rows($res[user2]);
$db->closedb ();
if($rows[user2]){
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$db->update_db(TB_useronline,array(
"post_date"=>"".$_SESSION['timestamp2'].""
// "useronline"=>"".$_SESSION['user_user'].""
)," useronline='".$_SESSION['user_user']."' ");
$db->closedb ();
}else{
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$db->add_db(TB_useronline,array(
"post_date"=>"".$_SESSION['timestamp2']."",
"useronline"=>"".$_SESSION['user_user'].""
));
}
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$db->del(TB_useronline," post_date<$timeout ");
$db->closedb ();
////////////////////// เพิ่ม สมาชิกออนไลน์ ////////////////////////////
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
$arr[usersch] = $db->fetch($res[usersch]);
$db->closedb ();
?>
</td></tr>
<table width="1000" align=center border="0" cellpadding="0" cellspacing="0">
<tr><td width="100%" align=center>
<table width="90%" border="0" cellpadding="0" cellspacing="0"align=center>
<tr>
<td width="400" align=left valign="top"><img src="images/121.gif" border="0" /><B><font color=blue size=2> เอกสารของคุณวันนี้</font></B><BR>
<?php
// นับจำนวน หนังสือเวียน ที่ไม่ได้เปิดอ่าน
include("modules/tkk8/tkk8_count_unread.php");
$tkk8_count_unread_num = tkk8_count_unread($arr[usersch][id]);
if($tkk8_count_unread_num>0) {
$tkk8_count_unread_txt = "<font color=red> <img src=images/arrow2.gif> แฟ้มหนังสือเวียน <u>$tkk8_count_unread_num</u> เรื่อง </font><BR>";
}else{
$tkk8_count_unread_txt = "<font color=red></font>";
}
// นับจำนวน หนังสือเวียน ที่ไม่ได้เปิดอ่าน
// นับจำนวน หนังสือราชการ ที่ไม่ได้เปิดอ่าน
include("modules/tkk4/tkk4_count_unread.php");
$tkk4_count_unread_num = tkk4_count_unread($arr[usersch][id]);
if($tkk4_count_unread_num>0) {
$tkk4_count_unread_txt = "<font color=red> <img src=images/arrow2.gif> แฟ้มหนังสือราชการ <u>$tkk4_count_unread_num</u> เรื่อง </font><BR>";
}else{
$tkk4_count_unread_txt = "<font color=red></font>" ;
}
// นับจำนวน หนังสือเวียน ที่ไม่ได้เปิดอ่าน
// นับจำนวน หนังสือเวียน ที่ไม่ได้เปิดอ่าน
include("modules/tkk7/tkk7_count_unread.php");
$tkk7_count_unread_num = tkk7_count_unread($arr[usersch][id]);
if($tkk7_count_unread_num>0) {
$tkk7_count_unread_txt = "<font color=red> <img src=images/arrow2.gif> แฟ้มหนังสือจาก ร.ร. <u>$tkk7_count_unread_num</u> เรื่อง </font><BR>";
}else{
$tkk7_count_unread_txt = "<font color=red></font>";
}
// นับจำนวน หนังสือเวียน ที่ไม่ได้เปิดอ่าน
// นับจำนวน รับหนังสือราชการ ส่งคืน
include("modules/tkk2/tkk2_1_count_unread.php");
$tkk2_1_count_unread_num = tkk2_1_count_unread($arr[usersch][id]);
if($tkk2_1_count_unread_num>0) {
$tkk2_1_count_unread_txt = " <img src=images/arrow2.gif> แฟ้มหนังสือส่งคืน <u>$tkk2_1_count_unread_num</u> เรื่อง </font><img src=images/new.gif><BR>";
}else{
$tkk2_1_count_unread_txt = "<font color=red></font>";
}
// นับจำนวน รับหนังสือราชการ
?>
<body onload="doStart();">
<div id="time">
<img src="myoffice/main.jpg"><font face="'thaisans_neuelight'" COLOR="blue"size=5px> หนังสือรอดำเนินการ</font>
<BR>
<A HREF="?name=tkk4&category=<?=$arr[usersch][id];?>"> <?=$tkk4_count_unread_txt ?> </A>
<A HREF="?name=tkk8&op=tkk8_read&category=<?=$arr[usersch][id];?>"> <?=$tkk8_count_unread_txt ?></A>
<A HREF="?name=tkk2&file=backarea&op=tkk2_read&category=<?=$arr[usersch][id];?> "><font color=blue ><?=$tkk2_1_count_unread_txt ?></font> </A>
<A HREF="?name=tkk7&category=<?=$arr[usersch][id];?>"> <?=$tkk7_count_unread_txt ?></A>
</div>
</body>
<BR><BR>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>