21,886
社区成员
发帖
与我相关
我的任务
分享
switch($action){
case "add1":
$smarty=new Smarty();
$smarty->display("tianjiabumen.tpl");
break;
case "del":
$id=$_GET['id'];
$bm=new bumenmodel();
$bm->id=$id;
$bm->delete();
header("location:bumenkongzhiqi.php?action=chaxun");
break;
class factory(){
function __contruct(){
$this->models = array();
}
function & getModel($modelName) {
if(!isset($this->models[$modelName])){
require("{MODEL_BASEPATH}/{$modelName}");
$this->models[$modelName] = new $modelName();
}
return $this->model[$modelName];
}
}