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; }
case 'error': # New text screen require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle($err_title); $object->setText($err_text); $object->addSoftkey($err_key[0], $err_key[1], $err_key[2]); break; # Flash message # Flash message case 'flash': # New formatted text screen require_once 'AastraIPPhoneFormattedTextScreen.class.php'; $object = new AastraIPPhoneFormattedTextScreen(); $object->setDestroyOnExit(); $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('');
$execute->addEntry('Led: softkey1=on'); $execute->addEntry('Dial:7001', 'no'); $execute->output(); break; case 'configuration': require_once 'AastraIPPhoneConfiguration.class.php'; $configuration = new AastraIPPhoneConfiguration(); $configuration->addEntry('softkey1 label', 'Test'); $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();