示例#1
0
 }
 # 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));
                 $object->addEntry($tzname, $XML_SERVER . '&action=submit&extension=' . $extension . '&password='******'&tz_code=' . $value . '&tz_name=' . $tzname);