<?php
/* =============================================================== *\
|		Module name:      Logo										|
|																	|
\* =============================================================== */

if (!defined('IN_SITE')){
     die('Hacking attempt!');
}

$Logo = new Logo;

class Logo
{
	function Logo(){
		$this->transfer_url();
	}

	function transfer_url(){
		global $DB, $Lang, $Template, $Func;

		$id		= intval($Func->get_vars('id', 1));

		$DB->query("SELECT site_url FROM ". $DB->prefix ."logo WHERE logo_id=$id");
		if ( !$DB->num_rows() ){
			$Template->message_die($Lang->data['logo_error_not_exist']);
			return false;
		}
		$logo_info	= $DB->fetch_array();
		$DB->free_result();

		$DB->query("UPDATE ". $DB->prefix ."logo SET hits=hits+1 WHERE logo_id=$id");

		$Template->fast_transfer($logo_info['site_url']);
		return true;
	}
}

?>