<?php
// +---------------------------------------------+
// |     Copyright 2003 - 2005 weenCompany       |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+

if(!defined('IN_WEENCOMPANY'))
{
  die('·Ç·¨½øÈë!');
}


global $hits, $start, $style, $digits, $message;
global $DB;

$resultconf = $DB->query("SELECT hits, start, style, digits, message FROM " . TABLE_PREFIX . "m18_hitcounter");
list($hits,$start,$style,$digits, $message) = mysql_fetch_row($resultconf);

$counter=$hits+$start;

if (strlen($message)>0){
	echo $message.'<br/><br/>';
    }

if (strlen($counter)<$digits){
	for ($d=strlen($counter);$d<$digits;$d++){
        $src = 'modules/m18_hitcounter/styles/' . $style . '/0.gif';
    	echo '<img src='.$src.' border=0>';
    }
}

for ($h=0;$h<strlen($counter);$h++) {
    $digit=substr($counter,$h,1);
    $src = 'modules/m18_hitcounter/styles/' . $style . '/' . $digit . '.gif';
    echo '<img src='.$src.' border=0>';
}

?>