一区二区久久-一区二区三区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)系我們修改或刪除,多謝。

主站蜘蛛池模板: 伊人精品成人久久综合欧美 | 国内精品麻豆 | 色5月婷婷 | 大量出精汇编免费看 | 毛片一级做a爰片性色 | 欧美成人精品三级网站 | 天天综合五月天 | 91麻豆视频网站 | 亚洲欧美综合另类图片小说区 | 91aaa免费观看在线观看资源 | 国产综合激情在线亚洲第一页 | h亚洲| 亚洲图片天堂 | 久久老司机波多野结衣 | 哟哟色 | 麻豆国产精品视频 | 国产精品免费精品自在线观看 | 国产综合自拍 | 久久国产精品高清一区二区三区 | 国产精品成人久久久 | 亚洲国产福利 | 97成人精品 | 国产成人系列 | 激情视频图片小说 | 五月婷婷综合在线视频 | 久久综合五月开心婷婷深深爱 | 49pao强力在线高清基地 | 色视频在线网站 | 一区二区在线看 | 97国产精品人人爽人人做 | 亚洲视频1区| 免费视频亚洲 | 91短视频版在线观看www | 色播六月 | 欧美yw193.c㎝在线观看 | 亚洲成人婷婷 | 成人亚洲国产综合精品91 | 国产观看精品一区二区三区 | 久久狠狠一本精品综合网 | 精品国产夜色在线 | 中文字幕 亚洲精品 第1页 |