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(); }
} # Log call to the application if ($asterisk) { Aastra_trace_call('asterisk_csv_dir', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } else { Aastra_trace_call('csv_directory', 'action=' . $action . ', lookup=' . $lookup . ', page=' . $page . ', index=' . $index . ', lastn=' . $lastn . ', firstn=' . $firstn . ', user='******', speed=' . $speed); } # Test User Agent Aastra_test_phone_versions(array('1' => '', '2' => '1.4.2.', '3' => '2.5.3.', '4' => '2.5.3.', '5' => '3.0.1.'), '0'); # Get Language $language = Aastra_get_language(); # Get global compatibility $is_multipleinputfields = Aastra_is_multipleinputfields_supported(); $nb_softkeys = Aastra_number_softkeys_supported(); $is_icons = Aastra_is_icons_supported(); $is_lockin = Aastra_is_lockin_supported(); $is_style_textmenu = Aastra_is_style_textmenu_supported(); $is_formatted_textscreen = Aastra_is_formattedtextscreen_supported(); $is_textmenu_wrapitem = Aastra_is_textmenu_wrapitem_supported(); # Retrieve the size of the display $chars_supported = Aastra_size_display_line(); if ($is_style_textmenu) { $chars_supported--; } # To handle non softkey phones if ($nb_softkeys) { $MaxLines = AASTRA_MAXLINES; } else { $MaxLines = AASTRA_MAXLINES - 2; } # Update URI
} } # Test MAC address if ($continue) { # If TZ must be asked if ($AA_ASK_TZ) { # Get TZ data $array_ini = Aastra_readINIfile(AASTRA_CONFIG_DIRECTORY . 'timezone.conf', '#', '='); $last = intval(count($array_ini['tz']) / $MaxLines); if (count($array_ini['tz']) - $last * $MaxLines != 0) { $last++; } # Create TextMenu $object = new AastraIPPhoneTextMenu(); $object->setDestroyOnExit(); if (Aastra_is_lockin_supported()) { $object->setLockIn(); } if (Aastra_size_display_line() > 16) { $object->setTitle(sprintf(Aastra_get_label('Select Timezone (%d/%d)', $language), $page, $last)); } else { $object->setTitle(sprintf(Aastra_get_label('Timezone (%d/%d)', $language), $page, $last)); } # Display current TZ page $i = 0; if (!$nb_softkeys and $page != 1) { $object->addEntry(Aastra_get_label('Previous Page', $language), $XML_SERVER . '&action=input&step=3&extension=' . $extension . '&password='******'&page=' . ($page - 1)); } foreach ($array_ini['tz'] as $key => $value) { if ($i >= ($page - 1) * $MaxLines and $i < $page * $MaxLines) { $tzname = strtoupper(substr($key, 0, 4)) . substr($key, -(strlen($key) - 4));