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; }
# create object $object = new AastraIPPhoneFormattedTextScreen(); if (Aastra_size_formattedtextscreen() > 3) { $object->addLine(Aastra_get_label('BIORHYTHMS', $language)); if (Aastra_size_formattedtextscreen() > 4) { $object->addLine(''); } $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I'])); $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E'])); $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P'])); } else { $object->setScrollStart('2'); $object->addLine(sprintf(Aastra_get_label('I=%+.3f %s', $language), $array['day']['I'], $array['trend']['I'])); $object->addLine(sprintf(Aastra_get_label('E=%+.3f %s', $language), $array['day']['E'], $array['trend']['E'])); $object->addLine(sprintf(Aastra_get_label('P=%+.3f %s', $language), $array['day']['P'], $array['trend']['P'])); $object->setScrollEnd(); } } else { # create object $object = new AastraIPPhoneTextScreen(); $object->setTitle(Aastra_get_language('BIORHYTHMS', $language)); $object->setText(sprintf(Aastra_get_label('I=%+.3f, E=%+.3f, P=%+.3f', $language), $array['day']['I'], $array['day']['E'], $array['day']['P'])); } } } # Common parameters $object->setDestroyOnExit(); if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
$configuration->addEntry('softkey1 type', 'xml'); $configuration->setTriggerDestroyOnExit(); $configuration->output(); 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';