コード例 #1
0
ファイル: vmail_4.php プロジェクト: jamesrusso/Aastra_Scripts
         $object->addEntry(Aastra_get_label('Play Temporary', $language), $XML_SERVER . '&action=play_greetings&msg=temp');
         $object->addEntry(Aastra_get_label('Modify Temporary', $language), $XML_SERVER . '&action=rec_greetings&msg=temp');
         $object->addEntry(Aastra_get_label('Delete Temporary', $language), $XML_SERVER . '&action=del_greetings&msg=temp');
         $del_greetings = True;
     } else {
         $object->addEntry(Aastra_get_label('Record Temporary', $language), $XML_SERVER . '&action=rec_greetings&msg=temp');
     }
     if ($del_greetings) {
         $object->addEntry(Aastra_get_label('Reset greetings', $language), $XML_SERVER . '&action=del_greetings&msg=ALL');
     }
     # Softkeys
     $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
     $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER);
     $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     # Cancel Action
     $object->setCancelAction($XML_SERVER);
     break;
     # Change password
 # Change password
 case 'chg_password':
     # Input Screen
     require_once 'AastraIPPhoneInputScreen.class.php';
     $object = new AastraIPPhoneInputScreen();
     $object->setDestroyOnExit();
     # Input number
     $object->setTitle(Aastra_get_label('Password Change', $language));
     $object->setType('number');
     $object->setPassword();
     $object->setPrompt(Aastra_get_label('New password', $language));
     $object->setParameter('paused');
     $object->setURL($XML_SERVER . '&action=set_password&origin=' . $origin);
コード例 #2
0
             break;
     }
     if ($page != $last) {
         $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&action=' . $action . '&page=' . ($page + 1) . '&selection=' . $selection);
     }
     $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
 } else {
     # 6739i
     if ($page != 0) {
         $object->addSoftkey('3', Aastra_get_label('Previous', $language), $XML_SERVER . '&action=' . $action . '&page=' . ($page - 1) . '&selection=' . $selection);
     }
     switch ($action) {
         case 'input1':
         case 'input2':
             $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=init');
             $object->setCancelAction($XML_SERVER . '&action=init');
             break;
         case 'inputfav1':
             $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=favorites&selection=' . $selection);
             break;
         case 'inputfav2':
             $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=inputfav1&choice=' . $data['favorites'][$selection]['source'] . '&selection=' . $selection);
             break;
     }
     if ($page != $last) {
         $object->addSoftkey('8', Aastra_get_label('Next', $language), $XML_SERVER . '&action=' . $action . '&page=' . ($page + 1) . '&selection=' . $selection);
     }
     $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
 }
 break;
 # Display favorites
コード例 #3
0
ファイル: vmail_3.php プロジェクト: jamesrusso/Aastra_Scripts
                     $object->setDefaultIndex($rank);
                 }
                 $rank++;
             }
             $index++;
         }
         # Actions
         if ($dpage != $last) {
             $object->addEntry(Aastra_get_label('Next Page', $language), $XML_SERVER . '&action=forward2&msg=' . $msg . '&dpage=' . ($dpage + 1));
         }
         $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
コード例 #4
0
ファイル: mymenu.php プロジェクト: jamesrusso/Aastra_Scripts
                    }
                    if ($menu_page2 != $last) {
                        $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . ($menu_page2 + 1));
                    }
                    $object->addSoftkey('3', Aastra_get_label('Details', $language), $XML_SERVER . '&menu_action=details&menu_page2=' . $menu_page2);
                    $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_page=' . $menu_page);
                    $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                } else {
                    $object->addSoftkey('1', Aastra_get_label('Add', $language), 'SoftKey:Select');
                    if ($menu_page2 != 1) {
                        $object->addSoftkey('3', Aastra_get_label('Previous Page', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . ($menu_page2 - 1));
                    }
                    if ($menu_page2 != $last) {
                        $object->addSoftkey('8', Aastra_get_label('Next Page', $language), $XML_SERVER . '&menu_action=add&menu_page2=' . ($menu_page2 + 1));
                    }
                    $object->addSoftkey('6', Aastra_get_label('Details', $language), $XML_SERVER . '&menu_action=details&menu_page2=' . $menu_page2);
                    $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_page=' . $menu_page);
                    $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
                    $object->setCancelAction('9', Aastra_get_label('Back', $language), $XML_SERVER . '&menu_page=' . $menu_page);
                }
            }
        } else {
            # Display list
            $object = new AastraIPPhoneExecute();
            $object->addEntry($XML_SERVER . '&menu_action=list');
        }
        break;
}
# Display object
$object->output();
exit;
コード例 #5
0
     # Notify
 # Notify
 case 'notify':
     # Display choice
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();
     $object->setDestroyOnExit();
     $object->setTitle(Aastra_get_label('Notification type', $language));
     $object->addEntry(Aastra_get_label('Message', $language), $XML_SERVER . '&action=set_notifym&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
     $object->addEntry(Aastra_get_label('Phone Call', $language), $XML_SERVER . '&action=set_notifyv&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
     # Softkeys
     $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection, 1);
     $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 2);
     $object->addIcon(1, 'Icon:ArrowLeft');
     $object->addIcon(2, 'Icon:CircleRed');
     $object->setCancelAction($XML_SERVER . '&action=zoom&lookup=' . $lookup . '&page=' . $page . '&selection=' . $selection);
     break;
     # Set Notify
 # Set Notify
 case 'set_notifym':
 case 'set_notifyv':
     # Add the user to the list
     if ($action == 'set_notifym') {
         Aastra_manage_presence_Asterisk($selection, 'set', 'notifym', $user);
     } else {
         Aastra_manage_presence_Asterisk($selection, 'set', 'notifyv', $user);
     }
     # Display text
     require_once 'AastraIPPhoneTextScreen.class.php';
     $object = new AastraIPPhoneTextScreen();
     $object->setDestroyOnExit();
コード例 #6
0
ファイル: clock.php プロジェクト: jamesrusso/Aastra_Scripts
     }
     # Softkeys
     if ($nb_softkeys > 0) {
         if ($nb_softkeys == 6) {
             $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
             $object->addSoftkey('2', Aastra_get_label('Move Up', $language), $XML_SERVER . '?user='******'&action=up');
             $object->addSoftkey('3', Aastra_get_label('Clear', $language), $XML_SERVER . '?user='******'&action=clear');
             $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '?user='******'&action=list');
             $object->addSoftkey('5', Aastra_get_label('Move Down', $language), $XML_SERVER . '?user='******'&action=down');
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftkey('3', Aastra_get_label('Move Up', $language), $XML_SERVER . '?user='******'&action=up');
             $object->addSoftkey('8', Aastra_get_label('Move Down', $language), $XML_SERVER . '?user='******'&action=down');
             $object->addSoftkey('6', Aastra_get_label('Clear', $language), $XML_SERVER . '?user='******'&action=clear');
             $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '?user='******'&action=list');
             $object->setCancelAction($XML_SERVER . '?user='******'&action=list');
             $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         }
     }
     break;
 case 'zoom':
 case 'zoomfav':
     # Retrieve city index
     $key = search_index($city, $array);
     # Open and retrieve RSS XML file
     $http = 'http://timeanddate.com/worldclock/city.html?n=' . $city;
     $handle = @fopen($http, 'r');
     $found = 0;
     $title = $array[$key]['name'];
     if ($handle) {
         while ($line = fgets($handle, 1000) and $found != 2) {
コード例 #7
0
             if ($nb_softkeys == 10) {
                 $name = $i + 1 . '. ' . $name;
             }
         }
         $object->addEntry($name, $XML_SERVER . '&action=set_speed&speed=' . $i, '');
     }
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
             $object->addSoftkey('4', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=zoom');
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftkey('9', Aastra_get_label('Cancel', $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:PresenceNotAvailable');
             $object->addIcon(2, 'Icon:CircleRed');
         }
     }
     break;
     # Set speed dial
 # Set speed dial
 case 'set_speed':
     # Retrieve session
     $array = Aastra_read_session('csv_directory');
     $temp = unserialize(base64_decode($array['csv_directory']));
     $directory = $temp[1];
     # Update global variable
     $XML_SERVER .= '&lookup=' . $lookup . '&lastn=' . $lastn . '&firstn=' . $firstn . '&index=' . $index . '&page=' . $page . '&company=' . $company;
     # Get user context
コード例 #8
0
ファイル: vmail_5.php プロジェクト: jamesrusso/Aastra_Scripts
         $del_greetings = True;
     } else {
         $object->addEntry(Aastra_get_label('Record Temporary', $language), $XML_SERVER . '&action=rec_greetings&msg=' . $msg . '&greet=temp&origin=' . $origin);
     }
     if ($del_greetings) {
         $object->addEntry(Aastra_get_label('Reset greetings', $language), $XML_SERVER . '&action=del_greetings&msg=' . $msg . '&greet=ALL&origin=' . $origin);
     }
     # Softkeys
     if ($origin == 'list') {
         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=list&last_msg=' . $msg);
     } else {
         $object->addSoftkey('9', Aastra_get_label('Back', $language), $XML_SERVER . '&action=list&last_msg=' . $msg);
     }
     $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     # Cancel Action
     $object->setCancelAction($XML_SERVER . '&action=' . $origin);
     break;
     # Change password
 # Change password
 case 'chg_password':
     # Input Screen
     require_once 'AastraIPPhoneInputScreen.class.php';
     $object = new AastraIPPhoneInputScreen();
     $object->setDestroyOnExit();
     # Input number
     $object->setTitle(Aastra_get_label('Password Change', $language));
     $object->setType('number');
     $object->setPassword();
     $object->setPrompt(Aastra_get_label('New password', $language));
     $object->setParameter('paused');
     $object->setURL($XML_SERVER . '&action=set_password&origin=' . $origin);
 function output($page = NULL)
 {
     # Test phone firmware / model
     Aastra_test_phone_version('1.4.2.', 0);
     Aastra_test_phone_model(array('Aastra9112i', 'Aastra9133i'), False, 0);
     # Force destroyOnExit
     $this->_destroyOnExit = 'yes';
     # Initial call?
     if (!isset($page)) {
         # Count number of entries in list
         $this->_count = count($this->_list);
         # Setup icons
         $this->_setupIcons();
         # Setup Softkeys
         $this->_setupSoftKeys();
         # Set Cancel URI
         if (!empty($this->_backCancelURL)) {
             parent::setCancelAction($this->_backCancelURL);
         }
         # Do some security / compliancy checks
         # Protect against wrap list bug in FW < R2.4.0
         if (Aastra_test_phone_version('2.4.0.', 1)) {
             $this->_wraplist = 'no';
         }
         if (!Aastra_is_wrap_title_supported()) {
             $this->_wraplist = 'no';
         }
         if (!Aastra_is_textmenu_wrapitem_supported()) {
             $this->_title_wrap = 'no';
         }
         if (!Aastra_is_style_textmenu_supported()) {
             $this->_style = '';
         }
         if (!Aastra_is_lockin_supported()) {
             $this->_lockin = 'no';
         }
         # Save object in user context (context = mac address)
         Aastra_save_user_context($this->_header['mac'], 'scrollableTextMenuData', $this);
     } else {
         # If beep is set, only beep during initial call
         $this->_beep = 'no';
     }
     # Generate the actual items of the menu for the given page
     $this->_generatePage($page);
     parent::output();
 }
 function zoom($index, $recentPage, $recentSelection)
 {
     # Find record matching the given index
     foreach ($this->_list as $record) {
         if ($record['index'] == $index) {
             $myrecord = $record;
             break;
         }
     }
     # Textmenu for the zoom
     $menu = new AastraIPPhoneTextMenu();
     $menu->setDestroyOnExit();
     if (Aastra_is_style_textmenu_supported()) {
         $menu->setStyle('none');
     }
     if (Aastra_is_wrap_title_supported()) {
         $menu->setTitleWrap();
     }
     if (Aastra_is_textmenu_wrapitem_supported()) {
         $menu->setWrapList();
     }
     $menu->setTitle($myrecord['name']);
     # Default Index
     $defaultIndex = 1;
     if (!empty($myrecord['title'])) {
         $menu->addEntry($myrecord['title'], NULL, NULL);
         $defaultIndex++;
     }
     if (!empty($myrecord['department'])) {
         $menu->addEntry($myrecord['department'], NULL, NULL);
         $defaultIndex++;
     }
     if (!empty($myrecord['company'])) {
         $menu->addEntry($myrecord['company'], NULL, NULL);
         $defaultIndex++;
     }
     $menu->setDefaultIndex($defaultIndex);
     # If Dial2 softkey is supported, add 'Dial:' Prefix to URL (so number can be dialed by pressing right navigation key)
     if (!Aastra_test_phone_version('2.0.1.', 1)) {
         $URLprefix = 'Dial:';
     } else {
         $URLprefix = '';
     }
     # Office Number
     if (!empty($myrecord['office'])) {
         if (Aastra_is_icons_supported()) {
             $iconIndex = 10;
             $prompt = '';
         } else {
             $iconIndex = NULL;
             $prompt = Aastra_get_label('(W)', $this->_language) . ' ';
         }
         if (!Aastra_test_phone_version('2.0.1.', 1)) {
             $menu->addEntry($prompt . $myrecord['office'], $URLprefix . $myrecord['officeDigits'], $myrecord['officeDigits'], $iconIndex, $myrecord['officeDigits']);
         } else {
             $menu->addEntry($prompt . $myrecord['office'], $URLprefix . $myrecord['officeDigits'], $myrecord['officeDigits']);
         }
     }
     # Office 2 number
     if (!empty($myrecord['office2'])) {
         if (Aastra_is_icons_supported()) {
             $iconIndex = 10;
             $prompt = '';
         } else {
             $iconIndex = NULL;
             $prompt = Aastra_get_label('(W)', $this->_language) . ' ';
         }
         if (!Aastra_test_phone_version('2.0.1.', 1)) {
             $menu->addEntry($prompt . $myrecord['office2'], $URLprefix . $myrecord['office2Digits'], $myrecord['officeDigits'], $iconIndex, $myrecord['office2Digits']);
         } else {
             $menu->addEntry($prompt . $myrecord['office2'], $URLprefix . $myrecord['office2Digits'], $myrecord['officeDigits']);
         }
     }
     # Mobile number
     if (!empty($myrecord['mobile'])) {
         if (Aastra_is_icons_supported()) {
             $iconIndex = 11;
             $prompt = '';
         } else {
             $iconIndex = NULL;
             $prompt = Aastra_get_label('(C)', $this->_language) . ' ';
         }
         if (!Aastra_test_phone_version('2.0.1.', 1)) {
             $menu->addEntry($prompt . $myrecord['mobile'], $URLprefix . $myrecord['mobileDigits'], $myrecord['officeDigits'], $iconIndex, $myrecord['mobileDigits']);
         } else {
             $menu->addEntry($prompt . $myrecord['mobile'], $URLprefix . $myrecord['mobileDigits'], $myrecord['officeDigits']);
         }
     }
     # Home number
     if (!empty($myrecord['home'])) {
         if (Aastra_is_icons_supported()) {
             $iconIndex = 12;
             $prompt = '';
         } else {
             $iconIndex = NULL;
             $prompt = Aastra_get_label('(H)', $this->_language) . ' ';
         }
         if (!Aastra_test_phone_version('2.0.1.', 1)) {
             $menu->addEntry($prompt . $myrecord['home'], $URLprefix . $myrecord['homeDigits'], $myrecord['officeDigits'], $iconIndex, $myrecord['homeDigits']);
         } else {
             $menu->addEntry($prompt . $myrecord['home'], $URLprefix . $myrecord['homeDigits'], $myrecord['officeDigits']);
         }
     }
     # Softkeys
     if (Aastra_is_softkeys_supported()) {
         if (Aastra_number_softkeys_supported() != 10) {
             # Regular phone with 6 softkeys
             if (!Aastra_test_phone_version('2.0.1.', 1)) {
                 $dialKeyType = 'SoftKey:Dial2';
             } else {
                 $dialKeyType = 'SoftKey:Dial';
             }
             $menu->addSoftkey(1, Aastra_get_label('Dial', $this->_language), $dialKeyType);
             $menu->addSoftkey(3, Aastra_get_label('Back', $this->_language), $this->_scrollHandlerReference . '&listPage=' . $recentPage . '&recentSelection=' . $recentSelection);
             $menu->addSoftkey(6, Aastra_get_label('Exit', $this->_language), 'SoftKey:Exit');
             # Check if speed dial URL is set
             if (isset($myrecord['speedURL'])) {
                 $menu->addSoftkey(4, Aastra_get_label('Add to Speed Dial', $this->_language), $myrecord['speedURL']);
             }
         } else {
             # 6739i
             $menu->addSoftkey(9, Aastra_get_label('Back', $this->_language), $this->_scrollHandlerReference . '&listPage=' . $recentPage . '&recentSelection=' . $recentSelection, 8);
             $menu->addSoftkey(10, Aastra_get_label('Exit', $this->_language), 'SoftKey:Exit', 9);
             # Check if speed dial URL is set
             if (isset($myrecord['speedURL'])) {
                 $menu->addSoftkey(6, Aastra_get_label('+Speed', $this->_language), $myrecord['speedURL']);
             }
         }
     }
     # Icons
     if (Aastra_is_icons_supported()) {
         if (Aastra_phone_type() != 5) {
             $menu->addIcon(10, Aastra_get_custom_icon('Office'));
             $menu->addIcon(11, Aastra_get_custom_icon('Cellphone'));
             $menu->addIcon(12, Aastra_get_custom_icon('Home'));
         } else {
             $menu->addIcon(8, 'Icon:ArrowLeft');
             $menu->addIcon(9, 'Icon:CircleRed');
             $menu->addIcon(10, 'Icon:Office');
             $menu->addIcon(11, 'Icon:CellPhone');
             $menu->addIcon(12, 'Icon:Home');
         }
     }
     # Cancel action
     $menu->setCancelAction($this->_scrollHandlerReference . '&listPage=' . $recentPage . '&recentSelection=' . $recentSelection);
     # Display XML object
     $menu->output();
 }
コード例 #11
0
ファイル: away.php プロジェクト: jamesrusso/Aastra_Scripts
         $object->addIcon(3, Aastra_get_custom_icon('Phone'));
         $object->addIcon(4, Aastra_get_custom_icon('Keypad'));
     }
     # Softkeys
     if ($nb_softkeys) {
         if ($nb_softkeys == 6) {
             $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
             $object->addSoftkey('5', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
             $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         } else {
             $object->addSoftkey('9', Aastra_get_label('Cancel', $language), $XML_SERVER . '&action=input_prefs2&state=' . $state);
             $object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
         }
     }
     # Cancel action
     $object->setCancelAction($XML_SERVER . '&action=input_prefs2&state=' . $state);
     break;
     # Record Temp message
 # Record Temp message
 case 'rec_msg':
     # Get current status
     $away = Aastra_manage_presence_Asterisk($user, 'get');
     # Next step
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     # Test if phone can dial
     if (!Aastra_is_dialuri_supported()) {
         # No display change
         $object->addEntry('');
         $object->output(True);
         # Disable DND if needed
コード例 #12
0
ファイル: rss.php プロジェクト: jamesrusso/Aastra_Scripts
         $object->addEntry($value['title'], $value['uri'] . '&set=' . $set);
     }
     $i++;
 }
 if (Aastra_is_softkeys_supported()) {
     if (Aastra_number_softkeys_supported() < 7) {
         $object->addSoftkey('1', Aastra_get_label('Select', $language), 'SoftKey:Select');
         if ($page != 1) {
             $object->addSoftkey('2', Aastra_get_label('Previous', $language), $XML_SERVER . '&index=' . ($index + 1) . '&page=' . ($page - 1));
         }
         if ($page != $last) {
             $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&index=' . ($index + 1) . '&page=' . ($page + 1));
         }
         if ($nb_rss > 1) {
             $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&last_index=' . ($index + 1));
             $object->setCancelAction($XML_SERVER . '&last_index=' . ($index + 1));
         }
         $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit');
     } else {
         $last_set = intval($nb_rss / 4);
         if ($nb_rss - $last_set * 4 != 0) {
             $last_set++;
         }
         $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) . '&set=' . $set);
                 $softkey++;
             }
         }
         if ($last_set != 1) {
コード例 #13
0
ファイル: agent.php プロジェクト: jamesrusso/Aastra_Scripts
             $object->addEntry(Aastra_get_label('Logoff', $language), $XML_SERVER . '&action=log&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc);
         }
         # Paused?
         if ($status['Paused']) {
             $object->addEntry(Aastra_get_label('Unpause', $language), $XML_SERVER . '&action=pause&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc);
         } else {
             $object->addEntry(Aastra_get_label('Pause', $language), $XML_SERVER . '&action=pause&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc);
         }
     } else {
         # Dynamic agent?
         if ($status['Type'] == 'dynamic') {
             $object->addEntry(Aastra_get_label('Logon', $language), $XML_SERVER . '&action=log&queue=' . $queue . '&q_pass='******'&q_desc=' . $q_desc);
         }
     }
     # Cancel action
     $object->setCancelAction($XML_SERVER . '&action=show_queues&queue=' . $queue);
     break;
     # Login/Logout
 # Login/Logout
 case 'log':
     # No change by default
     $update = False;
     # Get agent status for this queue
     $status = get_agent_status($queue, $agent);
     # Agent logged?
     if ($status['Logged']) {
         # Dynamic agent?
         if ($status['Type'] == 'dynamic') {
             # Remove agent from selected queue
             Aastra_queue_remove_Asterisk($agent, $queue);
             # Update needed
コード例 #14
0
ファイル: key.php プロジェクト: jamesrusso/Aastra_Scripts
 case 'nothing':
     # Do Nothing
     require_once 'AastraIPPhoneExecute.class.php';
     $object = new AastraIPPhoneExecute();
     $object->setBeep();
     $object->AddEntry('');
     break;
     # Key menu for non softkey phones
 # Key menu for non softkey phones
 case 'menu':
     # Base screen
     require_once 'AastraIPPhoneTextMenu.class.php';
     $object = new AastraIPPhoneTextMenu();
     $object->setDestroyOnExit();
     $object->setStyle('radio');
     $object->setCancelAction($XML_SERVER . '&action=main&type=' . $type . '&default=' . $selection . '&page=' . $page);
     # Labels for the title
     $array_title = array('top' => Aastra_get_label('Top Key %d', $language), 'bottom' => Aastra_get_label('Bottom Key %d', $language), 'expmod1' => Aastra_get_label('Module 1 Key %d', $language), 'expmod2' => Aastra_get_label('Module 2 Key %d', $language), 'expmod3' => Aastra_get_label('Module 3 Key %d', $language));
     if ($type == 'bottom' and $array_config[$header['model']]['top key'] != '1') {
         $title = sprintf(Aastra_get_label('Key %d', $language), $array_key[$selection]['key']);
     } else {
         $title = sprintf($array_title[$type], $array_key[$selection]['key']);
     }
     $object->setTitle($title);
     # Locked keys
     if ($array_key[$selection]['locked'] == '1') {
         # Only label change
         $object->addEntry(Aastra_get_label('Change Label', $language), $XML_SERVER . '&action=label&type=' . $type . '&selection=' . $selection . '&page=' . $page . '&set=' . $set);
     } else {
         # Move up
         if ($array_key[$selection]['key'] > 1) {