$size = Aastra_size_display_line(); if (strlen($flash_text) > $size) { $temp = wordwrap($flash_text, $size, "\n", True); $lines = explode("\n", $temp); } else { $lines[0] = $flash_text; } $nb_lines = count($lines); if ($nb_lines == 1) { $object->addLine(''); $object->addLine(''); $object->addLine($lines[0], 'double', 'center'); } else { if ($nb_lines < 4) { $object->addLine(''); } foreach ($lines as $value) { $object->addLine($value, NULL, 'center'); } } # Softkeys $object->setRefresh(2, $flash_next); $object->addSoftkey('6', '', $flash_next); break; } # Output XML object $object->output(); exit; ?>
function display_message($title, $message, $backURL = NULL) { global $LANGUAGE; # Depending on phone type if (Aastra_phone_type() != 5) { # non 6739i require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setTitle($title); $object->setText($message); $object->addSoftkey('5', Aastra_get_label('Back', $LANGUAGE), $backURL); $object->addSoftkey('6', Aastra_get_label('Exit', $LANGUAGE), 'SoftKey:Exit'); } else { # 6739i/8000i require_once 'AastraIPPhoneFormattedTextScreen.class.php'; $object = new AastraIPPhoneFormattedTextScreen(); $object->addLine('', 'double', 'center'); $object->addLine($title, 'double', 'center', 'red'); $object->setScrollStart('3'); $object->addLine(''); $object->addLine(''); $object->addLine($message, NULL, 'center'); $object->setScrollEnd(); $object->addLine('', NULL, 'center'); $object->addSoftkey('9', Aastra_get_label('Back', $LANGUAGE), $backURL, 1); $object->addSoftkey('10', Aastra_get_label('Exit', $LANGUAGE), 'SoftKey:Exit', 2); $object->addIcon(1, 'Icon:ArrowLeft'); $object->addIcon(2, 'Icon:CircleRed'); } # Common parameters $object->setDestroyOnExit(); $object->setCancelAction($backURL); $object->output(); exit; }
$text->setTitle('Error'); $text->setText('No Matches Found!'); $text->setDestroyOnExit(); $text->setRefresh('3',$XML_SERVER_PATH.'contactdir.php?user='******'&searchmethod='.$searchmethod.'&searchterm='.$search); $text->addSoftKey('6','','SoftKey:Exit'); //hide default buttons $text->output(); */ $screen->setdestroyOnExit(); $screen->setBeep(); $screen->addLine(''); $screen->addLine(''); $screen->addLine(''); $screen->addLine('No Matches Found!', 'double', 'center'); $screen->setRefresh('2', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=' . $searchmethod . '&searchterm=' . $search); $screen->addSoftKey('6', '', 'SoftKey:Exit'); $screen->output(); } //step 4: otherwise, we have a valid contacts, if they have details, show them } else { $contact = getContact($contact); if ($contact['tel'] || $contact['home'] || $contact['mobile']) { logit('$contact', print_r($contact, 1)); $menu->setTitleWrap(); $menu->setTitle('Please select a detail for ' . $contact['first_name'] . ' ' . $contact['last_name']); $menu->setDestroyOnExit(); if ($contact['tel']) { $menu->addEntry($contact['tel'], null, null, '1', $contact['tel']); } if ($contact['home']) { $menu->addEntry($contact['home'], null, null, '2', $contact['home']); }
break; case 'formattedtextscreen': require_once 'AastraIPPhoneFormattedTextScreen.class.php'; $ftext = new AastraIPPhoneFormattedTextScreen(); $ftext->setDestroyOnExit(); $ftext->addLine('Formatted Screen', 'double', 'center', 'red'); $ftext->setScrollStart(); $ftext->addLine('Scrolled text1'); $ftext->addLine('Scrolled text2'); $ftext->addLine('Scrolled text3'); $ftext->addLine('Scrolled text4'); $ftext->addLine('Scrolled text5'); $ftext->setScrollEnd(); $ftext->addLine('Footer', NULL, 'center'); $ftext->addSoftkey('10', 'Exit', 'SoftKey:Exit'); $ftext->output(); break; case 'status1': require_once 'AastraIPPhoneStatus.class.php'; $status = new AastraIPPhoneStatus(); $status->setTriggerDestroyOnExit(); $status->setSession('Session'); $status->addEntry('1', 'Message 1'); $status->addEntry('2', 'Message 2'); $status->output(); break; case 'status2': require_once 'AastraIPPhoneStatus.class.php'; $status = new AastraIPPhoneStatus(); $status->setSession('Session'); $status->setTriggerDestroyOnExit();