$label = '.....................'; } if ($is_icons) { $icon = $value[0]; } else { $icon = ''; $label = $value[1] . ' ' . $label; } $object->addEntry($label, $XML_SERVER . '&action=edit_info&type=' . $key, $key, $icon); } # Icons if ($is_icons) { if (Aastra_phone_type() != 5) { $object->addIcon(1, Aastra_get_custom_icon('Cellphone')); $object->addIcon(2, Aastra_get_custom_icon('Home')); $object->addIcon(3, Aastra_get_custom_icon('Phone')); } else { $object->addIcon(1, 'Icon:CellPhone'); $object->addIcon(2, 'Icon:Home'); $object->addIcon(3, 'Icon:PhoneOnHook'); } } # Softkeys if ($nb_softkeys) { if ($nb_softkeys == 6) { $object->addSoftkey('1', Aastra_get_label('Edit', $language), 'SoftKey:Select'); $object->addSoftkey('2', Aastra_get_label('Clear', $language), $XML_SERVER . '&action=clear_info'); $object->addSoftkey('5', Aastra_get_label('Back', $language), $XML_SERVER); $object->addSoftkey('6', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } else { $object->addSoftkey('1', Aastra_get_label('Clear', $language), $XML_SERVER . '&action=clear_info');
$object->addSoftkey('10', Aastra_get_label('Exit', $language), 'SoftKey:Exit', 13); $object->setCancelAction($XML_SERVER . '&action=browse&input=' . $input); $object->addIcon(10, 'Icon:Information'); $object->addIcon(11, 'Icon:Add'); $object->addIcon(12, 'Icon:ArrowLeft'); $object->addIcon(13, 'Icon:CircleRed'); } } else { $object->setCancelAction($XML_SERVER . '&action=browse'); } # Icons if ($is_icons) { if (Aastra_phone_type() != 5) { $object->addIcon(1, Aastra_get_custom_icon('Office')); $object->addIcon(2, Aastra_get_custom_icon('Cellphone')); $object->addIcon(3, Aastra_get_custom_icon('Home')); } else { $object->addIcon(1, 'Icon:Office'); $object->addIcon(2, 'Icon:CellPhone'); $object->addIcon(3, 'Icon:Home'); } } break; # Details on results # Details on results case 'details': # Retrieve session $array = Aastra_read_session('csv_directory'); $temp = unserialize(base64_decode($array['csv_directory'])); $directory = $temp[1]; # Update global variable
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(); }
$object->addEntry($label, $XML_SERVER . '&action=set_prefs&state=' . $state . '&value1=' . AA_PRESENCE_ACT_CFWD . '&type=' . $array_user[$key], '', $icon); } } # Manuel entry if ($is_icons) { $icon = '4'; } else { $icon = ''; } $object->addEntry(Aastra_get_label('Enter Number', $language), $XML_SERVER . '&action=edit_number1&state=' . $state, '', $icon); # Icons if ($is_icons) { $object->addIcon(1, Aastra_get_custom_icon('Cellphone')); $object->addIcon(2, Aastra_get_custom_icon('Home')); $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;
$object->addEntry($name, $XML_SERVER . '&action=refresh&page=' . $page . '&confno=' . $confno . '&mode=' . $mode, $new_selection . '&user_id=' . $value[0], $icon); $new_selection++; } $index++; } # Timeout $object->setTimeout('120'); # Default value if (isset($selection)) { $object->setDefaultIndex($selection); } # Icons if ($is_icons) { if (Aastra_phone_type() != 5) { $object->addIcon('1', Aastra_get_custom_icon('Speaker')); $object->addIcon('2', Aastra_get_custom_icon('Muted')); } else { $object->addIcon(1, 'Icon:Speaker'); $object->addIcon(2, 'Icon:Mute'); } } # Softkeys if ($nb_softkeys == 6) { if ($mode == 'admin') { $object->addSoftkey(1, Aastra_get_label('(Un)Mute', $language), $XML_SERVER . '&action=mute&page=' . $page . '&confno=' . $confno . '&mode=' . $mode); $object->addSoftkey(3, Aastra_get_label('Kick', $language), $XML_SERVER . '&action=kick&page=' . $page . '&confno=' . $confno . '&mode=' . $mode); } if ($page != 1) { $object->addSoftkey(2, Aastra_get_label('Previous', $language), $XML_SERVER . '&action=display&page=' . ($page - 1) . '&confno=' . $confno . '&mode=' . $mode); } $object->addSoftkey('4', Aastra_get_label('Back', $language), $XML_SERVER . '&confno=' . $confno);
if ($page != $last) { $object->addSoftkey('5', Aastra_get_label('Next', $language), $XML_SERVER . '&action=list&page=' . ($page + 1)); } if ($lookup != '') { $object->addSoftkey('4', Aastra_get_label('List', $language), $XML_SERVER . '&action=list'); } else { $object->addSoftkey('4', Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } $object->addSoftkey('6', Aastra_get_label('More', $language), $XML_SERVER . '&action=list&menu_set=1&lookup=' . $lookup); } } # Icons $object->addIcon('1', Aastra_get_custom_icon('Available')); $object->addIcon('2', Aastra_get_custom_icon('DND')); $object->addIcon('3', Aastra_get_custom_icon('Bell')); $object->addIcon('4', Aastra_get_custom_icon('Offhook')); } 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('4', Aastra_get_label('List Mode', $language), $XML_SERVER . '&action=list');