$menu->addSoftkey('3', 'Exit', 'SoftKey:Exit'); $menu->addSoftkey('5', 'Back', $XML_SERVER_PATH . 'contactdir.php?user='******'&searchmethod=' . $searchmethod . '&searchterm=' . $search); $menu->addSoftkey('6', 'Select', 'SoftKey:Select'); $menu->output(); } else { //if no contacts are found, return error and prompt again /* $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']);