function getUserID($ext) { global $db; if (!preg_match('/^\\d+$/', $ext)) { snom_textscreen(__('Fehler'), snom_xml_esc(__('Ungültiger Benutzername'))); } $user_id = (int) $db->executeGetOne('SELECT `_user_id` FROM `ast_sipfriends` WHERE `name`=\'' . $db->escape($ext) . '\''); if ($user_id < 1) { snom_textscreen(__('Fehler'), __('Unbekannter Benutzer')); } return $user_id; }
function snom_textscreen($title = '', $msg = '', $timeout = 0) { echo '<?', 'xml version="1.0" encoding="utf-8"?', '>', "\n"; echo '<SnomIPPhoneText>', "\n"; echo ' <Title>', $title, '</Title>', "\n"; echo ' <Text>', snom_xml_esc($msg), '</Text>', "\n"; if ($timeout > 0) { $empty_url = GS_PROV_SCHEME . '://' . GS_PROV_HOST . (GS_PROV_PORT ? ':' . GS_PROV_PORT : '') . GS_PROV_PATH . 'snom/close.xml'; echo ' <fetch mil="', $timeout * 1000, '">', $empty_url, '</fetch>', "\n"; } echo '</SnomIPPhoneText>', "\n"; return; }
function defineBackMenu() { global $user, $type, $mac, $url_snom_menu; $args = array(); $args[] = 'm=' . $mac; $args[] = 'u=' . $user; $args[] = 't=forward'; echo '<SoftKeyItem>', '<Name>#</Name>', '<URL>', $url_snom_menu, '?', implode('&', $args), '</URL>', '</SoftKeyItem>', "\n"; echo '<SoftKeyItem>', '<Name>F1</Name>', '<Label>', snom_xml_esc(__('Zurück')), '</Label>', '<URL>', $url_snom_menu, '?', implode('&', $args), '</URL>', '</SoftKeyItem>', "\n"; echo '<SoftKeyItem>', '<Name>F4</Name>', '<Label>', snom_xml_esc(__('Zurück')), '</Label>', '<URL>', $url_snom_menu, '?', implode('&', $args), '</URL>', '</SoftKeyItem>', "\n"; # Snom does not understand & ! }
function defineBackKey() { global $softkeys, $keys, $user, $type, $mac, $url_snom_features; echo '<SoftKeyItem>', '<Name>#</Name>', '<URL>', $url_snom_features, '?m=', $mac, '&u=', $user, '</URL>', '</SoftKeyItem>', "\n"; # Snom does not understand & ! echo '<SoftKeyItem>', '<Name>F4</Name>', '<Label>', snom_xml_esc(__('Zurück')), '</Label>', '<URL>', $url_snom_features, '?m=', $mac, '&u=', $user, '</URL>', '</SoftKeyItem>', "\n"; }
function defineBackKey() { global $user, $type, $mac, $url_snom_menu; $args = array(); $args[] = 'm=' . $mac; $args[] = 'u=' . $user; echo '<SoftKeyItem>', '<Name>#</Name>', '<URL>', $url_snom_menu, '?', implode('&', $args), '</URL>', '</SoftKeyItem>', "\n"; echo '<SoftKeyItem>', '<Name>F4</Name>', '<Label>', snom_xml_esc(__('Menü')), '</Label>', '<URL>', $url_snom_menu, '?', implode('&', $args), '</URL>', '</SoftKeyItem>', "\n"; }
$entry_name = 'WS: '; */ $entry_name .= $r['number']; if ($r['remote_name'] != '') { $entry_name .= ' ' . $r['remote_name']; } if (date('dm') == date('dm', (int) $r['ts'])) { $when = date('H:i', (int) $r['ts']); } else { $when = date('d.m.', (int) $r['ts']); } if (strlen($entry_name) < 1) { $entry_name = __('anonym'); } $entry_name = $when . ' ' . $entry_name; if ($num_calls > 1) { $entry_name .= ' (' . $num_calls . ')'; } echo "\n", '<DirectoryEntry>', "\n", '<Name>', snom_xml_esc($entry_name), '</Name>', "\n", '<Telephone>', snom_xml_esc($r['number']), '</Telephone>', "\n", '</DirectoryEntry>', "\n"; } echo '<SoftKeyItem>', '<Name>F2</Name>', '<Label>', snom_xml_esc(__('Löschen')), '</Label>', '<URL>', $url_snom_dl, '?user='******'&mac=', $mac, '&type=', $type, '&delete={index}</URL>', '</SoftKeyItem>', "\n"; echo "\n", '</SnomIPPhoneDirectory>'; if ($tp == 'missed') { gs_user_watchedmissed($user_id, $is_queue); } if (GS_BUTTONDAEMON_USE == true) { gs_user_missedcalls_ui($user, $is_queue); } } #################################### DIAL LOG } _ob_send();