phpweather-checkins Mailing List for PHP Weather (Page 9)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(1) |
Feb
(1) |
Mar
(184) |
Apr
(31) |
May
(45) |
Jun
(15) |
Jul
(11) |
Aug
(40) |
Sep
(19) |
Oct
(8) |
Nov
(6) |
Dec
(17) |
2003 |
Jan
(5) |
Feb
|
Mar
(12) |
Apr
(5) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(17) |
Oct
(10) |
Nov
|
Dec
(4) |
2004 |
Jan
(21) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin G. <gim...@us...> - 2002-08-12 23:00:14
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv5188 Modified Files: pw_text_no.php Log Message: Updates from sven-erik, this closes 562977. Index: pw_text_no.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_no.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- pw_text_no.php 16 May 2002 20:02:35 -0000 1.6 +++ pw_text_no.php 12 Aug 2002 23:00:10 -0000 1.7 @@ -105,12 +105,12 @@ $this->strings['cloud_overcast'] = 'himmelen var %sovercast%s fra en høyde av '; $this->strings['cloud_vertical_visibility'] = 'den %svertical visibility%s var '; $this->strings['cloud_condition'] = array( - 'SKC' => 'clear', - 'CLR' => 'clear', - 'FEW' => 'a few', - 'SCT' => 'scattered', - 'BKN' => 'broken', - 'OVC' => 'overcast'); + 'SKC' => 'skyfri', + 'CLR' => 'skyfri', + 'FEW' => 'noen', + 'SCT' => 'spredte', + 'BKN' => 'brutte', + 'OVC' => 'overskyet'); $this->strings['cumulonimbus'] = ' bygeskyer'; $this->strings['towering_cumulus'] = ' tårnende haugskyer'; $this->strings['cavok'] = ' ingen skyer under %s og ingen bygeskyer'; |
From: Martin G. <gim...@us...> - 2002-08-11 11:39:02
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv22957 Modified Files: phpweather.inc Log Message: Ups! We've been lucky that most METARs fit on a single line... Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- phpweather.inc 8 Aug 2002 17:46:04 -0000 1.9 +++ phpweather.inc 11 Aug 2002 11:38:58 -0000 1.10 @@ -492,7 +492,7 @@ $date = trim($file[0]); $metar = trim($file[1]); for ($i = 2; $i < count($file); $i++) { - $metar .= ' ' . trim($file[i]); + $metar .= ' ' . trim($file[$i]); } /* The date is in the form 2000/10/09 14:50 UTC. This seperates |
From: Martin G. <gim...@us...> - 2002-08-08 17:46:07
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv22754 Modified Files: phpweather.inc Log Message: DBM databases now work again thanks to Stuart Henderson <st...@sp...>. Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- phpweather.inc 28 Jun 2002 15:50:03 -0000 1.8 +++ phpweather.inc 8 Aug 2002 17:46:04 -0000 1.9 @@ -386,7 +386,7 @@ * Aalborg, Denmark. */ - global $useOCI, $useMySQL, $useDBM, $usePSQL, $conn, $dbMetar, + global $useOCI, $useMySQL, $useDBM, $usePSQL, $conn, $dbmMetar, $dbmTimestamp, $useXML, $XMLMetar, $XMLParser, $XMLFile; if ($useMySQL) { |
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 |
From: Martin G. <gim...@us...> - 2002-07-14 23:06:02
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv370 Modified Files: AUTHORS Log Message: Added entry for Ondrej Jombik <ne...@po...>. Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather/AUTHORS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- AUTHORS 29 May 2002 19:16:20 -0000 1.4 +++ AUTHORS 14 Jul 2002 23:05:52 -0000 1.5 @@ -74,3 +74,6 @@ Jesús Peñas <jp...@ed...> Made the Spanish translation. + +Ondrej Jombik <ne...@po...> + Translated PHP Weather into Slovak. |
From: Martin G. <gim...@us...> - 2002-07-14 23:03:59
|
Update of /cvsroot/phpweather/phpweather/config In directory usw-pr-cvs1:/tmp/cvs-serv32288 Modified Files: speed_test.php Log Message: Don't hide the errors. Index: speed_test.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/speed_test.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- speed_test.php 29 May 2002 20:12:35 -0000 1.2 +++ speed_test.php 14 Jul 2002 23:03:56 -0000 1.3 @@ -45,6 +45,8 @@ <a href="<?php echo $PHP_SELF ?>?batches=8">256</a>.</p> <?php +error_reporting(E_ALL); + /* This is 256 more or less randomly picked ICAOs from stations.csv. The ICAOs are grouped in batches of 32: */ $icaos = array( |
From: Martin G. <gim...@us...> - 2002-07-14 23:02:43
|
Update of /cvsroot/phpweather/phpweather/config In directory usw-pr-cvs1:/tmp/cvs-serv32090 Modified Files: make_config.php Log Message: Hmm, my Mozilla doesn't treat newlines in the value attribute correctly... strange and annoying. Index: make_config.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/make_config.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- make_config.php 29 May 2002 20:42:56 -0000 1.3 +++ make_config.php 14 Jul 2002 23:02:41 -0000 1.4 @@ -403,9 +403,9 @@ <form action="<? echo $PHP_SELF . '?' . SID ?>" method="post"> -<p>You can <input type="submit" name="download" value="Download the -Configuration" /> or <input type="reset" value="Reset Everything" -onclick="document.location='reset_session.php'" /></p> +<p>You can <input type="submit" name="download" +value="Download the Configuration" /> or <input type="reset" +value="Reset Everything" onclick="document.location='reset_session.php'" /></p> <dl> <?php @@ -415,7 +415,7 @@ ?> </dl> -<p><input type="submit" value="Update options"></p> +<p><input type="submit" value="Update options" /></p> <p>This is a configuration file bases on your answers above:</p> |
From: Martin G. <gim...@us...> - 2002-07-14 22:57:19
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv30861 Modified Files: db_updater.php Log Message: Cool - PHP has an elseif keyword :-) Index: db_updater.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db_updater.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- db_updater.php 25 Mar 2002 23:44:19 -0000 1.8 +++ db_updater.php 14 Jul 2002 22:57:16 -0000 1.9 @@ -14,11 +14,11 @@ file_exists($filename) && ereg('[012][0-9]Z.TXT', $filename)) { $fn = $filename; -} else if (!empty($argv[0]) && +} elseif (!empty($argv[0]) && file_exists($argv[0]) && ereg('[012][0-9]Z.TXT', $argv[0])) { $fn = $argv[0]; -} else if (!empty($argv[1]) && +} elseif (!empty($argv[1]) && file_exists($argv[1]) && ereg('[012][0-9]Z.TXT', $argv[1])) { $fn = $argv[1]; |
From: Martin G. <gim...@us...> - 2002-07-14 22:52:33
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv29900 Added Files: pw_text_sk.php Log Message: Slovak translation from Ondrej Jombik <ne...@po...> - thanks! --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by pw_text to produce Slovak * output. * * @author Ondrej Jombík <ne...@po...> * @author Radoslava Fedáková <mor...@po...> * @link http://www.nepto.sk/ Nepto.SK - homepage * @link http://www.platon.sk/ Platon software development group * @version $Id: pw_text_sk.php,v 1.1 2002/07/14 22:52:29 gimpster Exp $ */ /* ViM 6.0 indentation used */ class pw_text_sk extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to locale_common() */ function pw_text_sk($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-2'; $this->strings['no_data'] = '¥utujem, momentálne nie sú dostupné ¾iadne informácie pre %s%s%s.'; $this->strings['list_sentences_and'] = ' a '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ' a '; $this->strings['location'] = 'Toto je meterologický report pre %s%s%s.'; $this->strings['minutes'] = ' minútami'; $this->strings['time_format'] = 'Report bol zostavený pred %s, o %s%s%s UTC.'; $this->strings['time_minutes'] = 'a %s%s%s minútami'; $this->strings['time_one_hour'] = '%sjednou%s hodinou %s'; $this->strings['time_several_hours'] = '%s%s%s hodinami %s'; $this->strings['time_a_moment'] = 'práve teraz'; $this->strings['meters_per_second'] = ' metrov za sekundu'; $this->strings['miles_per_hour'] = ' míµ za hodinu'; $this->strings['meter'] = ' metrov'; $this->strings['meters'] = ' metre'; $this->strings['feet'] = ' stôp'; $this->strings['kilometers'] = ' kilometrov'; $this->strings['miles'] = ' míl'; $this->strings['and'] = ' a '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' s '; $this->strings['wind_blowing'] = 'Rýchlos» vetra bola '; $this->strings['wind_with_gusts'] = ' so silným závanom od '; $this->strings['wind_from'] = ' z '; $this->strings['wind_variable'] = ' z %srôznych%s smerov'; $this->strings['wind_varying'] = ', meniaca sa medzi smerom z %s%s%s (%s%s°%s) a %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'Vietor bol %spokojný%s'; $this->strings['wind_dir'] = array( 'severu', 'severu/severovýchodu', 'severovýchodu', 'východu/severovýchodu', 'východu', 'východu/juhovýchodu', 'juhovýchodu', 'juhu/juhovýchodu', 'juhu', 'juhu/juhozápadu', 'juhozápadu', 'západu/juhozápadu', 'západu', 'západu/severozápadu', 'severozápadu', 'severu/severozápadu', 'severu'); $this->strings['wind_dir_short'] = array( 'S', 'SSV', 'SV', 'VSV', 'V', 'VJV', 'JV', 'JJV', 'J', 'JJZ', 'JZ', 'ZJZ', 'Z', 'ZSZ', 'SZ', 'SSZ', 'S'); $this->strings['wind_dir_short_long'] = array( 'S' => 'sever', 'SV' => 'severovýchod', 'V' => 'východ', 'JV' => 'juhovýchod', 'J' => 'juh', 'JZ' => 'juhozápad', 'Z' => 'západ', 'SZ' => 'severozápad' ); $this->strings['temperature'] = 'Teplota bola '; $this->strings['dew_point'] = ' s rosným bodom '; $this->strings['altimeter'] = 'Atmosférický tlak bol '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Relatívna vlhkos» vzduchu bola '; $this->strings['feelslike'] = 'Teplota sa zdala by» '; $this->strings['cloud_group_beg'] = 'Na oblohe boli '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Obloha bola %sjasná%s.'; $this->strings['cloud_height'] = ' oblaky vo vý¹ke '; $this->strings['cloud_overcast'] = ' obloha bola %szamraèená%s od vý¹ky '; $this->strings['cloud_vertical_visibility'] = '%svertikálna viditeµnos»%s bola '; $this->strings['cloud_condition'] = array( 'SKC' => 'priehµadné', 'CLR' => 'jasné', 'FEW' => 'niektoré', /*'niekoµko',*/ 'SCT' => 'rozptýlené', 'BKN' => 'zatiahnuté', 'OVC' => 'zamraèené'); $this->strings['cumulonimbus'] = ' cumulonimbus'; $this->strings['towering_cumulus'] = ' týèiace sa nahromadené'; $this->strings['cavok'] = ' ¾iadne oblaky pod %s a ani ¾iadne iné nahromadené oblaky'; $this->strings['currently'] = 'Aktuálnym poèasím bolo '; $this->strings['weather'] = array( /* Intensity */ '-' => ' riedky ', ' ' => ' stredný ', '+' => ' hustý ', /* Proximity */ 'VC' => ' v priµahlých oblastiach', /* Descriptor */ 'PR' => ' èiastoèný', 'BC' => ' areály', 'MI' => ' plytký', 'DR' => ' slabé prúdenie vzduchu', 'BL' => ' veterno', 'SH' => ' prehánky', 'TS' => ' búrka s bleskami', 'FZ' => ' mrznutie', /* Precipitation */ 'DZ' => ' mrholenie s veµkými kvapkami', 'RA' => ' dá¾ï', /* ' da¾divo', */ 'SN' => ' sne¾enie', 'SG' => ' zrnité sne¾enie', 'IC' => ' µadové kry¹táliky', 'PL' => ' µadovec', 'GR' => ' krupobytie', 'GS' => ' slabé krupobytie', 'UP' => ' neznáme', /* Obscuration */ 'BR' => ' hmlový opar nad vodami', 'FG' => ' hmlisto', 'FU' => ' dymno', 'VA' => ' sopeèný popol', 'DU' => ' popra¹ok', 'SA' => ' piesoèno', /* piesoèné */ 'HZ' => ' opar nad pohorím', 'PY' => ' mrholenie s malými kvapôèkami', /* Other */ 'PO' => ' piesoèné výry', 'SQ' => ' prudký závan vetra', 'FC' => ' prietr¾ mraèien', 'SS' => ' pra¹ná priesoèná búrka'); $this->strings['visibility'] = 'Celková viditeµnos» bola '; $this->strings['visibility_greater_than'] = 'väè¹ia ako '; $this->strings['visibility_less_than'] = 'men¹ia ako '; $this->strings['visibility_to'] = ' do '; /* this is left untranslated, because I have no metar, that use this text -- Nepto [14/07/2002] */ $this->strings['runway_upward_tendency'] = ' with an %supward%s tendency'; $this->strings['runway_downward_tendency'] = ' with a %sdownward%s tendency'; $this->strings['runway_no_tendency'] = ' with %sno distinct%s tendency'; $this->strings['runway_between'] = 'between '; $this->strings['runway_left'] = ' left'; $this->strings['runway_central'] = ' central'; $this->strings['runway_right'] = ' right'; $this->strings['runway_visibility'] = 'Viditeµnos» bola '; $this->strings['runway_for_runway'] = ' for runway '; /* We run the parent constructor */ $this->pw_text($weather, $input); } function print_pretty_wind($wind) { extract($wind); if (! empty($meters_per_second)) { switch ($meters_per_second) { case 1: $this->strings['meters_per_second'] = ' meter za sekundu'; break; case 2: case 3: case 4: $this->strings['meters_per_second'] = ' metre za sekundu'; break; default: if ($meters_per_second - floor($meters_per_second) > 0) $this->strings['meters_per_second'] = ' metra za sekundu'; break; } } if (! empty($miles_per_hour)) { switch ($miles_per_hour) { case 1: $this->strings['miles_per_hour'] = ' míµa za hodinu'; break; case 2: case 3: case 4: $this->strings['miles_per_hour'] = ' míle za hodinu'; break; } } /* * Z/ZO grammar handling * zo severu, z juhu, zo zapadu, z vychodu */ if (isset($deg)) { if ($deg == 'VRB') { } else { $idx = intval(round($deg / 22.5)); if ($idx <= 2 || $idx >= 11) { $this->strings['wind_from'] = str_replace(' z ', ' zo ', $this->strings['wind_from']); } } } if (isset($var_beg)) { $idx = intval(round($var_beg / 22.5)); if ($idx <= 2 || $idx >= 11) { $this->strings['wind_varying'] = str_replace(' z ', ' zo ', $this->strings['wind_varying']); } } return parent::print_pretty_wind($wind); } function parse_cloud_group($cloud_group) { extract($cloud_group); if (isset($condition) && $condition == 'CAVOK') { $this->strings['cloud_group_beg'] = str_replace(' boli ', ' neboli ', $this->strings['cloud_group_beg']); } return parent::parse_cloud_group($cloud_group); } function print_pretty_time($time) { $minutes_old = round((time() - $time)/60); if ($minutes_old > 60) { $minutes = $minutes_old % 60; if ($minutes == 1) { $this->strings['time_minutes'] = 'a %s%s%s minútou'; } } else { if ($minutes_old < 5) { /* we must remove word 'pred', because we wanted string: 'Report bol zostavený prave teraz, ...' */ $this->strings['time_format'] = str_replace(' pred ', ' ', $this->strings['time_format']); } } return parent::print_pretty_time($time); } function print_pretty_weather($weather) { if ($weather[0]['descriptor'] == 'SH') { $this->strings['currently'] = str_replace(' bolo ', ' boli ', $this->strings['currently']); if ($weather[0]['precipitation'] == 'RA') { $this->strings['weather']['-'] = ' riedkeho '; $this->strings['weather'][' '] = ' stredného '; $this->strings['weather']['+'] = ' hustého '; $this->strings['weather']['RA'] = ' da¾ïa'; } } elseif ($weather[0]['precipitation'] == 'RA' || $weather[0]['obscuration'] == 'HZ') { $this->strings['currently'] = str_replace(' bolo ', ' bol ', $this->strings['currently']); } return parent::print_pretty_weather($weather); } } /* NOTES: ------ Metars to test: +----+------+---------------------------------------------------------------------------------+ | cc | icao | metar | +----+------+---------------------------------------------------------------------------------+ | FI | EFKK | EFKK 281950Z 18008KT 150V220 9999 -SHRA FEW012 SCT016 BKN020 BKN075 12/12 Q0998 | | KH | VDPP | VDPP 281030Z 23008KT 9000 FEW015 FEW025CB SCT300 33/26 Q1008 CB:S/NW/E | +----+------+---------------------------------------------------------------------------------+ Why is there backslash instead of slash in Airport name? cc=DJ&icao=HDAM Problematic metars: 201530Z VABB 24012KT 5000 FU FEW018 SCT025 28/22 Q1004 NOSIG MWCR 2820000Z 12016KT 9999 HZ FEW016 BKN200 32/25 Q1015 NOSIG CYZT 281900Z 10019G26KT 20SM VCSH FEW025 BKN050 OVC110 13/09 A2956 RMK SC1SC6AC2 SLP009 */ ?> |
From: Martin G. <gim...@us...> - 2002-07-11 16:10:26
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv14279 Modified Files: AUTHORS Log Message: Entry for Fabio Parri <pa...@ut...>. Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/AUTHORS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- AUTHORS 29 Jun 2002 13:37:39 -0000 1.3 +++ AUTHORS 11 Jul 2002 16:10:23 -0000 1.4 @@ -105,3 +105,7 @@ David Kjellquist <da...@kj...> Added support for windchill. + +Fabio Parri <pa...@ut...> + Converted the images so that they can be used on WAP phones and + updated the Italias translation. |
From: Martin G. <gim...@us...> - 2002-07-11 16:08:50
|
Update of /cvsroot/phpweather/phpweather-1.x/pw_icons In directory usw-pr-cvs1:/tmp/cvs-serv13745 Added Files: 0cloud.wbmp 0cloud_fog.wbmp 1cloud_fog.wbmp 1cloud_heavyrain.wbmp 1cloud_lightrain.wbmp 1cloud_modrain.wbmp 1cloud_norain.wbmp 2cloud_fog.wbmp 2cloud_hail.wbmp 2cloud_heavyrain.wbmp 2cloud_lightrain.wbmp 2cloud_modrain.wbmp 2cloud_norain.wbmp 2cloud_snow.wbmp 2cloud_thunders.wbmp 3cloud_fog.wbmp 3cloud_hail.wbmp 3cloud_heavyrain.wbmp 3cloud_lightrain.wbmp 3cloud_modrain.wbmp 3cloud_norain.wbmp 3cloud_snow.wbmp 3cloud_thunders.wbmp 4cloud_fog.wbmp 4cloud_heavyhail.wbmp 4cloud_heavyrain.wbmp 4cloud_heavysnow.wbmp 4cloud_lighthail.wbmp 4cloud_lightrain.wbmp 4cloud_lightsnow.wbmp 4cloud_modrain.wbmp 4cloud_norain.wbmp 4cloud_thunders.wbmp eee.wbmp n_0cloud.wbmp n_0cloud_fog.wbmp n_1cloud_fog.wbmp n_1cloud_heavyrain.wbmp n_1cloud_lightrain.wbmp n_1cloud_modrain.wbmp n_1cloud_norain.wbmp n_2cloud_fog.wbmp n_2cloud_hail.wbmp n_2cloud_heavyrain.wbmp n_2cloud_lightrain.wbmp n_2cloud_modrain.wbmp n_2cloud_norain.wbmp n_2cloud_snow.wbmp n_2cloud_thunders.wbmp n_3cloud_fog.wbmp n_3cloud_hail.wbmp n_3cloud_heavyrain.wbmp n_3cloud_lightrain.wbmp n_3cloud_modrain.wbmp n_3cloud_norain.wbmp n_3cloud_snow.wbmp n_3cloud_thunders.wbmp ne.wbmp nee.wbmp nne.wbmp nnn.wbmp nnw.wbmp nodir.wbmp nw.wbmp nww.wbmp se.wbmp see.wbmp sse.wbmp sss.wbmp ssw.wbmp sw.wbmp sww.wbmp temp_nodata.wbmp temphigh.wbmp templow.wbmp vrb.wbmp wind_nodata.wbmp www.wbmp Log Message: The WBMP files supplied by Fabio Parri <pa...@ut...> - thanks! --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ¯ûU_ÿÿÿÿÈE]Ý´¯ÿÿÿþ©Kvª¿ÿÿÿþoU_ÿÿÿý"" Zª¯ÿÿÿþ¤KmT_ÿÿÿÿûªªÚÕ_ÿÿÿÿÿõ*ªªÿÿÿÿÿÿýUU_ÿÿÿÿÿÿþJª¿ÿÿÿÿÿþýUU}ÿÿÿÿÿýª«öÿÿÿÿÿû¿I_í¯ÿÿÿÿýÔ¾Ú¿ÿÿÿÿü¿Õ}U+ÿÿÿÿþÿú¶¨ÿÿÿÿÿÿÿÕR%ÿÿÿÿÿýé! ¿ÿÿÿÿÿûRWÿÿÿÿÿøH«ÿÿÿÿ¿ù!$Gÿÿÿÿ_úDD+ÿÿÿþïÿÝHªÿÿÿÿÿ_ÿÿUÿÿÿÿÿ/ÿ¿ÿÿ÷ÿÿÿÿ¿ÿ_ÿÿëÿÿÿÿÿþïþÿÝÿÿÿÿÿÿ_ýÛÿÿÿÿÿÿ/û¿åÿÿ --- NEW FILE --- ¯ýª»ïÿÿÈE]ÞÕ]wÿÿþ©Kuª¯ºÿÿþzÕ{ßÿý"" ª÷¿ÿþ¤J¶ªn»ÿÿÿûªmUWÝÿÿûÙVªªýï¿ÿÿÝöU_îûßÿÿîºUZ¿÷]ÿÿÿ÷ÝUU}ûî¿ÿÿý磌öþ÷ßÿÿîûÉ_í¯}ïÿÿ÷]Ô¾Ú¿®ÿÿÿûîµ}U+÷_ÿÿþ÷Ú¶¨ûïÿÿ÷}ïÕR%~÷ÿÿû®ýé! ¿ÿÿý÷[RW¯ÿÿÿ{ìH«÷ÿÿû¾ò!$G{ÿÿý×zD+¿ÿÿþû¯mHªÿ×ÿÿÿ½÷þµ=ï{ÿÿýß{öýßw½ÿÿþë¿û®ëºßÿÿÿ}×ý÷}ßkÿÿÿÞûÿ{Þ÷½ÿÿþï½û¾ï»þÿ --- NEW FILE --- ¯ûU]ÿÿÿÿÈE]Ý´®ÿÿÿþ©Kvª¿÷ÿÿþoU_ûÿÿý"" Zª®ÿÿÿþ¤KmT_ÿÿÿûªªÚÕ_ûÿÿÿÿõ*ªªÿýÿÿÿÿ}UU_ÿÿÿÿÿ¾Jª¿ÿ¿ÿÿÿïýUU}ÿýÿÿÿ÷þª«öÿþÿÿÿÿ¿I_í¯¿ÿÿÿÿßÔ¾Ú¿ßÿÿÿ÷þÕ}U+þÿÿÿûÿz¶¨ÿÿÿÿßÿÕRJßÿÿÿÿïýé %oÿÿÿûÿ{RWÿÿýÿ¸H --- NEW FILE --- ¯ûUWûÿÿÿÈE]Ý´¯ÿÿþ©Kvª·»ÿÿþoU[ýÿÿý"" Zª¯¿ÿÿþ¤KmT[ÝÿÿÿûªªÚªþÿÿÿ½ÚjÕßÿÿÿßíUU_ýîÿÿÿýþªª¿þÿÿÿÞíUUÿïÿÿÿï÷«öþ÷ÿÿþÿe_í¯¿ÿÿïw¾Õ_÷ÿÿÿ÷ûÙ}ª«{¿ÿÿÿº¶Ñ¿ßÿÿ÷»ßê¤JûÿÿÿûýýÔB%}ßÿÿÿ¿Þ©WïÿÿûÝéP --- NEW FILE --- ¯ûU_ÿÿÿÿÈE]Ý´¯ÿÿÿþ©Kvª¿ÿÿÿþoU_ÿÿÿý"" Zª¯ÿÿÿþ¤KmT_ÿÿÿÿûªªÚÕ_ÿÿÿÿÿõ*ªªÿÿÿÿÿÿýUU_ÿÿÿÿÿÿþJª¿ÿÿÿÿÿÿýUU}ÿÿÿÿÿÿÿª«öÿÿÿÿÿÿÿI_í¯ÿÿÿÿÿÿÔ¾Ú¿ÿÿÿÿÿÿÕ}U+ÿÿÿÿÿÿú¶¨ÿÿÿÿÿÿÿÕR%ÿÿÿÿÿýé! ¿ÿÿÿÿÿûRWÿÿÿÿÿøH«ÿÿÿÿÿù!$GÿÿÿÿÿúDD+ÿÿÿÿÿÿÝHªÿÿÿÿÿÿÿÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ --- NEW FILE --- ¯ûU_ÿÿÿÿÈE]Ý´¯ÿÿÿþ©Kvª¿ÿÿÿþoU_ÿÿÿý"" Zª¯ÿÿÿþ¤KmT_ûÿÿÿûªªÚÕ_ûÿÿÿÿõ*ªªÿÖÿÿÿÿýUU_ÿÔÿÿÿÿþJª¿ÿëÿÿÿÿýUU}ÿÔÿÿÿÿÿª«öÿÒÿÿÿÿI_í¯ûÿÿÿÿÿÔ¾Ú¿ÿÿÿÿÿÿÕ}U+ÿÿÿÿÿïú¶¨ÿÿÿÿÿïÿÕR%ÿÿÿÿ[ýé! ¿ÿÿÿÿSûRWÿÿÿÿ¯øH«ÿÿÿÿSù!$GÿÿÿÿIúDD+ÿÿÿÿïÿÝHªÿÿÿÿÿÿÿÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúßÿÿÿÿÿÿÿÿúÿÿÿ --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿþÒ§ÿÕ¿ÿÿÿþßÛÝ¢¯ÿÿÿýUÿ¶¾Wÿÿÿ¿/ÿjÕ ÿÿÿ^Wýª²$$ÿþﯻUIBJÿÿÿ߯uTª¿ÿÿÿ/^Ú ÿÿÿÿÿ¿ý¥$¯ÿÿÿÿÿú¢BD½ÿÿÿÿþÕVÿÿÿÿþª --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿöÒ§ÿÕ¿ÿÿ÷þßÛÝ¢¯ÿÿûÝUÿ¶¾Wÿÿþï/ÿjÕ ÿÿ÷vWýª²$$ÿû¿¯»UIBJÿÿýï¯uTª¿ÿÿÿw^Ú ÿ÷ÿÿû»ý¥$¯»ÿÿýßú¢BD½ÝÿÿþöÕVïÿÿÿºª --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿúÒ§ÿÕ¿ÿÿýþßÛÝ¢¯ÿÿÿíUÿ¶¾Wÿÿÿ÷/ÿjÕ ÿÿýþWýª²$$ÿþÿ¯»UIBJÿÿÿ÷¯uTª·ÿÿÿû^Ú ÿ÷ÿÿþÿý¥$¯ÿÿÿÿÚ¢BD½ÿÿÿÿýµV÷ÿÿÿýZ@ --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿþÒ§ÿÕ¿ÿÿÿößÛÝ¢¯ÿÿÿ}Uÿ¶¾Wÿÿÿ¿/ÿjÕ ÿÿÿúWýª²$$ÿÿ½¯»UIBJÿÿÿ߯uTª¿ÿÿÿý^Ú ÿÿÿÿÿÞý¥$¯ýÿÿÿïÚ¢BD½ÞÿÿÿÿµVïÿÿÿîª --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿþÒ§ÿÕ¿ÿÿÿþßÛÝ¢¯ÿÿÿýUÿ¶¾Wÿÿÿÿ/ÿjÕ ÿÿÿþWýª²$$ÿÿÿ¯»UIBJÿÿÿÿ¯uTª¿ÿÿÿÿ^Ú ÿÿÿÿÿÿý¥$¯ÿÿÿÿÿú¢BD½ÿÿÿÿþÕVÿÿÿÿþª --- NEW FILE --- ÿÿÿûÿÿÿéÿÿÿÖÿÿÿþÒ§ÿÕ¿ÿÿÿþßÛÝ¢¯ÿÿÿýUÿ¶¾Wÿÿÿÿ/ÿjÕ ÿÿÿþWýª²$$ÿÿÿ¯»UIBJÿÿÿÿ¯uTª¿ÿÿÿÿ^Ú ÿÿÿÿÿÿý¥$¯ÿÿÿÿÿú¢BD½ÿÿÿÿþÕVÿÿÿÿþª --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ¿ÿÿÿÿÿûRDWÿÿÿÿÿø«ÿÿÿÿßú"DGÿÿÿÿ¯ùD"D+ÿÿÿÿwÿµDªÿÿÿÿÿïÿÿUÿÿÿÿÿÿßÿÿûÿÿÿÿßÿ¯ÿÿõÿÿÿÿÿÿwÿîÿÿÿÿÿÿïþ¿õÿÿÿÿÿÿýßòÿÿ --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ÿÿÿÿÿjzÿÿÿÿ¶Ôõïÿÿÿÿê©ÚBE_ÿÿÿÿÕRU ·ÿÿÿÿàT/ÿÿÿÿÒ$"OÿÿÿÿýUA --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ÿÿûº×ûZ²$$ÿýß·½©IBJÿÿþ÷ouRª¿ÿÿÿ»®Õ$ÿûÿÿýÝöªI¯ÝÿÿþïÛDA$½îÿÿÿ{ºIV÷ÿÿÿÝU --- NEW FILE --- ÿÿþþ×ûZ²$$ÿÿ·½©IBJÿÿÿûouRª·ÿÿÿý®Õ$ÿûÿÿÿöªI¯ÿÿÿÿ¿ÛDA$½ÿÿÿÿýºI«ûÿÿÿþ© *½ÿÿÿ¼BA$%ÿÿÿÞD $@ÿÿÿüI}ÿÿÿþÕ( þÿÿÿßúÒ¤ª¿ÿÿÿÿïÿúª¿ÿÿÿÿÿÿûwïþÿÿÿÿ¿ýÿ¿÷ÿÿÿïÿïýÿ¿ÿÿÿ÷ÿ¿÷þÿßÿÿÿÿ¿ýÿ¿÷ÿÿÿÿßþÿßûÿ¿ÿÿ÷ÿ¿÷þÿßÿÿ --- NEW FILE --- ÿÿÿî×ûZ²$$ÿþ÷·½©IBJÿÿÿouRª¿ÿÿÿ÷®Õ$ÿÿÿÿÿ{öªI¯÷ÿÿÿ¿ÛDA$½{ÿÿÿÿºI«¿ÿÿÿ¾© *ûÿÿÿÜBA$½ÿÿÿüD $B_ÿÿÿÜH }ÿÿÿïU( UÞÿÿÿþúÒ¤ª½ïÿÿÿïzª¿Þþÿÿÿ÷÷¿Wýïïÿÿÿ{ûßÞþ÷ÿÿÿ÷¿½ýïïÿÿûûßÞþ÷÷¿ÿÿÿ½ýïï{ÿÿÿûßÞþ÷÷¿¿ÿÿýýïï{ûßÿ --- NEW FILE --- ÿÿÿþ×ûZ²$$ÿÿÿ·½©IBJÿÿÿÿouRª¿ÿÿÿÿ®Õ$ÿÿÿÿÿÿöªI¯ÿÿÿÿÿÛDA$½ÿÿÿÿþºIVÿÿÿÿþ© --- NEW FILE --- ÿÿÿþ×ûZ²$$ÿÿÿ·½©IBJÿÿÿÿouRª¿ÿÿÿÿ®Õ$ÿÿÿÿÿÿöªI¯ÿÿÿÿÿÛDA$½ÿÿÿÿþºIVÿÿÿÿþ© --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ¿ÿÿþÿÿþ%_ÿÿþ¿ÿÿþ ÿÿüE?ÿÿý$ÿÿü_ÿÿü¾¯ÿÿüÿßÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ --- NEW FILE --- ÿÿÿþJÿÿÿý%ÿÿÿü ÿÿÿøÿÿÿòÿÿÿð+ÿÿÿäÿÿÿÈSÿÿÿ¡%ÿÿÿUÿÿÿÿ«ÿÿÿÿ×ÿÿÿÿëÿÿÿÿ÷ÿÿÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ --- NEW FILE --- --- NEW FILE --- _ÿúUÿþ!)ÿÿÿ«ÿÿÿWÿÿÿÕ_ÿÿÿÔ¿ÿÿÿ¥ÿÿÿÕÿÿÿÿ«ÿÿÿÿßÿÿÿÿßÿÿÿÿ¿ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- --- NEW FILE --- ¿ÿÿþÿÿþ%_ÿÿþ¿ÿÿþ ÿÿüE?ÿÿý$ÿÿü_ÿÿü¾¯ÿÿüÿßÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ --- NEW FILE --- --- NEW FILE --- |
From: Martin G. <gim...@us...> - 2002-07-11 16:07:31
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv12593 Modified Files: images.inc wap.php Log Message: Fabio Parri <pa...@ut...> has converted the images from GIF format into WBMP format which can be used by WAP enabled phones. So the images.inc file has been changed so that the extension used is configurable - this could be turned into a full-blown theming system, but lets wait until someone submits another set of icons before we do that... Index: images.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/images.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- images.inc 28 Jun 2002 15:56:56 -0000 1.3 +++ images.inc 11 Jul 2002 16:07:27 -0000 1.4 @@ -15,8 +15,13 @@ // This section contains user configurable items: The user can configure // the image filenames to be generated by the script. -// Specify the absolute path to the directory that contains the weather -// icon files. +// Specify the extension of the images. You can choose between '.gif' +// for normal GIF images and '.wbmp' for images to WAP phones. + +$image_extension = '.gif'; + +// Specify the absolute path to the directory that contains the +// weather icon files. $abs_image_path = 'pw_icons/'; @@ -60,7 +65,7 @@ unset($n_images); } -$sky_nodata_image = 'sky_nodata.gif'; +$sky_nodata_image = 'sky_nodata'; // Define a lot of images for daylight weather-group/cloud condition. // It's a 2-dimensional array, indexed by the: @@ -68,56 +73,56 @@ // - Cloud coverage (second index). $images = array ( - 'None' => array ('0' => '0cloud.gif', - '1' => '1cloud_norain.gif', - '2' => '2cloud_norain.gif', - '3' => '3cloud_norain.gif', - '4' => '4cloud_norain.gif'), - '-Rain' => array ('0' => '0cloud.gif', - '1' => '1cloud_lightrain.gif', - '2' => '2cloud_lightrain.gif', - '3' => '3cloud_lightrain.gif', - '4' => '4cloud_lightrain.gif'), - 'Rain' => array ('0' => '0cloud.gif', - '1' => '1cloud_modrain.gif', - '2' => '2cloud_modrain.gif', - '3' => '3cloud_modrain.gif', - '4' => '4cloud_modrain.gif'), - '+Rain' => array ('0' => '0cloud.gif', - '1' => '1cloud_heavyrain.gif', - '2' => '2cloud_heavyrain.gif', - '3' => '3cloud_heavyrain.gif', - '4' => '4cloud_heavyrain.gif'), - '-Snow' => array ('0' => '0cloud.gif', - '1' => '2cloud_snow.gif', - '2' => '2cloud_snow.gif', - '3' => '3cloud_snow.gif', - '4' => '4cloud_lightsnow.gif'), - '+Snow' => array ('0' => '0cloud.gif', - '1' => '2cloud_snow.gif', - '2' => '2cloud_snow.gif', - '3' => '3cloud_snow.gif', - '4' => '4cloud_heavysnow.gif'), - '-Hail' => array ('0' => '0cloud.gif', - '1' => '2cloud_hail.gif', - '2' => '2cloud_hail.gif', - '3' => '3cloud_hail.gif', - '4' => '4cloud_lighthail.gif'), - '+Hail' => array ('0' => '0cloud.gif', - '1' => '2cloud_hail.gif', - '2' => '2cloud_hail.gif', - '3' => '3cloud_hail.gif', - '4' => '4cloud_heavyhail.gif'), - 'Thun' => array ('0' => '0cloud.gif', - '1' => '2cloud_thunders.gif', - '2' => '2cloud_thunders.gif', - '3' => '3cloud_thunders.gif', - '4' => '4cloud_thunders.gif'), - 'Fog' => array ('0' => '0cloud_fog.gif', - '1' => '1cloud_fog.gif', - '2' => '2cloud_fog.gif', - '3' => '3cloud_fog.gif', - '4' => '4cloud_fog.gif') + 'None' => array ('0' => '0cloud', + '1' => '1cloud_norain', + '2' => '2cloud_norain', + '3' => '3cloud_norain', + '4' => '4cloud_norain'), + '-Rain' => array ('0' => '0cloud', + '1' => '1cloud_lightrain', + '2' => '2cloud_lightrain', + '3' => '3cloud_lightrain', + '4' => '4cloud_lightrain'), + 'Rain' => array ('0' => '0cloud', + '1' => '1cloud_modrain', + '2' => '2cloud_modrain', + '3' => '3cloud_modrain', + '4' => '4cloud_modrain'), + '+Rain' => array ('0' => '0cloud', + '1' => '1cloud_heavyrain', + '2' => '2cloud_heavyrain', + '3' => '3cloud_heavyrain', + '4' => '4cloud_heavyrain'), + '-Snow' => array ('0' => '0cloud', + '1' => '2cloud_snow', + '2' => '2cloud_snow', + '3' => '3cloud_snow', + '4' => '4cloud_lightsnow'), + '+Snow' => array ('0' => '0cloud', + '1' => '2cloud_snow', + '2' => '2cloud_snow', + '3' => '3cloud_snow', + '4' => '4cloud_heavysnow'), + '-Hail' => array ('0' => '0cloud', + '1' => '2cloud_hail', + '2' => '2cloud_hail', + '3' => '3cloud_hail', + '4' => '4cloud_lighthail'), + '+Hail' => array ('0' => '0cloud', + '1' => '2cloud_hail', + '2' => '2cloud_hail', + '3' => '3cloud_hail', + '4' => '4cloud_heavyhail'), + 'Thun' => array ('0' => '0cloud', + '1' => '2cloud_thunders', + '2' => '2cloud_thunders', + '3' => '3cloud_thunders', + '4' => '4cloud_thunders'), + 'Fog' => array ('0' => '0cloud_fog', + '1' => '1cloud_fog', + '2' => '2cloud_fog', + '3' => '3cloud_fog', + '4' => '4cloud_fog') ); // Define a lot of images for nigh time weather-group/cloud condition. @@ -127,56 +132,56 @@ // - Cloud coverage (second index). $n_images = array ( - 'None' => array ('0' => 'n_0cloud.gif', - '1' => 'n_1cloud_norain.gif', - '2' => 'n_2cloud_norain.gif', - '3' => 'n_3cloud_norain.gif', - '4' => '4cloud_norain.gif'), - '-Rain' => array ('0' => 'n_0cloud.gif', - '1' => 'n_1cloud_lightrain.gif', - '2' => 'n_2cloud_lightrain.gif', - '3' => 'n_3cloud_lightrain.gif', - '4' => '4cloud_lightrain.gif'), - 'Rain' => array ('0' => 'n_0cloud.gif', - '1' => 'n_1cloud_modrain.gif', - '2' => 'n_2cloud_modrain.gif', - '3' => 'n_3cloud_modrain.gif', - '4' => '4cloud_modrain.gif'), - '+Rain' => array ('0' => 'n_0cloud.gif', - '1' => 'n_1cloud_heavyrain.gif', - '2' => 'n_2cloud_heavyrain.gif', - '3' => 'n_3cloud_heavyrain.gif', - '4' => '4cloud_heavyrain.gif'), - '-Snow' => array ('0' => 'n_0cloud.gif', - '1' => 'n_2cloud_snow.gif', - '2' => 'n_2cloud_snow.gif', - '3' => 'n_3cloud_snow.gif', - '4' => '4cloud_lightsnow.gif'), - '+Snow' => array ('0' => 'n_0cloud.gif', - '1' => 'n_2cloud_snow.gif', - '2' => 'n_2cloud_snow.gif', - '3' => 'n_3cloud_snow.gif', - '4' => '4cloud_heavysnow.gif'), - '-Hail' => array ('0' => 'n_0cloud.gif', - '1' => 'n_2cloud_hail.gif', - '2' => 'n_2cloud_hail.gif', - '3' => 'n_3cloud_hail.gif', - '4' => '4cloud_lighthail.gif'), - '+Hail' => array ('0' => 'n_0cloud.gif', - '1' => 'n_2cloud_hail.gif', - '2' => 'n_2cloud_hail.gif', - '3' => 'n_3cloud_hail.gif', - '4' => '4cloud_heavyhail.gif'), - 'Thun' => array ('0' => 'n_0cloud.gif', - '1' => 'n_2cloud_thunders.gif', - '2' => 'n_2cloud_thunders.gif', - '3' => 'n_3cloud_thunders.gif', - '4' => '4cloud_thunders.gif'), - 'Fog' => array ('0' => 'n_0cloud_fog.gif', - '1' => 'n_1cloud_fog.gif', - '2' => 'n_2cloud_fog.gif', - '3' => 'n_3cloud_fog.gif', - '4' => '4cloud_fog.gif') + 'None' => array ('0' => 'n_0cloud', + '1' => 'n_1cloud_norain', + '2' => 'n_2cloud_norain', + '3' => 'n_3cloud_norain', + '4' => '4cloud_norain'), + '-Rain' => array ('0' => 'n_0cloud', + '1' => 'n_1cloud_lightrain', + '2' => 'n_2cloud_lightrain', + '3' => 'n_3cloud_lightrain', + '4' => '4cloud_lightrain'), + 'Rain' => array ('0' => 'n_0cloud', + '1' => 'n_1cloud_modrain', + '2' => 'n_2cloud_modrain', + '3' => 'n_3cloud_modrain', + '4' => '4cloud_modrain'), + '+Rain' => array ('0' => 'n_0cloud', + '1' => 'n_1cloud_heavyrain', + '2' => 'n_2cloud_heavyrain', + '3' => 'n_3cloud_heavyrain', + '4' => '4cloud_heavyrain'), + '-Snow' => array ('0' => 'n_0cloud', + '1' => 'n_2cloud_snow', + '2' => 'n_2cloud_snow', + '3' => 'n_3cloud_snow', + '4' => '4cloud_lightsnow'), + '+Snow' => array ('0' => 'n_0cloud', + '1' => 'n_2cloud_snow', + '2' => 'n_2cloud_snow', + '3' => 'n_3cloud_snow', + '4' => '4cloud_heavysnow'), + '-Hail' => array ('0' => 'n_0cloud', + '1' => 'n_2cloud_hail', + '2' => 'n_2cloud_hail', + '3' => 'n_3cloud_hail', + '4' => '4cloud_lighthail'), + '+Hail' => array ('0' => 'n_0cloud', + '1' => 'n_2cloud_hail', + '2' => 'n_2cloud_hail', + '3' => 'n_3cloud_hail', + '4' => '4cloud_heavyhail'), + 'Thun' => array ('0' => 'n_0cloud', + '1' => 'n_2cloud_thunders', + '2' => 'n_2cloud_thunders', + '3' => 'n_3cloud_thunders', + '4' => '4cloud_thunders'), + 'Fog' => array ('0' => 'n_0cloud_fog', + '1' => 'n_1cloud_fog', + '2' => 'n_2cloud_fog', + '3' => 'n_3cloud_fog', + '4' => '4cloud_fog') ); // Define image filenames for: @@ -186,36 +191,36 @@ // - calm wind (00000KT), or 'nodir' $wind_dir_images = array ( - 0 => 'nnn.gif', - 1 => 'nne.gif', - 2 => 'ne.gif', - 3 => 'nee.gif', - 4 => 'eee.gif', - 5 => 'see.gif', - 6 => 'se.gif', - 7 => 'sse.gif', - 8 => 'sss.gif', - 9 => 'ssw.gif', - 10 => 'sw.gif', - 11 => 'sww.gif', - 12 => 'www.gif', - 13 => 'nww.gif', - 14 => 'nw.gif', - 15 => 'nnw.gif', - 16 => 'nnn.gif'); - -$wind_nodata_image = 'wind_nodata.gif'; -$wind_vrb_image = 'vrb.gif'; -$wind_nodir_image = 'nodir.gif'; + 0 => 'nnn', + 1 => 'nne', + 2 => 'ne', + 3 => 'nee', + 4 => 'eee', + 5 => 'see', + 6 => 'se', + 7 => 'sse', + 8 => 'sss', + 9 => 'ssw', + 10 => 'sw', + 11 => 'sww', + 12 => 'www', + 13 => 'nww', + 14 => 'nw', + 15 => 'nnw', + 16 => 'nnn'); + +$wind_nodata_image = 'wind_nodata'; +$wind_vrb_image = 'vrb'; +$wind_nodir_image = 'nodir'; // Define image filenames for: // - 'no data' condition, // - 'temperature zero or below zero degrees Celcius // - 'temperature above zero degrees Celcius -$temp_nodata_image = 'temp_nodata.gif'; -$temp_low_image = 'templow.gif'; -$temp_high_image = 'temphigh.gif'; +$temp_nodata_image = 'temp_nodata'; +$temp_low_image = 'templow'; +$temp_high_image = 'temphigh'; // ====================================================================== // The wind_speeds array can be used to convert wind speed values in [m/s] @@ -237,10 +242,9 @@ // ? >" height="50" width="80" border="1"> function get_sky_image($processed_metar_data) { - global $abs_image_path, $strings; - global $itime; - - global $phenomena_array, $coverage, $images, $n_images; + global $abs_image_path, $image_extension, + $strings, $itime, + $phenomena_array, $coverage, $images, $n_images; $metar = $processed_metar_data['metar']; @@ -345,9 +349,11 @@ // can be selected from the array. if (($night == 1) || ($itime == 'nite')) { - echo $abs_image_path . $n_images[$phenomena_group][$maxcoverage]; + echo $abs_image_path . $n_images[$phenomena_group][$maxcoverage] . + $image_extension; } else { - echo $abs_image_path . $images[$phenomena_group][$maxcoverage]; + echo $abs_image_path . $images[$phenomena_group][$maxcoverage] . + $image_extension; } } @@ -365,21 +371,22 @@ // ? >" height="40" width="40" border="1"> function get_winddir_image($processed_metar_data) { - global $abs_image_path, + global $abs_image_path, $image_extension, $wind_nodir_image,$wind_dir_images,$wind_nodata_image, $wind_vrb_image,$strings; if (isset($processed_metar_data['wind_deg'])) { if ($processed_metar_data['wind_deg'] == $strings['wind_vrb_long']) { - echo $abs_image_path . $wind_vrb_image; - } elseif (($processed_metar_data['wind_deg'] == 0) && ($processed_metar_data['wind_knots'] == 0)) { - echo $abs_image_path . $wind_nodir_image; + echo $abs_image_path . $wind_vrb_image . $image_extension; + } elseif (($processed_metar_data['wind_deg'] == 0) && + ($processed_metar_data['wind_knots'] == 0)) { + echo $abs_image_path . $wind_nodir_image . $image_extension; } else { $array_index = round($processed_metar_data['wind_deg']/22.5); - echo $abs_image_path . $wind_dir_images[$array_index]; + echo $abs_image_path . $wind_dir_images[$array_index] . $image_extension; } } else { - echo $abs_image_path . $wind_nodata_image; + echo $abs_image_path . $wind_nodata_image . $image_extension; } } // ------------------------------------------------------------------------ @@ -396,17 +403,17 @@ // ? >" height="50" width="20" border="1"> function get_temp_image($processed_metar_data) { - global $abs_image_path, + global $abs_image_path, $image_extension, $temp_high_image,$temp_low_image,$temp_nodata_image; if (isset($processed_metar_data['temp_c'])) { if ($processed_metar_data['temp_c'] > 0) { - echo $abs_image_path . $temp_high_image; + echo $abs_image_path . $temp_high_image . $image_extension; } else { - echo $abs_image_path . $temp_low_image; + echo $abs_image_path . $temp_low_image . $image_extension; } } else { - echo $abs_image_path . $temp_nodata_image; + echo $abs_image_path . $temp_nodata_image . $image_extension; } } // ------------------------------------------------------------------------ Index: wap.php =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/wap.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- wap.php 19 Apr 2002 18:15:49 -0000 1.2 +++ wap.php 11 Jul 2002 16:07:28 -0000 1.3 @@ -3,6 +3,10 @@ /* $Id$ */ include('phpweather.inc'); +include('images.inc'); + +/* We cannot use GIF images for WAP: */ +$image_extension = '.wbmp'; echo "<?xml version=\"1.0\"?>\n"; ?> @@ -33,8 +37,9 @@ $city = 'EKYT'; } $metar = get_metar($city); -pretty_print_metar_wap($metar, $cities[$city]) +pretty_print_metar_wap($metar, $cities[$city]); ?> +<img src="<? get_sky_image(process_metar($metar)) ?>" height="50" width="80" border="1" /> <p> <?php |
From: Martin G. <gim...@us...> - 2002-07-11 15:57:26
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv9771 Modified Files: locale_it.inc Log Message: Missing space in comment. Index: locale_it.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/locale_it.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- locale_it.inc 1 Jul 2002 21:40:23 -0000 1.5 +++ locale_it.inc 11 Jul 2002 15:57:23 -0000 1.6 @@ -3,7 +3,7 @@ * Questo file consente la traduzione dei termini in italiano. Per * usarlo, richiamarlo dal file phpweather.inc. * - * Author: Fabio Parri<pa...@ut...> + * Author: Fabio Parri <pa...@ut...> */ /* Unsets old language variables and loads new ones. */ |
From: Martin G. <gim...@us...> - 2002-07-01 21:40:29
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv19891 Modified Files: locale_it.inc Log Message: Fabio Parri <pa...@ut...> sent me this with some corrections - thanks a lot! Index: locale_it.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/locale_it.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- locale_it.inc 2 Apr 2002 22:21:26 -0000 1.4 +++ locale_it.inc 1 Jul 2002 21:40:23 -0000 1.5 @@ -1,9 +1,9 @@ <?php /* - * Questo file consente la traduzione dei termini in italiano.Per usarlo, - * richiamarlo dal file phpweather.inc. + * Questo file consente la traduzione dei termini in italiano. Per + * usarlo, richiamarlo dal file phpweather.inc. * - * Author: Carlo Gulin <ka...@ad...> + * Author: Fabio Parri<pa...@ut...> */ /* Unsets old language variables and loads new ones. */ @@ -22,24 +22,24 @@ 'mm_inches' => '<b>%s</b> mm (<b>%s</b> pollici)', 'precip_a_trace' => 'deboli', 'precip_there_was' => 'Ci sono %s di pioggia ', - 'sky_str_format1' => 'Sono <b>%s</b> ad una altezza di <b>%s</b> metri (<b>%s</b> piedi)', + 'sky_str_format1' => 'Ci Sono <b>%s</b> a un\'altezza di <b>%s</b> metri (<b>%s</b> piedi)', 'sky_str_clear' => 'Il cielo é<b>chiaro</b>', - 'sky_str_format2' => ', <b>%s</b> ad una altezza di <b>%s</b> metri (<b>%s</b> piedi) e <b>%s</b> ad una altezza di <b>%s</b> metri (<b>%s</b> piedi)', - 'sky_str_format3' => ' e <b>%s</b> ad una altezza di <b>%s</b> metri (<b>%s</b> piedi)', - 'sky_cavok' => 'Non ci sono nuvole sotto <b>1,524</b> metri (<b>5,000</b> piedi)', + 'sky_str_format2' => ', <b>%s</b> a una altezza di <b>%s</b> metri (<b>%s</b> piedi) e <b>%s</b> a una altezza di <b>%s</b> metri (<b>%s</b> piedi)', + 'sky_str_format3' => ' e <b>%s</b> a una altezza di <b>%s</b> metri (<b>%s</b> piedi)', + 'sky_cavok' => 'Non ci sono nuvole sotto i <b>1,524</b> metri (<b>5,000</b> piedi)', 'clouds' => ' nuvole', 'clouds_cb' => ' cumulonembi', 'clouds_tcu' => ' nubi altocumuli', - 'visibility_format' => 'La visibiltá é <b>%s</b> kilometri (<b>%s</b> miglia).', - 'wind_str_format1' => 'a una velocitá di <b>%s</b> metri per secondo (<b>%s</b> miglia per ora)', - 'wind_str_format2' => ',con folate fino <b>%s</b> metri per secondo (<b>%s</b> miglia per ora),', + 'visibility_format' => 'La visibiltá é di <b>%s</b> kilometri (<b>%s</b> miglia).', + 'wind_str_format1' => 'a una velocitá di <b>%s</b> metri al secondo (<b>%s</b> miglia per ora)', + 'wind_str_format2' => ',con folate fino a <b>%s</b> metri al secondo (<b>%s</b> miglia per ora),', 'wind_str_format3' => ' da <b>%s</b>', 'wind_str_calm' => '<b>calma</b>', 'wind_vrb_long' => 'direzione variabile', 'wind_vrb_short' => 'VAR', 'windchill' => ' potere raffreddante del vento era del <b>%s</b> °C (<b>%s</b> °F) ', 'precip_last_hour' => 'nella ultima ora. ', - 'precip_last_6_hours' => 'nelle ultime 3 fino 6 ore. ', + 'precip_last_6_hours' => 'nelle ultime 3-6 ore. ', 'precip_last_24_hours' => 'nelle ultime 24 ore. ', 'precip_snow' => 'Ci sono <b>%s</b> mm (<b>%s</b> pollici) di neve sul suolo. ', 'temp_min_max_6_hours' => 'La temperatura massima nelle ultime 6 ore era <b>%s</b> e <b>%s</b> °C (<b>%s</b> and <b>%s</b> °F).', @@ -53,7 +53,7 @@ 'Heavy' => 'Intenso ', 'nearby' => 'Vicino ', 'current_weather' => 'Le condizioni attuali sono <b>%s</b>. ', - 'pretty_print_metar' => '<blockquote><p><b>%s</b> minuti fa, alle <b>%s</b> UTC, il vento era %s in %s. La temperatura era <b>%s</b> °C (<b>%s</b> °F), %s e la pressione era <b>%s</b> hPa (<b>%s</b> inHg). Umiditá relativa era <b>%s%%</b>. %s %s %s %s %s %s</p></blockquote>' + 'pretty_print_metar' => '<blockquote><p><b>%s</b> minuti fa, alle <b>%s</b> UTC, il vento soffiava %s, a %s. La temperatura era di <b>%s</b> °C (<b>%s</b> °F), %s e la pressione era <b>%s</b> hPa (<b>%s</b> inHg). L\'umiditá relativa era del <b>%s%%</b>. %s %s %s %s %s %s</p></blockquote>' ); $wind_dir_text_short_array = array( @@ -108,30 +108,30 @@ 'SN' => 'Nevica ', 'SG' => 'Grani di neve ', 'IC' => 'Cristalli di ghiaccio ', - 'PE' => 'Grandina ', - 'GR' => 'Hail ', + 'PE' => 'Ghiaccio a pallini ', + 'GR' => 'Grandina ', 'GS' => 'Piccoli fiocchi e/o neve a pallini ', - 'UP' => 'Sconosciuto ', - 'BR' => 'Misto ', + 'UP' => 'Precipitazione sconosciuta ', + 'BR' => 'Foschia ', 'FG' => 'Nebbia', 'FU' => 'Fumo', 'VA' => 'Cenere vulcanica', 'DU' => 'Polvere estesa', 'SA' => 'Sabbia ', 'HZ' => 'Caligine', - 'PY' => 'Spruzzi', - 'PO' => 'Sabbia ben sviluppata/Turbini di sabbia ', - 'SQ' => 'Urlante ', - 'FC' => 'Tornado Tromba marina ', + 'PY' => 'Vapore', + 'PO' => 'Turbini di sabbia/polvere ', + 'SQ' => 'Burrasca ', + 'FC' => 'Nube di tornado ', 'SS' => 'Tempesta di sabbia/polvere'); $cloud_condition_array = array( 'SKC' => 'sgombro', 'CLR' => 'sgombro', - 'VV' => 'visibilitá verticale', - 'FEW' => 'un poco', - 'SCT' => 'sporadico', + 'VV' => 'visibi litá verticale', + 'FEW' => 'un pò di', + 'SCT' => 'sporadiche', 'BKN' => 'agitato', 'OVC' => 'nuvoloso'); -?> +?> \ No newline at end of file |
From: Martin G. <gim...@us...> - 2002-06-29 13:44:58
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv31606 Modified Files: ChangeLog Log Message: Getting ready for release of version 1.61. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ChangeLog 17 May 2002 22:26:14 -0000 1.2 +++ ChangeLog 29 Jun 2002 13:44:55 -0000 1.3 @@ -1,3 +1,81 @@ +2002-06-29 13:37 Martin Geisler <gim...@gi...> + + * AUTHORS, INSTALL, README: + + Finishing touches before the release... + +2002-06-28 15:56 Martin Geisler <gim...@gi...> + + * images.inc: + + The icons are moved from /icons to /pw_icons. This closes Bug + 562984. + +2002-06-28 15:53 Martin Geisler <gim...@gi...> + + * pw_icons/: 0cloud.gif, 0cloud_fog.gif, 1cloud_fog.gif, + 1cloud_heavyrain.gif, 1cloud_lightrain.gif, 1cloud_modrain.gif, + 1cloud_norain.gif, 2cloud_fog.gif, 2cloud_hail.gif, + 2cloud_heavyrain.gif, 2cloud_lightrain.gif, 2cloud_modrain.gif, + 2cloud_norain.gif, 2cloud_snow.gif, 2cloud_thunders.gif, + 3cloud_fog.gif, 3cloud_hail.gif, 3cloud_heavyrain.gif, + 3cloud_lightrain.gif, 3cloud_modrain.gif, 3cloud_norain.gif, + 3cloud_snow.gif, 3cloud_thunders.gif, 4cloud_fog.gif, + 4cloud_heavyhail.gif, 4cloud_heavyrain.gif, 4cloud_heavysnow.gif, + 4cloud_lighthail.gif, 4cloud_lightrain.gif, 4cloud_lightsnow.gif, + 4cloud_modrain.gif, 4cloud_norain.gif, 4cloud_thunders.gif, + eee.gif, n_0cloud.gif, n_0cloud_fog.gif, n_1cloud_fog.gif, + n_1cloud_heavyrain.gif, n_1cloud_lightrain.gif, + n_1cloud_modrain.gif, n_1cloud_norain.gif, n_2cloud_fog.gif, + n_2cloud_hail.gif, n_2cloud_heavyrain.gif, n_2cloud_lightrain.gif, + n_2cloud_modrain.gif, n_2cloud_norain.gif, n_2cloud_snow.gif, + n_2cloud_thunders.gif, n_3cloud_fog.gif, n_3cloud_hail.gif, + n_3cloud_heavyrain.gif, n_3cloud_lightrain.gif, + n_3cloud_modrain.gif, n_3cloud_norain.gif, n_3cloud_snow.gif, + n_3cloud_thunders.gif, ne.gif, nee.gif, nne.gif, nnn.gif, nnw.gif, + nodir.gif, nw.gif, nww.gif, se.gif, see.gif, sse.gif, sss.gif, + ssw.gif, sw.gif, sww.gif, temp_nodata.gif, temphigh.gif, + templow.gif, vrb.gif, wind_nodata.gif, www.gif: + + The icons are moved from /icons to /pw_icons. This closes Bug + 562984. + +2002-06-28 15:51 Martin Geisler <gim...@gi...> + + * demo.php: + + I've expanded some explanations and indented some HTML code. + +2002-06-28 15:50 Martin Geisler <gim...@gi...> + + * phpweather.inc: + + Code and comment cleanup. + +2002-06-26 12:14 Martin Geisler <gim...@gi...> + + * phpweather.inc: + + Bug found by Carlos Eduardo Strauch <cst...@cd...> - thanks! + +2002-06-20 11:19 Martin Geisler <gim...@gi...> + + * locale_es.inc: + + Update from Diego Torres <dt...@co...>. + +2002-06-13 21:59 Martin Geisler <gim...@gi...> + + * phpweather.inc: + + The arguments passed to pow() are now explicitly casted to float. + +2002-05-17 22:26 Martin Geisler <gim...@gi...> + + * ChangeLog: + + Updated with logentries from CVS. + 2002-05-17 22:13 Martin Geisler <gim...@gi...> * demo.php: @@ -174,50 +252,12 @@ Thanks to David Kjellquist <da...@kj...> PHP Weather now has support for windchill. -2002-03-15 13:57 Martin Geisler <gim...@gi...> - - * icons/: temp_nodata.gif, wind_nodata.gif: - - We need these files too. Perhaps we should use something else than - the text 'No data' - something more international. I think we could - use the question-mark for the temperature, but unfortunately that's - already used with the wind... - 2002-03-10 20:22 Martin Geisler <gim...@gi...> * images.inc, list.php, table.php: This is the files that enables you to use icons in PHP Weather - Raymond van Beek <ra...@de...> has made the hard work. - -2002-03-10 20:20 Martin Geisler <gim...@gi...> - - * icons/: 0cloud.gif, 0cloud_fog.gif, 1cloud_fog.gif, - 1cloud_heavyrain.gif, 1cloud_lightrain.gif, 1cloud_modrain.gif, - 1cloud_norain.gif, 2cloud_fog.gif, 2cloud_hail.gif, - 2cloud_heavyrain.gif, 2cloud_lightrain.gif, 2cloud_modrain.gif, - 2cloud_norain.gif, 2cloud_snow.gif, 2cloud_thunders.gif, - 3cloud_fog.gif, 3cloud_hail.gif, 3cloud_heavyrain.gif, - 3cloud_lightrain.gif, 3cloud_modrain.gif, 3cloud_norain.gif, - 3cloud_snow.gif, 3cloud_thunders.gif, 4cloud_fog.gif, - 4cloud_heavyhail.gif, 4cloud_heavyrain.gif, 4cloud_heavysnow.gif, - 4cloud_lighthail.gif, 4cloud_lightrain.gif, 4cloud_lightsnow.gif, - 4cloud_modrain.gif, 4cloud_norain.gif, 4cloud_thunders.gif, - eee.gif, n_0cloud.gif, n_0cloud_fog.gif, n_1cloud_fog.gif, - n_1cloud_heavyrain.gif, n_1cloud_lightrain.gif, - n_1cloud_modrain.gif, n_1cloud_norain.gif, n_2cloud_fog.gif, - n_2cloud_hail.gif, n_2cloud_heavyrain.gif, n_2cloud_lightrain.gif, - n_2cloud_modrain.gif, n_2cloud_norain.gif, n_2cloud_snow.gif, - n_2cloud_thunders.gif, n_3cloud_fog.gif, n_3cloud_hail.gif, - n_3cloud_heavyrain.gif, n_3cloud_lightrain.gif, - n_3cloud_modrain.gif, n_3cloud_norain.gif, n_3cloud_snow.gif, - n_3cloud_thunders.gif, ne.gif, nee.gif, nne.gif, nnn.gif, nnw.gif, - nodir.gif, nw.gif, nww.gif, se.gif, see.gif, sse.gif, sss.gif, - ssw.gif, sw.gif, sww.gif, temphigh.gif, templow.gif, vrb.gif, - www.gif: - - Icons for PHP Weather - yeah! Raymond van Beek <ra...@de...> is - the man behind this - thanks a lot! 2002-03-07 09:49 Martin Geisler <gim...@gi...> |
From: Martin G. <gim...@us...> - 2002-06-29 13:37:44
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv29195 Modified Files: AUTHORS INSTALL README Log Message: Finishing touches before the release... Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/AUTHORS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- AUTHORS 24 Mar 2002 19:53:21 -0000 1.2 +++ AUTHORS 29 Jun 2002 13:37:39 -0000 1.3 @@ -1,4 +1,12 @@ +AUTHORS for PHP Weather +Copyright (C) 2000--2002 Martin Geisler <gim...@gi...> +Licensed under the GNU GPL. See the file COPYING for details. + Main author: Martin Geisler <gim...@gi...> + + +Helpful People +-------------- Thanks goes to all these persons who have helped: Index: INSTALL =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/INSTALL,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- INSTALL 19 Apr 2002 18:08:54 -0000 1.3 +++ INSTALL 29 Jun 2002 13:37:39 -0000 1.4 @@ -2,14 +2,18 @@ Copyright (C) 2000--2002 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. + Getting the source ------------------ + You can always get the latest version from this address: http://www.sourceforge.net/projects/phpweather/ + Installation ------------ + To try out PHP Weather to see that it works, just unpack the source into a directory on your webserver, and load the page demo.php in your favorite browser. @@ -30,10 +34,12 @@ Those pages should always be up-to-date whereas demo.php might be a little old. + Bugs? ----- + If you find a bug or feature request for PHP Weather, please don't -hesitate to report it at this address: +hesitate to report it using the Bug Tracker at this address: http://sourceforge.net/projects/phpweather/ @@ -47,7 +53,7 @@ include that METAR you're having problems with when you send a message or submit a bug. Without it, we can't really help you. -PHP Weather is known to work with PHP from version 3.0.12 and upward. +PHP Weather is known to work with PHP from version 3.0.3 and upward. If you find that it works with an earlier version, please write me! Enjoy! - Martin Geisler <gim...@gi...> Index: README =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- README 19 Apr 2002 18:08:54 -0000 1.2 +++ README 29 Jun 2002 13:37:39 -0000 1.3 @@ -2,8 +2,10 @@ Copyright (C) 2000--2002 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. + What is PHP Weather? -------------------- + PHP Weather is designed to make it easy for you to show the current weather on your webpage. All over the world airports make a so-called METAR-report once an hour. A METAR report is an aviation weather @@ -14,8 +16,10 @@ MySQL, Postgres, Oracle 8, or DBM database for fast retrieval, and makes easy availably in PHP scripts. + Installation ------------ + See the file INSTALL for instructions on installation of PHP Weather on your webserver. @@ -33,6 +37,7 @@ Please see http://phpweather.net/docs/1.x/index.php for full details and examples. + How to report problems ---------------------- @@ -59,4 +64,4 @@ http://www.sourceforge.net/projects/phpweather/ -Enjoy! - Martin Geisler <gim...@gi...> \ No newline at end of file +Enjoy! - Martin Geisler <gim...@gi...> |
From: Martin G. <gim...@us...> - 2002-06-29 11:13:44
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv13559 Modified Files: pw_images.php Log Message: I hope this fixed the problems with $phenomena being undefined. Index: pw_images.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- pw_images.php 15 May 2002 22:23:26 -0000 1.5 +++ pw_images.php 29 Jun 2002 11:13:41 -0000 1.6 @@ -292,12 +292,14 @@ // Ignore the others In case more then one exist, take only the // first one (highest predominance). ereg('(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match); - if ($match[1] != '') { + if (!empty($match[1])) { $phenomena = $match[1]; } else { ereg('(..)(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match); - if ($match[2] != '') { + if (!empty($match[2])) { $phenomena = $match[2]; + } else { + $phenomena = '#'; // No phenomena. } } // Not each precipitation type has a single image with it. |
From: Martin G. <gim...@us...> - 2002-06-29 10:51:11
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv5442 Modified Files: phpweather.php Log Message: Fixed PE -> PL noticed by Ondrej Jombik <ne...@po...> - thanks. I also noticed that there wasn't a constructor(!) instead there was a function called metar_parser()... That's also fixed now. Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- phpweather.php 18 May 2002 09:20:20 -0000 1.27 +++ phpweather.php 29 Jun 2002 10:51:08 -0000 1.28 @@ -51,7 +51,7 @@ * * @param array The initial properties of the object. */ - function metar_parser($input = array()) { + function phpweather($input = array()) { /* This class doesn't have any defaults, so it just calls the * parent constructor. */ @@ -425,7 +425,7 @@ } elseif (ereg('^(VC)?' . /* Proximity */ '(-|\+)?' . /* Intensity */ '(MI|PR|BC|DR|BL|SH|TS|FZ)?' . /* Descriptor */ - '((DZ|RA|SN|SG|IC|PE|GR|GS|UP)+)?' . /* Precipitation */ + '((DZ|RA|SN|SG|IC|PL|GR|GS|UP)+)?' . /* Precipitation */ '(BR|FG|FU|VA|DU|SA|HZ|PY)?' . /* Obscuration */ '(PO|SQ|FC|SS)?$', /* Other */ $part, $regs)) { |
From: Martin G. <gim...@us...> - 2002-06-28 15:56:59
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv19159 Modified Files: images.inc Log Message: The icons are moved from /icons to /pw_icons. This closes Bug 562984. Index: images.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/images.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- images.inc 19 Apr 2002 18:14:50 -0000 1.2 +++ images.inc 28 Jun 2002 15:56:56 -0000 1.3 @@ -18,7 +18,7 @@ // Specify the absolute path to the directory that contains the weather // icon files. -$abs_image_path = 'icons/'; +$abs_image_path = 'pw_icons/'; // An array to convert the weather group codes to an index of the // $images and $n_images array. |
From: Martin G. <gim...@us...> - 2002-06-28 15:56:15
|
Update of /cvsroot/phpweather/phpweather-1.x/icons In directory usw-pr-cvs1:/tmp/cvs-serv18566 Removed Files: 0cloud.gif 0cloud_fog.gif 1cloud_fog.gif 1cloud_heavyrain.gif 1cloud_lightrain.gif 1cloud_modrain.gif 1cloud_norain.gif 2cloud_fog.gif 2cloud_hail.gif 2cloud_heavyrain.gif 2cloud_lightrain.gif 2cloud_modrain.gif 2cloud_norain.gif 2cloud_snow.gif 2cloud_thunders.gif 3cloud_fog.gif 3cloud_hail.gif 3cloud_heavyrain.gif 3cloud_lightrain.gif 3cloud_modrain.gif 3cloud_norain.gif 3cloud_snow.gif 3cloud_thunders.gif 4cloud_fog.gif 4cloud_heavyhail.gif 4cloud_heavyrain.gif 4cloud_heavysnow.gif 4cloud_lighthail.gif 4cloud_lightrain.gif 4cloud_lightsnow.gif 4cloud_modrain.gif 4cloud_norain.gif 4cloud_thunders.gif eee.gif n_0cloud.gif n_0cloud_fog.gif n_1cloud_fog.gif n_1cloud_heavyrain.gif n_1cloud_lightrain.gif n_1cloud_modrain.gif n_1cloud_norain.gif n_2cloud_fog.gif n_2cloud_hail.gif n_2cloud_heavyrain.gif n_2cloud_lightrain.gif n_2cloud_modrain.gif n_2cloud_norain.gif n_2cloud_snow.gif n_2cloud_thunders.gif n_3cloud_fog.gif n_3cloud_hail.gif n_3cloud_heavyrain.gif n_3cloud_lightrain.gif n_3cloud_modrain.gif n_3cloud_norain.gif n_3cloud_snow.gif n_3cloud_thunders.gif ne.gif nee.gif nne.gif nnn.gif nnw.gif nodir.gif nw.gif nww.gif se.gif see.gif sse.gif sss.gif ssw.gif sw.gif sww.gif temp_nodata.gif temphigh.gif templow.gif vrb.gif wind_nodata.gif www.gif Log Message: The icons are moved from /icons to /pw_icons. This closes Bug 562984. --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-06-28 15:53:57
|
Update of /cvsroot/phpweather/phpweather-1.x/pw_icons In directory usw-pr-cvs1:/tmp/cvs-serv17484 Added Files: 0cloud.gif 0cloud_fog.gif 1cloud_fog.gif 1cloud_heavyrain.gif 1cloud_lightrain.gif 1cloud_modrain.gif 1cloud_norain.gif 2cloud_fog.gif 2cloud_hail.gif 2cloud_heavyrain.gif 2cloud_lightrain.gif 2cloud_modrain.gif 2cloud_norain.gif 2cloud_snow.gif 2cloud_thunders.gif 3cloud_fog.gif 3cloud_hail.gif 3cloud_heavyrain.gif 3cloud_lightrain.gif 3cloud_modrain.gif 3cloud_norain.gif 3cloud_snow.gif 3cloud_thunders.gif 4cloud_fog.gif 4cloud_heavyhail.gif 4cloud_heavyrain.gif 4cloud_heavysnow.gif 4cloud_lighthail.gif 4cloud_lightrain.gif 4cloud_lightsnow.gif 4cloud_modrain.gif 4cloud_norain.gif 4cloud_thunders.gif eee.gif n_0cloud.gif n_0cloud_fog.gif n_1cloud_fog.gif n_1cloud_heavyrain.gif n_1cloud_lightrain.gif n_1cloud_modrain.gif n_1cloud_norain.gif n_2cloud_fog.gif n_2cloud_hail.gif n_2cloud_heavyrain.gif n_2cloud_lightrain.gif n_2cloud_modrain.gif n_2cloud_norain.gif n_2cloud_snow.gif n_2cloud_thunders.gif n_3cloud_fog.gif n_3cloud_hail.gif n_3cloud_heavyrain.gif n_3cloud_lightrain.gif n_3cloud_modrain.gif n_3cloud_norain.gif n_3cloud_snow.gif n_3cloud_thunders.gif ne.gif nee.gif nne.gif nnn.gif nnw.gif nodir.gif nw.gif nww.gif se.gif see.gif sse.gif sss.gif ssw.gif sw.gif sww.gif temp_nodata.gif temphigh.gif templow.gif vrb.gif wind_nodata.gif www.gif Log Message: The icons are moved from /icons to /pw_icons. This closes Bug 562984. --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-06-28 15:52:41
|
Update of /cvsroot/phpweather/phpweather-1.x/pw_icons In directory usw-pr-cvs1:/tmp/cvs-serv17233/pw_icons Log Message: Directory /cvsroot/phpweather/phpweather-1.x/pw_icons added to the repository |
From: Martin G. <gim...@us...> - 2002-06-28 15:51:53
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv16551 Modified Files: demo.php Log Message: I've expanded some explanations and indented some HTML code. Index: demo.php =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/demo.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- demo.php 17 May 2002 22:13:22 -0000 1.5 +++ demo.php 28 Jun 2002 15:51:48 -0000 1.6 @@ -37,7 +37,7 @@ <h1>Your version: <?php echo $version ?></h1> -<p>You can download new version from <a +<p>You can download new versions from <a href="http://sourceforge.net/projects/phpweather/">this page</a>. I'm currently working on the next version of <a href="http://www.sourceforge.net/projects/phpweather/">PHP @@ -251,20 +251,30 @@ <h1>Caching the METARs</h1> -<p>But you'll soon start to look for a way to improve the -response-time of your script. To do this, you first have to decide -what database you want to use. You have a number of options at this -time:</p> +<p>You'll soon start to look for a way to improve the response-time of +your script. The problem is, that it takes about a second to retrieve +a METAR report from the NWS. It would be a waste if your page had to +do this every time it's accessed.</p> + +<p>To decrease the time it takes for the script to access the METARs, +you can cache the retrieved METARs locally. You will have to decide +what database you want to use. You do this by copying the file +<code>config-dist.inc</code> to <code>config.inc</code> - the name is +important. Now change <code>config.inc</code> so suit your preferences +by changing <i>one</i> of the <code>$useXXX</code> variables to +<code>1</code>. You'll find more instructions in the comments in the +file.</p> + +<p>You have a number of different databases to choose from:</p> <dl> + + <dt><b>A MySQL database</b></dt> + <dd> + <p>Set <code>$useMySQL</code> to 1, and then create a table with + the following SQL statement:</p> -<dt><b>A MySQL database</b></dt> -<dd> - -<p>Set <code>$useMySQL</code> to 1, and then create a table with the -following SQL statement:</p> - -<pre> + <pre> CREATE TABLE metars ( metar VARCHAR(255) NOT NULL, timestamp TIMESTAMP(14), @@ -273,31 +283,32 @@ UNIQUE station (station) ); </pre> - -</dd> - -<dt><b>A PostgreSQL database</b></dt> - -<dd><p>Set <code>$usePSQL</code> to 1 and create a table with the -following SQL statement:</p> - -<pre> + + </dd> + + <dt><b>A PostgreSQL database</b></dt> + + <dd> + <p>Set <code>$usePSQL</code> to 1 and create a table with the + following SQL statement:</p> + + <pre> CREATE TABLE metars ( metar VARCHAR(255) NOT NULL, timestamp TIMESTAMP, station VARCHAR(4) PRIMARY KEY NOT NULL ); </pre> - -</dd> - -<dt><b>An Oracle 8 database</b></dt> - -<dd> -<p>Set <code>$useOCI</code> to 1 and create a table with this SQL -statement:</p> - -<pre> + + </dd> + + <dt><b>An Oracle 8 database</b></dt> + + <dd> + <p>Set <code>$useOCI</code> to 1 and create a table with this SQL + statement:</p> + + <pre> create table metars ( metar varchar2(255) not null, timestamp date, @@ -305,29 +316,25 @@ ); alter table metars add primary key (station); </pre> -</dd> - -<dt><b>A DBM database</b></dt> - -<dd> -<p>Set <code>$useDBM</code> to 1 and make make sure that the user -running the webserver has write-permission to the current -directory.</p> -</dd> - -<dt><b>An XML file</b></dt> - -<dd> -<p>Set <code>$useXML</code> to 1 and make sure that the webserver has - read/write permission to the file <code>cache.xml</code>.</p> -</dd> - + </dd> + + <dt><b>A DBM database</b></dt> + + <dd> + <p>Set <code>$useDBM</code> to 1 and make make sure that the user + running the webserver has write-permission to the current + directory.</p> + </dd> + + <dt><b>An XML file</b></dt> + + <dd> + <p>Set <code>$useXML</code> to 1 and make sure that the webserver + has read/write permission to the file <code>cache.xml</code>.</p> + </dd> + </dl> -<p>If you use a database that requires you to log on, then please -remember to do so. There's already some code at the top of -<code>phpweather.inc</code> that should serve as a guide.</p> - <p>If you don't connect to your database, you'll recieve a lot of errors, saying things like: "<code>MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in @@ -336,7 +343,9 @@ errors are trying to tell you, that PHP Weather couldn't store the METAR in the <a href="http://www.mysql.com">MySQL</a>-database, because you didn't supply a valid username and password. The errors -will be similar for other databases.</p> +will be similar for other databases. Go back to +<code>config.inc</code> and make sure that the code in that file does +establish a connection to the database.</p> <p>If you've configured <a href="http://www.sourceforge.net/projects/phpweather/">PHP Weather</a> |
From: Martin G. <gim...@us...> - 2002-06-28 15:50:07
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv16092 Modified Files: phpweather.inc Log Message: Code and comment cleanup. Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- phpweather.inc 26 Jun 2002 12:14:13 -0000 1.7 +++ phpweather.inc 28 Jun 2002 15:50:03 -0000 1.8 @@ -1,20 +1,23 @@ <?php /* Copyright (c) 2000-2002 Martin Geisler <gim...@gi...>. -Licensed under the GPL, see the file COPYING. - -See - - http://www.phpweather.net/ and - http://www.sourceforge.net/projects/phpweather - -for updates and further instructions on how to use PHP Weather. -*/ + * Licensed under the GPL, see the file COPYING. + * + * Take a look at these websites for updates and further instructions + * on how to use PHP Weather: + * + * http://www.phpweather.net/ and + * http://www.sourceforge.net/projects/phpweather + */ /* This stores the version number in the variable $version. */ -$version = '1.60-CVS'; +$version = '1.61'; +/* We start by loading the default configuration: */ require('config-dist.inc'); +/* Now, if the user has customized the configuration by making a file + * called 'defaults.inc', then we include that now so that it can + * override the defaults: */ if (file_exists('config.inc')) include('config.inc'); if ($useMySQL) { @@ -384,10 +387,7 @@ */ global $useOCI, $useMySQL, $useDBM, $usePSQL, $conn, $dbMetar, - $dbmTimestamp; - - // XML Globals I did this seperate so you could see it. - global $useXML, $XMLMetar, $XMLParser, $XMLFile; + $dbmTimestamp, $useXML, $XMLMetar, $XMLParser, $XMLFile; if ($useMySQL) { $query = "SELECT metar, UNIX_TIMESTAMP(timestamp) FROM metars WHERE station = '$station'"; @@ -501,8 +501,6 @@ $date_unixtime = gmmktime($date_parts[3], $date_parts[4], 0, $date_parts[1], $date_parts[2], $date_parts[0]); - - if (!ereg('[0-9]{6}Z', $metar)) { /* Some reports dont even have a time-part, so we insert the @@ -590,10 +588,13 @@ } function process_metar($metar) { - /* initialization */ + /* This function decodes a raw METAR. The result is an associative + * array with entries like 'temp_c', 'visibility_miles' etc. */ + global $strings, $wind_dir_text_short_array, $wind_dir_text_array, $cloud_condition_array, $weather_array; - $decoded_metar['temp_visibility_miles'] = ''; + + $temp_visibility_miles = ''; $cloud_layers = 0; $decoded_metar['remarks'] = ''; $decoded_metar['weather'] = ''; @@ -702,9 +703,9 @@ /* * Temp Visibility Group, single digit followed by space */ - $decoded_metar['temp_visibility_miles'] = $part; + $temp_visibility_miles = $part; } elseif (ereg('^M?(([0-9]?)[ ]?([0-9])(/?)([0-9]*))SM$', - $decoded_metar['temp_visibility_miles'] . ' ' . + $temp_visibility_miles . ' ' . $parts[$i], $regs)) { /* * Visibility Group |
From: Martin G. <gim...@us...> - 2002-06-26 12:14:17
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv11478 Modified Files: phpweather.inc Log Message: Bug found by Carlos Eduardo Strauch <cst...@cd...> - thanks! Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- phpweather.inc 13 Jun 2002 21:59:07 -0000 1.6 +++ phpweather.inc 26 Jun 2002 12:14:13 -0000 1.7 @@ -689,8 +689,8 @@ /* A strange value. When you look at other pages you see it interpreted like this (where I use > to signify 'Greater than'): */ - $decoded_metar['visibility_miles'] = '>7'; - $decoded_metar['visibility_km'] = '>11.3'; + $decoded_metar['visibility_miles'] = '>6.2'; + $decoded_metar['visibility_km'] = '>10'; } elseif(ereg('^([0-9]{4})$', $part, $regs)) { /* * Visibility in meters (4 digits only) |