X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdisplay_prefs.php;h=384c0e5b398bf3fc103a5a1b8c3c2242666a788a;hb=ea52d139c2309cc07ec2e37155a3fe304471c0fc;hp=2b4faf5213000d368936f79929efa3cb2adf25d4;hpb=d67d5295b9342c011697ce4df325197e29898588;p=fa-stable.git diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 2b4faf52..384c0e5b 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security =10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -15,23 +24,31 @@ include_once($path_to_root . "/admin/db/company_db.inc"); if (isset($_POST['setprefs'])) { - $theme = user_theme(); - set_user_prefs($_POST['prices'], $_POST['Quantities'], - $_POST['Rates'], $_POST['Percent'], - check_value('show_gl'), - check_value('show_codes'), - $_POST['date_format'], $_POST['date_sep'], - $_POST['tho_sep'], $_POST['dec_sep'], - $_POST['theme'], $_POST['page_size'], check_value('show_hints')); - - language::set_language($_POST['language']); - - flush_dir($comp_path.'/'.user_company().'/js_cache'); - - if (user_theme() != $theme) - reload_page(""); - - display_notification_centered(_("Display settings have been updated.")); + if (!is_numeric($_POST['query_size']) || ($_POST['query_size']<1)) + { + display_error($_POST['query_size']); + display_error( _("Query size must integer and greater than zero.")); + set_focus('query_size'); + } else { + $theme = user_theme(); + set_user_prefs($_POST['prices'], $_POST['Quantities'], + $_POST['Rates'], $_POST['Percent'], + check_value('show_gl'), + check_value('show_codes'), + $_POST['date_format'], $_POST['date_sep'], + $_POST['tho_sep'], $_POST['dec_sep'], + $_POST['theme'], $_POST['page_size'], check_value('show_hints'), + $_POST['profile'], check_value('rep_popup'), (int)($_POST['query_size']), check_value('graphic_links')); + + language::set_language($_POST['language']); + + flush_dir($comp_path.'/'.user_company().'/js_cache'); + + if (user_theme() != $theme) + reload_page(""); + + display_notification_centered(_("Display settings have been updated.")); + } } start_form(); @@ -81,6 +98,20 @@ pagesizes_list_row(_("Page Size:"), "page_size", user_pagesize()); /* The array $pagesizes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ +if (!isset($_POST['profile'])) + $_POST['profile'] = user_print_profile(); + +print_profiles_list_row(_("Printing profile"). ':', 'profile', + null, _('Browser printing support')); + +check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(), + false, _('Set this option to on if your browser directly supports pdf files')); + +check_row(_("Use icons instead of text links:"), 'graphic_links', user_graphic_links(), + false, _('Set this option to on for using icons instead of text links')); + +text_row_ex(_("Query page size:"), 'query_size', 5, 5, '', user_query_size()); + table_section_title(_("Language")); if (!isset($_POST['language'])) @@ -90,7 +121,7 @@ languages_list_row(_("Language:"), 'language', $_POST['language']); end_table(1); -submit_center('setprefs', _("Update")); +submit_center('setprefs', _("Update"), true, '', true); end_form(2);