Changed all smaller forms and tables to be uniform. Copyright notes.
[fa-stable.git] / admin / forms_setup.php
1 <?php
2 /**********************************************************************
3     Copyright (C) FrontAccounting, LLC.
4         Released under the terms of the GNU Affero General Public License,
5         AGPL, as published by the Free Software Foundation, either version 
6         3 of the License, or (at your option) any later version.
7     This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
10     See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
11 ***********************************************************************/
12 $page_security =10;
13 $path_to_root="..";
14 include($path_to_root . "/includes/session.inc");
15
16 page(_("Forms Setup"));
17
18 include($path_to_root . "/includes/ui.inc");
19
20 //-------------------------------------------------------------------------------------------------
21
22 if (isset($_POST['setprefs'])) 
23 {
24
25         $systypes = get_systypes();
26
27         begin_transaction();
28
29     while ($type = db_fetch($systypes)) 
30     {
31         save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]);
32     }
33
34     commit_transaction();
35
36         display_notification_centered(_("Forms settings have been updated."));
37 }
38
39 start_form();
40
41 start_table("class='tablestyle'");
42
43 $systypes = get_systypes();
44
45 $th = array(_("Form"), _("Next Reference"));
46 table_header($th);
47
48 while ($type = db_fetch($systypes)) 
49 {
50         ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], '', $type["next_reference"]);
51 }
52
53 end_table(1);
54
55 submit_center('setprefs', _("Update"), true, '', true);
56
57 end_form(2);
58
59 //-------------------------------------------------------------------------------------------------
60
61 end_page();
62
63 ?>