function showSeoPlugins($info = '') { $this->layout = "default"; $sql = "select * from seoplugins where status=1 and installed=1 order by id"; $menuList = $this->db->select($sql); if (count($menuList) <= 0) { $msg = $_SESSION['text']['label']['noactiveplugins']; $msgButton = '<a class="actionbut" href="' . SP_PLUGINSITE . '" target="_blank">' . $this->spTextPlugin['Download Seo Panel Plugins'] . ' >></a>'; $this->set('msg', $msg); $this->set('msgButton', $msgButton); $this->render('common/notfound'); exit; } # to get sub menus under a plugin main menu foreach ($menuList as $i => $menuInfo) { @Session::setSession('plugin_id', $menuInfo['id']); $pluginDirName = $menuInfo['name']; $menuFile = SP_PLUGINPATH . "/" . $pluginDirName . "/views/" . SP_PLUGINMENUFILE; if (file_exists($menuFile)) { $menuList[$i]['menu'] = @View::fetchFile($menuFile); } else { $menuList[$i]['menu'] = "<ul id='subui'>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href='javascript:void(0);' onclick=\"" . pluginMenu('action=index') . "\">{$menuInfo['name']}</a></li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>"; } } $this->set('menuList', $menuList); $menuSelected = empty($info['menu_selected']) ? $menuList[0]['id'] : $info['menu_selected']; $this->set('menuSelected', $menuSelected); $this->render('seoplugins/showseoplugins'); }
function showSeoPlugins($info = '') { $this->layout = "default"; $sql = "select * from seoplugins where status=1 and installed=1 order by id"; $menuList = $this->db->select($sql); if (count($menuList) <= 0) { $this->set('msg', 'No Active Seo Plugins Found!'); $this->render('common/notfound'); exit; } # to get sub menus under a plugin main menu foreach ($menuList as $i => $menuInfo) { Session::setSession('plugin_id', $menuInfo['id']); $pluginDirName = $menuInfo['name']; $menuFile = SP_PLUGINPATH . "/" . $pluginDirName . "/views/" . SP_PLUGINMENUFILE; if (file_exists($menuFile)) { $menuList[$i]['menu'] = View::fetchFile($menuFile); } else { $menuList[$i]['menu'] = "<ul id='subui'>\r\n\t\t\t\t\t\t\t\t\t\t\t<li><a href='javascript:void(0);' onclick=\"" . pluginMenu('action=index') . "\">{$menuInfo['name']}</a></li>\r\n\t\t\t\t\t\t\t\t\t\t</ul>"; } } $this->set('menuList', $menuList); $menuSelected = empty($info['menu_selected']) ? $menuList[0]['id'] : $info['menu_selected']; $this->set('menuSelected', $menuSelected); $this->render('seoplugins/showseoplugins'); }