Добро пожаловать, Гость!
:: + Добавить ссылку через биллинг
:: + Добавить ссылку анонимно
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
что за код - Страница 1
Общие вопросы | что за код
СоСдАТеЛь-СеРгО
:
Ребята что за код
* * ** **** *** *********** ** ***************
<?php
define('NTOP', 1);
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
error_reporting(0);
header("Content-type: image/gif");
if (!$ip) $ip = $_SERVER['REMOTE_ADDR'];
$sait_t = mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `id` = '".$id."' AND `ban` = '0'");
if(mysql_num_rows($sait_t) > 0)
{
$sait = mysql_fetch_array($sait_t);
$img = 'images/'.$sait['imagebig'].'.gif';
$image = imagecreatefromgif($img);
$type_img = mysql_fetch_array(mysql_query("SELECT * FROM `".$prefix."images` WHERE `name` = '".$sait['imagebig']."'"));
$old_day = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$operator_id = mysql_query("SELECT `id_c` FROM `".$prefix."ip` WHERE INET_ATON('".$ip."') BETWEEN `start` AND `finish`");
if(mysql_num_rows($operator_id) > 0)
{
$arr = mysql_fetch_array($operator_id);
$operator = $arr['id_c'];
}
else
{
$operator = 1000;
}
$isset = mysql_query("SELECT * FROM `".$prefix."hosts` WHERE `id_sait` = '".$id."' AND `ip` = '".$ip."' AND `time` > '".$old_day."'");
if (mysql_num_rows($isset) == 0)
{
mysql_query("INSERT INTO `".$prefix."hosts` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hosts` = (`hosts` + 1), `all_hosts` = (`all_hosts` + 1) WHERE `id` = '".$id."'");
mysql_query("INSERT INTO `".$prefix."hits` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hits` = (`hits` + 1), `all_hits` = (`all_hits` + 1) WHERE `id` = '".$id."'");
}
else
{
mysql_query("INSERT INTO `".$prefix."hits` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hits` = (`hits` + 1), `all_hits` = (`all_hits` + 1) WHERE `id` = '".$id."'");
}
if (mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait_online` WHERE `ip` = '".$ip."' AND `ua` = '".$ua."' AND `time` > '".(time()-180)."' AND `id_sait` = '".$id."'")) == 1)
{
mysql_query("UPDATE `".$prefix."sait_online` SET `time` = '".time()."' WHERE `ip` = '".$ip."' AND `ua` = '".$ua."' AND `id_sait` = '".$id."' LIMIT 1");
}
else
{
mysql_query("DELETE FROM `".$prefix."sait_online` WHERE `time` < '".(time()-180)."' AND `id_sait` = '".$id."'");
mysql_query("INSERT INTO `".$prefix."sait_online` (`id_sait`,`ip`, `ua`, `time`) values('".$id."','".$ip."', '".$ua."', ".time().")");
}
if($type_img['type'] == 'big')
{
$real_stat = mysql_fetch_array(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `id` = '".$id."'"));
$hits = 68 - (strlen($real_stat['hits']) * 5);
$hosts = 35 - (strlen($real_stat['hosts']) * 5);
$black = ImagecolorAllocate
($image,250,250,250);
$white = imagecolorallocate
($image,250,250,250);
ImageString($image,1,$hosts,15,$real_stat['hosts'],$white);
ImageString($image,1,$hits,15,$real_stat['hits'],$white);
}
}
else
{
$img = 'images/default.gif';
$image = imagecreatefromgif($img);
}
imagegif($image);
imageDestroy($image);
?>
что за код
7 Авг 2014Ребята что за код
* * ** **** *** *********** ** ***************
<?php
define('NTOP', 1);
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
error_reporting(0);
header("Content-type: image/gif");
if (!$ip) $ip = $_SERVER['REMOTE_ADDR'];
$sait_t = mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `id` = '".$id."' AND `ban` = '0'");
if(mysql_num_rows($sait_t) > 0)
{
$sait = mysql_fetch_array($sait_t);
$img = 'images/'.$sait['imagebig'].'.gif';
$image = imagecreatefromgif($img);
$type_img = mysql_fetch_array(mysql_query("SELECT * FROM `".$prefix."images` WHERE `name` = '".$sait['imagebig']."'"));
$old_day = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$operator_id = mysql_query("SELECT `id_c` FROM `".$prefix."ip` WHERE INET_ATON('".$ip."') BETWEEN `start` AND `finish`");
if(mysql_num_rows($operator_id) > 0)
{
$arr = mysql_fetch_array($operator_id);
$operator = $arr['id_c'];
}
else
{
$operator = 1000;
}
$isset = mysql_query("SELECT * FROM `".$prefix."hosts` WHERE `id_sait` = '".$id."' AND `ip` = '".$ip."' AND `time` > '".$old_day."'");
if (mysql_num_rows($isset) == 0)
{
mysql_query("INSERT INTO `".$prefix."hosts` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hosts` = (`hosts` + 1), `all_hosts` = (`all_hosts` + 1) WHERE `id` = '".$id."'");
mysql_query("INSERT INTO `".$prefix."hits` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hits` = (`hits` + 1), `all_hits` = (`all_hits` + 1) WHERE `id` = '".$id."'");
}
else
{
mysql_query("INSERT INTO `".$prefix."hits` SET
`time` = '".time()."',
`id_sait` = '".$id."',
`ip` = '".$ip."',
`browser` = '".browser()."',
`operator` = '".$operator."'");
mysql_query("UPDATE `".$prefix."sait` SET `hits` = (`hits` + 1), `all_hits` = (`all_hits` + 1) WHERE `id` = '".$id."'");
}
if (mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait_online` WHERE `ip` = '".$ip."' AND `ua` = '".$ua."' AND `time` > '".(time()-180)."' AND `id_sait` = '".$id."'")) == 1)
{
mysql_query("UPDATE `".$prefix."sait_online` SET `time` = '".time()."' WHERE `ip` = '".$ip."' AND `ua` = '".$ua."' AND `id_sait` = '".$id."' LIMIT 1");
}
else
{
mysql_query("DELETE FROM `".$prefix."sait_online` WHERE `time` < '".(time()-180)."' AND `id_sait` = '".$id."'");
mysql_query("INSERT INTO `".$prefix."sait_online` (`id_sait`,`ip`, `ua`, `time`) values('".$id."','".$ip."', '".$ua."', ".time().")");
}
if($type_img['type'] == 'big')
{
$real_stat = mysql_fetch_array(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `id` = '".$id."'"));
$hits = 68 - (strlen($real_stat['hits']) * 5);
$hosts = 35 - (strlen($real_stat['hosts']) * 5);
$black = ImagecolorAllocate
($image,250,250,250);
$white = imagecolorallocate
($image,250,250,250);
ImageString($image,1,$hosts,15,$real_stat['hosts'],$white);
ImageString($image,1,$hits,15,$real_stat['hits'],$white);
}
}
else
{
$img = 'images/default.gif';
$image = imagecreatefromgif($img);
}
imagegif($image);
imageDestroy($image);
?>
Комментарии: