Changed API for input/lists functions, added empty hints when needed
[fa-stable.git] / admin / forms_setup.php
1 <?php
2
3 $page_security =10;
4 $path_to_root="..";
5 include($path_to_root . "/includes/session.inc");
6
7 page(_("Forms Setup"));
8
9 include($path_to_root . "/includes/ui.inc");
10
11 //-------------------------------------------------------------------------------------------------
12
13 if (isset($_POST['setprefs'])) 
14 {
15
16         $systypes = get_systypes();
17
18         begin_transaction();
19
20     while ($type = db_fetch($systypes)) 
21     {
22         save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]);
23     }
24
25     commit_transaction();
26
27         display_notification_centered(_("Forms settings have been updated."));
28 }
29
30 start_form();
31 start_table("class='tablestyle'");
32
33 $systypes = get_systypes();
34
35 $th = array(_("Form"), _("Next Reference"));
36 table_header($th);
37
38 while ($type = db_fetch($systypes)) 
39 {
40         ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], '', $type["next_reference"]);
41 }
42
43 end_table(1);
44
45 submit_center('setprefs', _("Update"));
46
47 end_form(2);
48
49 //-------------------------------------------------------------------------------------------------
50
51 end_page();
52
53 ?>