Ejemplo n.º 1
0
        if ($input != '') {
            $data['last']['target'] = $input;
            Aastra_save_user_context($user, 'currency', $data);
        }
        $action = 'init';
        break;
}
# Depending on action
switch ($action) {
    # Initial screen
    case 'init':
        # Prepare result screen
        $object = new AastraIPPhoneInputScreen();
        $object->setTitle(Aastra_get_label('Currency converter', $language));
        $object->setURL($XML_SERVER . '&action=display');
        $object->setDisplayMode('condensed');
        $object->addField('empty');
        $object->addField('string');
        $object->setFieldEditable('no');
        $object->setFieldPrompt(Aastra_get_label('Source', $language));
        $object->setFieldDefault($data['last']['source']);
        $object->addField('string');
        $object->setFieldEditable('no');
        $object->setFieldPrompt(Aastra_get_label('Target', $language));
        $object->setFieldDefault($data['last']['target']);
        # Softkeys
        if ($nb_softkeys == 6) {
            $object->addSoftkey('1', Aastra_get_label('Source', $language), $XML_SERVER . '&action=input1&choice=' . $data['last']['source']);
            $object->addSoftkey('2', Aastra_get_label('Target', $language), $XML_SERVER . '&action=input2&choice=' . $data['last']['target']);
            $object->addSoftkey('3', Aastra_get_label('Reverse', $language), $XML_SERVER . '&action=reverse');
            $object->addSoftkey('4', Aastra_get_label('Watch List', $language), $XML_SERVER . '&action=favorites');
Ejemplo n.º 2
0
     require_once 'AastraIPPhoneInputScreen.class.php';
     $input = new AastraIPPhoneInputScreen();
     $input->setTitle('Title');
     $input->setPrompt('Enter the date');
     $input->setParameter('param');
     $input->setType('dateUS');
     $input->setURL('http://myserver.com/script.php');
     $input->setDestroyOnExit();
     $input->setCancelAction($XML_SERVER);
     $input->output();
     break;
 case 'inputscreen3':
     require_once 'AastraIPPhoneInputScreen.class.php';
     $input = new AastraIPPhoneInputScreen();
     $input->setTitle('Restricted application');
     $input->setDisplayMode('condensed');
     $input->setURL($XML_SERVER);
     $input->setDestroyOnExit();
     $input->addField('empty');
     $input->addField('string');
     $input->setFieldSelection('1');
     $input->setFieldPrompt('Username:'******'user');
     $input->setFieldSelection('1');
     $input->addField('number');
     $input->setFieldPassword('yes');
     $input->setFieldPrompt('Password:'******'password');
     $input->setFieldSelection('2');
     $input->addSoftkey('10', 'Exit', 'SoftKey:Exit');
     $input->output();