Home
  • ETD Home
  • '; public $appended_last = '
  • LOGOUT
  • '; /** * Method to set modules directory * * @param string $str_modules_dir * @return void */ public function setModulesDir($str_modules_dir) { $this->modules_dir = $str_modules_dir; } /** * Method to generate a list of module menu * * @param object $obj_db * @return string */ public function generateModuleMenu($obj_db) { // get module data from database $_mods_q = $obj_db->query('SELECT * FROM '.$this->module_table); while ($_mods_d = $_mods_q->fetch_assoc()) { $this->module_list[] = array('name' => $_mods_d['module_name'], 'path' => $_mods_d['module_path'], 'desc' => $_mods_d['module_desc']); } // create the HTML Hyperlinks $_menu = ''; return $_menu; } /** * Method to generate a list of module submenu * * @param string $str_module * @return string */ public function generateSubMenu($str_module = '') { global $dbs; $_submenu = ''; $_submenu_file = $this->modules_dir.$str_module.DIRECTORY_SEPARATOR.'submenu.php'; if (file_exists($_submenu_file)) { include $_submenu_file; } else { include 'default/submenu.php'; } // iterate menu array foreach ($menu as $_list) { if ($_list[0] == 'Header') { $_submenu .= ''; } else { $_submenu .= ''.$_list[0].''; } } $_submenu .= ' '; return $_submenu; } }