function _err($msg = '') { @ob_end_clean(); ob_start(); echo '<?', 'xml version="1.0" encoding="utf-8"?', '>', "\n", '<TiptelIPPhoneTextScreen>', "\n", '<Title>', __('Fehler'), '</Title>', "\n", '<Text>', tiptelXmlEsc(__('Fehler') . ': ' . $msg), '</Text>', "\n", '</TiptelIPPhoneTextScreen>', "\n"; _ob_send(); }
ob_start(); echo '<?','xml version="1.0" encoding="utf-8"?','>' ,"\n"; echo '<TiptelIPPhoneDirectory>' ,"\n"; echo '<Title>'. tiptelXmlEsc($pb['title']) .'</Title>', "\n"; $rs = $db->execute( $pb['query'] ); if ( $rs && $rs->numRows() !== 0 ) { while ($r = $rs->fetchRow()) { $lastname = $r['ln']; $firstname = $r['fn']; $number = $r['ext']; echo '<DirectoryEntry>' ,"\n"; echo '<Name>'. tiptelXmlEsc($lastname) .', '. tiptelXmlEsc($firstname) .' ('. tiptelXmlEsc($number) .')</Name>', "\n"; echo '<Telephone>'. tiptelXmlEsc($number) .'</Telephone>', "\n"; echo '</DirectoryEntry>' ,"\n"; } } echo '</TiptelIPPhoneDirectory>' ,"\n"; if (! headers_sent()) { header( 'Content-Type: application/xml' ); header( 'Content-Length: '. (int)@ob_get_length() ); } @ob_end_flush(); ?>