require_once( CLASS_SYS_PATH . "class.db.php");
class Ini {
var $defaultPlay = "main";
var $DB;
var $play;
//////@@@@ MEMBER FUNCTION LIST @@@@\\\
//-======================================-\
// LastModifyTime::2006.11.16
//-======================================-\
////////////////////////////////////////////
function setDB($db){
return $this->DB = $db;
}
function loadSystem($play){
if( $this->isValidPlay($play) ){
require_once("class.smarttemplate.php");
require_once( $play );
$playLikeABird = new Main;
}else{
$this->halt("Invalid Access....");
}
}
function iniCon(){
global $DB;
$DB = new DB( HOST_ADDR , HOST_USER , HOST_PSW , DB_NAME );
}
function getDB(){
return $this->DB;
}
function getPlay(){
return $play = empty( $_REQUEST["play"] ) ? $this->defaultPlay : $_REQUEST["play"];
}
function isValidPlay($play){
if( file_exists( $play ) ){
return true;
}else{
return false;
}
}
function halt($msg){
echo "" . $msg . "n
";
}
function iniSystem(){
$this->iniCon();
$this->setDB($DB);
$play = $this->getPlay();
return $play = $this->resetPlay($play);
}
function resetPlay($p){
return $p = CLASS_PATH . ENTRY_FIRST_FORMAT . $p . ENTRY_LAST_FORMAT;
}
function Ini(){
$play = $this->iniSystem();
$this->Debug($play);
$this->loadSystem($play);
$this->close();
}
function debug($play){
if( DEBUG ) $this->halt("Play -> $play");
}
function close(){
return $this->DB = NULL;
}
///////@@@@@@@@@@@@@@@@@@@@@@@@@ define class over @@@@@@@@@@@@@@@@@@@@@@@@@\\\\
}
?>