Example #1
0
         if ($AA_FREEPBX_MODE == '2') {
             $object->addSoftkey('2', Aastra_get_label('ABC', $language), 'SoftKey:ChangeMode');
         }
         $object->addSoftkey('6', Aastra_get_label('Submit', $language), 'SoftKey:Submit');
     }
     break;
 case '3':
     # Init continue
     $continue = True;
     # Check credentials
     if ($AA_FREEPBX_MODE == '1') {
         $mode = 'login';
     } else {
         $mode = 'sip';
     }
     if (!Aastra_verify_user_Asterisk($extension, $password, $mode)) {
         # Display error
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         if (Aastra_is_lockin_supported()) {
             $object->setLockIn();
         }
         $object->setTitle(Aastra_get_label('Authentication failed', $language));
         $object->setText(Aastra_get_label('Wrong credentials.', $language));
         if ($nb_softkeys) {
             if ($nb_softkeys == 6) {
                 $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER . '&action=input&step=1&extension=' . $extension);
             } else {
                 $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER . '&action=input&step=1&extension=' . $extension);
             }
         } else {
Example #2
0
                 $object->addEntry($XML_SERVER . '&action=password&user='******'&action=check&user='******'&pin=' . $pin);
             }
         } else {
             # Launch application
             $action = 'launch';
         }
     }
     break;
     # Check credentials
 # Check credentials
 case 'check':
     # Credentials Not OK?
     if (!($userinfo = Aastra_verify_user_Asterisk($user, $pin, 'vm'))) {
         # Error message
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(Aastra_get_label('Authentication failed', $language));
         $object->setText(Aastra_get_label('Wrong user and/or password', $language));
         # Softkeys
         if ($nb_softkeys) {
             if ($nb_softkeys == 6) {
                 $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER);
                 $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             } else {
                 $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER);
                 $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             }
Example #3
0
     break;
     # Erase screen if user cancels
 # Erase screen if user cancels
 case 'cancel':
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->setTriggerDestroyOnExit();
     $object->addEntry('');
     break;
     # Submit password
 # Submit password
 case 'submit':
     # MODE USER
     if ($AA_FREEPBX_MODE == '1') {
         # Authentication failed
         if (!Aastra_verify_user_Asterisk($user, $password, 'login')) {
             # Display error
             require_once 'AastraIPPhoneTextScreen.class.php';
             $object = new AastraIPPhoneTextScreen();
             $object->setDestroyOnExit();
             $object->setTitle(Aastra_get_label('Authentication failed', $language));
             $object->setText(Aastra_get_label('Wrong credentials.', $language));
             # Softkeys
             if ($nb_softkeys) {
                 if ($nb_softkeys == 6) {
                     $object->addSoftkey('5', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                     $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER);
                 } else {
                     $object->addSoftkey('9', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                     $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER);
                 }