CVS: phpweather-1.x demo.php,1.6,1.7
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-07-17 18:07:12
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv18974 Modified Files: demo.php Log Message: Informed people, that they have to include images.inc before they can use the functions get_temp_image($data), get_winddir_image($data), and get_sky_image($data). Index: demo.php =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/demo.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- demo.php 28 Jun 2002 15:51:48 -0000 1.6 +++ demo.php 17 Jul 2002 18:07:08 -0000 1.7 @@ -9,8 +9,11 @@ Be sure to check out the newest version from http://www.sourceforge.net/projects/phpweather/ */ +/* This gives us English strings: */ include('locale_en.inc'); +/* The main PHP Weather code: */ include('phpweather.inc'); +/* Support for including images: */ include('images.inc'); ?> @@ -228,13 +231,14 @@ </font> </code> -<p>To get matching icons you'll use the functions +<p>To get matching icons you should include the file +<code>images.inc</code> and then use the functions <code>get_temp_image($data)</code>, <code>get_winddir_image($data)</code>, and -<code>get_sky_image($code)</code> like this:</p> +<code>get_sky_image($data)</code> like this:</p> <code><font color="#000000"> -<blockquote><br /><font color="#0000CC"><?php $decoded_metar </font><font color="#006600">= </font><font color="#0000CC">process_metar</font><font color="#006600">(</font><font color="#0000CC">$metar</font><font color="#006600">); </font><font color="#0000CC">?><br /></font><img src="<font color="#0000CC"><?php get_temp_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="50" width="20" border="1">&nbsp;<br /><img src="<font color="#0000CC"><?php get_winddir_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="40" width="40" border="1"><br /><img src="<font color="#0000CC"><?php get_sky_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="50" width="80" border="1">&nbsp;<br /></blockquote><br /></font> +<font color="#0000CC"><?php<br />$decoded_metar </font><font color="#006600">= </font><font color="#0000CC">process_metar</font><font color="#006600">(</font><font color="#0000CC">$metar</font><font color="#006600">);<br />include(</font><font color="#CC0000">'images.inc'</font><font color="#006600">);<br /></font><font color="#0000CC">?><br /></font><blockquote><br /><img src="<font color="#0000CC"><?php get_temp_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="50" width="20" border="1">&nbsp;<br /><img src="<font color="#0000CC"><?php get_winddir_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="40" width="40" border="1"><br /><img src="<font color="#0000CC"><?php get_sky_image</font><font color="#006600">(</font><font color="#0000CC">$decoded_metar</font><font color="#006600">) </font><font color="#0000CC">?></font>" height="50" width="80" border="1">&nbsp;<br /></blockquote><br /></font> </code> <p>Please refer to <a href="table.php">this document</a> for more |