# Advanced display require_once 'AastraIPPhoneFormattedTextScreen.class.php'; $object = new AastraIPPhoneFormattedTextScreen(); $object->setdestroyOnExit(); $object->setTimeout('2'); if (Aastra_size_formattedtextscreen() > 3) { $object->addLine(''); $object->addLine(''); } if ($status == 1) { $object->addLine(sprintf(Aastra_get_label('Night Mode activated (%d)', $language), $index), 'double', 'center'); } else { $object->addLine(sprintf(Aastra_get_label('Day Mode activated (%d)', $language), $index), 'double', 'center'); } if ($nb_softkeys == 6) { $object->addSoftKey('6', '', 'SoftKey:Exit'); } } else { # Basic display require_once 'AastraIPPhoneTextScreen.class.php'; $object = new AastraIPPhoneTextScreen(); $object->setDestroyOnExit(); if ($status == 1) { $object->setTitle(sprintf(Aastra_get_label('Night Mode (%d)', $language), $index)); } else { $object->setTitle(sprintf(Aastra_get_label('Day Mode (%d)', $language), $index)); } $object->setText(Aastra_get_label('Activated', $language)); $object->addSoftKey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } break;
if ($notify) { $object->addLine(Aastra_get_label('Notification on return', $language)); } } else { if ($hint == 'Idle') { $object->addLine(Aastra_get_label('Phone is idle', $language)); } else { if ($hint == 'Ringing') { $object->addLine(Aastra_get_label('Phone is ringing', $language)); } else { $object->addLine(Aastra_get_label('Phone is in use', $language)); } } } # Softkeys $object->addSoftKey('1', Aastra_get_label('Dial', $language), 'Dial:' . $selection); $intercom = Aastra_get_intercom_config_Asterisk(); if ($intercom != '') { $object->addSoftKey('2', Aastra_get_label('Intercom', $language), 'Dial:' . $intercom . $selection); } if ($away['status'] != AA_PRESENCE_AVAILABLE and $away['status'] != AA_PRESENCE_DISCONNECTED) { if (!$notify) { $object->addSoftKey('3', Aastra_get_label('Notify me', $language), $XML_SERVER . '&action=notify&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection); } else { $object->addSoftKey('3', Aastra_get_label('Unnotify', $language), $XML_SERVER . '&action=unnotify&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection); } } if ($AA_SPEEDDIAL_STATE) { $object->addSoftkey('6', Aastra_get_label('Add to Speed Dial', $language), $XML_SERVER . '&action=select&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection . '&orig_s=zoom'); } $object->addSoftKey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=list&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
/* $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']);