Esempio n. 1
0
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('button_list', 'page');
$tpl->define_dynamic('button_list', 'page');
$tpl->define_dynamic('add_button', 'page');
$tpl->define_dynamic('edit_button', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_CUSTOM_MENUS_PAGE_TITLE' => tr('VHCS - Admin - Manage custom menus'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
gen_admin_menu($tpl);
add_new_button($tpl, $sql);
if (isset($_GET['delete_id'])) {
    delete_button($tpl, $sql);
}
if (isset($_GET['edit_id'])) {
    edit_button($tpl, $sql);
}
update_button($tpl, $sql);
gen_button_list($tpl, $sql);
$tpl->assign(array('TR_TITLE_CUSTOM_MENUS' => tr('Manage custom menus'), 'TR_ADD_NEW_BUTTON' => tr('Add new button'), 'TR_BUTTON_NAME' => tr('Button name'), 'TR_BUTTON_LINK' => tr('Button link'), 'TR_BUTTON_TARGET' => tr('Button target'), 'TR_VIEW_FROM' => tr('Show in'), 'RESELLER' => tr('Reseller level'), 'USER' => tr('Enduser level'), 'RESSELER_AND_USER' => tr('Reseller and enduser level'), 'TR_ADD' => tr('Add'), 'TR_MENU_NAME' => tr('Menu button'), 'TR_ACTON' => tr('Action'), 'TR_EDIT' => tr('Edit'), 'TR_DELETE' => tr('Delete'), 'TR_LEVEL' => tr('Level'), 'TR_SAVE' => tr('Save'), 'TR_EDIT_BUTTON' => tr('Edit button')));
gen_page_message($tpl);
if (isset($_GET['edit_id'])) {
    $tpl->assign('ADD_BUTTON', '');
} else {
    $tpl->assign('EDIT_BUTTON', '');
}
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
 update_single_value('UserProjectAccessLevel', ADMINISTRATOR);
 userprojectapi::editPluginInWhiteboardMenu('plugin_access_level', gpc_get_int('UserProjectAccessLevel', ADMINISTRATOR));
 update_button('ShowMenu');
 userprojectapi::editPluginInWhiteboardMenu('plugin_show_menu', gpc_get_int('ShowMenu'));
 update_button('ShowInFooter');
 update_button('ShowAvatar');
 update_button('IAUHighlighting');
 update_color('IAUHBGColor', '#E67C7C');
 update_button('URIUHighlighting');
 update_color('URIUHBGColor', '#E67C7C');
 update_button('NUIHighlighting');
 update_color('NUIHBGColor', '#FCBDBD');
 update_button('ShowZIU');
 update_button('ZIHighlighting');
 update_color('ZIHBGColor', '#F8FFCC');
 update_button('layer_one_name');
 update_color('TAMHBGColor', '#FAD785');
 $col_amount = gpc_get_int('CAmount', 3);
 if (plugin_config_get('CAmount') != $col_amount && plugin_config_get('CAmount') != '' && $col_amount <= 20) {
     plugin_config_set('CAmount', $col_amount);
 } elseif (plugin_config_get('CAmount') == '') {
     plugin_config_set('CAmount', 3);
 }
 if (!empty($_POST['URIThreshold'])) {
     foreach ($_POST['URIThreshold'] as $unreach_issue_threshold) {
         $unreach_issue_threshold = gpc_get_int_array('URIThreshold');
         if (plugin_config_get('URIThreshold') != $unreach_issue_threshold) {
             plugin_config_set('URIThreshold', $unreach_issue_threshold);
         }
     }
 }