public function buidedic() { //数据字典 require_once COMMON_PATH . "tpmakerdb.class.php"; //引入自定义的类 msg('正在生成数据字典.....', 0); exit; $list = D('Sys_projects'); $data = $list->getByid($_REQUEST['id']); if ($data['dbname'] != '') { $t = new tpmakerdb(); $t->projectid = $data['id']; $t->dropcheck = false; $t->buideall(); } }
public function add() { require_once COMMON_PATH . "tpmakerdb.class.php"; //引入自定义的类 $d = new tpmakerdb(); $ptables = D('Sys_tables'); $wherevalue = 'ismodel=0 and pid=' . $_SESSION['workingprojectid']; //过滤条件 $tlist = $ptables->findAll($wherevalue, '*', 'seqNo'); foreach ($tlist as $key => $tabid) { $tabsid = $tabid[id]; $tlist[$key]['sub'] = $d->getfieldsbytbid($tabsid); } //dump($tlist); $this->assign('table', $tlist); $this->assign('table_view', $tlist); $_SESSION[condition] = null; $_SESSION[fields] = null; $this->display(); }