| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/scan_inS/ |
Upload File : |
<?php
session_start();
$date = date("Y-m-d H:i:s");
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>รายงานบันทึกเข้า-ออก</title>
<br /><p align="center"><strong>รายงานบันทึกการเข้า-ออก ห้อง server </strong></p>
<table width="80%" border="1" align="center">
<tr align="center" bgcolor="#33CCCC">
<td width="15%">ชื่อ</td>
<td width="22%">กิจกรรม</td>
<td width="8%">วันที่</td>
<td width="5%">เวลาเข้า</td>
<td width="5%">เวลาออก</td>
</tr>
<?php
$objConnect = mysql_connect("localhost","root","090407") or die("Error Connect to Database");
mysql_query("SET character_set_results=utf8");
mysql_query("SET character_set_client=utf8");
mysql_query("SET character_set_connection=utf8");
$objDB = mysql_select_db("scan_inserver");
$plquery="SELECT * FROM report order by id ";
//echo $plquery.'<br>';
$result=mysql_query($plquery);
//echo $result.'<br>';
?>
<?php
while($row=mysql_fetch_array($result)){
$id=$row['id'];
$m= substr($row['dateIn'],5,2);
//echo $m.'<br>';
$d= substr($row['dateIn'],8,2);
//echo $d.'<br>';
$y= substr($row['dateIn'],0,4)+543;
//echo $y.'<br>';
$dateN=$d.'-'.$m.'-'.$y;
$plquery1="select * from User where IDUser='".$row['IDUser']."' ";
$result1=mysql_query($plquery1);
while($objResult = mysql_fetch_array($result1)){
$nameS=$objResult['username'];
echo '<tr><td>'.' '.$nameS.'</td>';
echo '<td>'.' '.$row['comment'].'</td>';
echo '<td align="center">'.$dateN.'</td>';
echo '<td align="center">'.substr($row['dateIn'],11,5).' น.'.'</td>';
if (substr($row['dateOut'],11,5)=='00:00'){
echo '<td align="center"></td>';
}else{
echo '<td align="center">'.substr($row['dateOut'],11,5).' น.'.'</td>';
}
echo '</tr>';
}
}
?>
</table>