$txt_error = "<div>" . _('The following errors occurred') . ":</div>\n <div style='padding:10px;'>" . implode('<br/>', $validation_errors) . '</div>'; $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;'); $nt = new Notification('nt_1', $config_nt); $nt->show(); Util::make_form('POST', "user_form.php?login={$login}"); exit; } else { //Create or update user $insert_menu = FALSE; $language_changed = FALSE; $tzone_changed = FALSE; // MENUS if (!$pro && $am_i_admin && !$is_my_profile) { $insert_menu = true; $perms = array(); list($menu_perms, $perms_check) = Session::get_menu_perms($conn); foreach ($menu_perms as $mainmenu => $menus) { foreach ($menus as $key => $menu) { $cond_1 = POST("menu_perm{$key}") == 'on'; $cond_2 = $perms_check[$mainmenu][$key] == TRUE; if ($cond_1 && $cond_2) { $perms[$key] = TRUE; } } } } if ($mode == 'insert') { $msg = 'created'; if ($insert_menu == TRUE) { //New template $template_id = Session::update_template($conn, $login . "_perms", $perms);