| Server IP : 104.21.80.248 / 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/myschool/queencollege/modules123456/useronline/ |
Upload File : |
<?
include("modules/useronline/startconnect.php");
$ct_ip = $_SERVER["REMOTE_ADDR"];
$ct_yyyy = date("Y") ;
$ct_mm = date("m") ;
$ct_dd = date("d") ;
$ct_time = time();
$timecheck = time()-$time_delay; // นับจำนวนเข้าชมขณะนี้ ในช่วงเวลา 15 นาที
$sql = " select COUNT(ct_no) AS ct_count from ".TB_ACTIVEUSER." where ct_dd = '$ct_dd' AND ct_mm = '$ct_mm' AND ct_yyyy = '$ct_yyyy' AND ct_time >= '$timecheck' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$stat_now = $row["ct_count"]; // แสดงสถิติเข้าชมคณะนี้
$sql = " select SUM(ct_count) AS ct_count from ".TB_ACTIVEUSER." where ct_dd = '$ct_dd' AND ct_mm = '$ct_mm' AND ct_yyyy = '$ct_yyyy' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$stat_dd = $row["ct_count"]; // แสดงสถิติวันนี้
$sql = " select SUM(ct_count) AS ct_count from ".TB_ACTIVEUSER." where ct_mm = '$ct_mm' AND ct_yyyy = '$ct_yyyy' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$stat_mm = $row["ct_count"]; // แสดงสถิติเดือนนี้
$sql = " select SUM(ct_count) AS ct_count from ".TB_ACTIVEUSER." where ct_yyyy = '$ct_yyyy' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$stat_yyyy = $row["ct_count"]; // แสดงสถิติปีนี้
$sql = " select SUM(ct_count) AS ct_count from ".TB_ACTIVEUSER." ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$stat_all = $row["ct_count"]; // แสดงสถิติทั้งหมด
?>
<table width="220" cellpadding="0" cellspacing="0" class="fontmain" style="border-collapse: collapse" bgcolor="">
<tr>
<td>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" class="fontmain">
<tr>
<td width="120" height="20">ขณะนี้</td>
<td width="80"><div align="right"><?=$stat_now ?> คน</div></td>
</tr>
<tr>
<td height="20"> สถิติวันนี้</td>
<td><div align="right"><?=$stat_dd ?> คน</div></td>
</tr>
<tr>
<td height="20">สถิติเดือนนี้</td>
<td><div align="right"><?=$stat_mm ?> คน</div></td>
</tr>
<tr>
<td height="20">สถิติปีนี้</td>
<td><div align="right"><?=$stat_yyyy ?> คน</div></td>
</tr>
<tr>
<td height="20">สถิติทั้งหมด</td>
<td><div align="right"><?=$stat_all ?> คน</div></td>
</tr>
</table>
</div>
</td>
</tr>
<?
include("modules/useronline/endconnect.php");
?>
</table>