一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

php類

<?php
/*----------------------------------------------------------------//
 * Class::    Ini
 * Function:: to install the system which is requested from client     
 * Author::   Kevin#    
 * QQ::       84529890
 * Date::     2006.10.24
//----------------------------------------------------------------*/
 require_once( CLASS_SYS_PATH . "class.db.php");
 class Ini {
 /*
 * member variable $defaultPlay
 * to set the variable play 
 */
 var $defaultPlay = "main";
 /*
 * member variable $DB
 * to set the object : database
 */
 var $DB;
 /*
 * member variable $play
 * record the parameter of play
 */
 var $play;
//////@@@@ MEMBER FUNCTION LIST @@@@///////
//-======================================-//
//      LastModifyTime::2006.11.16 
//-======================================-//
////////////////////////////////////////////
 /*
 * function :: setDB($db)
 * set the global database object
 */
 function setDB($db){
     return $this->DB = $db;
 }
 /*
 * 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 "<font color=/"#FF0000/">" . $msg . "</font>/n<br />";
 }
 /*
 * 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 @@@@@@@@@@@@@@@@@@@@@@@@@////////
 }
?>

php技術(shù)php類,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产精品福利在线观看免费不卡 | 黄色wwwcom | 国产老妇xxxxxbb亚洲老妇 | 久久伊人婷婷 | 亚洲一区二区三区亚瑟 | 国产精品视频第一区二区三区 | 国产福利资源 | 久久情 | 亚洲人成网77777亚洲 | 久久久久久一级毛片免费无遮挡 | 色久悠悠色久在线观看 | 久久精品全国免费观看国产 | 免费激情网址 | 久久国产精品国产精品 | 亚洲欧美成人永久第一网站 | 伊色综合久久之综合久久 | 久久婷婷午色综合夜啪 | 国产成人精品免费视频大 | 福利在线视频观看 | 成人永久免费视频网站在线观看 | 伊人久综合 | 国产精品视频2021 | 激情小说区| 91热成人精品国产免费 | 久久在精品线影院精品国产 | 国产成人小视频在线观看 | 五月婷婷丁香网 | 国内第一永久免费福利视频 | 国产网站免费视频 | 天天做天天爱夜夜爽女人爽宅 | 中文字幕不卡一区 | 国产一区二区三区怡红院 | 欧美三级欧美成人高清www | 亚洲一区第一页 | 91视频最新| 五月婷婷六月丁香激情 | 国产福利亚洲 | 丁香综合激情 | 东京道一本加勒无 | 国产成人乱码一区二区三区在线 | 精品欧美一区二区三区在线观看 |