| version 1.11, 2012/06/06 10:19:41 |
version 1.12, 2015/01/20 15:20:17 |
| Line 150 $ezin_ADMIN_MENU[] = array( |
|
| Line 150 $ezin_ADMIN_MENU[] = array( |
|
| 'inc_file' => 'help.inc.php'); |
'inc_file' => 'help.inc.php'); |
| $ezin_ADMIN_MENU[] = array( |
$ezin_ADMIN_MENU[] = array( |
| 'caption' => 'Logout', |
'caption' => 'Logout', |
| 'link' => 'logout.php') |
'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); |
| |
|
| ?> |
?> |