if (!in_array($action, array('', 'edit', 'save', 'del'), true)) { $action = ''; } echo '<h2>'; if (@$MODULES[$SECTION]['icon']) { echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> '; } if (count($MODULES[$SECTION]['sub']) > 1) { echo $MODULES[$SECTION]['title'], ' - '; } echo $MODULES[$SECTION]['sub'][$MODULE]['title']; echo '</h2>', "\n"; echo '<script type="text/javascript"> //<![CDATA[ function confirm_delete() { return confirm(', utf8_json_quote(__("Wirklich löschen?")), '); } //]]> </script>', "\n"; ##################################################################### if ($action === 'save') { $gwid = (int) @$_REQUEST['gw-id']; if ($gwid < 1) { $DB->execute('INSERT INTO `gates` ( `id`, `grp_id`, `type`, `name`, `title`, `allow_out`, `dialstr`,
if (@$MODULES[$SECTION]['icon']) { echo '<img alt=" " src="', GS_URL_PATH, str_replace('%s', '32', $MODULES[$SECTION]['icon']), '" /> '; } if (count($MODULES[$SECTION]['sub']) > 1) { echo $MODULES[$SECTION]['title'], ' - '; } echo $MODULES[$SECTION]['sub'][$MODULE]['title']; echo '</h2>', "\n"; ?> <script type="text/javascript"> //<![CDATA[ function confirm_delete() { return confirm(<?php echo utf8_json_quote(__("Wirklich löschen?")); ?> ); } function updateElement( fieldID, fieldValue ) { document.getElementById(fieldID).value = fieldValue; } function updateDialstr( fieldID, fieldValue ) { dialString = ''; <?php foreach ($default_dialstrs as $dialstr_key => $dialstr) { echo "\t", 'if (fieldValue == \'', $dialstr_key, '\') dialString = \'', $dialstr, '\'', "\n"; } ?>
//--- output title echo "<h2>"; if (@$MODULES[$SECTION]["icon"]) { echo "<img alt=\" \" src=\"" . GS_URL_PATH . str_replace("%s", "32", $MODULES[$SECTION]["icon"]) . "\" /> "; } if (count($MODULES[$SECTION]["sub"]) > 1) { echo $MODULES[$SECTION]["title"] . " - "; } echo $MODULES[$SECTION]["sub"][$MODULE]["title"]; echo "</h2>\n"; //--- include some javascript stuff echo "<script type=\"text/javascript\" src=\"" . GS_URL_PATH . "js/arrnav.js\"></script>\n"; echo "<script type=\"text/javascript\">\n"; echo "//<![CDATA[\n"; echo "function confirm_delete() {\n"; echo "\treturn confirm(" . utf8_json_quote(__("Wirklich löschen?")) . ");\n"; echo "}\n"; echo "//]]>\n"; echo "</script>\n"; //--- get browser get/post stuff $per_page = (int) GS_GUI_NUM_RESULTS; $page = (int) @$_REQUEST['page']; $save = (int) trim(@$_REQUEST['save']); $edit = (int) trim(@$_REQUEST['edit']); $description = trim(@$_REQUEST['description']); $delete = (int) trim(@$_REQUEST['delete']); $newaction = trim(@$_REQUEST['newaction']); $phonenum = (int) trim(@$_REQUEST['phonenum']); $playback = (int) trim(@$_REQUEST['playback']); $audio_exts = array('aif', 'aiff', 'wav', 'au', 'al', 'alaw', 'la', 'ul', 'ulaw', 'lu', 'gsm', 'cdr', 'mp3', 'ogg'); $errormsgs = array();
<script type="text/javascript"> //<![CDATA[ <?php echo 'var gs_keys_inherited = {'; $i=0; foreach ($softkeys as $keyname => $keydefs) { if (array_key_exists('inh', $keydefs)) { $inh = $keydefs['inh']; # inherited if ($inh['function'] != '') { if ($i===0) ++$i; else echo ','; echo "\n",'"',$keyname,'":{'; echo '"f":' , utf8_json_quote($inh['function']); echo ',"d":' , utf8_json_quote($inh['data']); echo ',"l":' , utf8_json_quote($inh['label']); echo ',"uw":', (int)($inh['user_writeable']); echo '}'; } } } echo "\n};\n"; ?> function gs_key_fn( el ) { try { var kname = el.name.split('-')[1]; if (kname === undefined || kname === null || kname === '') return; var inh = null; if (typeof(gs_keys_inherited) !== 'undefined') inh = gs_keys_inherited[kname] || null;
include_once GS_DIR . 'inc/gs-fns/gs_ldap_user_search.php'; $user_info = gs_ldap_user_search($user); if (isGsError($user_info)) { _server_error($user_info->getMsg()); } if (!is_array($user_info)) { _server_error('Failed to look up user "' . $user . '" in LDAP.'); } require_once GS_DIR . 'lib/utf8-normalize/gs_utf_normal.php'; @header('Content-Type: application/json'); # RFC 4627 ob_start(); echo "{\n"; $i = 0; foreach ($user_info as $k => $v) { if ($i > 0) { echo ",\n"; } echo '"', $k, '": '; if ($v === null) { echo 'null'; } else { echo utf8_json_quote($v); } ++$i; } echo "\n}\n"; if (!headers_sent()) { header('Content-Length: ' . @ob_get_length()); } @ob_end_flush();