AnonSec Team
Server IP : 124.109.2.77  /  Your IP : 216.73.216.49
Web Server : Apache/2
System : Linux ns4.amiprocorp.com 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : cpctlp ( 1020)
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 :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 329
OFF  |  Perl :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 335
OFF  |  Python :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 341
OFF
Directory (0755) :  /home/cpctlp/domains/cpctlphp.com/public_html/admin/../ckeditor4.10.1/../counter/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cpctlp/domains/cpctlphp.com/public_html/admin/../ckeditor4.10.1/../counter/index.php
<?php
// edit counter settings here
 
$counter_path_http = "counter/";

// ip-protection in seconds
$counter_expire = 600;

   $ignore = false; 
   
   // get counter information
    $sql = "select * from counter_values  ";
    // fill when empty
   if ($db->recCount($sql) == 0)
   {	  
	 $sql = "INSERT INTO `counter_values` ( `day_id`, `day_value`, `yesterday_id`, `yesterday_value`, `week_id`, `week_value`, `month_id`, `month_value`, `year_id`, `year_value`, `all_value`, `record_date`, `record_value`) VALUES ( '" . date("z") . "',  '1', '" . (date("z")-1) . "', '0', '" . date("W") . "', '1', '" . date("n") . "', '1', '" . date("Y") . "',  '1',  '1',  NOW(),  '1')";
	 $db->query($sql);

	 $sql = "INSERT INTO counter_ips_record (ip, visit) VALUES ('$counter_ip', NOW())";
	$db->query($sql);

	  $sql = "select * from counter_values ";
	  $ignore = true;
   }   
   $row=$db->getRec($sql);		
   $day_id = $row['day_id'];
   $day_value = $row['day_value'];
   $yesterday_id = $row['yesterday_id'];
   $yesterday_value = $row['yesterday_value'];
   $week_id = $row['week_id'];
   $week_value = $row['week_value'];
   $month_id = $row['month_id'];
   $month_value = $row['month_value'];
   $year_id = $row['year_id'];
   $year_value = $row['year_value'];
   $all_value = $row['all_value'];
   $record_date = $row['record_date'];
   $record_value = $row['record_value'];
   
   $counter_agent = (isset($_SERVER['HTTP_USER_AGENT'])) ? addslashes(trim($_SERVER['HTTP_USER_AGENT'])) : "";
   $counter_time = time();
   $counter_ip = trim(addslashes($_SERVER['REMOTE_ADDR'])); 
   
   // ignorore some bots
   if (substr_count($counter_agent, "bot") > 0)
      $ignore = true;
      
   // delete free ips
   if ($ignore == false)
   {
      $sql = "delete from counter_ips where unix_timestamp(NOW())-unix_timestamp(visit) > $counter_expire  "; 
    $db->query($sql);
   }
      
   // check for entry
   if ($ignore == false)
   {
      $sql = "select * from counter_ips where ip = '$counter_ip'  ";
      if ($db->recCount($sql)== 0)
      {
         // insert
	     $sql = "INSERT INTO counter_ips (ip, visit) VALUES ('$counter_ip', NOW())";
   	     $db->query($sql);
      }
      else
      {
         $ignore = true;
	     $sql = "update counter_ips set visit = NOW() where ip = '$counter_ip'  ";
	     $db->query($sql);
      }
   }
   
   // online?
   $sql = "select * from counter_ips   ";
   $online=$db->recCount($sql);
       
   // add counter
   if ($ignore == false)
   {     	  
      // yesterday
	  if ($day_id == (date("z")-1)) 
	  {
	     $yesterday_value = $day_value; 
		 $yesterday_id = (date("z")-1);
	  }
	  else
	  {
	     if ($yesterday_id != (date("z")-1))
		 {
		    $yesterday_value = 0; 
		    $yesterday_id = date("z")-1;
		 }
	  }
	  
	  // day
	  if ($day_id == date("z")) 
	  {
	     $day_value++; 
	  }
	  else 
	  {
	     $day_value = 1;
		 $day_id = date("z");
	  }
	  
	  // week
	  if ($week_id == date("W")) 
	  {
	     $week_value++; 
	  }
	  else 
	  { 
	     $week_value = 1;
		 $week_id = date("W");
      }
	  
      // month
	  if ($month_id == date("n")) 
	  {
	     $month_value++; 
	  }
	  else 
	  {
	     $month_value = 1;
		 $month_id = date("n");
      }
	  
	  // year
	  if ($year_id == date("Y")) 
	  {
	     $year_value++; 
	  }
	  else 
	  {
	     $year_value = 1;
		 $year_id = date("Y");
      }
	  
	  // all
	  $all_value++;
		 
	  // neuer record?
	  if ($day_value > $record_value)
	  {
	     $record_value = $day_value;
	     $record_date = date("Y-m-d H:i:s");
	  }
		 
	  // speichern und aufrไumen
	  $sql = "update counter_values set day_id = '$day_id', day_value = '$day_value', yesterday_id = '$yesterday_id', yesterday_value = '$yesterday_value', week_id = '$week_id', week_value = '$week_value', month_id = '$month_id', month_value = '$month_value', year_id = '$year_id', year_value = '$year_value', all_value = '$all_value', record_date = '$record_date', record_value = '$record_value' ";
	 $db->query($sql);

	   // insert
	     $sql = "INSERT INTO counter_ips_record (ip, visit) VALUES ('$counter_ip', NOW())";
   	    $db->query($sql);
   }	  
?>

<style type="text/css">
<!--
.style3 {font-family: Kanit;color:#ffffff;  }

-->
</style>

 
		<TABLE align=center width=20% align="center" cellpadding=0 cellspacing=0>
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">ออนไลน์ <img src="counter/ip.gif" width="16" height="16" /></span></TD>
		<TD style="text-align:left;" width="30%"><span class="style3" >&nbsp;&nbsp;&nbsp;<?php echo $online; ?>&nbsp;คน</span></TD>
	</TR>
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">วันนี้ </span></TD>
		<TD style="text-align:left;"><span class="style3">&nbsp;&nbsp;&nbsp;<?php echo $day_value; ?>&nbsp;คน</span></TD>
	</TR>
	<!--<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">วานนี้<img src="counter/online.png" width="16" height="16" /></span></TD>
		<TD><span class="style3"><?php echo $yesterday_value; ?>&nbsp;คน</span></TD>
	</TR> 
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">สัปดาห์นี้ </span></TD>
		<TD style="text-align:left;"><span class="style3">&nbsp;&nbsp;&nbsp;<?php echo $week_value; ?>&nbsp;คน</span></TD>
	</TR>-->
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">เดือนนี้ </span></TD>
		<TD style="text-align:left;"><span class="style3">&nbsp;&nbsp;&nbsp;<?php echo $month_value; ?>&nbsp;คน</span></TD>
	</TR>
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">ปีนี้ </span></TD>
		<TD style="text-align:left;"><span class="style3">&nbsp;&nbsp;&nbsp;<?php echo $year_value; ?>&nbsp;คน</span></TD>
	</TR>
	<TR style="border-color:#2d4a8a ">
		<TD><span class="style3">ทั้งหมด </span></TD>
		<TD style="text-align:left;"><span class="style3">&nbsp;&nbsp;&nbsp;<?php echo $all_value; ?>&nbsp;คน</span></TD>
	</TR>
	<TR style="border-color:#2d4a8a ">
 		<TD colspan=2 align="right"><?php echo "<span style=\"color:#FFFFFF\">เริ่มนับตั้งแต่&nbsp;:&nbsp;</font>" .ShowAllDate("2021-06-19",1);  ?></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
	</TR>
	</TABLE>
 

AnonSec - 2021