CVS: phpweather index.php,1.29,1.30
Brought to you by:
iridium
From: Max H. <ir...@us...> - 2002-03-28 21:45:00
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv3830 Modified Files: index.php Log Message: I think it's easier to follow the flow if we just do this. Also added icon Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- index.php 28 Mar 2002 15:49:09 -0000 1.29 +++ index.php 28 Mar 2002 21:44:56 -0000 1.30 @@ -9,11 +9,35 @@ $weather = new phpweather(array()); +$output = '<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html> +<head> + <title>PHP Weather - test</title> + <style type="text/css"> +<!-- +BODY { + font-family: Verdana, Tahoma, Geneva, Arial, Helvetica, sans-serif; + font-size: 13px; +} + --> + </style> +</head> +<body> + +<img src="icons/phpweather-long-white.gif" alt=""> +<p>This is the default test page for PHP Weather. For more information, please visit +<a href="http://www.phpweather.net">http://www.phpweather.net</a>.</p> +<p>Data is taken from the <a href="http://weather.noaa.gov">National Weather Service</a> at NOAA.</p> + +'; + if (empty($action)) { /* No action - we display a form from which the user can select a country. */ - $output = '<form action="index.php" method="get">' . "\n" . + $output .= '<form action="index.php" method="get">' . "\n" . '<p><input type="hidden" name="action" value="show_stations" /> ' . get_countries_select($weather, '') . ' <input type="submit" />' . "</p>\n</form>\n"; @@ -25,7 +49,7 @@ if (empty($icao)) $icao = ''; if (empty($language)) $language = ''; - $output = '<form action="index.php" method="get">' . "\n<p>" . + $output .= '<form action="index.php" method="get">' . "\n<p>" . '<input type="hidden" name="action" value="show_weather" /> ' . get_countries_select($weather, $cc) . get_stations_select($weather, $cc, $icao) . @@ -34,7 +58,7 @@ } elseif ($action == 'show_weather' && !empty($language)) { /* A station has just been selected - we print the weather. */ - $output = '<form action="index.php" method="get">' . "\n<p>" . + $output .= '<form action="index.php" method="get">' . "\n<p>" . '<input type="hidden" name="action" value="show_weather" /> ' . get_countries_select($weather, $cc) . get_stations_select($weather, $cc, $icao) . @@ -76,30 +100,7 @@ } else { header('Content-Type: text/html; charset=' . $text->get_charset()); } -?> -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "DTD/xhtml1-transitional.dtd"> -<html> -<head> - <title>PHP Weather - test</title> - <style type="text/css"> -<!-- -BODY { - font-family: Verdana, Tahoma, Geneva, Arial, Helvetica, sans-serif; - font-size: 13px; -} - --> - </style> -</head> -<body> - -<h1>PHP Weather - test</h1> -<p>This is the default test page for PHP Weather. For more information, please visit -<a href="http://www.phpweather.net">http://www.phpweather.net</a>.</p> -<p>Data is taken from the <a href="http://weather.noaa.gov">National Weather Service</a> at NOAA.</p> -<?php echo $output; $end_time = explode(' ', microtime()); |