<?php
/*************************************************************\
+-------------------------------------------------------------+
| 通灵佛教网在线烧香程序 System                                 |
| Copyright (c) 2003-2010 Alfred China                        |
| All rights reserved.                                        |
+-------------------------------------------------------------+
\*************************************************************/
require_once('chk.php');
require_once('netgou.php');

if($_COOKIE['ngadmin'] == "admin"){
	if($is_admin['password'] == "21232f297a57a5a743894a0e4a801fc3")
	{
		echo "<script language=\"JavaScript\">\r\n"; 
		echo " alert(\"您的会员名和密码是默认的,请尽快更改\");\r\n"; 
		echo "</script>"; 
	}
}

/**
 * 获取服务器变量
 * @param $keys
 * @return string
 */
function getServer($keys) {
	$server = array();
	$array = (array) $keys;
	foreach ($array as $key) {
		$server[$key] = NULL;
		if (isset($_SERVER[$key])) {
			$server[$key] = str_replace(array('<','>','"',"'",'%3C','%3E','%22','%27','%3c','%3e'), '', $_SERVER[$key]);
		}
	}
	return is_array($keys) ? $server : $server[$keys];
}
$GLOBALS['ngServer'] = getServer(array('HTTP_REFERER','HTTP_HOST','HTTP_X_FORWARDED_FOR','HTTP_USER_AGENT',
												'HTTP_CLIENT_IP','HTTP_SCHEME','HTTPS','PHP_SELF',
												'REQUEST_URI','REQUEST_METHOD','REMOTE_ADDR','SCRIPT_NAME',
												'QUERY_STRING'));
!$GLOBALS['ngServer']['PHP_SELF'] && $GLOBALS['ngServer']['PHP_SELF'] = getServer('SCRIPT_NAME');
	

$sysversion	  	= phpversion();
$dbversion 		= mysql_GET_server_info();
$clientversion 	= mysql_GET_client_info();
$webos 			= trim(preg_replace("/php\/$sysversion/i",'',$_SERVER['SERVER_SOFTWARE']));
$max_upload  	= ini_GET('file_uploads') ? ini_GET('upload_max_FILESize') : 'Disabled';
$max_ex_time 	= ini_GET('max_execution_time').' seconds';
$systemtime		= gmdate('Y-m-d H:i',time()+$db_timedf*3600);
$sysos      	= php_uname();
$ifCOOKIE   	= isset($_COOKIE) ? 'SUCCESS' : 'FAIL';
$ng_dir 		= ng_dir;

if ($sendmail_path = ini_GET('sendmail_path')) {
	$sys_mail = 'Unix Sendmail ( Path: '.$sendmail_path.')';
} elseif ($SMTP = ini_GET('SMTP')) {
	$sys_mail = 'SMTP ( Server: '.$SMTP.')';
} else {
	$sys_mail = 'Disabled';
}
  
function test_dirs_rights() {
	$directories = array('include/cache','images/icons', 'images/mlogo','images/ngad','images/photos','images/thumbnails','images/upload','html' );
	sort($directories);
	$rc = "";
	foreach($directories as $dir){
		$testdir = ng_dir.DIRECTORY_SEPARATOR.$dir;
		$rc[] = array("directory"=>$dir, "exists"=>is_dir($testdir), "writable"=>is_writable($testdir));
	}
	return $rc;
}
$test_dirs_rights = test_dirs_rights();

$ng_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
$ng_obstart ? $ng_gzip="Gzip enabled":$ng_gzip="Gzip disabled";

require_once PrintTemp('admin');
require_once "./footer.php";

$output=str_replace(array('<!--<!--<!---->','<!--<!---->','<!---->'),array('','',''),ob_get_contents());
ob_end_clean();
echo $output;
flush;
exit;
?>