示例#1
0
                $object->addEntry(Aastra_get_label('Confirm Calls: Yes', $language), $XML_SERVER . '&action=change_grpconf');
            } else {
                $object->addEntry(Aastra_get_label('Confirm Calls: No', $language), $XML_SERVER . '&action=change_grpconf');
            }
            $object->addEntry(sprintf(Aastra_get_label('%s phone number(s)', $language), count($array_fm['grplist'])), $XML_SERVER . '&action=change_grplist');
            # Softkeys
            if ($nb_softkeys) {
                if ($nb_softkeys == 6) {
                    $object->addSoftkey('1', Aastra_get_label('Change', $language), 'SoftKey:Select');
                    $object->addSoftkey('2', Aastra_get_label('My Numbers', $language), $XML_SERVER . '&action=info');
                    $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                } else {
                    $object->addSoftkey('1', Aastra_get_label('My Numbers', $language), $XML_SERVER . '&action=info');
                    $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                }
            }
        }
        break;
        # Default
    # Default
    default:
        # Debug
        Aastra_debug('Unexpected action:' . $action);
        require_once 'AastraIPPhoneExecute.class.php';
        $object = new AastraIPPhoneExecute();
        $object->addEntry('');
        break;
}
# Display answer
$object->output();
exit;
示例#2
0
             if ($nb_softkeys == 6) {
                 $object->addSoftkey(6, Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             } else {
                 $object->addSoftkey(10, Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             }
         }
     }
     break;
     # Poor man's dial
 # Poor man's dial
 case 'dial':
     # Do nothing
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->addEntry('');
     $object->output(True);
     # Dial the number
     Aastra_dial_number_Asterisk($user, $value);
     exit;
     break;
     # Parked calls
 # Parked calls
 case 'list':
     # Get Parked calls
     $park = Aastra_get_parked_calls_Asterisk();
     $count = count($park);
     # Update display
     if ($count == 0) {
         # No park calls
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
示例#3
0
     $yahtzee['set'] = False;
     # Roll the dices
     for ($i = 0; $i < 5; $i++) {
         if (!$yahtzee['dice'][$i]['hold']) {
             $yahtzee['dice'][$i]['value'] = rand(1, 6);
         }
     }
     # One extra roll
     $yahtzee['roll']++;
     # End of the game
     if ($yahtzee['round'] == 13 and $yahtzee['roll'] == 3) {
         $index = last_score($yahtzee);
         $score = compute_score($yahtzee, $index);
         $object2 = new AastraIPPhoneExecute();
         $object2->addEntry($XML_SERVER . '&action=set2&value=' . $index . '&score=' . $score);
         $object2->output();
         exit;
     }
     break;
     # Hold/Release
 # Hold/Release
 case 'hold':
     if ($yahtzee['dice'][$value]['hold']) {
         $yahtzee['dice'][$value]['hold'] = False;
     } else {
         $yahtzee['dice'][$value]['hold'] = True;
     }
     break;
     # Set the score
 # Set the score
 case 'set':
示例#4
0
     $input->setFieldSelection('1');
     $input->addField('number');
     $input->setFieldPassword('yes');
     $input->setFieldPrompt('Password:'******'password');
     $input->setFieldSelection('2');
     $input->addSoftkey('10', 'Exit', 'SoftKey:Exit');
     $input->output();
     break;
 case 'execute':
     require_once 'AastraIPPhoneExecute.class.php';
     $execute = new AastraIPPhoneExecute();
     $execute->setTriggerDestroyOnExit();
     $execute->addEntry('Led: softkey1=on');
     $execute->addEntry('Dial:7001', 'no');
     $execute->output();
     break;
 case 'configuration':
     require_once 'AastraIPPhoneConfiguration.class.php';
     $configuration = new AastraIPPhoneConfiguration();
     $configuration->addEntry('softkey1 label', 'Test');
     $configuration->addEntry('softkey1 type', 'xml');
     $configuration->setTriggerDestroyOnExit();
     $configuration->output();
     break;
 case 'formattedtextscreen':
     require_once 'AastraIPPhoneFormattedTextScreen.class.php';
     $ftext = new AastraIPPhoneFormattedTextScreen();
     $ftext->setDestroyOnExit();
     $ftext->addLine('Formatted Screen', 'double', 'center', 'red');
     $ftext->setScrollStart();