if ($nb_softkeys == 6) { $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace'); $object->addSoftkey('2', Aastra_get_label('Reset', $language), $XML_SERVER . '&action=input'); $object->addSoftkey('3', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode'); $object->addSoftkey('4', Aastra_get_label('Settings', $language), $XML_SERVER . '&action=settings'); $object->addSoftkey('5', Aastra_get_label('Lookup', $language), 'SoftKey:Submit'); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('1', Aastra_get_label('Reset', $language), $XML_SERVER . '&action=input', 1); $object->addSoftkey('5', Aastra_get_label('Settings', $language), $XML_SERVER . '&action=settings', 2); $object->addSoftkey('6', Aastra_get_label('Search', $language), 'SoftKey:Submit', 5); if ($back == '1') { $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER_PATH . 'directory.php?user='******'10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 4); $object->addIcon(1, 'Icon:Delete'); $object->addIcon(2, 'Icon:Settings'); $object->addIcon(3, 'Icon:ArrowLeft'); $object->addIcon(4, 'Icon:CircleRed'); $object->addIcon(5, 'Icon:Search'); } } else { # Textmenu require_once 'AastraIPPhoneTextMenu.class.php'; $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit(); $object->setTitle($title); $object->setStyle('none'); $object->addEntry(Aastra_get_label('Lookup', $language), $XML_SERVER . '&action=input_any'); $object->addEntry(Aastra_get_label('Settings', $language), $XML_SERVER . '&action=settings'); if ($back == '1') {
$object->setTitle(Aastra_get_label('Directory Lookup', $language)); $object->setURL($XML_SERVER . '&action=list'); $object->setDestroyOnExit(); $object->setType('string'); $object->setPrompt(Aastra_get_label('Letters in name', $language)); $object->setParameter('lookup'); if ($lookup != '') { $object->setDefault($lookup); } # Softkeys $object->addSoftkey('5', Aastra_get_label('List Mode', $language), $XML_SERVER . '&action=list', 1); $object->addSoftkey('6', Aastra_get_label('Search', $language), 'SoftKey:Submit', 2); $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list', 3); $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 4); $object->setCancelAction($XML_SERVER . '&action=list'); $object->addIcon(1, 'Icon:Book'); $object->addIcon(2, 'Icon:Search'); $object->addIcon(3, 'Icon:ArrowLeft'); $object->addIcon(4, 'Icon:CircleRed'); break; # Preferences # Preferences case 'prefs': # Retrieve current configuration $mode = Aastra_get_user_context(Aastra_get_userdevice_Asterisk($user), 'pbx_directory'); # Display options require_once 'AastraIPPhoneTextMenu.class.php'; $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit(); $object->setDefaultIndex($mode); $object->setTitle(Aastra_get_label('Directory Mode', $language));
} } $object->setCancelAction($XML_SERVER); } else { # Input area code $object = new AastraIPPhoneInputScreen(); $object->setTitle(Aastra_get_label('Area code finder', $language)); $object->setPrompt(Aastra_get_label('Enter area code', $language)); $object->setParameter('area'); $object->setType('number'); $object->setURL($XML_SERVER); $object->setDestroyOnExit(); # Softkeys if ($nb_softkeys > 0) { if ($nb_softkeys < 7) { $object->addSoftkey('1', Aastra_get_label('Backspace', $language), 'SoftKey:BackSpace'); $object->addSoftkey('5', Aastra_get_label('Lookup', $language), 'SoftKey:Submit'); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } } } # Top title if (Aastra_is_top_title_supported()) { $object->setTopTitle(Aastra_get_label('Area code lookup'), '', '1'); $object->addIcon('1', 'http://' . $AA_XML_SERVER . '/' . $AA_XMLDIRECTORY . '/icons/area.png'); } # Display object $object->output(); exit;