|
| 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 | + Search: |
| 34 | + - searchable = 1 or searchable = 2 include the field in the search |
| 35 | + - searchable = 1: this field will be the title of the search result |
| 36 | + - searchable = 2: this field will be included in the description of the search result |
| 37 | +
|
| 38 | +
|
| 39 | +*/ |
| 40 | + |
| 41 | +$form["title"] = "Client Circle"; |
| 42 | +$form["description"] = ""; |
| 43 | +$form["name"] = "client_circle"; |
| 44 | +$form["action"] = "client_circle_edit.php"; |
| 45 | +$form["db_table"] = "client_circle"; |
| 46 | +$form["db_table_idx"] = "circle_id"; |
| 47 | +$form["db_history"] = "yes"; |
| 48 | +$form["tab_default"] = "circle"; |
| 49 | +$form["list_default"] = "client_circle_list.php"; |
| 50 | +$form["auth"] = 'yes'; |
| 51 | + |
| 52 | +$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
| 53 | +$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
| 54 | +$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 55 | +$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 56 | +$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| 57 | + |
| 58 | +//* Languages |
| 59 | +$language_list = array(); |
| 60 | +$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang'); |
| 61 | +while ($file = @readdir ($handle)) { |
| 62 | + if ($file != '.' && $file != '..') { |
| 63 | + if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') { |
| 64 | + $tmp = substr($file, 0, 2); |
| 65 | + $language_list[$tmp] = $tmp; |
| 66 | + } |
| 67 | + } |
| 68 | +} |
| 69 | + |
| 70 | +//* Load themes |
| 71 | +$themes_list = array(); |
| 72 | +$handle = @opendir(ISPC_THEMES_PATH); |
| 73 | +while ($file = @readdir ($handle)) { |
| 74 | + if (substr($file, 0, 1) != '.') { |
| 75 | + if(@is_dir(ISPC_THEMES_PATH."/$file")) { |
| 76 | + $themes_list[$file] = $file; |
| 77 | + } |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +$form["tabs"]['circle'] = array ( |
| 82 | + 'title' => "Circle", |
| 83 | + 'width' => 100, |
| 84 | + 'template' => "templates/client_circle_edit.htm", |
| 85 | + 'fields' => array ( |
| 86 | + ################################## |
| 87 | + # Begin Datatable fields |
| 88 | + ################################## |
| 89 | + 'circle_name' => array ( |
| 90 | + 'datatype' => 'VARCHAR', |
| 91 | + 'formtype' => 'TEXT', |
| 92 | + 'default' => '', |
| 93 | + 'value' => '', |
| 94 | + 'separator' => '', |
| 95 | + 'width' => '30', |
| 96 | + 'maxlength' => '255', |
| 97 | + 'rows' => '', |
| 98 | + 'cols' => '', |
| 99 | + 'searchable' => 2 |
| 100 | + ), |
| 101 | + 'client_ids' => array ( |
| 102 | + 'datatype' => 'VARCHAR', |
| 103 | + 'formtype' => 'CHECKBOXARRAY', |
| 104 | + 'default' => '', |
| 105 | + 'separator' => ',', |
| 106 | + 'datasource' => array ( 'type' => 'SQL', |
| 107 | + 'querystring' => 'SELECT client_id,contact_name FROM client WHERE 1 ORDER BY contact_name', |
| 108 | + 'keyfield'=> 'client_id', |
| 109 | + 'valuefield'=> 'contact_name' |
| 110 | + ), |
| 111 | + 'value' => '' |
| 112 | + ), |
| 113 | + 'description' => array ( |
| 114 | + 'datatype' => 'TEXT', |
| 115 | + 'formtype' => 'TEXTAREA', |
| 116 | + 'default' => '', |
| 117 | + 'value' => '', |
| 118 | + 'separator' => '', |
| 119 | + 'width' => '', |
| 120 | + 'maxlength' => '', |
| 121 | + 'rows' => '10', |
| 122 | + 'cols' => '30' |
| 123 | + ), |
| 124 | + 'active' => array ( |
| 125 | + 'datatype' => 'VARCHAR', |
| 126 | + 'formtype' => 'CHECKBOX', |
| 127 | + 'default' => 'y', |
| 128 | + 'value' => array(0 => 'n',1 => 'y') |
| 129 | + ), |
| 130 | + ################################## |
| 131 | + # END Datatable fields |
| 132 | + ################################## |
| 133 | + ) |
| 134 | +); |
| 135 | + |
| 136 | + |
| 137 | +?> |
0 commit comments