}
/*
* function::loadsystem($play)
* load system
*/
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()
* install database
*/
function inicon(){
global $db;
$db = new db( host_addr , host_user , host_psw , db_name );
}
/*
* function::getdb()
* to get the current database object
*/
function getdb(){
return $this->db;
}
/*
* function::getplay()
* get the play which is post from client
*/
function getplay(){
return $play = empty( $_request[play] ) ? $this->defaultplay : $_request[play];
}
/*
* function:: isvalidplay($play)
* to check legitimacy if the play parameter is
*/
function isvalidplay($play){
if( file_exists( $play ) ){
return true;
}else{
return false;
}
}
/*
* function:: halt($msg)
* show message on the browser
*/
function halt($msg){
echo . $msg . \n
;
}
/*
* function :: inisystem()
* install system
*/
function inisystem(){
$this->inicon();
$this->setdb($db);
$play = $this->getplay();
return $play = $this->resetplay($play);
}
/*
* function :: resetplay($p)
* to re-define the play's parameter
*/
function resetplay($p){
return $p = class_path . entry_first_format . $p . entry_last_format;
}
/*
* function:: ini()
* to link the database and get the play which post from client
*/
function ini(){
$play = $this->inisystem();
$this->debug($play);
$this->loadsystem($play);
$this->close();
}
/*
* function:: debug($play)
* to show the debug information
*/
function debug($play){
if( debug ) $this->halt(play -> $play);
}
/*
* function::close()
* unset database
*/
function close(){
return $this->db = null;
}
///////@@@@@@@@@@@@@@@@@@@@@@@@@ define class over @@@@@@@@@@@@@@@@@@@@@@@@@\\\\\\\\
}
?>
http://www.bkjia.com/phpjc/317181.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/317181.htmltecharticle?php /*----------------------------------------------------------------// *class::ini *function::toinstallthesystemwhichisrequestedfromclient *author::kevin# *qq::84529890 *date::20...
