|
| 1 | +<?php |
| 2 | + |
| 3 | +/* |
| 4 | +Copyright (c) 2015, Florian Schaal, schaal @it |
| 5 | +All rights reserved. |
| 6 | +
|
| 7 | +Redistribution and use in source and binary forms, with or without modification, |
| 8 | +are permitted provided that the following conditions are met: |
| 9 | +
|
| 10 | + * Redistributions of source code must retain the above copyright notice, |
| 11 | + this list of conditions and the following disclaimer. |
| 12 | + * Redistributions in binary form must reproduce the above copyright notice, |
| 13 | + this list of conditions and the following disclaimer in the documentation |
| 14 | + and/or other materials provided with the distribution. |
| 15 | + * Neither the name of ISPConfig nor the names of its contributors |
| 16 | + may be used to endorse or promote products derived from this software without |
| 17 | + specific prior written permission. |
| 18 | +
|
| 19 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 20 | +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 21 | +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 22 | +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 23 | +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 24 | +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 | +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 26 | +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 27 | +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 28 | +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | +*/ |
| 30 | + |
| 31 | +$form["title"] = "IP Addresse mapping"; |
| 32 | +$form["description"] = ""; |
| 33 | +$form["name"] = "server_ip_map"; |
| 34 | +$form["action"] = "server_ip_map_edit.php"; |
| 35 | +$form["db_table"] = "server_ip_map"; |
| 36 | +$form["db_table_idx"] = "server_ip_map_id"; |
| 37 | +$form["db_history"] = "yes"; |
| 38 | +$form["tab_default"] = "server_ip_map"; |
| 39 | +$form["list_default"] = "server_ip_map_list.php"; |
| 40 | +$form["auth"] = 'yes'; |
| 41 | + |
| 42 | +$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
| 43 | +$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
| 44 | +$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 45 | +$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
| 46 | +$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
| 47 | + |
| 48 | +$form["tabs"]['server_ip_map'] = array ( |
| 49 | + 'title' => "IP Address Mapping", |
| 50 | + 'width' => 80, |
| 51 | + 'template' => "templates/server_ip_map_edit.htm", |
| 52 | + 'fields' => array ( |
| 53 | + 'server_id' => array ( |
| 54 | +// 'datatype' => 'INTEGER', |
| 55 | + 'datatype' => 'VARCHAR', |
| 56 | + 'formtype' => 'SELECT', |
| 57 | + 'default' => '', |
| 58 | +// 'datasource' => array ( 'type' => 'SQL', |
| 59 | +// 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id > 0 ORDER BY server_name', |
| 60 | +// 'keyfield'=> 'server_id', |
| 61 | +// 'valuefield'=> 'server_name' |
| 62 | +// ), |
| 63 | + 'value' => '' |
| 64 | + ), |
| 65 | + 'source_ip' => array ( |
| 66 | + 'datatype' => 'VARCHAR', |
| 67 | + 'formtype' => 'SELECT', |
| 68 | + 'validators' => array ( |
| 69 | + 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'source_ip_empty'), |
| 70 | + ), |
| 71 | + 'default' => '', |
| 72 | + 'value' => '' |
| 73 | + ), |
| 74 | + 'destination_ip' => array ( |
| 75 | + 'datatype' => 'VARCHAR', |
| 76 | + 'formtype' => 'TEXT', |
| 77 | + 'validators' => array ( |
| 78 | + 0 => array ( 'type' => 'ISIP', 'errmsg'=> 'ip_error_wrong'), |
| 79 | + 1 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'destination_ip_empty'), |
| 80 | + ), |
| 81 | + 'default' => '', |
| 82 | + 'value' => '', |
| 83 | + 'separator' => '', |
| 84 | + 'width' => '15', |
| 85 | + 'maxlength' => '15', |
| 86 | + 'rows' => '', |
| 87 | + 'cols' => '', |
| 88 | + 'searchable' => 1 |
| 89 | + ), |
| 90 | + 'active' => array( |
| 91 | + 'datatype' => 'VARCHAR', |
| 92 | + 'formtype' => 'CHECKBOX', |
| 93 | + 'default' => 'y', |
| 94 | + 'value' => array(0 => 'n', 1 => 'y') |
| 95 | + ), |
| 96 | + ) |
| 97 | +); |
| 98 | +?> |
0 commit comments