<?php
/**
 * [UQcms System] Copyright uqcms.com
 * QQ: 2200631718
 * Author: gj.name
 * This is NOT a freeware
*/
 class control extends core { function __construct(){ parent::__construct(); } function assign($name, $value){ $smarty = $this->load_smarty(); if(isset($smarty)){ $smarty->assign($name, $value); }else{ exit('smarty load error'); } } function display($tpl = null){ $smarty = $this->load_smarty(); if(isset($smarty)){ if(empty($tpl)){ return $smarty->displays(); }else{ return $smarty->displays($tpl); } }else{ exit('smarty load error'); } } function load_smarty(){ static $smarty_tpl = array(); if(isset($smarty_tpl['smt'])){ return $smarty_tpl['smt']; }else{ include_once FRAME_PATH.'core/smarty/Smarty.class.php'; include_once FRAME_PATH.'core/mytpl.class.php'; $smarty_tpl['smt'] = new mytpl(); return $smarty_tpl['smt']; } } }