Permalink
Browse files

Merge back master to face-lifting

  • Loading branch information...
sque committed Jan 6, 2014
1 parent 3b5c85f commit 9e2762cbffcc18d6ed709068b956db700d1370a8
Showing with 853 additions and 42 deletions.
  1. +15 −0 .gitignore
  2. +1 −0 AUTHORS.txt
  3. +6 −1 README.md
  4. +0 −4 config/.gitignore
  5. 0 files/.gitignore
  6. +0 −4 files/photos/.gitignore
  7. +0 −4 files/srtm/.gitignore
  8. +4 −0 globals/language/dutch.php
  9. +4 −0 globals/language/english.php
  10. +4 −0 globals/language/greek.php
  11. +1 −1 globals/vars.php
  12. +5 −0 includes/main_menu.php
  13. +2 −1 includes/pages/admin/admin_areas.php
  14. +20 −1 includes/pages/admin/admin_areas_area.php
  15. +2 −1 includes/pages/admin/admin_regions.php
  16. +3 −1 includes/pages/admin/admin_regions_region.php
  17. +197 −0 includes/pages/hostmaster/hostmaster_range_v6.php
  18. +95 −0 includes/pages/hostmaster/hostmaster_ranges_v6.php
  19. +80 −0 includes/pages/mynodes/mynodes_range_v6.php
  20. +41 −2 includes/pages/node_editor/node_editor.php
  21. +24 −1 includes/pages/nodes/nodes_view.php
  22. +42 −0 includes/pages/ranges/ranges_v6.php
  23. +62 −12 install/schema.sql
  24. +0 −5 templates/_compiled/.gitignore
  25. +0 −4 templates/_compiled/basic/.gitignore
  26. +20 −0 templates/basic/includes/main_menu.tpl
  27. +96 −0 templates/basic/includes/pages/hostmaster/hostmaster_range_form_range_v6.tpl
  28. +46 −0 templates/basic/includes/pages/hostmaster/hostmaster_range_v6.tpl
  29. +30 −0 templates/basic/includes/pages/hostmaster/hostmaster_ranges_v6.tpl
  30. +26 −0 templates/basic/includes/pages/mynodes/mynodes_range_v6.tpl
  31. +4 −0 templates/basic/includes/pages/node_editor/node_editor.tpl
  32. +4 −0 templates/basic/includes/pages/nodes/node_info.tpl
  33. +1 −0 templates/basic/includes/pages/nodes/nodes_view.tpl
  34. +18 −0 templates/basic/includes/pages/nodes/nodes_view_table_ip_ranges_v6.tpl
View
@@ -1,5 +1,20 @@
# Exclude WiND installation-specific files
/config/
/files
/templates/_compiled
# Exclude Eclipse build files
.project
.settings/
.buildpath
.externalToolBuilders/
# Exclude other editors meta files
.*.swp
*.orig
*.rej
*~
.#*
*#
.emacs.desktop*
nbproject/
View
@@ -8,3 +8,4 @@ Konstantinos Paliouras <sque [@] tolabaki.gr>
John Kolovos <cirrus [@] awmn.net>
Eddy Kikkert <ed [@] kikkert-online.nl>
Vasilis Tsiligiannis <acinonyx [@] openwrt.gr>
Yiannis Samouhos <ysam [@] unreal.gr>
View
@@ -6,6 +6,10 @@ It was created as a replacement for [NodeDB](http://www.nodedb.com/) by the memb
WiND is distributed under [GNU Affero General Public License v3](http://www.gnu.org/licenses/agpl-3.0.html) where each piece of code remains under the copyright of their respective author. Everyone can see the source code and everyone can contribute to it.
## Caution ##
There have been changes in the Database. Please review the DB Schema before you try to use the current master source with your old installation.
## Features
* Supports multiple users and multiple nodes per user
* Supports controling of task authorization.
@@ -16,7 +20,8 @@ WiND is distributed under [GNU Affero General Public License v3](http://www.gnu.
* Can be used to manage the distribution of IP Ranges and forward/reverse DNS assigned to each node (_Hostmaster_)
* Fully themeable interface (using simple (X)HTML templates)
* Support for localication; Unicode/UTF-8 support
* Integrates with BIND Nameserver for serving the DNS zones.
* Supports provisioning of IPv4 and initial IPv6 addresses.
* Integrates with BIND Nameserver for serving the IPv4 DNS zones.
* A WHOIS server is provided that serves the data using the [WHOIS protocol](http://www.faqs.org/rfcs/rfc3912.html)
## Documentation
View

This file was deleted.

Oops, something went wrong.
View
No changes.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
@@ -587,6 +587,10 @@
'title' => 'Aanvraag IP C-Class',
'body' => 'Omschrijf duidelijk de reden van uw aanvraag in het veld "Informatie".'
),
'node_editor_range_v6' => array(
'title' => 'IPv6 Net request',
'body' => 'Describe clearly the reason for your request in the field "Info".'
),
'node_editor_dnszone_request_reverse' => array(
'title' => 'Aanvraag DNS zone',
'body' => 'Omschrijf duidelijk de reden van uw aanvraag in het veld "Informatie".'
@@ -590,6 +590,10 @@
'title' => 'IP C-Class request',
'body' => 'Describe clearly the reason for your request in the field "Info".'
),
'node_editor_range_v6' => array(
'title' => 'IPv6 Net request',
'body' => 'Describe clearly the reason for your request in the field "Info".'
),
'node_editor_dnszone_request_reverse' => array(
'title' => 'DNS zone request',
'body' => 'Describe clearly the reason for your request in the field "Info".'
@@ -591,6 +591,10 @@
'title' => 'Αίτηση απόδοσης IP C-Class',
'body' => 'Περιγράψτε με σαφήνεια, στο πεδίο Πληροφορίες τον λόγο της αίτησής σας.'
),
'node_editor_range_v6' => array(
'title' => 'Αίτηση απόδοσης IPv6 Net',
'body' => 'Περιγράψτε με σαφήνεια, στο πεδίο Πληροφορίες τον λόγο της αίτησής σας.'
),
'node_editor_dnszone_request_reverse' => array(
'title' => 'Αίτηση απόδοσης ζώνης DNS',
'body' => 'Περιγράψτε με σαφήνεια στο πεδίο Πληροφορίες τον λόγο της αίτησής σας.'
View
@@ -20,7 +20,7 @@
$vars = array(
'info' => array(
'version' => array(1, 0, 0),
'version' => array(1, 1, '0-a1'),
'min_template_version' => 0
)
);
View
@@ -174,6 +174,11 @@ function output() {
$this->tpl['ranges_waiting'] = $db->cnt('', "ip_ranges", "status = 'waiting' AND delete_req = 'N'");
$this->tpl['link_ranges_req_del'] = make_ref('/hostmaster/ranges', array("form_search_ranges_search" => serialize(array("ip_ranges__delete_req" => "Y"))));
$this->tpl['ranges_req_del'] = $db->cnt('', "ip_ranges", "delete_req = 'Y'");
$this->tpl['link_ranges_v6'] = makelink(array("page" => "hostmaster", "subpage" => "ranges_v6"));
$this->tpl['link_ranges_v6_waiting'] = makelink(array("page" => "hostmaster", "subpage" => "ranges_v6", "form_search_ranges_v6_search" => serialize(array("ip_ranges_v6__status" => "waiting", "ip_ranges_v6__delete_req" => "N"))));
$this->tpl['ranges_v6_waiting'] = $db->cnt('', "ip_ranges_v6", "status = 'waiting' AND delete_req = 'N'");
$this->tpl['link_ranges_v6_req_del'] = makelink(array("page" => "hostmaster", "subpage" => "ranges_v6", "form_search_ranges_v6_search" => serialize(array("ip_ranges_v6__delete_req" => "Y"))));
$this->tpl['ranges_v6_req_del'] = $db->cnt('', "ip_ranges_v6", "delete_req = 'Y'");
}
}
@@ -35,7 +35,7 @@ function table_areas() {
global $construct, $db, $main;
$table_areas = new table(array('FORM_NAME' => 'table_areas', 'TABLE_NAME' => 'table_areas'));
$table_areas->db_data(
'areas.id, areas.name AS areas__name, areas.ip_start, areas.ip_end, areas.info, regions.name AS regions__name',
'areas.id, areas.name AS areas__name, areas.ip_start, areas.ip_end, areas.v6net, areas.v6prefix, areas.info, regions.name AS regions__name',
'areas ' .
'LEFT JOIN regions ON regions.id = areas.region_id',
"",
@@ -45,6 +45,7 @@ function table_areas() {
if (isset($table_areas->data[$i])) {
$table_areas->data[$i]['ip_start'] = long2ip($table_areas->data[$i]['ip_start']);
$table_areas->data[$i]['ip_end'] = long2ip($table_areas->data[$i]['ip_end']);
$table_areas->data[$i]['v6net'] = inet_ntop($table_areas->data[$i]['v6net']);
$table_areas->info['EDIT'][$i] = make_ref('/admin/areas', array("area" => $table_areas->data[$i]['id']));
}
}
@@ -28,12 +28,13 @@ function admin_areas_area() {
function form_area() {
global $db, $vars;
$form_area = new form(array('FORM_NAME' => 'form_area'));
$form_area->db_data('areas.id, areas.region_id, areas.name, areas.ip_start, areas.ip_end, areas.info');
$form_area->db_data('areas.id, areas.region_id, areas.name, areas.ip_start, areas.ip_end, areas.v6net, areas.v6prefix, areas.info');
$form_area->db_data_enum('areas.region_id', $db->get("id AS value, name AS output", "regions"));
$form_area->db_data_values("areas", "id", get('area'));
if (get('area') != 'add') {
$form_area->data[3]['value'] = long2ip($form_area->data[3]['value']);
$form_area->data[4]['value'] = long2ip($form_area->data[4]['value']);
$form_area->data[5]['value'] = inet_ntop($form_area->data[5]['value']);
}
$form_area->db_data_remove('areas__id');
return $form_area;
@@ -54,6 +55,7 @@ function output_onpost_form_area() {
$ret = TRUE;
$_POST['areas__ip_start'] = ip2long($_POST['areas__ip_start']);
$_POST['areas__ip_end'] = ip2long($_POST['areas__ip_end']);
$_POST['areas__v6net'] = inet_pton($_POST['areas__v6net']);
$ret = $form_area->db_set(array(),
"areas", "id", get('area'));
@@ -62,6 +64,23 @@ function output_onpost_form_area() {
} else {
$main->message->set_fromlang('error', 'generic');
}
$dat = $db->get("areas.id AS id", "areas", "areas.name = '".$_POST['areas__name']."'", "" , "name ASC LIMIT 1");
$areaid = $dat[0]['id'];
$ipv6net = inet_ntop($_POST['areas__v6net']);
$ipv6net = explode(':',$ipv6net,4);
if ($ipv6net{2} == '') { $ipv6net{2} = '0000'; }
$ipv6net{3} = '0000';
for($i=0;$i<65536;$i=$i+256) {
$ipv6net{3} = dechex($i);
$ipv6net{4} = ':';
$ipv6net2 = implode(':',$ipv6net);
$ret2 = $db->add("ipv6_node_repos", array("v6net" => inet_pton($ipv6net2), "area_id" => $areaid));
if ($ret2) {
$main->message->set_fromlang('info', 'insert_success', make_ref('/admin/areas)));
} else {
$main->message->set_fromlang('error', 'generic');
}
}
}
}
@@ -35,7 +35,7 @@ function table_regions() {
global $construct, $db, $main;
$table_regions = new table(array('FORM_NAME' => 'table_regions', 'TABLE_NAME' => 'table_regions'));
$table_regions->db_data(
'regions.id, regions.name, regions.ip_start, regions.ip_end, regions.info',
'regions.id, regions.name, regions.ip_start, regions.ip_end, regions.v6net, regions.v6prefix, regions.info',
'regions',
"",
"",
@@ -44,6 +44,7 @@ function table_regions() {
if (isset($table_regions->data[$i])) {
$table_regions->data[$i]['ip_start'] = long2ip($table_regions->data[$i]['ip_start']);
$table_regions->data[$i]['ip_end'] = long2ip($table_regions->data[$i]['ip_end']);
$table_regions->data[$i]['v6net'] = inet_ntop($table_regions->data[$i]['v6net']);
$table_regions->info['EDIT'][$i] = make_ref('/admin/regions', array("region" => $table_regions->data[$i]['id']));
}
}
@@ -28,11 +28,12 @@ function admin_regions_region() {
function form_region() {
global $db, $vars;
$form_region = new form(array('FORM_NAME' => 'form_region'));
$form_region->db_data('regions.id, regions.name, regions.ip_start, regions.ip_end, regions.info');
$form_region->db_data('regions.id, regions.name, regions.ip_start, regions.ip_end, regions.v6net, regions.v6prefix, regions.info');
$form_region->db_data_values("regions", "id", get('region'));
if (get('region') != 'add') {
$form_region->data[2]['value'] = long2ip($form_region->data[2]['value']);
$form_region->data[3]['value'] = long2ip($form_region->data[3]['value']);
$form_region->data[4]['value'] = inet_ntop($form_region->data[4]['value']);
}
$form_region->db_data_remove('regions__id');
return $form_region;
@@ -53,6 +54,7 @@ function output_onpost_form_region() {
$ret = TRUE;
$_POST['regions__ip_start'] = ip2long($_POST['regions__ip_start']);
$_POST['regions__ip_end'] = ip2long($_POST['regions__ip_end']);
$_POST['regions__v6net'] = inet_pton($_POST['regions__v6net']);
$ret = $form_region->db_set(array(),
"regions", "id", get('region'));
Oops, something went wrong.

0 comments on commit 9e2762c

Please sign in to comment.