Skip to content

Commit 6f2d95f

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
Master See merge request !195
2 parents daf5a71 + 8a74454 commit 6f2d95f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+917
-1
lines changed

install/sql/incremental/upd_dev_collection.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,18 @@ ALTER TABLE openvz_template ADD COLUMN `features` varchar(255) DEFAULT NULL AFTE
150150
ALTER TABLE openvz_vm ADD COLUMN `features` TEXT DEFAULT NULL AFTER `capability`;
151151
ALTER TABLE openvz_template ADD COLUMN `iptables` varchar(255) DEFAULT NULL AFTER `features`;
152152
ALTER TABLE openvz_vm ADD COLUMN `iptables` TEXT DEFAULT NULL AFTER `features`;
153+
154+
CREATE TABLE `server_ip_map` (
155+
`server_ip_map_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
156+
`sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
157+
`sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
158+
`sys_perm_user` varchar(5) DEFAULT NULL,
159+
`sys_perm_group` varchar(5) DEFAULT NULL,
160+
`sys_perm_other` varchar(5) DEFAULT NULL,
161+
`server_id` int(11) unsigned NOT NULL DEFAULT '0',
162+
`source_ip` varchar(15) DEFAULT NULL,
163+
`destination_ip` varchar(35) DEFAULT '',
164+
`active` enum('n','y') NOT NULL DEFAULT 'y',
165+
PRIMARY KEY (`server_ip_map_id`)
166+
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
167+

install/sql/ispconfig3.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,25 @@ CREATE TABLE `server_ip` (
12521252

12531253
-- --------------------------------------------------------
12541254

1255+
--
1256+
-- Table structure for table `server_ip_map`
1257+
--
1258+
1259+
CREATE TABLE `server_ip_map` (
1260+
`server_ip_map_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1261+
`sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
1262+
`sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
1263+
`sys_perm_user` varchar(5) DEFAULT NULL,
1264+
`sys_perm_group` varchar(5) DEFAULT NULL,
1265+
`sys_perm_other` varchar(5) DEFAULT NULL,
1266+
`server_id` int(11) unsigned NOT NULL DEFAULT '0',
1267+
`source_ip` varchar(15) DEFAULT NULL,
1268+
`destination_ip` varchar(35) DEFAULT '',
1269+
`active` enum('n','y') NOT NULL DEFAULT 'y',
1270+
PRIMARY KEY (`server_ip_map_id`)
1271+
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
1272+
1273+
-- --------------------------------------------------------
12551274

12561275
--
12571276
-- Table structure for table `server_php`
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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' => 'VARCHAR',
55+
'formtype' => 'SELECT',
56+
'default' => '',
57+
'value' => ''
58+
),
59+
'source_ip' => array (
60+
'datatype' => 'VARCHAR',
61+
'formtype' => 'SELECT',
62+
'validators' => array (
63+
0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'source_ip_empty'),
64+
),
65+
'default' => '',
66+
'value' => ''
67+
),
68+
'destination_ip' => array (
69+
'datatype' => 'VARCHAR',
70+
'formtype' => 'TEXT',
71+
'validators' => array (
72+
0 => array ( 'type' => 'ISIP', 'errmsg'=> 'ip_error_wrong'),
73+
1 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'destination_ip_empty'),
74+
),
75+
'default' => '',
76+
'value' => '',
77+
'separator' => '',
78+
'width' => '15',
79+
'maxlength' => '15',
80+
'rows' => '',
81+
'cols' => '',
82+
'searchable' => 1
83+
),
84+
'active' => array(
85+
'datatype' => 'VARCHAR',
86+
'formtype' => 'CHECKBOX',
87+
'default' => 'y',
88+
'value' => array(0 => 'n', 1 => 'y')
89+
),
90+
)
91+
);
92+
?>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Rewrite on Server';
3+
$wb["source_txt"] = 'Source IP';
4+
$wb["destination_txt"] = 'Destination IP';
5+
$wb["active_txt"] = 'Active';
6+
$wb["ip_error_wrong"] = 'The Destination IP address is invalid';
7+
$wb["destination_ip_empty"] = 'The Destination IP is empty.';
8+
$wb["source_ip_empty"] = 'The Source IP is empty.';
9+
$wb["duplicate_mapping_error"] = "Mapping already exists.";
10+
$wb["duplicate_mapping_error"] = "Source IP can not be an IP of the Rewrite-Server";
11+
?>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
$wb["list_head_txt"] = 'IP Mappings';
3+
$wb["server_id_txt"] = 'Server';
4+
$wb["source_ip_txt"] = 'Source IP';
5+
$wb["destination_ip_txt"] = 'Destination IP';
6+
$wb["active_txt"] = 'Active';
7+
?>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Rewrite on Server';
3+
$wb["source_txt"] = 'Source IP';
4+
$wb["destination_txt"] = 'Destination IP';
5+
$wb["active_txt"] = 'Active';
6+
$wb["ip_error_wrong"] = 'The Destination IP address is invalid';
7+
$wb["destination_ip_empty"] = 'The Destination IP is empty.';
8+
$wb["source_ip_empty"] = 'The Source IP is empty.';
9+
$wb["duplicate_mapping_error"] = "Mapping already exists.";
10+
$wb["duplicate_mapping_error"] = "Source IP can not be an IP of the Rewrite-Server";
11+
?>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
$wb["list_head_txt"] = 'IP Mappings';
3+
$wb["server_id_txt"] = 'Server';
4+
$wb["source_ip_txt"] = 'Source IP';
5+
$wb["destination_ip_txt"] = 'Destination IP';
6+
$wb["active_txt"] = 'Active';
7+
?>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Rewrite on Server';
3+
$wb["source_txt"] = 'Source IP';
4+
$wb["destination_txt"] = 'Destination IP';
5+
$wb["active_txt"] = 'Active';
6+
$wb["ip_error_wrong"] = 'The Destination IP address is invalid';
7+
$wb["destination_ip_empty"] = 'The Destination IP is empty.';
8+
$wb["source_ip_empty"] = 'The Source IP is empty.';
9+
$wb["duplicate_mapping_error"] = "Mapping already exists.";
10+
$wb["duplicate_mapping_error"] = "Source IP can not be an IP of the Rewrite-Server";
11+
?>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
$wb["list_head_txt"] = 'IP Mappings';
3+
$wb["server_id_txt"] = 'Server';
4+
$wb["source_ip_txt"] = 'Source IP';
5+
$wb["destination_ip_txt"] = 'Destination IP';
6+
$wb["active_txt"] = 'Active';
7+
?>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Rewrite on Server';
3+
$wb["source_txt"] = 'Source IP';
4+
$wb["destination_txt"] = 'Destination IP';
5+
$wb["active_txt"] = 'Active';
6+
$wb["ip_error_wrong"] = 'The Destination IP address is invalid';
7+
$wb["destination_ip_empty"] = 'The Destination IP is empty.';
8+
$wb["source_ip_empty"] = 'The Source IP is empty.';
9+
$wb["duplicate_mapping_error"] = "Mapping already exists.";
10+
$wb["duplicate_mapping_error"] = "Source IP can not be an IP of the Rewrite-Server";
11+
?>

0 commit comments

Comments
 (0)