예제 #1
0
        $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('');
            }
            foreach ($lines as $value) {
                $object->addLine($value, NULL, 'center');
            }
        }
        # Softkeys
        $object->setRefresh(2, $flash_next);
        $object->addSoftkey('6', '', $flash_next);
        break;
}
# Output XML object
$object->output();
exit;
?>

예제 #2
0
        //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']);
        $menu->setDestroyOnExit();
        if ($contact['tel']) {
            $menu->addEntry($contact['tel'], null, null, '1', $contact['tel']);
        }
        if ($contact['home']) {