コード例 #1
0
ファイル: vmail_3.php プロジェクト: jamesrusso/Aastra_Scripts
         }
         $object->addEntry(Aastra_get_label('Reverse Select.', $language), $XML_SERVER . '&action=reverse&msg=' . $msg . '&dpage=' . $dpage);
         if ($submit) {
             $object->addEntry(Aastra_get_label('Submit', $language), $XML_SERVER . '&action=dsubmit&msg=' . $msg);
         }
         $object->addEntry(Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=detail&msg=' . $msg);
         $object->setCancelAction($XML_SERVER . '&action=detail&msg=' . $msg);
     } else {
         # Display error message
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(Aastra_get_label('Message forward', $language));
         $object->setText(Aastra_get_label('No other user with voicemail configured on the platform.', $language));
         $object->setDoneAction($XML_SERVER . '&action=detail&msg=' . $msg);
         $object->setCancelAction($XML_SERVER . '&action=detail&msg=' . $msg);
     }
     break;
     # Submit forward
 # Submit forward
 case 'dsubmit':
     # Decode current Message
     sscanf($msg, '%4s-%s', $msg_id, $msg_folder);
     # Retrieve cached data
     $array = Aastra_read_session('vmail', $ext);
     $directory = unserialize(base64_decode($array['directory']));
     # Forward to all selected
     foreach ($directory as $key => $value) {
         if ($value['select']) {
             Aastra_forward_to_user_Asterisk($user, $value['number'], $msg_id, $msg_folder, 'INBOX');
         }
コード例 #2
0
                $object->addIcon(18, 'Icon:ArrowDown');
                $object->addIcon(19, 'Icon:CircleRed');
            }
        } else {
            # Display error
            require_once 'AastraIPPhoneTextScreen.class.php';
            $object = new AastraIPPhoneTextScreen();
            $object->setDestroyOnExit();
            if ($lookup == '') {
                $object->setTitle(Aastra_get_label('Directory error', $language));
                $object->setText(Aastra_get_label('Directory list is empty. Please contact your administrator.', $language));
            } else {
                $object->setTitle(Aastra_get_label('Lookup error', $language));
                $object->setText(Aastra_get_label('Sorry no match.', $language));
            }
            # Softkey
            if ($lookup != '') {
                $object->addSoftkey('5', Aastra_get_label('List Mode', $language), $XML_SERVER . '&action=list', 1);
                $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=search&lookup=' . $lookup, 2);
                $object->setCancelAction($XML_SERVER . '&action=search&lookup=' . $lookup);
            }
            $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 3);
            $object->addIcon(1, 'Icon:Book');
            $object->addIcon(2, 'Icon:ArrowLeft');
            $object->addIcon(b, 'Icon:CircleRed');
        }
        break;
}
# Output XML object
$object->output();
exit;
コード例 #3
0
ファイル: follow.php プロジェクト: jamesrusso/Aastra_Scripts
         # Display Error message
         require_once 'AastraIPPhoneTextScreen.class.php';
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(Aastra_get_label('Phone numbers', $language));
         $object->setText(Aastra_get_label('No phone number configured.', $language));
         # Softkeys
         if ($nb_softkeys == 6) {
             $object->addSoftkey('1', Aastra_get_label('Add Int.', $language), $XML_SERVER . '&action=addint_grplist');
             $object->addSoftkey('4', Aastra_get_label('Add Ext.', $language), $XML_SERVER . '&action=' . $addext_grplist);
             $object->addSoftkey('6', Aastra_get_label('Back', $language), $XML_SERVER);
         } else {
             $object->addSoftkey('1', Aastra_get_label('Add Int.', $language), $XML_SERVER . '&action=addint_grplist');
             $object->addSoftkey('6', Aastra_get_label('Add Ext.', $language), $XML_SERVER . '&action=' . $addext_grplist);
             $object->addSoftkey('10', Aastra_get_label('Back', $language), $XML_SERVER);
             $object->setCancelAction($XML_SERVER);
         }
     }
     break;
     # Delete a phone number
 # Delete a phone number
 case 'delete_grplist':
     # Update needed
     $update = True;
     if ($value == '') {
         $value = $selection;
     }
     # Get Current value
     $fm = Aastra_manage_followme_Asterisk($user, 'get_all');
     # Check condidions
     if (count($fm['grplist']) == 1) {
コード例 #4
0
ファイル: vmail.php プロジェクト: jamesrusso/Aastra_Scripts
         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');
             }
         }
         $object->setCancelAction($XML_SERVER . '&user='******'launch';
     }
     break;
     # Password
 # Password
 case 'password':
     # Input Password
     require_once 'AastraIPPhoneInputScreen.class.php';
     $object = new AastraIPPhoneInputScreen();
     $object->setTitle(sprintf(Aastra_get_label('VoiceMail Access (%s)', $language), $user));
     $object->setPrompt(Aastra_get_label('Enter Password', $language));
     $object->setParameter('pin');
     $object->setType('number');
コード例 #5
0
ファイル: mymenu.php プロジェクト: jamesrusso/Aastra_Scripts
     $object->setDestroyOnExit();
     $object->setTitle($selection);
     if ($all[$selection]['info'] != '') {
         $object->setText($all[$selection]['info']);
     } else {
         $object->setText(Aastra_get_label('No information available', $language));
     }
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2);
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2);
             $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             $object->setCancelAction($XML_SERVER . '&menu_action=add&menu_page2=' . $menu_page2);
         }
     }
     break;
     # Add a menu screen
 # Add a menu screen
 case 'add':
     # Load menu config file
     $header['model'] = strtolower($header['model']);
     $all = Aastra_readINIfile($menu_source . '.menu', '#', '=');
     foreach ($all as $key => $value) {
         if ($value[$header['model']] == 'no') {
             unset($all[$key]);
         } else {
             $all[$key]['title'] = Aastra_get_label($all[$key]['title'], $language);
         }
コード例 #6
0
ファイル: clock.php プロジェクト: jamesrusso/Aastra_Scripts
             $object->setTitle($title);
             $object->setText($current);
         }
         # Softkeys
         if ($nb_softkeys > 0) {
             if ($nb_softkeys == 6) {
                 if ($action == 'zoom') {
                     $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page);
                 } else {
                     $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites');
                 }
                 $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             } else {
                 if ($action == 'zoom') {
                     $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page);
                     $object->setCancelAction($XML_SERVER . '?selection=' . $selection . '&user='******'&action=list' . '&page=' . $page);
                 } else {
                     $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites');
                     $object->setCancelAction($XML_SERVER . '?selection=' . $selection . '&user='******'&action=favorites');
                 }
                 $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
             }
         }
     } else {
         # Display error
         $object = new AastraIPPhoneTextScreen();
         $object->setDestroyOnExit();
         $object->setTitle(Aastra_get_label('Application error', $language));
         $object->setText(Aastra_get_label('The information you are looking for is not available at this time. Try again later.', $language));
     }
 } else {
コード例 #7
0
        }
        # Display update
        require_once 'AastraIPPhoneTextScreen.class.php';
        $object = new AastraIPPhoneTextScreen();
        $object->setDestroyOnExit();
        $object->setTitle(Aastra_get_label('List Updated', $language));
        $object->setText(sprintf(Aastra_get_label('%s stored in speed dial list at position %d.', $language), $name, $speed + 1));
        # Softkeys
        if ($nb_softkeys) {
            if ($nb_softkeys == 6) {
                $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&action=zoom');
                $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
            } else {
                $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=zoom', 1);
                $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 2);
                $object->setCancelAction($XML_SERVER . '&action=zoom');
                $object->addIcon(1, 'Icon:ArrowLeft');
                $object->addIcon(2, 'Icon:CircleRed');
            }
        }
        break;
        # Default
    # Default
    default:
        # Do nothing
        require_once 'AastraIPPhoneExecute.class.php';
        $object = new AastraIPPhoneExecute();
        $object->addEntry('');
        break;
}
# Send XML answer
コード例 #8
0
         $object->setText(Aastra_get_label('Password mismatch.', $language));
         # Softkeys
         if ($nb_softkeys) {
             if ($nb_softkeys == 6) {
                 if ($mode == 'SINGLE') {
                     $object->addSoftkey('5', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                 } else {
                     $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list&index=' . $index);
                 }
                 $object->addSoftkey('6', Aastra_get_label('Close', $language), $XML_SERVER . '&action=change&index=' . $index);
             } else {
                 if ($mode == 'SINGLE') {
                     $object->addSoftkey('9', Aastra_get_label('Cancel', $language), 'SoftKey:Exit');
                 } else {
                     $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=list&index=' . $index);
                     $object->setCancelAction($XML_SERVER . '&action=list&index=' . $index);
                 }
                 $object->addSoftkey('10', Aastra_get_label('Close', $language), $XML_SERVER . '&action=change&index=' . $index);
             }
         }
     }
     break;
     # Check or Register
 # Check or Register
 case 'check':
 case 'register':
     # Context change
     $context = False;
     # Combined Status
     $combined = 0;
     # Retrieve status for all configured indexes
コード例 #9
0
ファイル: stock.php プロジェクト: jamesrusso/Aastra_Scripts
                $object->setScrollEnd();
                $object->addLine(Aastra_get_label('Powered by Yahoo', $language), '', 'center');
            }
        } else {
            # Prepare result screen
            $object = new AastraIPPhoneTextScreen();
            require_once 'AastraIPPhoneTextScreen.class.php';
            $object->setTitle(Aastra_get_label('Stock results', $language));
            $object->setText(Aastra_get_label('Information not available at this time. Please try again later.', $language));
        }
        # Add remaining softkeys
        if ($nb_softkeys > 0) {
            if ($nb_softkeys == 6) {
                $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
                $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
            } else {
                $object->addSoftkey('8', Aastra_get_label('Back', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
                $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                $object->setCancelAction($XML_SERVER . '&action=favorites&selection=' . $selection);
            }
        }
        break;
}
# Display object
$object->setDestroyOnExit();
if (Aastra_is_top_title_supported()) {
    $object->setTopTitle(Aastra_get_label('Stock Quotes'), '', '1');
    $object->addIcon('1', 'http://' . $AA_XML_SERVER . '/' . $AA_XMLDIRECTORY . '/icons/stocks.png');
}
$object->output();
exit;
コード例 #10
0
ファイル: rss.php プロジェクト: jamesrusso/Aastra_Scripts
                $softkey = 1;
                for ($y = 0; $y < $nb_rss; $y++) {
                    if ($y >= ($set - 1) * 4 and $y < $set * 4) {
                        $object->addSoftkey($softkey, $Title[$y], $XML_SERVER . '&index=' . ($y + 1) . '&rank=1' . '&set=' . $set);
                        $softkey++;
                    }
                }
                if ($last_set != 1) {
                    if ($set != $last_set) {
                        $object->addSoftkey('5', Aastra_get_label('More...', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . ($rank + 1) . '&set=' . ($set + 1));
                    } else {
                        $object->addSoftkey('5', Aastra_get_label('More...', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . ($rank + 1) . '&set=1');
                    }
                }
                if ($rank != 0) {
                    $object->addSoftkey('8', Aastra_get_label('Previous', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . $rank . '&set=' . $set);
                }
                if ($rank != count($array_rss) - 1) {
                    $object->addSoftkey('9', Aastra_get_label('Next', $language), $XML_SERVER . '&index=' . ($index + 1) . '&rank=' . ($rank + 2) . '&set=' . $set);
                }
                $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                $object->setCancelAction($back);
            }
        } else {
            $object->setDoneAction($back);
        }
    }
    # Display output
    $object->output();
    exit;
}
コード例 #11
0
ファイル: meetme.php プロジェクト: jamesrusso/Aastra_Scripts
 # Display list
 if ($nbuser == 0) {
     # No user
     require_once 'AastraIPPhoneTextScreen.class.php';
     $object = new AastraIPPhoneTextScreen();
     $object->setDestroyOnExit();
     $object->setTitle(sprintf(Aastra_get_label('Conference %s', $language), $confno));
     $object->setText(Aastra_get_label('No user in this conference room.', $language));
     # Softkeys
     if ($nb_softkeys == 6) {
         $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER . '&confno=' . $confno);
         $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     } else {
         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&confno=' . $confno);
         $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         $object->setCancelAction($XML_SERVER . '&confno=' . $confno);
     }
 } else {
     # Retrieve last page
     $last = intval($nbuser / AASTRA_MAXLINES);
     if ($nbuser - $last * AASTRA_MAXLINES != 0) {
         $last++;
     }
     # Sort by name
     Aastra_natsort2d($meetmechannel, '2');
     # Prepare object
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();
     $object->setDestroyOnExit();
     if (Aastra_is_style_textmenu_supported()) {
         $object->setStyle('none');
コード例 #12
0
ファイル: queues.php プロジェクト: jamesrusso/Aastra_Scripts
            $object = new AastraIPPhoneExecute();
            $object->setTriggerDestroyOnExit('');
            $object->addEntry('');
        } else {
            # Error message
            require_once 'AastraIPPhoneTextScreen.class.php';
            $object = new AastraIPPhoneTextScreen();
            $object->setDestroyOnExit();
            $object->setTitle(Aastra_get_label('Pickup failed', $language));
            $object->setText(Aastra_get_label('Failed to intercept the caller in the queue.', $language));
            # Softkeys
            if ($nb_softkeys == 6) {
                $object->addSoftKey('6', Aastra_get_label('Close', $language), $XML_SERVER . '&action=show_queues&queue=' . $queue);
            } else {
                $object->addSoftKey('10', Aastra_get_label('Close', $language), $XML_SERVER . '&action=show_queues&queue=' . $queue);
                $object->setCancelAction($XML_SERVER . '&action=show_queues&queue=' . $queue);
            }
        }
        break;
}
# Display XML object
if ($refresh == 1) {
    $object->output();
} else {
    # Do nothing
    require_once 'AastraIPPhoneExecute.class.php';
    $object2 = new AastraIPPhoneExecute();
    $object2->addEntry('');
    $object2->output();
}
exit;