Location: PHPKode > projects > RabbitBB - Online Web Storage Project > mywebdrive/common.php
<?PHP

if( !get_magic_quotes_gpc() )
{
	if( is_array($_GET) )
	{
		while( list($k, $v) = each($_GET) )
		{
			if( is_array($_GET[$k]) )
			{
				while( list($k2, $v2) = each($_GET[$k]) )
				{
					$_GET[$k][$k2] = addslashes($v2);
				}
				@reset($_GET[$k]);
			}
			else
			{
				$_GET[$k] = addslashes($v);
			}
		}
		@reset($_GET);
	}

	if( is_array($_POST) )
	{
		while( list($k, $v) = each($_POST) )
		{
			if( is_array($_POST[$k]) )
			{
				while( list($k2, $v2) = each($_POST[$k]) )
				{
					$_POST[$k][$k2] = addslashes($v2);
				}
				@reset($_POST[$k]);
			}
			else
			{
				$_POST[$k] = addslashes($v);
			}
		}
		@reset($_POST);
	}

	if( is_array($_COOKIE) )
	{
		while( list($k, $v) = each($_COOKIE) )
		{
			if( is_array($_COOKIE[$k]) )
			{
				while( list($k2, $v2) = each($_COOKIE[$k]) )
				{
					$_COOKIE[$k][$k2] = addslashes($v2);
				}
				@reset($_COOKIE[$k]);
			}
			else
			{
				$_COOKIE[$k] = addslashes($v);
			}
		}
		@reset($_COOKIE);
	}
}


if (!isset($rootpath))
   $rootpath = "";
if (!isset($_COOKIE['lang']))
   $_COOKIE['lang'] = "en";

include_once($rootpath . "config.php");
$webappcfg['APPPATH'] = $rootpath . $webappcfg['APPPATH'];


include_once($rootpath . "constants.php");

include_once($rootpath . "lang/" . $_COOKIE['lang'] . "/lang.php");
//include_once("sessions.php");
if (file_exists($webappcfg['APPPATH'] . "/" . "common/include.php"))
	include_once($webappcfg['APPPATH'] . "/" . "common/include.php");

$db = new sql_db($webappcfg['db_server'], $webappcfg['db_login'],
		$webappcfg['db_password'], $webappcfg['db_selectdb']);

if(!$db->db_connect_id)
{
	//message_die(CRITICAL_ERROR, "Could not connect to the database");
}

	
if (file_exists($webappcfg['APPPATH'] . "/" . "session/include.php"))
	include_once($webappcfg['APPPATH'] . "/" . "session/include.php");
if (file_exists($webappcfg['APPPATH'] . "/" . "user/include.php"))
	include_once($webappcfg['APPPATH'] . "/" . "user/include.php");
if (file_exists($webappcfg['APPPATH'] . "/" . "control/include.php"))
	include_once($webappcfg['APPPATH'] . "/" . "control/include.php");
if (file_exists($webappcfg['APPPATH'] . "/" . "theme/include.php"))
	include_once($webappcfg['APPPATH'] . "/" . "theme/include.php");

NSession::session_begin();

?>
Return current item: RabbitBB - Online Web Storage Project