An Error Occured
Unable to connect'.
' to the database server.
Please try again later.
'; // Database, or querry error
$version ="4.06";
$offlistversion="4.06";
$catlistversion="4.06";
$kbcatlistversion="4.06";
$kbofflistversion="4.06";
$inlinegfxlistversion="4.06";
$backup_version="4.06";
$restore_version="4.06";
require_once($path_faqe."/includes/const.inc");
$altlinkmethod=0;
if(!isset($dodebug))
$dodebug=false;
if(!isset($upload_hash))
$upload_hash = md5($copyright_note);
$avail_mimetypes = array("text/plain","application/octetstream");
if(!isset($new_global_handling))
{
if(phpversion() >= '4.1.0')
$new_global_handling=true;
else
$new_global_handling=false;
}
if(!isset($has_file_errors))
{
if(phpversion() >= '4.2.0')
$has_file_errors=true;
else
$has_file_errors=false;
}
if(!isset($upload_avail))
{
$upload_avail=true;
$upload_ini=@ini_get('file_uploads');
if(( $upload_ini == '0') || !$upload_ini)
$upload_avail=false;
if(strtolower($upload_ini) == 'off')
$upload_avail=false;
if(phpversion() == '4.0.4pl1')
$upload_avail=false;
if((phpversion() < '4.0.3') && (@ini_get('open_basedir') != ''))
$upload_avail=false;
}
$safemode_ini=@ini_get('safe_mode');
if(( $safemode_ini == '1') || (strtolower($safemode_ini) == 'on'))
$insafemode=true;
else
$insafemode=false;
switch($dbengine)
{
case 1:
require_once($path_faqe."/includes/db_mysql.inc");
break;
default:
die("Unsupported DB engine ($dbengine) defined");
}
$db=faqe_db_connect($dbhost,$dbuser,$dbpasswd,$dbname,$err_query);
if(!isset($cookiedomain))
{
if($new_global_handling)
$myhost=$_SERVER["HTTP_HOST"];
else
$myhost=$HTTP_SERVER_VARS["HTTP_HOST"];
$portpos=strpos($myhost,":");
if($portpos>0)
$myhost=substr($myhost,0,$portpos);
$cookiedomain = $myhost;
if(strpos($cookiedomain,".")<1)
$cookiedomain="";
else
{
$num_points=substr_count($myhost,".");
if($num_points<2)
$cookiedomain=".".$myhost;
}
}
if($new_global_handling)
$act_script_url=$_SERVER["PHP_SELF"];
else
$act_script_url=$PHP_SELF;
while( list($var, $param) = @each($HTTP_POST_VARS) )
{
if(!isset($$var))
{
if((substr($var,0,4)!="url_") && (substr($var,0,5)!="path_"))
$$var=$HTTP_POST_VARS[$var];
}
if(!get_magic_quotes_gpc())
$$var=addslashes($$var);
}
while( list($var, $param) = @each($HTTP_GET_VARS) )
{
if(!isset($$var))
{
if((substr($var,0,4)!="url_") && (substr($var,0,5)!="path_"))
$$var=$HTTP_GET_VARS[$var];
}
if(!get_magic_quotes_gpc())
$$var=addslashes($$var);
}
if(!isset($REMOTE_ADDR))
{
if($new_global_handling)
$REMOTE_ADDR=$_SERVER["REMOTE_ADDR"];
}
if(!isset($HTTP_USER_AGENT))
{
if($new_global_handling)
$HTTP_USER_AGENT=$_SERVER["HTTP_USER_AGENT"];
}
if(!isset($REMOTE_USER))
{
if($new_global_handling)
@$REMOTE_USER=$_SERVER["REMOTE_USER"];
}
if(substr($url_faqengine,-1)=="/")
$url_faqengine=substr($url_faqengine,0,-1);
if(substr($url_gfx,-1)=="/")
$url_gfx=substr($url_gfx,0,-1);
if(substr($path_faqe,-1)=="/")
$path_faqe=substr($path_faqe,0,-1);
if(substr($path_gfx,-1)=="/")
$path_gfx=substr($path_gfx,0,-1);
if(substr($path_logfiles,-1)=="/")
$path_logfiles=substr($path_logfiles,0,-1);
if((strlen($cookiepath)>1) && (substr($cookiepath,-1)=="/"))
$cookiepath=substr($cookiepath,0,-1);
require_once($path_faqe."/includes/timezones.inc");
?>