public function pluginlist() { $path = 'Plugin/'; $files = \getfils($path, $path); $filter = array('Base', 'Common', 'Home'); $plugin_arr = array(); foreach ($files as $f) { if (!in_array($f, $filter)) { $xml = simplexml_load_file('Plugin/' . $f . '/config.xml'); $xml->plugin = $f; $plugin_arr[] = $xml; } } //获取已经安装的插件列表 $pluginmod = DD('Plugin'); $plugin_install = $pluginmod->select(); foreach ($plugin_install as $k => $ins) { $plugin_install[$ins['filetitle']] = $ins; } $this->assign('plugin_arr', $plugin_arr); $this->assign('plugin_install', $plugin_install); $this->display(); }
private function _catecommon() { /* 模型 */ $Model = DD('Model'); $Modellist = $Model->select(); $this->assign('Modellist', $Modellist); /* 分类 */ $Category = DD('Category'); $result = $Category->select(); $Category_arr = \Org\Helper\Unlimitedclass::cateresult($result); $this->assign('category', $Category_arr); /* 模板 */ $dir = 'Template/Site/' . C('SITE_THEME') . '/Content/Content'; $listtmpl = array(); $catetmpl = array(); $newstmpl = array(); $pagetmpl = array(); $files = getfils($dir); foreach ($files as $f) { if (strpos(strtolower($f), 'category') === 0) { $f_arr = explode('.', $f); $catetmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'list') === 0) { $f_arr = explode('.', $f); $listtmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'news') === 0) { $f_arr = explode('.', $f); $newstmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'page') === 0) { $f_arr = explode('.', $f); $pagetmpl[] = $f_arr[0]; continue; } } $this->assign('tmpl', array('catetmpl' => $catetmpl, 'listtmpl' => $listtmpl, 'newstmpl' => $newstmpl, 'pagetmpl' => $pagetmpl)); }
private function _catecommon() { /* 模型 */ $Model = DD('Model'); $Modellist = $Model->selectall($this->OpSiteLangInfo['id']); $this->assign('Modellist', $Modellist); /* 分类 */ $Category = DD('Category'); $result = $Category->selectall($this->OpSiteLangInfo['id']); Vendor('Unlimitedclass.Unlimitedclass', '', '.class.php'); $unlimitedclass = new \Unlimitedclass(); $Category_arr = $unlimitedclass->cateresult($result); $this->assign('category', $Category_arr); /* 模板 */ $dir = 'Template/Site/' . $this->OpSiteLangInfo['tmpl'] . '/Content/Content'; $listtmpl = array(); $catetmpl = array(); $newstmpl = array(); $pagetmpl = array(); $files = getfils($dir); foreach ($files as $f) { if (strpos(strtolower($f), 'category') === 0) { $f_arr = explode('.', $f); $catetmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'list') === 0) { $f_arr = explode('.', $f); $listtmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'news') === 0) { $f_arr = explode('.', $f); $newstmpl[] = $f_arr[0]; continue; } if (strpos(strtolower($f), 'page') === 0) { $f_arr = explode('.', $f); $pagetmpl[] = $f_arr[0]; continue; } } $this->assign('tmpl', array('catetmpl' => $catetmpl, 'listtmpl' => $listtmpl, 'newstmpl' => $newstmpl, 'pagetmpl' => $pagetmpl)); }