<?php
// $Id: admin.php,v 1.2.8.3 2006/02/03 14:34:08 nobunobu Exp $
include "mainfile.php";
require_once XOOPS_ROOT_PATH."/class/XCube_EventManager.class.php";
class DefaultSystemCheckProxyRegister extends XCube_EventProxyRegister
{
	var $_mList=array("Legacypage.Admin.SystemCheck");
	function getEventNameList()
	{
		return $this->_mList;
	}
	function &createLegacypage_Admin_SystemCheckDelegate()
	{
		$delegate=new XCube_Delegate("DefaultSystemCheckFunction","DefaultCheck");
		return $delegate;
	}

}
class DefaultSystemCheckFunction
{
	function DefaultCheck()
	{
		if (is_dir(XOOPS_ROOT_PATH."/install/" )) {
		    xoops_error(sprintf(_WARNINSTALL2,XOOPS_ROOT_PATH.'/install/'),'','tips');
		}
		if ( is_writable(XOOPS_ROOT_PATH."/mainfile.php" ) ) {
		    xoops_error(sprintf(_WARNINWRITEABLE,XOOPS_ROOT_PATH.'/mainfile.php'),'','tips');
		}
	}
}

require_once XOOPS_ROOT_PATH . "/header.php";
$root=&XCube_Root::getSingleton();
$root->mEventManager->addProxyRegister(new DefaultSystemCheckProxyRegister());
$eventArgs=array();
$root->mEventManager->raiseEvent("Legacypage.Admin.SystemCheck",$root->mController,$eventArgs);
require_once XOOPS_ROOT_PATH . "/footer.php";
?>