|
16 | 16 | may be used to endorse or promote products derived from this software without |
17 | 17 | specific prior written permission. |
18 | 18 |
|
19 | | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 19 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND |
20 | 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
21 | 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
22 | 22 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
|
34 | 34 | Tabellendefinition |
35 | 35 |
|
36 | 36 | Datentypen: |
37 | | - - INTEGER (Wandelt Ausdrücke in Int um) |
| 37 | + - INTEGER (Wandelt Ausdr�cke in Int um) |
38 | 38 | - DOUBLE |
39 | | - - CURRENCY (Formatiert Zahlen nach Währungsnotation) |
| 39 | + - CURRENCY (Formatiert Zahlen nach W�hrungsnotation) |
40 | 40 | - VARCHAR (kein weiterer Format Check) |
41 | 41 | - TEXT (kein weiterer Format Check) |
42 | 42 | - DATE (Datumsformat, Timestamp Umwandlung) |
|
55 | 55 | - Wert oder Array |
56 | 56 |
|
57 | 57 | Hinweis: |
58 | | - Das ID-Feld ist nicht bei den Table Values einzufügen. |
| 58 | + Das ID-Feld ist nicht bei den Table Values einzuf�gen. |
59 | 59 |
|
60 | 60 |
|
61 | 61 | */ |
62 | 62 |
|
63 | | -$form["title"] = "Users"; |
64 | | -$form["description"] = "Form to edit systemusers."; |
65 | | -$form["name"] = "users"; |
66 | | -$form["action"] = "users_edit.php"; |
67 | | -$form["db_table"] = "sys_user"; |
68 | | -$form["db_table_idx"] = "userid"; |
69 | | -$form["tab_default"] = "users"; |
70 | | -$form["list_default"] = "users_list.php"; |
71 | | -$form["auth"] = 'yes'; |
| 63 | +$form['title'] = 'Users'; |
| 64 | +$form['description'] = 'Form to edit systemusers.'; |
| 65 | +$form['name'] = 'users'; |
| 66 | +$form['action'] = 'users_edit.php'; |
| 67 | +$form['db_table'] = 'sys_user'; |
| 68 | +$form['db_table_idx'] = 'userid'; |
| 69 | +$form['tab_default'] = 'users'; |
| 70 | +$form['list_default'] = 'users_list.php'; |
| 71 | +$form['auth'] = 'yes'; |
72 | 72 |
|
73 | | -$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
74 | | -$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
75 | | -$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
76 | | -$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
77 | | -$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| 73 | +//* 0 = id of the user, > 0 id must match with id of current user |
| 74 | +$form['auth_preset']['userid'] = 0; |
| 75 | +//* 0 = default groupid of the user, > 0 id must match with groupid of current user |
| 76 | +$form['auth_preset']['groupid'] = 0; |
78 | 77 |
|
79 | | -// lese Module aus |
| 78 | +//** Permissions are: r = read, i = insert, u = update, d = delete |
| 79 | +$form['auth_preset']['perm_user'] = 'riud'; |
| 80 | +$form['auth_preset']['perm_group'] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 81 | +$form['auth_preset']['perm_other'] = ''; //r = read, i = insert, u = update, d = delete |
| 82 | + |
| 83 | +//* Pick out modules |
80 | 84 | $modules_list = array(); |
81 | | -$handle = @opendir($conf["rootpath"]."/web"); |
| 85 | +$handle = @opendir(ISPC_WEB_PATH); |
82 | 86 | while ($file = @readdir ($handle)) { |
83 | | - if ($file != "." && $file != "..") { |
84 | | - if(@is_dir($conf["rootpath"]."/web/".$file)) { |
85 | | - if(is_file($conf["rootpath"]."/web/".$file."/lib/module.conf.php") and $file != 'login') { |
| 87 | + if ($file != '.' && $file != '..') { |
| 88 | + if(@is_dir(ISPC_WEB_PATH."/$file")) { |
| 89 | + if(is_file(ISPC_WEB_PATH."/$file/lib/module.conf.php") and $file != 'login') { |
86 | 90 | $modules_list[$file] = $file; |
87 | 91 | } |
88 | 92 | } |
89 | 93 | } |
90 | 94 | } |
91 | 95 |
|
92 | | -// lese Themes aus |
| 96 | +//* Load themes |
93 | 97 | $themes_list = array(); |
94 | | -$handle = @opendir($conf["rootpath"]."/web/themes"); |
| 98 | +$handle = @opendir(ISPC_THEMES_PATH); |
95 | 99 | while ($file = @readdir ($handle)) { |
96 | | - if (substr($file,0,1) != '.') { |
97 | | - if(@is_dir($conf["rootpath"]."/web/themes/".$file)) { |
| 100 | + if (substr($file, 0, 1) != '.') { |
| 101 | + if(@is_dir(ISPC_THEMES_PATH."/$file")) { |
98 | 102 | $themes_list[$file] = $file; |
99 | 103 | } |
100 | 104 | } |
101 | 105 | } |
102 | 106 |
|
103 | | -// lese verfügbare Sprachen aus |
| 107 | +//* Languages |
104 | 108 | $language_list = array(); |
105 | | -$handle = @opendir($conf["rootpath"]."/lib/lang"); |
| 109 | +$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang'); |
106 | 110 | while ($file = @readdir ($handle)) { |
107 | | - if ($file != "." && $file != "..") { |
108 | | - if(@is_file($conf["rootpath"]."/lib/lang/".$file) and substr($file,-4,4) == '.lng') { |
109 | | - $tmp = substr($file,0,2); |
| 111 | + if ($file != '.' && $file != '..') { |
| 112 | + if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') { |
| 113 | + $tmp = substr($file, 0, 2); |
110 | 114 | $language_list[$tmp] = $tmp; |
111 | 115 | } |
112 | 116 | } |
113 | 117 | } |
114 | 118 |
|
115 | | -// lese verfügbare Gruppen aus. |
| 119 | +//* Pick out groups |
116 | 120 | $groups_list = array(); |
117 | | -$tmp_records = $app->db->queryAllRecords("SELECT groupid, name FROM sys_group ORDER BY name"); |
| 121 | +$tmp_records = $app->db->queryAllRecords('SELECT groupid, name FROM sys_group ORDER BY name'); |
118 | 122 | if(is_array($tmp_records)) { |
119 | 123 | foreach($tmp_records as $tmp_rec) { |
120 | | - $tmp_id = $tmp_rec["groupid"]; |
121 | | - $groups_list[$tmp_id] = $tmp_rec["name"]; |
| 124 | + $groups_list[$tmp_rec['groupid']] = $tmp_rec['name']; |
122 | 125 | } |
123 | 126 | } |
124 | 127 |
|
125 | | -$form["tabs"]['users'] = array ( |
126 | | - 'title' => "Users", |
| 128 | +$form['tabs']['users'] = array ( |
| 129 | + 'title' => 'Users', |
127 | 130 | 'width' => 80, |
128 | | - 'template' => "templates/users_user_edit.htm", |
| 131 | + 'template' => 'templates/users_user_edit.htm', |
129 | 132 | 'fields' => array ( |
130 | 133 | ################################## |
131 | 134 | # Beginn Datenbankfelder |
|
240 | 243 | ) |
241 | 244 | ); |
242 | 245 | /* |
243 | | -$form["tabs"]['address'] = array ( |
244 | | - 'title' => "Address", |
| 246 | +$form['tabs']['address'] = array ( |
| 247 | + 'title' => 'Address', |
245 | 248 | 'width' => 80, |
246 | | - 'template' => "templates/users_address_edit.htm", |
| 249 | + 'template' => 'templates/users_address_edit.htm', |
247 | 250 | 'fields' => array ( |
248 | 251 | ################################## |
249 | 252 | # Beginn Datenbankfelder |
|
399 | 402 | ); |
400 | 403 | */ |
401 | 404 |
|
402 | | -$form["tabs"]['groups'] = array ( |
403 | | - 'title' => "Groups", |
| 405 | +$form['tabs']['groups'] = array ( |
| 406 | + 'title' => 'Groups', |
404 | 407 | 'width' => 80, |
405 | | - 'template' => "templates/users_groups_edit.htm", |
| 408 | + 'template' => 'templates/users_groups_edit.htm', |
406 | 409 | 'fields' => array ( |
407 | 410 | ################################## |
408 | 411 | # Beginn Datenbankfelder |
|
0 commit comments