Update of /cvsroot/phpweather/web
In directory usw-pr-cvs1:/tmp/cvs-serv31163
Modified Files:
index.php
Log Message:
Show a sample output, rather than nothing at all :)
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/web/index.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- index.php 23 Mar 2002 12:50:58 -0000 1.10
+++ index.php 24 Mar 2002 22:49:52 -0000 1.11
@@ -9,29 +9,30 @@
<p>This is the homepage of PHP Weather at <a
href="http://www.sourceforge.net/">SourceForge</a>. You should go <a href="http://sourceforge.net/project/showfiles.php?group_id=23245">here to download</a> files.</p>
-<!-- PHP Weather doesn't do anything as long as we can't get data to
-it on SourceForge :-( So I've commented out the code below, so that
-the page can load more quickly.
<p>PHP Weather helps you do this on your webpages:</p>
+<?
$weather = new phpweather(array());
+$weather->set_metar("EGBE 242120Z 21005KT 200V270 CAVOK 08/03 Q1031");
$text = new pw_text_en($weather, array('mark_begin' => '<font color="blue">',
'mark_end' => '</font>'));
$images = new pw_images($weather, array('icons_path' => 'phpweather/icons/'));
-echo '<p>Current weather in ' . $weather->get_location() . ': ' .
+echo '<p>Current weather in ' . $weather->get_location() . ': <br />' .
'<img src="' . $images->get_sky_image() .
'" height="50" width="80" border="1"> ' .
'<img src="' . $images->get_winddir_image() .
'" height="40" width="40" border="1"> ' .
'<img src="' . $images->get_temp_image() .
- '" height="50" width="20" border="1">';
+ '" height="50" width="20" border="1"></p>';
-echo ". A textual report looks like this:</p>\n";
+echo "<p>A textual report looks like this:</p>\n";
$text->print_pretty();
+?>
+<!--
echo "<p>Now try it yourself:</p>\n";
if (empty($action)) {
@@ -131,7 +132,10 @@
-->
-<?php
+Due to limitations of the SourceForge server, we can not load the most up-to-date information here. To see
+PHPWeather working properly, you can go <a href="http://www.warwick.ac.uk/~msufi/phpweather" target="new">here</a>.
+<?
+
require_once('include/footer.php');
?>
|