From d767b7c5d8b80507725c20613653450cda155b8c Mon Sep 17 00:00:00 2001 From: stargazerwna Date: Sun, 25 May 2014 17:15:20 +0300 Subject: [PATCH 1/3] nodesettingschanges --- globals/language/greek.php | 25 +++++++++++++++++-- includes/pages/node_editor/node_editor.php | 22 ++++++++++++++++ .../pages/node_editor/node_editor.tpl | 7 ++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/globals/language/greek.php b/globals/language/greek.php index ad7e0cb..e0168f6 100644 --- a/globals/language/greek.php +++ b/globals/language/greek.php @@ -87,7 +87,8 @@ 'services_categories' => "Κατηγορίες υπηρεσίων", 'services_categories_add' => "Προσθήκη κατηγορίας υπηρεσίων", 'services_categories_edit' => "Επεξεργασία κατηγορίας υπηρεσίων", - + 'nodesettingschanges_add' => "Προσθήκη αλλαγής στο αρχείο καταγραφής για τον κόμβο αυτό", + 'nodesettingschanges' => "Αρχείο αλλαγών", 'user_add' => "Εγγραφή νέου χρήστη", 'user_edit' => "Προφίλ χρήστη", 'node' => "Κόμβος", @@ -380,6 +381,15 @@ 'nodes_services__protocol-udp' => 'UDP', 'nodes_services__port' => 'Πόρτα', + 'nodesettingschanges__entryid' => 'entry', + 'nodesettingschanges__nodeid' => 'nodeid', + 'nodesettingschanges__uid' => 'uid', + 'nodesettingschanges__changemenu' => 'Τομέας αλλαγής', + 'nodesettingschanges__changemade' => 'Τελευταία αλλαγή', + 'nodesettingschanges__reason' => 'Αιτιολογία τροποποίησης', + 'nodesettingschanges__comment' => 'Σχόλιο', + 'nodesettingschanges__dateline' => 'Ημερομηνία ώρα', + 'photos__date_in' => 'Ημερομηνία', 'photos__view_point' => 'Κατεύθυνση', 'photos__view_point-N' => 'Βόρεια', @@ -685,7 +695,18 @@ 'title' => 'Επεξεργασία υπηρεσίας', 'body' => 'Στη σελίδα αυτή μπορείτε να επεξεργαστείτε μία υπηρεσία του κόμβου σας. Το πεδίο Διεύθυνση IP περιέχει όλες τις διευθύνσεις που έχετε δηλώσει και πρέπει να καθορίζει την IP στην οποία τρέχει (ακούει) η υπηρεσία. Το πεδίο URL, πρέπει να περιέχει το link για την υπηρεσία ή το link για κάποια σελίδα που αναφέρεται στην υπηρεσία. Τέλος τα πεδία Πρωτόκολλο και Πόρτα, πρέπει να αναφέρονται στο πρωτόκολλο που χρησιμοποιεί η υπηρεσία (π.χ. tcp, udp) και στην πόρτα που ακούει.' ), - + 'node_editor_nodesettingschanges_add' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => 'Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), + 'node_editor_nodesettingschanges' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => '1Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), + 'nodesettingschanges' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => '2Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), 'nodes_search' => array( 'title' => 'Κόμβοι δικτύου', 'body' => 'Στη σελίδα αυτή μπορείτε να αναζητήσετε κόμβους του δικτύου με βάση τα πεδία που προσφέρονται. Τα αποτελέσματα εμφανίζονται στον παρακάτω πίνακα. Επίσης, μπορείτε να διαλέξετε κάποιον κόμβο για προβολή των στοιχείων του.' diff --git a/includes/pages/node_editor/node_editor.php b/includes/pages/node_editor/node_editor.php index 13dc3a8..27fc0fd 100644 --- a/includes/pages/node_editor/node_editor.php +++ b/includes/pages/node_editor/node_editor.php @@ -313,6 +313,28 @@ function table_services() { return $table_services; } + function table_nodesettingschanges() { + global $construct, $db, $main; + $table_nodesettingschanges = new table(array('TABLE_NAME' => 'table_nodesettingschanges', 'FORM_NAME' => 'table_nodesettingschanges')); + $table_nodesettingschanges->db_data( + 'nodesettingschanges.changemenu, nodesettingschanges.changemade, nodesettingschanges.reason, nodesettingschanges.comment, nodesettingschanges.dateline, users.username', + 'nodesettingschanges + INNER JOIN users on nodesettingschanges.uid = users.id', + "nodesettingschanges.nodeid = '".get('node')."'", + '', + "nodesettingschanges.entryid DESC"); + + for($i=1;$idata);$i++) { + if (isset($table_nodesettingschanges->data[$i])) { + #$table_actionlog->data[$i]['ip_start'] = long2ip($table_actionlog->data[$i]['ip_start']); + #$table_actionlog->data[$i]['ip_end'] = long2ip($table_actionlog->data[$i]['ip_end']); + #$table_actionlog->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "actionlog", "area" => $table_actionlog->data[$i]['id'])); + } + } + + return $table_nodesettingschanges; + } + function table_photosview() { global $db, $vars; $table_photosview = new table(array('TABLE_NAME' => 'table_photosview', 'FORM_NAME' => 'table_photosview')); diff --git a/templates/basic/includes/pages/node_editor/node_editor.tpl b/templates/basic/includes/pages/node_editor/node_editor.tpl index 1046c58..27c677a 100644 --- a/templates/basic/includes/pages/node_editor/node_editor.tpl +++ b/templates/basic/includes/pages/node_editor/node_editor.tpl @@ -37,6 +37,7 @@
  • {$lang.network}
  • {$lang.services}
  • {$lang.myview}
  • +
  • {$lang.nodesettingschanges}
  • {/if} @@ -96,6 +97,12 @@
    {include file=generic/section-level3.tpl title="`$lang.myview`" content=$table_photosview}
    +
    + {include assign="t1" file="generic/button.tpl" link=$link_nodesettingschanges_add content="`$lang.nodesettingschanges_add`" + class="btn-success btn-sm" glyph="plus-sign"} + {include file=generic/section-level3.tpl title="`$lang.nodesettingschanges`" content=$table_nodesettingschanges} +
    + {/if} From 6a5768d6ee215d21c56c7f90cbde569c0a20b7f7 Mon Sep 17 00:00:00 2001 From: stargazerwna Date: Sun, 25 May 2014 17:15:20 +0300 Subject: [PATCH 2/3] fixes --- globals/language/greek.php | 25 +++++- includes/pages/node_editor/node_editor.php | 23 ++++++ .../node_editor_nodesettingschanges.php | 80 +++++++++++++++++++ .../pages/node_editor/node_editor.tpl | 7 ++ .../node_editor_nodesettingschanges.tpl | 25 ++++++ ...ttingschanges_form_nodesettingschanges.tpl | 79 ++++++++++++++++++ .../pages/nodechangeslog/nodechangeslog.tpl | 30 +++++++ 7 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 includes/pages/node_editor/node_editor_nodesettingschanges.php create mode 100644 templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges.tpl create mode 100644 templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges_form_nodesettingschanges.tpl create mode 100644 templates/basic/includes/pages/nodechangeslog/nodechangeslog.tpl diff --git a/globals/language/greek.php b/globals/language/greek.php index ad7e0cb..e0168f6 100644 --- a/globals/language/greek.php +++ b/globals/language/greek.php @@ -87,7 +87,8 @@ 'services_categories' => "Κατηγορίες υπηρεσίων", 'services_categories_add' => "Προσθήκη κατηγορίας υπηρεσίων", 'services_categories_edit' => "Επεξεργασία κατηγορίας υπηρεσίων", - + 'nodesettingschanges_add' => "Προσθήκη αλλαγής στο αρχείο καταγραφής για τον κόμβο αυτό", + 'nodesettingschanges' => "Αρχείο αλλαγών", 'user_add' => "Εγγραφή νέου χρήστη", 'user_edit' => "Προφίλ χρήστη", 'node' => "Κόμβος", @@ -380,6 +381,15 @@ 'nodes_services__protocol-udp' => 'UDP', 'nodes_services__port' => 'Πόρτα', + 'nodesettingschanges__entryid' => 'entry', + 'nodesettingschanges__nodeid' => 'nodeid', + 'nodesettingschanges__uid' => 'uid', + 'nodesettingschanges__changemenu' => 'Τομέας αλλαγής', + 'nodesettingschanges__changemade' => 'Τελευταία αλλαγή', + 'nodesettingschanges__reason' => 'Αιτιολογία τροποποίησης', + 'nodesettingschanges__comment' => 'Σχόλιο', + 'nodesettingschanges__dateline' => 'Ημερομηνία ώρα', + 'photos__date_in' => 'Ημερομηνία', 'photos__view_point' => 'Κατεύθυνση', 'photos__view_point-N' => 'Βόρεια', @@ -685,7 +695,18 @@ 'title' => 'Επεξεργασία υπηρεσίας', 'body' => 'Στη σελίδα αυτή μπορείτε να επεξεργαστείτε μία υπηρεσία του κόμβου σας. Το πεδίο Διεύθυνση IP περιέχει όλες τις διευθύνσεις που έχετε δηλώσει και πρέπει να καθορίζει την IP στην οποία τρέχει (ακούει) η υπηρεσία. Το πεδίο URL, πρέπει να περιέχει το link για την υπηρεσία ή το link για κάποια σελίδα που αναφέρεται στην υπηρεσία. Τέλος τα πεδία Πρωτόκολλο και Πόρτα, πρέπει να αναφέρονται στο πρωτόκολλο που χρησιμοποιεί η υπηρεσία (π.χ. tcp, udp) και στην πόρτα που ακούει.' ), - + 'node_editor_nodesettingschanges_add' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => 'Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), + 'node_editor_nodesettingschanges' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => '1Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), + 'nodesettingschanges' => array( + 'title' => 'Προσθήκη αλλαγής στο αρχείο καταγραφής', + 'body' => '2Στη σελίδα αυτή μπορείτε να προσθέσετε μία αλλαγή που κάνατε στις ρυθμίσεις του κόμβου αυτό. Οι συνδιαχειριστές σας πρέπει να είναι ενήμεροι για τις αλλαγές που γίνονται.' + ), 'nodes_search' => array( 'title' => 'Κόμβοι δικτύου', 'body' => 'Στη σελίδα αυτή μπορείτε να αναζητήσετε κόμβους του δικτύου με βάση τα πεδία που προσφέρονται. Τα αποτελέσματα εμφανίζονται στον παρακάτω πίνακα. Επίσης, μπορείτε να διαλέξετε κάποιον κόμβο για προβολή των στοιχείων του.' diff --git a/includes/pages/node_editor/node_editor.php b/includes/pages/node_editor/node_editor.php index 13dc3a8..d2440f2 100644 --- a/includes/pages/node_editor/node_editor.php +++ b/includes/pages/node_editor/node_editor.php @@ -313,6 +313,28 @@ function table_services() { return $table_services; } + function table_nodesettingschanges() { + global $construct, $db, $main; + $table_nodesettingschanges = new table(array('TABLE_NAME' => 'table_nodesettingschanges', 'FORM_NAME' => 'table_nodesettingschanges')); + $table_nodesettingschanges->db_data( + 'nodesettingschanges.changemenu, nodesettingschanges.changemade, nodesettingschanges.reason, nodesettingschanges.comment, nodesettingschanges.dateline, users.username', + 'nodesettingschanges + INNER JOIN users on nodesettingschanges.uid = users.id', + "nodesettingschanges.nodeid = '".get('node')."'", + '', + "nodesettingschanges.entryid DESC"); + + for($i=1;$idata);$i++) { + if (isset($table_nodesettingschanges->data[$i])) { + #$table_actionlog->data[$i]['ip_start'] = long2ip($table_actionlog->data[$i]['ip_start']); + #$table_actionlog->data[$i]['ip_end'] = long2ip($table_actionlog->data[$i]['ip_end']); + #$table_actionlog->info['EDIT'][$i] = makelink(array("page" => "admin", "subpage" => "actionlog", "area" => $table_actionlog->data[$i]['id'])); + } + } + + return $table_nodesettingschanges; + } + function table_photosview() { global $db, $vars; $table_photosview = new table(array('TABLE_NAME' => 'table_photosview', 'FORM_NAME' => 'table_photosview')); @@ -407,6 +429,7 @@ function output() { $this->tpl['table_subnets'] = $construct->table($this->table_subnets(), __FILE__); $this->tpl['table_ipaddr'] = $construct->table($this->table_ipaddr(), __FILE__); $this->tpl['table_services'] = $construct->table($this->table_services(), __FILE__); + $this->tpl['table_nodesettingschanges'] = $construct->table($this->table_nodesettingschanges(), __FILE__); $this->tpl['table_photosview'] = $construct->table($this->table_photosview(), __FILE__); if ($this->has_owner_access()) $this->tpl['link_node_delete'] = self_ref(array('action' => 'delete')); diff --git a/includes/pages/node_editor/node_editor_nodesettingschanges.php b/includes/pages/node_editor/node_editor_nodesettingschanges.php new file mode 100644 index 0000000..2f70cdd --- /dev/null +++ b/includes/pages/node_editor/node_editor_nodesettingschanges.php @@ -0,0 +1,80 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 dated June, 1991. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +class node_editor_nodesettingschanges { + + var $tpl; + + function __construct() { + + } + + function node_editor_nodesettingschanges() { + + } + + function form_nodesettingschanges() { + global $main, $db, $vars, $lang; + $form_nodesettingschanges = new form(array('FORM_NAME' => 'form_nodesettingschanges')); + + $form_nodesettingschanges->db_data('nodesettingschanges.uid, nodesettingschanges.nodeid, nodesettingschanges.dateline, + nodesettingschanges.changemade, nodesettingschanges.changemenu, nodesettingschanges.reason, nodesettingschanges.comment'); + $form_nodesettingschanges->data[1]['value']= intval(get('node')); + $uid=$main->userdata->user; + $form_nodesettingschanges->data[0]['value']= $uid; + $form_nodesettingschanges->data[2]['value']= date("Y-m-d H:i:s"); + + return $form_nodesettingschanges; + } + +function output() { + if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_'.$_POST['form_name'])) return call_user_func(array($this, 'output_onpost_'.$_POST['form_name'])); + global $construct; + $this->tpl['nodesettingschanges_method'] = (get('nodesettingschange') == 'add' ? 'add' : 'edit' ); + $this->tpl['form_nodesettingschanges'] = $construct->form($this->form_nodesettingschanges(), __FILE__); + return template($this->tpl, __FILE__); + } + + function output_onpost_form_nodesettingschanges() { + global $construct, $main, $db; + $form_nodesettingschanges = $this->form_nodesettingschanges(); + #$nameserver = get('nameserver'); + #if (get('nameserver') == 'add') { + # $_POST['dns_nameservers__ip'] = ip2long($_POST['dns_nameservers__ip']); + #} + $f['node_id'] = intval(get('node')); + $ret = TRUE; + $ret = $form_nodesettingschanges->db_set(array(), + "nodesettingschanges", "entryid", $nodesettingschanges); + #$ret = $form_nameserver->db_set($f, + # "dns_nameservers", "id", $nameserver); + + if ($ret) { + $main->message->set_fromlang('info', 'insert_success', makelink(array("page" => "mynodes", "node" => get('node')))); + log_admin_action($nodes,"#nodesetttingschange#".get('node'),get('entryid'), "nodesetttingschanges", "insert_success");#@# + } else { + $main->message->set_fromlang('error', 'generic'); + } + } + +} + +?> \ No newline at end of file diff --git a/templates/basic/includes/pages/node_editor/node_editor.tpl b/templates/basic/includes/pages/node_editor/node_editor.tpl index 1046c58..49a921d 100644 --- a/templates/basic/includes/pages/node_editor/node_editor.tpl +++ b/templates/basic/includes/pages/node_editor/node_editor.tpl @@ -37,6 +37,7 @@
  • {$lang.network}
  • {$lang.services}
  • {$lang.myview}
  • +
  • {$lang.nodesettingschanges}
  • {/if} @@ -96,6 +97,12 @@
    {include file=generic/section-level3.tpl title="`$lang.myview`" content=$table_photosview}
    +
    + {include assign="btn_add" file="generic/button.tpl" href=$link_nodesettingschanges_add content="`$lang.nodesettingschanges_add`" + class="btn-success btn-sm" glyph="plus-sign"} + {include file=generic/section-level3.tpl title="`$lang.nodesettingschanges`" buttons="`$btn_add`" content=$table_nodesettingschanges} +
    + {/if} diff --git a/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges.tpl b/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges.tpl new file mode 100644 index 0000000..fe42d6c --- /dev/null +++ b/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges.tpl @@ -0,0 +1,25 @@ +{* + * WiND - Wireless Nodes Database + * Basic HTML Template + * + * Copyright (C) 2005 Konstantinos Papadimitriou + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 dated June, 1991. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *} + +{include assign=help file=generic/help.tpl help="node_editor_nodesettingschanges_`$nodesettingschanges_method`"} +{assign var=t value="nodesettingschanges_`$nodesettingschanges_method`"} +{include file=generic/page-title.tpl title="`$lang.$t`" right="$help"} +{$form_nodesettingschanges} diff --git a/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges_form_nodesettingschanges.tpl b/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges_form_nodesettingschanges.tpl new file mode 100644 index 0000000..9a10d81 --- /dev/null +++ b/templates/basic/includes/pages/node_editor/node_editor_nodesettingschanges_form_nodesettingschanges.tpl @@ -0,0 +1,79 @@ +{* + * WiND - Wireless Nodes Database + * Basic HTML Template + * + * Copyright (C) 2005 Konstantinos Papadimitriou + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 dated June, 1991. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *} +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang.db[$data.3.fullField]}{if $data[3].Null != 'YES'}*{/if}:
    {$lang.db[$data.4.fullField]}{if $data[4].Null != 'YES'}*{/if}: + +
    {$lang.db[$data.5.fullField]}{if $data[5].Null != 'YES'}*{/if}: + +
    {$lang.db[$data.6.fullField]}{if $data[6].Null != 'YES'}*{/if}:
    +
    \ No newline at end of file diff --git a/templates/basic/includes/pages/nodechangeslog/nodechangeslog.tpl b/templates/basic/includes/pages/nodechangeslog/nodechangeslog.tpl new file mode 100644 index 0000000..332ea5e --- /dev/null +++ b/templates/basic/includes/pages/nodechangeslog/nodechangeslog.tpl @@ -0,0 +1,30 @@ +{* + * WiND - Wireless Nodes Database + * Basic HTML Template + * + * Copyright (C) 2005 Konstantinos Papadimitriou + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 dated June, 1991. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *} +{include file=generic/page-title.tpl title="`$lang.admin_panel` > `$lang.nodechangeslog`"} + + + + + +
    + +{include file=generic/title2.tpl title="`$lang.nodechangeslog`" content=$table_nodechangeslog} +
    \ No newline at end of file From db0a681f599ec72881b894fe193e134a9f43b764 Mon Sep 17 00:00:00 2001 From: stargazerwna Date: Sun, 25 May 2014 18:33:27 +0300 Subject: [PATCH 3/3] added new schema --- .../node_editor_nodesettingschanges.php | 9 ++++----- install/schema.sql | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/includes/pages/node_editor/node_editor_nodesettingschanges.php b/includes/pages/node_editor/node_editor_nodesettingschanges.php index 81eb645..986a0d5 100644 --- a/includes/pages/node_editor/node_editor_nodesettingschanges.php +++ b/includes/pages/node_editor/node_editor_nodesettingschanges.php @@ -19,14 +19,14 @@ * */ -class mynodes_nodesettingschanges { +class node_editor_nodesettingschanges { var $tpl; function __construct() { } - function mynodes_nodesettingschanges() { + function node_editor_nodesettingschanges() { } @@ -44,7 +44,7 @@ function form_nodesettingschanges() { return $form_nodesettingschanges; } -function output() { + function output() { if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_'.$_POST['form_name'])) return call_user_func(array($this, 'output_onpost_'.$_POST['form_name'])); global $construct; $this->tpl['nodesettingschanges_method'] = (get('nodesettingschange') == 'add' ? 'add' : 'edit' ); @@ -67,8 +67,7 @@ function output_onpost_form_nodesettingschanges() { # "dns_nameservers", "id", $nameserver); if ($ret) { - #$main->message->set_fromlang('info', 'insert_success', makelink(array("page" => "node_editor", "node" => get('node')))); - $main->message->set_fromlang('info', 'insert_success', make_ref('/node_editor', array("node" => $_POST['nodes_nodesettingschanges__node_id']))); + $main->message->set_fromlang('info', 'insert_success', make_ref('/node_editor', array("node" => $_POST['nodes_nodesetttingschanges__node_id']))); #log_admin_action($nodes,"#nodesetttingschange#".get('node'),get('entryid'), "nodesetttingschanges", "insert_success");#@# } else { $main->message->set_fromlang('error', 'generic'); diff --git a/install/schema.sql b/install/schema.sql index 8a88fe6..c57a974 100644 --- a/install/schema.sql +++ b/install/schema.sql @@ -295,3 +295,18 @@ CREATE TABLE IF NOT EXISTS `users_nodes` ( UNIQUE KEY `unique_keys` (`node_id`,`user_id`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `nodesettingschanges` ( + `entryid` int(10) NOT NULL AUTO_INCREMENT, + `nodeid` int(10) NOT NULL DEFAULT '0', + `uid` int(10) NOT NULL, + `dateline` varchar(30) DEFAULT NULL, + `changemade` text NOT NULL, + `changemenu` enum('routerOS version upgrade/downgrade','groups','users','other','script','ip firewall other','ip firewall nat','ip firewall filter','wireless','snmp','radius','partitions','ipv6','ppp','INTERFACE','driver','led','user','system','special-login','routing','queue','port','mpls','log','ip','file','HARDWARE','certificate') NOT NULL, + `reason` enum('other','bug fix','critical-problem','imporovement','termination') NOT NULL, + `comment` text, + PRIMARY KEY (`entryid`,`nodeid`), + KEY `uid` (`uid`), + KEY `changemenu` (`changemenu`), + FULLTEXT KEY `changemade` (`changemade`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8;