'articles', 'caption' => 'Articles', 'link' => 'articles.php', 'inc_file' => 'articles.inc.php', 'column' => 'role_articles'); if (! ezin_admin_is_blog()) { $ezin_ADMIN_MENU[] = array( 'action' => 'pages', 'caption' => 'Pages', 'link' => 'pages.php', 'inc_file' => 'articles.inc.php', 'column' => 'role_articles'); } $ezin_ADMIN_MENU[] = array( 'action' => 'boxes', 'caption' => 'Boxes', 'link' => 'boxes.php', 'inc_file' => 'boxes.inc.php', 'column' => 'role_articles'); $ezin_ADMIN_MENU[] = array( 'action' => 'authors', 'caption' => 'Authors', 'link' => 'authors.php', 'inc_file' => 'authors.inc.php', 'column' => 'role_authors'); $ezin_ADMIN_MENU[] = array( 'action' => 'sections', 'caption' => 'Sections', 'link' => 'sections.php', 'inc_file' => 'sections.inc.php', 'column' => 'role_sections'); $ezin_ADMIN_MENU[] = array( 'action' => 'editorials', 'caption' => 'Editorials', 'link' => 'editorials.php', 'inc_file' => 'editorials.inc.php', 'column' => 'role_editorials'); $ezin_ADMIN_MENU[] = array( 'action' => 'messages', 'caption' => 'Messages', 'link' => 'messages.php', 'inc_file' => 'messages.inc.php', 'column' => 'role_messages'); if (! ezin_admin_is_blog()) { $ezin_ADMIN_MENU[] = array( 'action' => 'bindings', 'caption' => 'Bindings', 'link' => 'bindings.php', 'inc_file' => 'bindings.inc.php', 'column' => array('role_articles', 'role_sections')); } $ezin_ADMIN_MENU[] = array( 'action' => 'polls', 'caption' => 'Polls', 'link' => 'polls.php', 'inc_file' => 'polls.inc.php', 'column' => 'role_polls'); $ezin_ADMIN_MENU[] = array( 'action' => 'feedbacks', 'caption' => 'Feedbacks', 'link' => 'feedbacks.php', 'inc_file' => 'feedbacks.inc.php', 'column' => 'role_feedbacks'); $ezin_ADMIN_MENU[] = array( 'action' => 'newsletters', 'caption' => 'Newsletters', 'link' => 'newsletters.php', 'inc_file' => 'newsletters.inc.php', 'column' => 'role_newsletters'); $ezin_ADMIN_MENU[] = array( 'action' => 'users', 'caption' => 'Users', 'link' => 'users.php', 'inc_file' => 'users.inc.php', 'column' => 'role_users'); $ezin_ADMIN_MENU[] = array( 'action' => 'roles', 'caption' => 'Roles', 'link' => 'roles.php', 'inc_file' => 'roles.inc.php', 'column' => 'role_roles'); $ezin_ADMIN_MENU[] = array( 'action' => 'sessions', 'caption' => 'Sessions', 'link' => 'sessions.php', 'inc_file' => 'sessions.inc.php', 'column' => 'role_sessions'); $ezin_ADMIN_MENU[] = array( 'action' => 'sources', 'caption' => 'Sources', 'link' => 'sources.php', 'inc_file' => 'sources.inc.php', 'column' => 'role_sections'); $ezin_ADMIN_MENU[] = array( 'action' => 'exports', 'caption' => 'Exports', 'link' => 'exports.php', 'inc_file' => 'exports.inc.php', 'column' => 'role_config'); $ezin_ADMIN_MENU[] = array( 'action' => 'config', 'caption' => 'Config', 'link' => 'config.php', 'inc_file' => 'config.inc.php', 'column' => 'role_config'); $ezin_ADMIN_MENU[] = array( 'action' => 'maintenance', 'caption' => 'Maintenance', 'link' => 'maintenance.php', 'inc_file' => 'maintenance.inc.php', 'column' => 'role_config'); $ezin_ADMIN_MENU[] = array( 'action' => 'file_management', 'caption' => 'File mng', 'link' => 'file-mng.php', 'column' => 'role_file_management'); if (strlen($ezin_cfg['admin_auth_function']) > 0 && function_exists($ezin_cfg['admin_auth_function'])) { // nothing } else { $ezin_ADMIN_MENU[] = array( 'action' => 'password', 'caption' => 'Password', 'link' => 'password.php', 'inc_file' => 'password.inc.php'); } $ezin_ADMIN_MENU[] = array( 'action' => 'help', 'caption' => 'Help', 'link' => 'help.php', 'inc_file' => 'help.inc.php'); $ezin_ADMIN_MENU[] = array( 'caption' => 'Logout', 'link' => 'logout.php'); /* * Load menu for custom applications * * Admin API: ezin_admin_menu_add(action, caption, link, inc_file, column [, after_action [, visible]]); */ $ezin_tmp_ADMIN_MENU = array(); foreach(ezin_admin_menu_get() as $menu) { if (!$menu['visible']) { continue; } $item = array( 'action' => $menu['action'], 'caption' => $menu['caption'], 'link' => 'app/'.$menu['app_dir'].'/'.$menu['link'], 'inc_file' => $menu['inc_file'], 'column' => $menu['column'] ); if (is_null($menu['after_action'])) { $ezin_tmp_ADMIN_MENU[] = $item; } else { $index = 0; if ($index == 0) foreach($ezin_ADMIN_MENU as $key => $val) { if ($val['action'] == $menu['after_action']) { $index = $key; } } if ($index > 0) { $ezin_ADMIN_MENU = Platon::array_insert($ezin_ADMIN_MENU, $index, $item); $index *= -1; } if ($index == 0) foreach($ezin_tmp_ADMIN_MENU as $key => $val) { if ($val['action'] == $menu['after_action']) { $index = $key; } } if ($index > 0) { $ezin_tmp_ADMIN_MENU = Platon::array_insert($ezin_tmp_ADMIN_MENU, $index, $item); $index *= -1; } } } $ezin_ADMIN_MENU = array_merge($ezin_tmp_ADMIN_MENU, $ezin_ADMIN_MENU); ?>