403Webshell
Server IP : 119.59.102.212  /  Your IP : 3.22.217.190
Web Server : Apache/2
System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64
User : yangkam ( 1022)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/counter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/counter/counter.php
<?php
//if (isset($Session_name) && $Session_name == "default") {
//	session_start();
//}
//else {
//	session_name("$Session_name");
//	session_start("$Session_name");
//}
$SID = session_id();
$time = time();
$dag = date("z");
$nu = time()-50; // Keep for 15 mins
?>

<CENTER>
<TABLE width='100%' >
<TR>
	<TD><IMG SRC="coremain/images/useronline.gif" BORDER=0 ALT=""></TD>
	<TD>


<?php 
// Check to see if the session_id is already registerd
$sidcheck = mysql_query("SELECT count(*) FROM cms_useronline WHERE SID='$SID'");
$sid_check = mysql_result($sidcheck,0);

if ($sid_check == "0") {
		// If not, the session_id will be stored in MySQL
	mysql_query("INSERT INTO cms_useronline VALUES ('$SID','$time','$dag')");		
} else {		
		// If it is, it will register a new time to the session.
	mysql_query("UPDATE cms_useronline SET time='$time' WHERE SID='$SID'");				
}
	
	// This is it, this counts the users currently online	
$count_users = mysql_query("SELECT count(*) FROM cms_useronline WHERE time>$nu AND day=$dag");
$users_online = mysql_result($count_users,0);

	// This deletes old ids, so your db will not get overloaded.
mysql_query("DELETE FROM cms_useronline WHERE time<$nu");
mysql_query("DELETE FROM cms_useronline WHERE day != $dag");


    echo "ออนไลน์ทั้งหมด <B><FONT  COLOR=#ff0000>$users_online</FONT></B> คน"; 
?> 



</TD>
</TR>
<TR>
	<TD><IMG SRC="coremain/images/com.gif" BORDER=0 ALT=""></TD>
	<TD>หมายเลข IP <FONT  COLOR="#ff0000"><?php echo getenv(REMOTE_ADDR);?></TD>
</TR>
<TR>
	<TD><IMG SRC="coremain/images/online.gif" BORDER=0 ALT=""></TD>
	<TD>คุณเข้าชมลำดับที่ 
	
<?php

/* ทำการตรวจสอบ Counter */
$sql1="Select * From cms_counter";
$dbquery1=mysql_query($sql1);
$result1= mysql_fetch_array($dbquery1);
$counter=$result1['counter'];

/* ทำการ Update Counter โดย+1 */
if($_SESSION['counters']==""){
		$counter_new=$counter+1;
		$sql2="update cms_counter set counter='$counter_new'";
		$dbquery2=mysql_query($sql2);
		$_SESSION['counters']=1;
}


echo "<FONT  COLOR=#ff0000><B>".number_format($counter,'0')."</B></FONT>"; // echo ค่าของ conter
		if($_SESSION[date_start_web]==""){
			$s="SELECT * FROM cms_counter ";
			$r=mysql_query($s);
			$d=mysql_num_fields($r);
				if($d==1){
				// update field
				 $xx="ALTER TABLE `cms_counter` ADD `dates` DATE NOT NULL AFTER `counter`";
					mysql_query($xx);
				}
			$_SESSION[date_start_web]=1;
		}

?>


 </TD>
</TR>
	<?php
	if($result1[dates]!="0000-00-00") {
		echo"<TR>";
		echo"	<TD colspan=2 align=center>จำนวนผู้เข้าชมตั้งแต่วันที่ <br><font color='ff0000'>";
				echo $result1[dates];		
		echo"	</font></TD>";
		echo"</TR>";
	}
?>

</TABLE></CENTER><br>

Youez - 2016 - github.com/yon3zu
LinuXploit