View file gallery/count.php

File size: 1.48Kb
<?php
#-----------------------------------------------------#
#          ********* ROTORCMS *********               #
#              Made by  :  VANTUZ                     #
#               E-mail  :  [email protected]         #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#        для его дальнейшего распространения          #
#-----------------------------------------------------#	
require_once "../includes/start.php";
require_once "../includes/functions.php";
// -------------------- Вывод статистики ------------------------------//
$count = stats_counter();
$online = stats_online();

$img = imageCreateFromGIF(BASEDIR . 'images/img/counter.gif');
$color = imagecolorallocate($img, 255, 242, 193);

if ($online[1] >= 0 && $online[1] < 10) $pos = 66;
if ($online[1] >= 10 && $online[1] < 100) $pos = 54;
if ($online[1] >= 100 && $online[1] < 1000) $pos = 43;

imageTTFtext($img, 6, 0, 3, 8, $color, BASEDIR . "gallery/fonts/font4.ttf", $count['count_dayhosts']);
imageTTFtext($img, 6, 0, 3, 14, $color, BASEDIR . "gallery/fonts/font4.ttf", $count['count_dayhits']);
imageTTFtext($img, 12, 0, $pos, 14, $color, BASEDIR . "gallery/fonts/font7.ttf", $online[1]);

Header("Content-type: image/gif");
ImageGIF($img);
ImageDestroy($img);

?>