$object->addIcon(18, 'Icon:ArrowDown'); $object->addIcon(19, 'Icon:CircleRed'); } } else { # Display error require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); if ($lookup == '') { $object->setTitle(Aastra_get_label('Directory error', $language)); $object->setText(Aastra_get_label('Directory list is empty. Please contact your administrator.', $language)); } else { $object->setTitle(Aastra_get_label('Lookup error', $language)); $object->setText(Aastra_get_label('Sorry no match.', $language)); } # Softkey if ($lookup != '') { $object->addSoftkey('5', Aastra_get_label('List Mode', $language), $XML_SERVER . '&action=list', 1); $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=search&lookup=' . $lookup, 2); $object->setCancelAction($XML_SERVER . '&action=search&lookup=' . $lookup); } $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 3); $object->addIcon(1, 'Icon:Book'); $object->addIcon(2, 'Icon:ArrowLeft'); $object->addIcon(b, 'Icon:CircleRed'); } break; } # Output XML object $object->output(); exit;
$conf_speed[$speed]['other'] = ''; if ($asterisk) { Aastra_save_user_context(Aastra_get_userdevice_Asterisk($user), 'speed', $conf_speed); } else { Aastra_save_user_context($user, 'speed', $conf_speed); } # Display update require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('List Updated', $language)); $object->setText(sprintf(Aastra_get_label('%s stored in speed dial list at position %d.', $language), $name, $speed + 1)); # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&action=zoom'); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=zoom', 1); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 2); $object->setCancelAction($XML_SERVER . '&action=zoom'); $object->addIcon(1, 'Icon:ArrowLeft'); $object->addIcon(2, 'Icon:CircleRed'); } } break; # Default # Default default: # Do nothing require_once 'AastraIPPhoneExecute.class.php';
foreach ($all as $key => $value) { $all[$key]['info'] = Aastra_get_label($all[$key]['info'], $language); } # Display Help $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle($selection); if ($all[$selection]['info'] != '') { $object->setText($all[$selection]['info']); } else { $object->setText(Aastra_get_label('No information available', $language)); } # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); $object->setCancelAction($XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2); } } break; # Add a menu screen # Add a menu screen case 'add': # Load menu config file $header['model'] = strtolower($header['model']); $all = Aastra_readINIfile($menu_source . '.menu', '#', '='); foreach ($all as $key => $value) {
if (Aastra_is_wrap_title_supported()) { $object->setTitleWrap(); } # Title if (Aastra_phone_type() == 5) { $object->setTitle($array_rss[$index]['title']); } else { $object->setTitle($array_rss[99]['title'] . ' - ' . $array_rss[$index]['title']); } # Content $object->setText($array_rss[$index]['description']); # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { if ($index != 0) { $object->addSoftkey('2', Aastra_get_label('Previous', $language), $XML_SERVER . '&zip=' . $zip . '&index=' . $index); } $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&zip=' . $zip); if ($index != count($array_rss) - 2) { $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&zip=' . $zip . '&index=' . ($index + 2)); } $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $softkey = 1; foreach ($array_rss as $key => $value) { if ($key != '99') { $object->addSoftkey($softkey, $value['title'], $value['uri'] . '&user='******'9', Aastra_get_label('Back', $language), $XML_SERVER); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
case 'list': # Get Parked calls $park = Aastra_get_parked_calls_Asterisk(); $count = count($park); # Update display if ($count == 0) { # No park calls require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('Parked Calls', $language)); $object->setText(Aastra_get_label('No parked calls on the platform.', $language)); # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey(4, Aastra_get_label('Refresh', $language), $XML_SERVER . '&action=list'); $object->addSoftkey(6, Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey(6, Aastra_get_label('Refresh', $language), $XML_SERVER . '&action=list'); $object->addSoftkey(10, Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } } } else { # Only one and autopick if ($count == 1 and $autopick == '1') { # Dial the orbit require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); if (Aastra_is_dialuri_supported()) { $object->addEntry('Dial:' . $park[0][0]); } else {
$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'); } else { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } } } # Display object $object->output(); exit;
$format_time = '%I:%M %p'; } else { $format_date = '%d/%m/%y'; $format_time = '%H:%M'; } $format = sprintf(Aastra_get_label('%s at %s', $language), $format_date, $format_time); $text .= ' ' . sprintf(Aastra_get_label('Last Call: %s %s.', $language), $day, strftime($format, $detail['LastCall'])); } else { $text .= ' ' . Aastra_get_label('No Last Call.', $language); } $object->setText($text); } # Softkeys if ($nb_softkeys == 6) { if ($detail['Type'] == 'dynamic') { $object->addSoftkey('3', Aastra_get_label('Logout', $language), $XML_SERVER . '&action=logout_agent&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); } $object->addSoftKey('4', Aastra_get_label('Refresh', $language), $XML_SERVER . '&action=agent_detail&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); $object->addSoftKey('5', Aastra_get_label('Back', $language), $XML_SERVER . '&action=show_queue_members&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); $object->addSoftKey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { if ($detail['Type'] == 'dynamic') { $object->addSoftkey('1', Aastra_get_label('Logout', $language), $XML_SERVER . '&action=logout_agent&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); } $object->addSoftKey('6', Aastra_get_label('Refresh', $language), $XML_SERVER . '&action=agent_detail&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); $object->addSoftKey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=show_queue_members&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); $object->addSoftKey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); $object->setCancelAction($XML_SERVER . '&action=show_queue_members&queue=' . $queue . '&q_desc=' . $q_desc . '&member=' . $member); } break; # Redirect
$change = 'select'; } break; } # Retrieve current status $cf = Aastra_manage_cf_Asterisk($user, $action, $value); # Softkeys? if ($nb_softkeys) { # Textscreen for softkey phones require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(sprintf(Aastra_get_label('Call Forward for %s', $language), Aastra_get_userdevice_Asterisk($user))); if ($cf == '') { $object->setText(Aastra_get_label('Call Forward is currently deactivated.', $language)); $object->addSoftkey('1', Aastra_get_label('Activate', $language), $XML_SERVER . '&action=' . $change); } else { $array_user = array_flip($array_user); $text = sprintf(Aastra_get_label('Call Forward is currently set to %s', $language), $cf); if ($array_user[$cf] != '') { $array_label = array('cell' => Aastra_get_label('Cell', $language), 'home' => Aastra_get_label('Home', $language), 'other' => Aastra_get_label('Other', $language)); $text .= ' (' . $array_label[$array_user[$cf]] . ')'; } $object->setText($text); $object->addSoftkey('1', Aastra_get_label('Change', $language), $XML_SERVER . '&action=' . $change); $object->addSoftkey('2', Aastra_get_label('Deactivate', $language), $XML_SERVER . '&action=cancel'); } if ($nb_softkeys == 6) { $object->addSoftkey('3', Aastra_get_label('My Numbers', $language), $XML_SERVER . '&action=info'); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else {
# Submit password case 'submit': # MODE USER if ($AA_FREEPBX_MODE == '1') { # Authentication failed if (!Aastra_verify_user_Asterisk($user, $password, 'login')) { # Display error require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('Authentication failed', $language)); $object->setText(Aastra_get_label('Wrong credentials.', $language)); # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('5', Aastra_get_label('Cancel', $language), 'SoftKey:Exit'); $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER); } else { $object->addSoftkey('9', Aastra_get_label('Cancel', $language), 'SoftKey:Exit'); $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER); } } } else { # Only if auto-logout is supported//configured if ($is_sip_notify and $AA_AUTOLOGOUT) { # Confirm logout require_once 'AastraIPPhoneTextMenu.class.php'; $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit(); $object->setStyle('none'); $object->setTitle(Aastra_get_label('Confirm Logout', $language));
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; }
if (count($array_rss) > 1) { $object->setTitle($Title[$index] . ' (' . ($rank + 1) . '/' . count($array_rss) . ') - ' . $array_rss[$rank]['title']); } else { $object->setTitle($Title[$index] . ' - ' . $array_rss[$rank]['title']); } } $object->setText($array_rss[$rank]['description']); if ($rank != 0 or $rank != count($array_rss) - 1) { $back = $XML_SERVER . '&index=' . ($index + 1) . '&last_rank=' . ($rank + 1); } else { $back = $XML_SERVER . '&last_index=' . ($index + 1); } if (Aastra_is_softkeys_supported()) { if (Aastra_number_softkeys_supported() < 7) { if ($rank != 0) { $object->addSoftkey('2', Aastra_get_label('Previous', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . $rank); } $object->addSoftkey('4', Aastra_get_label('Back', $language), $back); if ($rank != count($array_rss) - 1) { $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . ($rank + 2)); } $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $last_set = intval($nb_rss / 4); if ($nb_rss - $last_set * 4 != 0) { $last_set++; } $softkey = 1; for ($y = 0; $y < $nb_rss; $y++) { if ($y >= ($set - 1) * 4 and $y < $set * 4) { $object->addSoftkey($softkey, $Title[$y], $XML_SERVER . '&index=' . ($y + 1) . '&rank=1' . '&set=' . $set);
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2', '1'); $menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1', '2'); $menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3', '3'); $menu->natsortByName(); $menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1'); $menu->addSoftkey('9', 'Back', $XML_SERVER); $menu->addSoftkey('10', 'Exit', 'SoftKey:Exit'); $menu->output(); break; case 'textscreen': require_once 'AastraIPPhoneTextScreen.class.php'; $text = new AastraIPPhoneTextScreen(); $text->setTitle('Title'); $text->setText('The screen object can be implemented similar to the firmware info screen.'); $text->setDestroyOnExit(); $text->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1'); $text->addSoftkey('6', 'Exit', 'SoftKey:Exit'); $text->output(); break; case 'inputscreen1': require_once 'AastraIPPhoneInputScreen.class.php'; $input = new AastraIPPhoneInputScreen(); $input->setTitle('Title'); $input->setPrompt('Enter your password'); $input->setParameter('param'); $input->setType('string'); $input->setURL('http://myserver.com/script.php?test=1'); $input->setPassword(); $input->setDestroyOnExit(); $input->setDefault(''); $input->setCancelAction($XML_SERVER);
$text = sprintf(Aastra_get_label('Currently %s.', $language), $status_text[$away['status']]['label']); } $object->setText($text); } else { $object->setTitle($callerid); $object->setText('Ext.' . $number); } } else { $object->setTitle($number); $object->setText($callerid); } } # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('6', Aastra_get_label('More', $language), 'SoftKey:Exit'); if ($is_keypress) { $object->addSoftkey('1', Aastra_get_label('Cancel', $language), $XML_SERVER . '?action=cancel'); } } else { $object->addSoftkey('10', Aastra_get_label('More', $language), 'SoftKey:Exit'); } } # Common parameters $object->setDestroyOnExit(); $object->setTimeout('4'); $found = True; } } # No match whatsoever if (!$found) {
$object->addIcon(3, Aastra_get_custom_icon('Home')); $object->addIcon(4, Aastra_get_custom_icon('Phone')); } else { $object->addIcon(1, 'Icon:Office'); $object->addIcon(2, 'Icon:CellPhone'); $object->addIcon(3, 'Icon:Home'); $object->addIcon(4, 'Icon:PhoneOnHook'); } } } else { # Display error require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setTitle($data[$selection]['name']); $object->setText(Aastra_get_label('No phone number associated to this name.', $language)); $object->addSoftkey('6', Aastra_get_label('Done', $language), $XML_SERVER . '&action=list&selection=' . $selection); } } else { # Back to the list require_once 'AastraIPPhoneExecute.class.php'; $object = new AastraIPPhoneExecute(); $object->addEntry($XML_SERVER . '&action=list&selection=' . $selection); } break; # List of speed dial # List of speed dial case 'list': # Display speeddials as a list require_once 'AastraIPPhoneTextMenu.class.php'; $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit();
$object->addLine(Aastra_get_label('Bid', $language) . ': ' . $return[1][0][5]); $object->addLine(Aastra_get_label('Date', $language) . ': ' . $return[1][0][2]); $object->addLine(Aastra_get_label('Time', $language) . ': ' . $return[1][0][3]); $object->setScrollEnd(); $object->addLine(Aastra_get_label('Powered by Yahoo', $language), '', 'center'); } } else { # Prepare result screen $object = new AastraIPPhoneTextScreen(); $object->setTitle(Aastra_get_label('Currency converter', $language)); $object->setText(Aastra_get_label('Information not available at this time. Please try again later.', $language)); } # Add remaining softkeys if ($nb_softkeys == 6) { if ($action == 'display') { $object->addSoftkey('4', Aastra_get_label('New Lookup', $language), $XML_SERVER . '&action=init'); } else { $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&action=favorites&selection=' . $selection); } $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { if ($action == 'display') { $object->addSoftkey('6', Aastra_get_label('New Lookup', $language), $XML_SERVER . '&action=init'); } else { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=favorites&selection=' . $selection); } $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } break; } # Top title
$input->setParameter('search'); $input->setDefault($searchterm); $input->setURL($XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=onetouch'); $input->addSoftkey('1', 'T9', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=t9'); //$input->addSoftkey('2', 'History', $XML_SERVER_PATH.'contactdir.php?user='******'&searchmethod=t9&history=show'); $input->addSoftkey('5', 'Back', $XML_SERVER_PATH . 'contactdir.php?user='******'4', 'Search', 'SoftKey:Submit'); $input->addSoftkey('6', 'BKSpace', 'SoftKey:BackSpace'); $input->addSoftkey('3', 'Exit', 'SoftKey:Exit'); $input->output(); break; case 'help': $text->setTitle('Contact Directory'); $text->setText('To search for contacts, use one of the following methods: One-touch: allows you to press each key once for the desired letter (i.e. to spell boy: \'2\' for \'b\', \'6\' for \'o\', \'9\' for \'y\'). T9: hit each number untill the desired letter appears on the screen (i.e. to spell boy: \'22\' for \'b\', \'666\' for \'o\', \'999\' for \'y\').'); $text->setDestroyOnExit(); $text->addSoftkey('3', 'Back', $XML_SERVER_PATH . 'contactdir.php?user='******'Contact Directory'); $text->setText('Chose input method to use for search:'); $text->setDestroyOnExit(); $text->addSoftkey('1', 'One-Touch', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=onetouch'); $text->addSoftkey('2', 'T9', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=t9'); $text->addSoftkey('3', 'Help', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=help'); $text->addSoftkey('6', 'Exit', 'SoftKey:Exit'); $text->output(); break; } //step3: if we do have a search term, see if there are any contacts for said term
case 'main': # Authenticate user Aastra_check_signature_Asterisk($user); # Display current status $array_fm = Aastra_manage_followme_Asterisk($user, 'get_all'); # Check if configured if ($array_fm['status'] == '2') { # Error: Not configured require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('Follow-me', $language)); $object->setText(Aastra_get_label('This feature is not configured for your phone. Please contact your administrator.', $language)); if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } } } else { # Configured: List of options require_once 'AastraIPPhoneTextMenu.class.php'; $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit(); $object->setStyle('none'); $object->setTitle(sprintf(Aastra_get_label('Follow-me for %s', $language), Aastra_get_userdevice_Asterisk($user))); if ($array_fm['status'] == '1') { $object->addEntry(Aastra_get_label('Status: Activated', $language), $XML_SERVER . '&action=change_status'); } else { $object->addEntry(Aastra_get_label('Status: Deactivated', $language), $XML_SERVER . '&action=change_status');
$object->addLine($month . ' ' . $day2 . ' ' . $year, $font, 'center'); $object->addLine($time . ' ' . $AMPM, $font, 'center'); if ($size < 4) { $object->setScrollEnd(); } } else { $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle($title); $object->setText($current); } # Softkeys if ($nb_softkeys > 0) { if ($nb_softkeys == 6) { if ($action == 'zoom') { $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page); } else { $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites'); } $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { if ($action == 'zoom') { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page); $object->setCancelAction($XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page); } else { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites'); $object->setCancelAction($XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites'); } $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } }
$action = 'flash'; $flash_next = $XML_SERVER . '&action=detail&msg=' . $msg; $flash_text = Aastra_get_label('Message forwarded to the selected user(s).', $language); break; } # Post-process action switch ($action) { # Error message 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; }
$object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } } else { $object->setCancelAction($XML_SERVER . '&selection=' . $selection . '&action=edit&step=1&type=' . $type . '&set=' . $set); if ($page != $last) { $object->addEntry(Aastra_get_label('Next Page', $language), $XML_SERVER . '&selection=' . $selection . '&action=edit&step=2&type=' . $type . '&page=' . ($page + 1) . '&set=' . $set . '&input1=' . $input1); } } } else { # Display error require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); $object->setTitle(Aastra_get_label('BLF error', $language)); $object->setText(Aastra_get_label('You already have a BLF on every possible user of the platform.', $language)); $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER . '&selection=' . $selection . '&action=edit&step=1&type=' . $type . '&set=' . $set); } break; # SPEEDDIAL # SPEEDDIAL case 'speeddial': case 'speeddialconf': case 'speeddialxfer': # Input number require_once 'AastraIPPhoneInputScreen.class.php'; $object = new AastraIPPhoneInputScreen(); $object->setDestroyOnExit(); $object->setTitle($array_title[$input1]); $object->setType('number'); $object->setPrompt(Aastra_get_label('Enter phone number', $language)); $object->setURL($XML_SERVER . '&selection=' . $selection . '&action=edit&step=3&type=' . $type . '&set=' . $set . '&input1=' . $input1);