| 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/myoffice/2565/modules/calendarswork/ |
Upload File : |
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<style type="text/css">
<!--
.calendarswork {
width:1000;
background-color: #d7fef6;
}
-->
</style>
<TABLE cellSpacing=0 cellPadding=0 width=100% height=450 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<?
$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]);
?>
<table cellSpacing=1 cellPadding=1 width=100% border=0>
<tr>
<td colspan=6 align=center ><div align='left'> <IMG SRC="images/icon/calendar.gif" BORDER="0" ALIGN="absmiddle"> <b>WORK TIME</b>
<A HREF="?name=calendarswork&file=add"><font color=blue><b><u>ลงเวลามาปฏิบัติงาน</u><b></font></A>
<div>
<div align='center'><b>บัญชีลงเวลาของ <?=$arr[user][category_name];?> </b>
</div>
</td>
</tr>
<tr>
<td bgcolor="#0099CC" width="40%" align="center"><font color="#FFFFFF">ชื่อ - สกุล</td>
<td bgcolor="#0099CC" width="15%" align="center"><font color="#FFFFFF">วัน - เดือน - ปี</td>
<td bgcolor="#0099CC" width="15%" align="center"><font color="#FFFFFF">การปฏิบัติ</td>
<td bgcolor="#0099CC" width="10%" align="center"><font color="#FFFFFF">เริ่มปฏิบัติงาน</td>
<td bgcolor="#0099CC" width="10%" align="center"><font color="#FFFFFF">เลิกปฏิบัติงาน</td>
<td bgcolor="#0099CC" width="10%" align="center"><font color="#FFFFFF">ลงเวลากลับ</td>
</tr>
<?
$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]);
$limit = 31 ;
$SUMPAGE = $db->num_rows(TB_CALENDARSWORK,"id","person='".$arr[user][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 ;
$res[calendars] = $db->select_query("SELECT * FROM ".TB_CALENDARSWORK." WHERE person='".$arr[user][id]."' ORDER BY date_event DESC LIMIT $goto, $limit");
$count=0;
$rank=1;
while($arr[calendars] = $db->fetch($res[calendars])){
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE id='".$arr[calendars][person]."' ");
$arr[user] = $db->fetch($res[user]);
if ($count==0) { echo "<TR>"; }
?>
<TD bgcolor="<?=$ColorFill; ?>" valign=top > <? echo $arr[user][category_name]; ?></td>
<TD bgcolor="<?=$ColorFill; ?>" valign=top align="center"><?echo "".thai_date_fullmonth(strtotime($arr[calendars][date_event])."" );?></td>
<TD bgcolor="<?=$ColorFill; ?>" valign=top align="center"> <font color="<?=$textfill; ?>"><b><? echo $arr[calendars][p_work]; ?></font></td>
<TD bgcolor="<?=$ColorFill; ?>" valign=top align="center"> <font color="<?=$textfill; ?>"><b><? echo $arr[calendars][timeout]; ?></font></td>
<TD bgcolor="<?=$ColorFill; ?>" valign=top align="center"> <font color="<?=$textfill; ?>"><b><? echo $arr[calendars][timeout2]; ?></font></td>
<td width="60" align="center"valign="top">
<?
if($arr[calendars][timeout2]==''){
?>
<a href="?name=calendarswork&file=editevent&id=<? echo $arr[calendars][id];?>">ลงเวลากลับ</a>
<? } else {echo "-";}?>
</td>
</tr>
<tr>
<td height="1" align="left" class="dotline" colspan="5"></td>
</tr>
<?
$rank++;
}
$count++;
?>
</table>
<?
SplitPage($page,$totalpage,"?name=calendars&file=person&person=".$_GET[person]."");
echo $ShowSumPages ;
echo $ShowPages ;
?>
</TD>
</TR>
</TBODY>
</TABLE>