Location: PHPKode > projects > CNStats > cnstats/cnt-show.php
<?php define("ISCNSTATS","1");error_reporting(E_ALL&~E_NOTICE);if(is_file("config.php")){include"config.php";include dirname(__FILE__)."/includes/db.php";$_6c09ff9d=$GLOBALS["cnstats_db"]->_74cff91f($STATS_CONF["sqlhost"],$STATS_CONF["sqluser"],$STATS_CONF["sqlpassword"],$STATS_CONF["dbname"]);if(!$_6c09ff9d)return;if(empty($STATS_CONF["sqlprefix"]))$STATS_CONF["sqlprefix"]="cns_";$_6c09ff9d=$GLOBALS["cnstats_db"]->_24bdb5eb("SELECT t_u_hits+t_r_hits as t_hits,u_hits+r_hits as hits,u_hosts+r_hosts as hosts FROM ".$STATS_CONF["sqlprefix"]."counter");if($_6c09ff9d){if($STATS_CONF=$GLOBALS["cnstats_db"]->_ef336f8e($_6c09ff9d)){}$GLOBALS["cnstats_db"]->_d8902be8($_6c09ff9d);}header("Content-type: image/png");$_c6e5dff4=ImageCreateFromPng("button.png");$_8985ba28=ImageColorAllocate($_c6e5dff4,0,0,0);$_665648e9=ImageColorAllocate($_c6e5dff4,$COUNTER["inkR"],$COUNTER["inkG"],$COUNTER["inkB"]);ImageString($_c6e5dff4,2,86-6*strlen($STATS_CONF["t_hits"]),1,$STATS_CONF["t_hits"],$_665648e9);ImageString($_c6e5dff4,1,85-5*strlen($STATS_CONF["hits"]),13,$STATS_CONF["hits"],$_665648e9);ImageString($_c6e5dff4,1,85-5*strlen($STATS_CONF["hosts"]),20,$STATS_CONF["hosts"],$_665648e9);ImagePng($_c6e5dff4);ImageDestroy($_c6e5dff4);}else{header("Content-type: image/png");$_c6e5dff4=ImageCreateFromPng("button.png");$_8985ba28=ImageColorAllocate($_c6e5dff4,0,0,0);$_665648e9=ImageColorAllocate($_c6e5dff4,$COUNTER["inkR"],$COUNTER["inkG"],$COUNTER["inkB"]);ImageString($_c6e5dff4,2,86-6*8,1,"error 12",$_665648e9);ImagePng($_c6e5dff4);ImageDestroy($_c6e5dff4);}?>
Return current item: CNStats