//--------------------------------------------------------------------------- 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";
if ($user_id < 1) { snom_textscreen(__('Fehler'), __('Unbekannter Benutzer')); } 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('gs', 'prv', 'imported'), true)) { $type = false; } $db = gs_db_slave_connect(); // setup i18n stuff gs_setlang(gs_get_lang_user($db, trim($_REQUEST['u']), GS_LANG_FORMAT_GS)); gs_loadtextdomain('gemeinschaft-gui'); gs_settextdomain('gemeinschaft-gui'); /* $typeToTitle = array( 'imported' => "Firma (aus LDAP)", 'gs' => "Firma", # should normally be "Gemeinschaft" 'prv' => "Pers\xC3\xB6nlich", ); */ $tmp = array(15 => array('k' => 'gs', 'v' => gs_get_conf('GS_PB_INTERNAL_TITLE', __("Intern"))), 25 => array('k' => 'prv', 'v' => gs_get_conf('GS_PB_PRIVATE_TITLE', __("Persönlich")))); 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', __("Extern"))); } kSort($tmp);