View file wapirate/top/cou.php

File size: 761B
<?php
header('content-type: image/jpeg');
$sid=$_GET["sid"];
include("conf.php");
include("func.php");
connect($dbserver,$dbname,$dbuser,$dbpass);
resetcou();
$sql ="SELECT * FROM sites where id='".$sid."' and banned='0';";
$sites = mysql_fetch_array(mysql_query($sql));
$tthits = $sites[9]+1;
$tdhits = $sites[8]+1;
$res = mysql_query("UPDATE sites SET dhits='".$tdhits."', thits='".$tthits."' WHERE id='".$sid."'");
$bgpic = @imagecreatefromjpeg("images/cou.jpg");
$textcolor = imagecolorallocate($bgpic,255,255,255);
imagestring($bgpic,1,7,3,str_repeat("0",7-strlen("$tthits"))."$tthits",$textcolor);
imagestring($bgpic,1,17,13,str_repeat("0",5-strlen("$tdhits"))."$tdhits",$textcolor);
imagejpeg($bgpic,"",90);
imagedestroy($bgpic);

?>