Thread: FTS v1.0.2
View Single Post
  #16  
Old 6th April 2008, 17:45
BoLaMN BoLaMN is offline
Senior Member
 
Join Date: Jan 2008
Australia
Posts: 93
Default Re: FTS v1.0.1
Try this, i dont know if it will work im guessing ur not using php5 ;)

Code:
<?php
########################################################
#			FTS Handle Functions					   #
#			Do Not Edit								   #
########################################################
class HANDLE {
	function Freq($where,$file,$type = '_class.php',$ui = 0) {
		if(is_array($where))
		die('HANDLE strict rules: \$where parameter must not be an array');
		$where = explode ( '.' , $where );
		if(!is_array($where))
		die('HANDLE error: cannot make an array');
		global $rootpath;
		$pth = '';
		foreach($where as $where) {
			 $pth .= $where.'/';
		}
		include $rootpath.'include/'.$pth.$file.$type;
	}
	
	function dep($file) {
		include $file;
	}
	
	function hiderr() {
		return error_reporting(0);
	}
	
	function showerr() {
		return error_reporting(1);
	}
	
	function checkins() {
	global $rootpath;
	if(file_exists($rootpath.'install') && !file_exists($rootpath.'install/install.lock'))
	error(8,'
If you haven\'t installed FTS yet, click here to install it.
If you already installed FTS and you think this is an error, make an file named install.lock in install folder(or simply delete the install folder)');
}
	
	function strip_magic_quotes($arr)
{
foreach ($arr as $k => $v)
{
 if (is_array($v))
  { $arr[$k] = HANDLE::strip_magic_quotes($v); }
 else
  { $arr[$k] = stripslashes($v); }
}

return $arr;
}
	
	function htmlspecialchars_uni($text, $entities = true)
{
	return str_replace(
		// replace special html characters
		array('<', '>', '"'),
		array('<', '>', '"'),
		preg_replace(
			// translates all non-unicode entities
			'/&(?!' . ($entities ? '#[0-9]+' : '(#[0-9]+|[a-z]+)') . ';)/si',
			'&',
			$text
		)
	);
}
	
	function cur_user_check () {
	global $CURUSER;
	if ($CURUSER)
	stderr ("Permission denied!", "You are already logged in!");
}
}
global $rootpath; 
include $rootpath.'include/factory.php';
class UserHandle {
function KPS($type = "+", $point = "1.0", $id = "") {
	global $bonus,$_db;
	if ($bonus == "enable" OR $bonus == "disablesave")
		$_db->query("UPDATE users SET seedbonus = seedbonus$type$point WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);		
	else
		return;
}	
}
?>
Reply With Quote