if (!gs_get_conf('GS_POLYCOM_PROV_ENABLED')) { gs_log(GS_LOG_DEBUG, 'Polycom provisioning not enabled'); _err('Not enabled.'); } $type = trim(@$_REQUEST['t']); if (!in_array($type, array('forward'), true)) { $type = false; } $user = trim(@$_REQUEST['u']); if (!preg_match('/^\\d+$/', $user)) { _err('Not a valid SIP user.'); } $db = gs_db_slave_connect(); // setup i18n stuff gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS)); gs_loadtextdomain('gemeinschaft-gui'); gs_settextdomain('gemeinschaft-gui'); $url_polycom_provdir = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT ? ':' . GS_PROV_PORT : '') . GS_PROV_PATH . 'polycom/'; $url_polycom_menu = $url_polycom_provdir . 'configmenu.php'; #################################### INITIAL SCREEN { if (!$type) { $mac = preg_replace('/[^\\dA-Z]/', '', strtoupper(trim(@$_REQUEST['m']))); $user = trim(@$_REQUEST['u']); ob_start(); echo $phonemenu_doctype . "\n"; echo '<html>', "\n"; echo "<head><title>" . htmlEnt(__("Konfigurationsmenü")) . "</title></head>\n"; echo '<body><br />', "\n"; echo '- <a href="' . $url_polycom_menu . '?m=' . $mac . '&u=' . $user . '&t=forward">' . htmlEnt(__("Rufumleitung")) . '</a><br />', "\n"; echo '- <a href="' . $url_polycom_provdir . 'features.php?m=' . $mac . '&u=' . $user . '&t=forward">' . htmlEnt(__("Dienstmerkmale")) . '</a><br />', "\n"; // echo '- <a href="'. $url_polycom_provdir .'rt.php?m='. $mac .'&u='. $user .'&t=forward">'. __("Klingelt\xC3\xB6ne") .'</a><br />',"\n";
return $user_id; } if (!gs_get_conf('GS_SNOM_PROV_ENABLED')) { gs_log(GS_LOG_DEBUG, "Snom provisioning not enabled"); snom_textscreen(__('Fehler'), __('Nicht aktiviert')); } $type = trim(@$_REQUEST['t']); if (!in_array($type, array(), true)) { $type = false; } $db = gs_db_slave_connect(); $user = trim(@$_REQUEST['u']); $user_id = getUserID($user); // setup i18n stuff gs_setlang(gs_get_lang_user($db, $user, GS_LANG_FORMAT_GS)); gs_loadtextdomain("gemeinschaft-gui"); gs_settextdomain("gemeinschaft-gui"); $tmp = array(); if (gs_get_conf('GS_PB_IMPORTED_ENABLED')) { $pos = (int) gs_get_conf('GS_PB_IMPORTED_ORDER', 9) * 10; $tmp[$pos] = array('k' => 'imported', 'v' => gs_get_conf('GS_PB_IMPORTED_TITLE', __("Importiert"))); } kSort($tmp); foreach ($tmp as $arr) { $typeToTitle[$arr['k']] = $arr['v']; } $url_snom_extnumbers = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT == 80 ? '' : ':' . GS_PROV_PORT) . GS_PROV_PATH . 'snom/extnumbers.php'; $url_snom_menu = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT ? ':' . GS_PROV_PORT : '') . GS_PROV_PATH . 'snom/menu.php'; #################################### INITIAL SCREEN { if (!$type) { $mac = preg_replace('/[^\\dA-Z]/', '', strToUpper(trim(@$_REQUEST['m'])));