|
| 1 | +<?php |
| 2 | + |
| 3 | +/* |
| 4 | + Form Definition |
| 5 | +
|
| 6 | + Tabledefinition |
| 7 | +
|
| 8 | + Datatypes: |
| 9 | + - INTEGER (Forces the input to Int) |
| 10 | + - DOUBLE |
| 11 | + - CURRENCY (Formats the values to currency notation) |
| 12 | + - VARCHAR (no format check, maxlength: 255) |
| 13 | + - TEXT (no format check) |
| 14 | + - DATE (Dateformat, automatic conversion to timestamps) |
| 15 | +
|
| 16 | + Formtype: |
| 17 | + - TEXT (Textfield) |
| 18 | + - TEXTAREA (Textarea) |
| 19 | + - PASSWORD (Password textfield, input is not shown when edited) |
| 20 | + - SELECT (Select option field) |
| 21 | + - RADIO |
| 22 | + - CHECKBOX |
| 23 | + - CHECKBOXARRAY |
| 24 | + - FILE |
| 25 | +
|
| 26 | + VALUE: |
| 27 | + - Wert oder Array |
| 28 | +
|
| 29 | + Hint: |
| 30 | + The ID field of the database table is not part of the datafield definition. |
| 31 | + The ID field must be always auto incement (int or bigint). |
| 32 | +
|
| 33 | +
|
| 34 | +*/ |
| 35 | + |
| 36 | +$lista_funkcji = array(); |
| 37 | +$lista_funkcji['mail_domain_get,mail_domain_add,mail_domain_update,mail_domain_delete'] = 'Mail domain functions<br>'; |
| 38 | + |
| 39 | +$lista_funkcji['mail_user_add,mail_user_update,mail_user_delete'] = 'Mail user functions<br>'; |
| 40 | + |
| 41 | +$lista_funkcji['mail_alias_add,mail_alias_update,mail_alias_delete'] = 'Mail alias functions<br>'; |
| 42 | + |
| 43 | +$lista_funkcji['mail_forward_add,mail_forward_update,mail_forward_delete'] = 'Mail forward functions<br>'; |
| 44 | + |
| 45 | +$lista_funkcji['mail_catchall_add,mail_catchall_update,mail_catchall_delete'] = 'Mail catchall functions<br>'; |
| 46 | + |
| 47 | +$lista_funkcji['mail_transport_add,mail_transport_update,mail_transport_delete'] = 'Mail transport functions<br>'; |
| 48 | + |
| 49 | +$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>'; |
| 50 | + |
| 51 | +$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>'; |
| 52 | + |
| 53 | +$lista_funkcji['mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete'] = 'Mail spamfilter user functions<br>'; |
| 54 | + |
| 55 | +$lista_funkcji['mail_policy_add,mail_policy_update,mail_policy_delete'] = 'Mail spamfilter policy functions<br>'; |
| 56 | + |
| 57 | +$lista_funkcji['mail_fetchmail_add,mail_fetchmail_update,mail_fetchmail_delete'] = 'Mail fetchmail functions<br>'; |
| 58 | + |
| 59 | +$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>'; |
| 60 | + |
| 61 | +$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>'; |
| 62 | + |
| 63 | +$lista_funkcji['mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions<br>'; |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +$form["title"] = "Remote user"; |
| 68 | +$form["description"] = ""; |
| 69 | +$form["name"] = "remote_user"; |
| 70 | +$form["action"] = "remote_user_edit.php"; |
| 71 | +$form["db_table"] = "remote_user"; |
| 72 | +$form["db_table_idx"] = "remote_userid"; |
| 73 | +$form["db_history"] = "yes"; |
| 74 | +$form["tab_default"] = "remote_user"; |
| 75 | +$form["list_default"] = "remote_user_list.php"; |
| 76 | +$form["auth"] = 'yes'; // yes / no |
| 77 | + |
| 78 | +$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
| 79 | +$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
| 80 | +$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 81 | +$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 82 | +$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| 83 | + |
| 84 | +$form["tabs"]['remote_user'] = array ( |
| 85 | + 'title' => "Remote User", |
| 86 | + 'width' => 100, |
| 87 | + 'template' => "templates/remote_user_edit.htm", |
| 88 | + 'fields' => array ( |
| 89 | + ################################## |
| 90 | + # Begin Datatable fields |
| 91 | + ################################## |
| 92 | + 'remote_userid' => array ( |
| 93 | + 'datatype' => 'INTEGER', |
| 94 | + 'formtype' => 'SELECT', |
| 95 | + 'default' => '', |
| 96 | + 'datasource' => array ( 'type' => 'SQL', |
| 97 | + 'querystring' => 'SELECT remote_userid,remote_username FROM remote_user WHERE {AUTHSQL} ORDER BY remote_username', |
| 98 | + 'keyfield'=> 'remote_userid', |
| 99 | + 'valuefield'=> 'remote_username' |
| 100 | + ), |
| 101 | + 'value' => '' |
| 102 | + ), |
| 103 | + |
| 104 | + 'remote_username' => array ( |
| 105 | + 'datatype' => 'VARCHAR', |
| 106 | + 'formtype' => 'TEXT', |
| 107 | + 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| 108 | + 'errmsg'=> 'username_error_unique'), |
| 109 | + 1 => array ( 'type' => 'REGEX', |
| 110 | + 'regex' => '/^[\w\.\-]{0,64}$/', |
| 111 | + 'errmsg'=> 'username_error_regex'), |
| 112 | +2 => array ( 'type' => 'NOTEMPTY', |
| 113 | + 'errmsg'=> 'username_error_empty'), |
| 114 | + ), |
| 115 | + 'default' => '', |
| 116 | + 'value' => '', |
| 117 | + 'width' => '30', |
| 118 | + 'maxlength' => '255' |
| 119 | + ), |
| 120 | + 'remote_password' => array ( |
| 121 | + 'datatype' => 'VARCHAR', |
| 122 | + 'formtype' => 'PASSWORD', |
| 123 | + 'encryption' => 'MD5', |
| 124 | + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| 125 | + 'errmsg'=> 'password_error_empty'), |
| 126 | + ), |
| 127 | + 'default' => '', |
| 128 | + 'value' => '', |
| 129 | + 'width' => '30', |
| 130 | + 'maxlength' => '255' |
| 131 | + ), |
| 132 | + 'remote_functions' => array ( |
| 133 | + 'datatype' => 'TEXT', |
| 134 | + 'formtype' => 'CHECKBOXARRAY', |
| 135 | + 'regex' => '', |
| 136 | + 'errmsg' => '', |
| 137 | + 'default' => '', |
| 138 | + 'value' => $lista_funkcji, |
| 139 | + 'separator' => ';', |
| 140 | + 'width' => '', |
| 141 | + 'maxlength' => '', |
| 142 | + 'rows' => '5', |
| 143 | + 'cols' => '30' |
| 144 | + ) |
| 145 | + |
| 146 | + ################################## |
| 147 | + # ENDE Datatable fields |
| 148 | + ################################## |
| 149 | + ) |
| 150 | +); |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | +?> |
0 commit comments