Esempio n. 1
0
 # Init
 case 'init':
     # No user yet
     if ($user == '') {
         require_once 'AastraIPPhoneInputScreen.class.php';
         if (Aastra_is_multipleinputfields_supported()) {
             # Multiple input fields Mailbox and password
             $object = new AastraIPPhoneInputScreen();
             $object->setDestroyOnExit();
             $object->setDisplayMode('condensed');
             $object->setTitle(Aastra_get_label('VoiceMail Access', $language));
             $object->setURL($XML_SERVER . '&action=check');
             $object->addField('empty');
             $object->addField('number');
             $object->setFieldPrompt(Aastra_get_label('Mailbox:', $language));
             $object->setFieldParameter('user');
             $object->addField('number');
             $object->setFieldPrompt(Aastra_get_label('Password:'******'pin');
             $object->setFieldPassword('yes');
         } else {
             # Single input field Just Mailbox
             $object = new AastraIPPhoneInputScreen();
             $object->setDestroyOnExit();
             $object->setTitle(Aastra_get_label('VoiceMail Access', $language));
             $object->setPrompt(Aastra_get_label('Enter Mailbox Number', $language));
             $object->setParameter('user');
             $object->setType('number');
             $object->setURL($XML_SERVER . '&action=password');
             $object->setDestroyOnExit();
         }
Esempio n. 2
0
 switch ($step) {
     case '1':
         if (Aastra_is_multipleinputfields_supported()) {
             $object = new AastraIPPhoneInputScreen();
             $object->setTitle(Aastra_get_label('Initial Startup', $language));
             $object->setDisplayMode('condensed');
             $object->setURL($XML_SERVER . '&action=input&step=3');
             $object->setDestroyOnExit();
             $object->addField('empty');
             $object->addField('number');
             if ($AA_FREEPBX_MODE == '1') {
                 $object->setFieldPrompt(Aastra_get_label('Extension:', $language));
             } else {
                 $object->setFieldPrompt(Aastra_get_label('Device ID:', $language));
             }
             $object->setFieldParameter('extension');
             if ($AA_FREEPBX_MODE == '1') {
                 $object->addField('number');
             } else {
                 $object->addField('string');
             }
             $object->setFieldPrompt(Aastra_get_label('Password:'******'password');
             if ($AA_FREEPBX_MODE == '2') {
                 $object->addFieldSoftkey('2', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode');
             }
         } else {
             $object = new AastraIPPhoneInputScreen();
             $object->setTitle(Aastra_get_label('Initial Startup', $language));
             if ($AA_FREEPBX_MODE == '1') {
     $company = '';
     $object->setDefaultIndex('4');
 } else {
     if (!empty($company)) {
         $object->setDefaultIndex('1');
     }
     if (!empty($lastn)) {
         $object->setDefaultIndex('2');
     }
     if (!empty($firstn)) {
         $object->setDefaultIndex('3');
     }
 }
 $object->addField('string');
 $object->setFieldPrompt(Aastra_get_label('Company:', $language));
 $object->setFieldParameter('company');
 if (!empty($company)) {
     $object->setFieldDefault($company);
 }
 $object->addField('string');
 $object->setFieldPrompt(Aastra_get_label('Last Name:', $language));
 $object->setFieldParameter('lastn');
 if (!empty($lastn)) {
     $object->setFieldDefault($lastn);
 }
 $object->addField('string');
 $object->setFieldPrompt(Aastra_get_label('First Name:', $language));
 $object->setFieldParameter('firstn');
 if (!empty($firstn)) {
     $object->setFieldDefault($firstn);
 }
Esempio n. 4
0
 $object->setDestroyOnExit();
 $object->setTitle(Aastra_get_label('Return Date/Time', $language));
 # Multiple input fields?
 if (Aastra_is_multipleinputfields_supported()) {
     # Empty field
     $object->setURL($XML_SERVER . '&action=set_date_time');
     $object->setDisplayMode('condensed');
     $object->addField('empty');
     # Date
     if ($AA_FORMAT_DT == 'US') {
         $object->addField('dateUS');
     } else {
         $object->addField('dateInt');
     }
     $object->setFieldPrompt(Aastra_get_label('Date', $language));
     $object->setFieldParameter('value1');
     $object->setFieldDefault($default_date);
     # Time
     if ($AA_FORMAT_DT == 'US') {
         $object->addField('timeUS');
     } else {
         $object->addField('timeInt');
     }
     $object->setFieldPrompt(Aastra_get_label('Time', $language));
     $object->setFieldParameter('value2');
     $object->setFieldDefault($default_time);
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             if ($away['return'] != '') {
                 $object->addSoftKey('1', Aastra_get_label('No Date', $language), $XML_SERVER . '&action=set_date_time&value1=&value2=');
Esempio n. 5
0
     break;
     # Input data
 # Input data
 case 'input':
     switch ($step) {
         case '1':
             if (Aastra_is_multipleinputfields_supported()) {
                 $object = new AastraIPPhoneInputScreen();
                 $object->setTitle(Aastra_get_label('User Login', $language));
                 $object->setDisplayMode('condensed');
                 $object->setURL($XML_SERVER . '&action=submit');
                 $object->setDestroyOnExit();
                 $object->addField('empty');
                 $object->addField('number');
                 $object->setFieldPrompt(Aastra_get_label('User:'******'user');
                 $object->addField('number');
                 $object->setFieldPrompt(Aastra_get_label('Password:'******'password');
             } else {
                 $object = new AastraIPPhoneInputScreen();
                 $object->setTitle(Aastra_get_label('User Login', $language));
                 $object->setPrompt(Aastra_get_label('Enter user', $language));
                 $object->setParameter('user');
                 $object->setType('number');
                 $object->setURL($XML_SERVER . '&action=input&step=2');
                 $object->setDestroyOnExit();
                 if ($extension != '') {
                     $object->setDefault($extension);
                 }
     if (!empty($lookup)) {
         $object->setDefaultIndex('4');
     } else {
         if (!empty($lastname)) {
             $object->setDefaultIndex('2');
         } else {
             if (!empty($firstname)) {
                 $object->setDefaultIndex('3');
             }
         }
     }
     # Fields
     $object->addField('empty');
     $object->addField('string');
     $object->setFieldPrompt(Aastra_get_label('Last Name:', $LANGUAGE));
     $object->setFieldParameter('lastname');
     $object->setFieldDefault($lastname);
     $object->addField('string');
     $object->setFieldPrompt(Aastra_get_label('First Name:', $LANGUAGE));
     $object->setFieldParameter('firstname');
     $object->setFieldDefault($firstname);
     $object->addField('string');
     $object->setFieldPrompt(Aastra_get_label('Or Anywhere:', $LANGUAGE));
     $object->setFieldParameter('lookup');
     $object->setFieldDefault($lookup);
 } else {
     # Single field
     $object->setPrompt(Aastra_get_label('Last/Firstname?', $LANGUAGE));
     $object->setParameter('lookup');
     $object->setType('string');
     $object->setDefault($lookup);
Esempio n. 7
0
     $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();
     break;
 case 'execute':
     require_once 'AastraIPPhoneExecute.class.php';
     $execute = new AastraIPPhoneExecute();
     $execute->setTriggerDestroyOnExit();
     $execute->addEntry('Led: softkey1=on');
     $execute->addEntry('Dial:7001', 'no');
Esempio n. 8
0
 # EDIT
 case 'edit':
     # Multiple input fields?
     if (Aastra_is_multipleinputfields_supported()) {
         # Input Screen
         require_once 'AastraIPPhoneInputScreen.class.php';
         $object = new AastraIPPhoneInputScreen();
         $object->setDestroyOnExit();
         # Title
         $object->setTitle(sprintf(Aastra_get_label('Speed Dial %d', $language), $selection + 1));
         # Target URL
         $object->setURL($XML_SERVER . '&action=set2&selection=' . $selection . '&step=' . $step);
         # Field Name
         $object->addField('string');
         $object->setFieldPrompt(Aastra_get_label('Name', $language));
         $object->setFieldParameter('input1');
         if ($data[$selection]['name'] != '') {
             $default = $data[$selection]['name'];
         } else {
             $default = $input1;
         }
         $object->setFieldDefault($default);
         if ($nb_softkeys == 6) {
             $object->addFieldSoftkey('3', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode');
             $object->addFieldSoftkey('4', Aastra_get_label('NextSpace', $language), 'SoftKey:NextSpace');
         }
         # Field Work Number
         $object->addField('number');
         $object->setFieldPrompt(Aastra_get_label('Work number', $language));
         $object->setFieldParameter('input2');
         if ($data[$selection]['work'] != '') {