$canonize_area_code = @$_REQUEST['canonize_area_code']; $canonize_area_code = preg_replace('/[^0-9*#]/', '', $canonize_area_code); gs_keyval_set('canonize_area_code', $canonize_area_code); $canonize_local_branch = @$_REQUEST['canonize_local_branch']; $canonize_local_branch = preg_replace('/[^0-9*#]/', '', $canonize_local_branch); gs_keyval_set('canonize_local_branch', $canonize_local_branch); $canonize_special = @$_REQUEST['canonize_special']; $canonize_special = trim($canonize_special); if (is_valid_pcre('/' . $canonize_special . '/')) { gs_keyval_set('canonize_special', $canonize_special); } else { echo '<b>', 'Invalid pattern!', '</b><br />', "\n"; } $canonize_cbc_prefix = @$_REQUEST['canonize_cbc_prefix']; $canonize_cbc_prefix = preg_replace('/[^0-9*#]/', '', $canonize_cbc_prefix); gs_keyval_set('canonize_cbc_prefix', $canonize_cbc_prefix); } ?> <p class="text"><?php echo __('Festlegung der vom Standort abhängigen Rufnummernteile, die sich auf die Kanonisierung auswirken. Bitte halten Sie sich an die angegebenen Beispiele!'); ?> </p> <form method="post" action="<?php echo GS_URL_PATH; ?> "> <?php echo gs_form_hidden($SECTION, $MODULE); ?> <input type="hidden" name="action" value="save" />
* as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * 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 Street, Fifth Floor, Boston, * MA 02110-1301, USA. \*******************************************************************/ defined('GS_VALID') or die('No direct access.'); if (trim(gs_keyval_get('setup_show')) === 'autoshow') { gs_keyval_set('setup_show', 'password'); } ?> <div style="width:550px; border:1px solid #ccc; margin: 2em auto; padding:0 1em 1em 1em; background-color:#eee;"> <h1><?php echo __('Fertig'); ?> </h1> <p> <?php switch ($GS_INSTALLATION_TYPE) { case 'gpbx': echo __('Die grundlegende Netzwerk-Konfiguration der GPBX ist jetzt abgeschlossen. Bitte nehmen Sie die weiteren Einstellungen im Administrator-Bereich der normalen Web-Oberfläche vor. Natürlich können Sie auch später wieder das Setup aufrufen.'); break; default:
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. \*******************************************************************/ defined('GS_VALID') or die('No direct access.'); $can_continue = @$_SESSION['login_ok']; $action = @$_REQUEST['action']; $change_pwd_ok = false; $change_pwd_msg = ''; if ($action === 'setpwd') { $newpwd = trim(@$_REQUEST['change_login_pwd1']); if ($newpwd !== trim(@$_REQUEST['change_login_pwd2'])) { $change_pwd_msg = __('Die Paßwörter stimmen nicht überein!'); } elseif ($newpwd === '') { $change_pwd_msg = __('Das Paßwort darf nicht leer sein!'); } else { gs_keyval_set('setup_pwd', $newpwd); $keyval_setup_pwd = $newpwd; $change_pwd_msg = __('Das Paßwort wurde gespeichert.'); $change_pwd_ok = true; } } ?> <br /> <br /> <div style="width:550px; border:1px solid #ccc; margin: 2em auto; padding:0 1em 1em 1em; background-color:#eee;"> <?php ##################################################################### # login {
<?php } } ?> </div> <?php if ($action === 'save2') { if ($save2_action === 'reboot' || $save2_action === 'shutdown') { # nach dem Aendern der Netzwerkeinstellungen muss Asterisk neu # gestartet werden //@exec( 'sudo /opt/gemeinschaft/sbin/start-asterisk 1>>/dev/null 2>>/dev/null' ); # vorher muss das evtl. geanderte Netzwerk-Interface (eth0) # per ifup --force eth0 geupdated werden gs_keyval_set('setup_net_has_changes', 'no'); if (@file_exists('/usr/sbin/gs-pre-shutdown')) { $err = 0; $out = array(); @exec('sudo /usr/sbin/gs-pre-shutdown 2>>/dev/null', $out, $err); } if ($save2_action === 'reboot') { $cmd = '/sbin/shutdown -r now'; } elseif ($save2_action === 'shutdown') { $cmd = '/sbin/shutdown -h -P now'; } //@exec( 'sudo sh -c \'sleep 2; /opt/gemeinschaft/sbin/gpbx-pre-shutdown 1>>/dev/null 2>>/dev/null; '. $cmd .' 1>>/dev/null 2>>/dev/null &\' 0<&- 1>&- 2>&- &' ); @exec('sudo sh -c \'sleep 2; ' . $cmd . ' 1>>/dev/null 2>>/dev/null &\' 0<&- 1>&- 2>&- &'); } } ?>
$ports_protocols[$port] = 'ptmp'; break; } } foreach ($ports_protocols as $port => $protocol) { if ($protocol === 'ptp') { $cards_bri_1_ports_te_ptp[] = $port; } if ($protocol === 'ptmp') { $cards_bri_1_ports_te_ptmp[] = $port; } } $cards_bri_1_ports_te_ptp = implode(',', $cards_bri_1_ports_te_ptp); $cards_bri_1_ports_te_ptmp = implode(',', $cards_bri_1_ports_te_ptmp); gs_keyval_set('cards_bri_1_ports_te_ptp', $cards_bri_1_ports_te_ptp); gs_keyval_set('cards_bri_1_ports_te_ptmp', $cards_bri_1_ports_te_ptmp); # write /etc/misdn-init.conf if (@file_exists('/usr/local/bin/gpbx-cards-conf') && @is_executable('/usr/local/bin/gpbx-cards-conf')) { @exec('sudo /usr/local/bin/gpbx-cards-conf conf 1>>/dev/null 2>>/dev/null'); } # restart mISDN: @exec('sudo /etc/init.d/misdn-init restart 1>>/dev/null 2>>/dev/null'); # reload Asterisk: @exec('sudo /opt/gemeinschaft/sbin/start-asterisk 1>>/dev/null 2>>/dev/null'); } ?> <form method="post" action="<?php echo GS_URL_PATH; ?> ">