$object = new AastraIPPhoneTextScreen(); $object->setTitle(Aastra_get_label('Information not available', $language)); $object->setText(Aastra_get_label('The information you are looking for is not available at this time. Try again later.', $language)); $output = $object->output(); exit; } # ZIP code OK? if ($itemCount != 0) { # Prepare static file $handle = @fopen($file_name, 'w'); if ($handle) { for ($y = 0; $y < $itemCount; $y++) { # Format data fputs($handle, '[' . $y . "]\n"); $allItems[$y]['title'] = filter_format($allItems[$y]['title']); $allItems[$y]['title'] = trim_title($allItems[$y]['title'], '', ' :: '); if ($y == 0) { $main = $allItems[$y]['title']; $allItems[$y]['title'] = 'Currently'; } fputs($handle, 'title=' . $allItems[$y]['title'] . "\n"); $description = filter_format($allItems[$y]['description']); if (trim($description, ' ') == '') { $description = Aastra_get_label('No data provided', $language); } $allItems[$y]['description'] = $description . ' ' . Aastra_get_label('RSS feed provided by rssweather.com and brought to you by Aastra Telecom.', $language); fputs($handle, 'description=' . $allItems[$y]['description'] . "\n"); fputs($handle, 'uri=' . $XML_SERVER . '&zip=' . $zip . '&index=' . ($y + 1) . "\n"); } fputs($handle, "[99]\n"); fputs($handle, 'title=' . $main . "\n");
if ($nb != 0) { $object->addSoftkey($nb, Aastra_get_label('Exit', $language), 'SoftKey:Exit'); } $output = $object->output(); exit; } # At least one item if ($itemCount > 0) { # Prepare static file $handle = @fopen($file_name, 'w'); if ($handle) { for ($y = 0; $y < $itemCount; $y++) { # Format data fputs($handle, '[' . $y . ']' . "\n"); $allItems[$y]['title'] = filter_format($allItems[$y]['title'], $pattern, $before_s, $before_r, $after_s, $after_r); $allItems[$y]['title'] = trim_title($allItems[$y]['title'], $trim_title_before, $trim_title_after); $description = filter_format($allItems[$y]['description'], $pattern, $before_s, $before_r, $after_s, $after_r); if (trim($description, ' ') == '') { $description = $nodescription; } $allItems[$y]['description'] = $description . $copyright; switch ($encoding) { case 'utf8': fputs($handle, 'title=' . utf8_decode(ereg_replace("’", "'", $allItems[$y]['title'])) . "\n"); fputs($handle, 'description=' . utf8_decode(ereg_replace("’", "'", $allItems[$y]['description'])) . "\n"); break; default: fputs($handle, 'title=' . $allItems[$y]['title'] . "\n"); fputs($handle, 'description=' . $allItems[$y]['description'] . "\n"); break; }