コード例 #1
0
        # Cleanup
        unset($array_night);
    }
}
# Callback
$XML_SERVER .= '?user='******'&mode=' . $mode;
# Depending on action
switch ($action) {
    # Display
    case 'display':
        # Display current status
        if (Aastra_is_formattedtextscreen_supported()) {
            # 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
コード例 #2
0
        $menu->natsortByName();
        $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();