View file ch/ch.php

File size: 2.19Kb
<?php
header("Content-Type: text/html; charset=utf-8");
error_reporting(0);
session_name("sid");
session_start();
include "../nm.php";

$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$xost="".$total['xost']."";

$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$xit="".$total['xit']."";

$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$vxost="".$total['vxost']."";

$tot=mysql_query("select * from chet WHERE ch='1' ;");
$total=mysql_fetch_array($tot);
$vxit="".$total['vxit']."";

$sql_sel = "SELECT `id` FROM onlin";
$result_sel = mysql_query($sql_sel);
$onli = mysql_num_rows($result_sel);

if($np=="1")
{
$im = imageCreateFromGif("1.gif");
$color=imagecolorallocate($im,255,255,255);
imagestring($im,1,50,3,$xost,$color);
imagestring($im,1,50,11,$xit,$color);

header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}

if($np=="2")
{
$im = imageCreateFromGif("2.gif");
$color=imagecolorallocate($im,255,255,0);
imagestring($im,1,50,4,$xost,$color);
imagestring($im,1,50,12,$xit,$color);
imagestring($im,1,50,20,$onli,$color);
header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}

if($np=="3")
{
$im = imageCreateFromGif("3.gif");
$color=imagecolorallocate($im,255,255,0);
imagestring($im,1,50,4,$xost,$color);
imagestring($im,1,50,12,$xit,$color);
imagestring($im,1,50,20,$vxost,$color);
header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}

if($np=="4")
{
$im = imageCreateFromGif("4.gif");
$color=imagecolorallocate($im,255,255,0);
imagestring($im,1,50,4,$xost,$color);
imagestring($im,1,50,12,$xit,$color);
imagestring($im,1,50,20,$vxit,$color);
header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}

if($np=="5")
{
$im = imageCreateFromGif("5.gif");
$color=imagecolorallocate($im,255,255,0);
imagestring($im,1,70,4,$xost,$color);
imagestring($im,1,70,13,$xit,$color);
imagestring($im,1,70,22,$vxost,$color);
imagestring($im,1,70,31,$vxit,$color);
imagestring($im,1,70,40,$onli,$color);
header("Content-type: image/png");
ImagePng($im);
ImageDestroy($im);
}
?>