phpweather-checkins Mailing List for PHP Weather (Page 19)
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-03-17 14:13:21
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv28981 Modified Files: ChangeLog usermap Log Message: Updated ChangeLog and added iridium to the usermappings. By the way, what do people think about having their email-addresses written all over the place without any SPAM-protection? I have no problem with this myself, as my email-address is SPAM- protected by a program called TMDA, but it just occurred to me that some of you might have tied to keep your address 'secret' and then I just write it all over the place... In short: feel free to edit usermap and AUTHORS if you want the info to be different than what I've made. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ChangeLog 5 Jul 2001 16:07:09 -0000 1.4 +++ ChangeLog 17 Mar 2002 14:13:18 -0000 1.5 @@ -1,3 +1,591 @@ +2002-03-17 14:06 Martin Geisler <gim...@gi...> + + * defaults-dist.php: + + New property for pw_text. I'm not actually sure these properties + should be collected here, I think it would be better if they were + in right in the class-file. + + I also removed the language property as it isn't used anymore. + +2002-03-17 14:03 Martin Geisler <gim...@gi...> + + * languages.php: + + Mapping between language-codes and corresponding English names. + +2002-03-17 14:02 Martin Geisler <gim...@gi...> + + * images-test.php: + + Really nice test-page for pw_images made by Ray van Beek. + +2002-03-17 13:59 Martin Geisler <gim...@gi...> + + * index.php: + + The images found by pw_images are now also part of the output. + +2002-03-17 13:39 Martin Geisler <gim...@gi...> + + * output/: pw_images.php, pw_text.php, pw_text_da.php, + pw_text_en.php, pw_text_hu.php, pw_text_no.php: + + The new output modules. pw_text does that locale_common did before, + and pw_text_xx are the localized version of the class. pw_images is + new - it selects suitable images for display with or instead of the + textual report. + +2002-03-17 13:32 Martin Geisler <gim...@gi...> + + * metar_parser.php, phpweather.php: + + The METAR parser is now in class phpweather, so there's no need for + the file metar_parser.php. + +2002-03-16 13:55 Martin Geisler <gim...@gi...> + + * phpweather.php: + + That should have been commited a long time ago... + +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-15 12:01 Max Hammond <ir...@us...> + + * data_retrieval.php: + + Oops + +2002-03-15 11:37 Max Hammond <ir...@us...> + + * 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: + + added icons + +2002-03-15 11:22 Max Hammond <ir...@us...> + + * data_retrieval.php: + + Added set_metar() for testing etc + +2002-03-11 16:50 Martin Geisler <gim...@gi...> + + * docs/src/latex/: apidoc.tex, databases.tex, history.tex, + installation.tex, main.tex, phpweather-a4.tex, translation.tex: + + Added some extra files to the documentation. The documentation + needs a lot of work right now, but if anybody wants to write + something, feel free. + + You shouldn't be intimidated by the fact that it's written in + LaTeX, as long as you're writing plain text, there shouldn't be any + problems. + +2002-03-11 16:27 Martin Geisler <gim...@gi...> + + * docs/ps/: phpweather-a4.ps, phpweather-letter.ps: + + This is mostly a test of the new syncmail script. The idea is that + it shouldn't include a diff of these PostScript files. + +2002-03-07 09:42 Martin Geisler <gim...@gi...> + + * db_layer.php: + + Updated for new db-names. + +2002-03-07 09:40 Martin Geisler <gim...@gi...> + + * db/: db_common.php, db_dba.php, db_mysql.php, db_null.php, + db_pgsql.php, pw_db_common.php, pw_db_dba.php, pw_db_mysql.php, + pw_db_null.php, pw_db_pgsql.php: + + Applied patch from Carsten Klapp <car...@ma...> - thanks a + lot. I also did some reformatting on some of the comments. + +2001-12-20 19:11 Max Hammond <ir...@us...> + + * defaults-dist.php, metar_parser.php: + + Hacking around a bug in PHP function gmmktime + +2001-12-19 10:07 Max Hammond <ir...@us...> + + * metar_parser.php: + + oops. that should not have been committed... + +2001-12-19 10:04 Max Hammond <ir...@us...> + + * metar_parser.php, db/db_pgsql.php: + + Patched to make it work :) + +2001-12-19 09:12 Max Hammond <ir...@us...> + + * data_retrieval.php: + + Forced cache reload + +2001-12-18 21:52 Martin Geisler <gim...@gi...> + + * db/db_mysql.php: + + Applied patch from Max Hammond - thanks a lot! + +2001-08-19 13:58 Martin Geisler <gim...@gi...> + + * configurator.php: + + More fixes... I had a problem with magic_quotes_gpc. If turned on, + things like 'font color="red">' would be passed to the script as + '<font color=\"red\">' which doesn't work at all. + + I don't know why they invented this whole magic-quotes-thing, but I + find it highly annoying. It should be up to the script to escape + any quotes it doesn't like. + +2001-08-19 13:39 Martin Geisler <gim...@gi...> + + * configurator.php: + + It would be a good idea to translate the special characters into + their HTML entities, before we show the new configfile to the + user... + + Martijn Moret <ma...@mo...> made me aware of this - thanks. + +2001-08-19 12:46 Martin Geisler <gim...@gi...> + + * configurator.php: + + Typo... + +2001-08-19 12:46 Martin Geisler <gim...@gi...> + + * data_retrieval.php: + + Some servers only say '200' instead of '200 OK' when they're about + to send the document. + +2001-07-31 18:52 Mihaly Gyulai <gy...@my...> + + * configurator.php, data_retrieval.php: + + Minor comment modifications. + +2001-07-18 10:39 Martin Geisler <gim...@gi...> + + * docs/src/latex/intro.tex: + + These couple of sections shouldn't be numbered (that's what the + star does - it removed the numbering of a section.) + +2001-07-18 10:38 Martin Geisler <gim...@gi...> + + * docs/src/latex/: installation.tex, translation.tex: + + Just a couple of chapters... + + If anybody wants to write something for the manual, feel free. I'll + probably do some writing myself on my holiday, but that shouldn't + keep anybody from doing so also. Also, feel free to correct my + grammatical mistakes and my spelling. + +2001-07-18 10:34 Martin Geisler <gim...@gi...> + + * docs/src/latex/main.tex: + + Added the two new chapters installation and translation. Also added + a new command \code which typesets it's contents in a code-style. + That means typewriter-font for now. + +2001-07-17 12:27 Martin Geisler <gim...@gi...> + + * phpweather.php: + + Nothing to worry about... + +2001-07-17 12:25 Martin Geisler <gim...@gi...> + + * docs/src/latex/: apidoc.tex, main.tex: + + We now include the fdl. + +2001-07-17 12:24 Martin Geisler <gim...@gi...> + + * docs/src/latex/fdl.tex: + + This is the license for the manual. Since we're using the GPL for + the program, I thought that we might as well use the GNU Free + Documentation License (FDL) for the manual. + +2001-07-17 12:22 Martin Geisler <gim...@gi...> + + * configurator.php: + + Added a description of the verbosity variable. + +2001-07-17 12:15 Martin Geisler <gim...@gi...> + + * defaults-dist.php: + + This makes sure that we start out with a reasonable verbosity. + Setting it to 1, makes sure that it only prints errors. + +2001-07-17 12:12 Martin Geisler <gim...@gi...> + + * base_object.php: + + We now have three functions for reporting errors, warnings, and + debug-information. They all accept a message (mandatory argument) + and optionally a filename and a linenumber. + + Whether or not the functions make any output, is controlled by + $this->verbosity. + +2001-07-17 12:07 Martin Geisler <gim...@gi...> + + * db/db_mysql.php: + + It now throws an error with an explanation of went wrong, if + anything goes wrong - that made sense, didn't it? :-) + +2001-07-14 21:47 Martin Geisler <gim...@gi...> + + * metar_parser.php: + + Instead of storing the different groups (cloud, weather, wind) like + group1, group2 etc, they're now stored as group[0], group[1] etc. + This makes it easier to pass them around. + +2001-07-14 19:47 Martin Geisler <gim...@gi...> + + * docs/: pdf/.cvsignore, ps/.cvsignore: + + Ups! + +2001-07-14 19:46 Martin Geisler <gim...@gi...> + + * docs/: pdf/.cvsignore, ps/.cvsignore: + + Ignore the compressed files for now... + +2001-07-14 19:44 Martin Geisler <gim...@gi...> + + * docs/: html/db_dba.html, html/locale_common.html, + html/locale_hu.html, html/metar_parser.html, + html/phpdoc_elementlist.html, html/phpweather.html, + pdf/phpweather-a4.pdf, pdf/phpweather-letter.pdf, + ps/phpweather-a4.ps, ps/phpweather-letter.ps, src/latex/apidoc.tex, + src/xml/class_db_dba.xml, src/xml/class_locale_common.xml, + src/xml/class_locale_hu.xml, src/xml/class_metar_parser.xml, + src/xml/class_phpweather.xml, src/xml/elementlist.xml, + src/xml/warnings_classanalyser.xml: + + Update. + +2001-07-14 19:43 Martin Geisler <gim...@gi...> + + * docs/src/: phpdoc2latex.php, latex/main.tex: + + I'm just playing with the formatting... Now things like $this->var + is also marked as a variable. + +2001-07-14 09:07 Martin Geisler <gim...@gi...> + + * docs/: pdf/phpweather-a4.pdf, pdf/phpweather-a4.pdf.bz2, + pdf/phpweather-a4.pdf.gz, pdf/phpweather-a4.pdf.zip, + pdf/phpweather-letter.pdf, pdf/phpweather-letter.pdf.bz2, + pdf/phpweather-letter.pdf.gz, pdf/phpweather-letter.pdf.zip, + ps/phpweather-a4.ps, ps/phpweather-a4.ps.bz2, + ps/phpweather-a4.ps.gz, ps/phpweather-a4.ps.zip, + ps/phpweather-letter.ps, ps/phpweather-letter.ps.bz2, + ps/phpweather-letter.ps.gz, ps/phpweather-letter.ps.zip: + + The compressed files shouldn't be in CVS. + +2001-07-13 18:02 Mihaly Gyulai <gy...@my...> + + * phpweather.php: + + langauge -> language ! Fortunately only in the comments... + +2001-07-13 09:21 Martin Geisler <gim...@gi...> + + * db/db_dba.php: + + Updated documentaion a bit + +2001-07-13 09:17 Martin Geisler <gim...@gi...> + + * usermap: + + This file is used when generating the ChangeLog. + +2001-07-13 09:15 Martin Geisler <gim...@gi...> + + * phpweather.php: + + It's actually possible to add a @link tag to the doc-comment. + +2001-07-13 09:13 Martin Geisler <gim...@gi...> + + * configurator.php: + + Added a header. I think I'll move the configurator.php to it's own + directory, and then split the file up into several smaller files so + tha PHPDoc can undertand what's going on... + +2001-07-13 08:54 Martin Geisler <gim...@gi...> + + * docs/: pdf/phpweather-a4.pdf, pdf/phpweather-a4.pdf.bz2, + pdf/phpweather-a4.pdf.gz, pdf/phpweather-a4.pdf.zip, + pdf/phpweather-letter.pdf, pdf/phpweather-letter.pdf.bz2, + pdf/phpweather-letter.pdf.gz, pdf/phpweather-letter.pdf.zip, + ps/phpweather-a4.ps, ps/phpweather-a4.ps.bz2, + ps/phpweather-a4.ps.gz, ps/phpweather-a4.ps.zip, + ps/phpweather-letter.ps, ps/phpweather-letter.ps.bz2, + ps/phpweather-letter.ps.gz, ps/phpweather-letter.ps.zip: + + The graphs are now made from left to right - much better! + +2001-07-13 08:35 Martin Geisler <gim...@gi...> + + * docs/src/phpdoc2latex.php: + + This is much better! The graphs are now made from left to right + instead from top to bottom. + +2001-07-13 08:34 Martin Geisler <gim...@gi...> + + * docs/src/latex/.cvsignore: + + This should make sure that CVS stops annoying us about all the + files left behind when LaTeX has been run. + +2001-07-12 20:07 Martin Geisler <gim...@gi...> + + * docs/html/: base_object.html, data_retrieval.html, + db_common.html, db_dba.html, db_layer.html, db_mysql.html, + db_null.html, db_pgsql.html, empty.html, frame_packagelist.html, + index.html, locale_common.html, locale_da.html, locale_en.html, + locale_hu.html, metar_parser.html, + packageelementlist_PHP_Weather.html, phpdoc.css, + phpdoc_classtree.html, phpdoc_elementlist.html, + phpdoc_packagelist.html, phpdoc_xmlfiles.html, phpweather.html: + + HTML files... + +2001-07-12 20:03 Martin Geisler <gim...@gi...> + + * docs/ps/: phpweather-a4.ps, phpweather-a4.ps.bz2, + phpweather-a4.ps.gz, phpweather-a4.ps.zip, phpweather-letter.ps, + phpweather-letter.ps.bz2, phpweather-letter.ps.gz, + phpweather-letter.ps.zip: + + PostScript files! Beware of the filesize... + +2001-07-12 20:01 Martin Geisler <gim...@gi...> + + * docs/pdf/: phpweather-a4.pdf, phpweather-a4.pdf.bz2, + phpweather-a4.pdf.gz, phpweather-a4.pdf.zip, phpweather-letter.pdf, + phpweather-letter.pdf.bz2, phpweather-letter.pdf.gz, + phpweather-letter.pdf.zip: + + PDF files! + +2001-07-12 19:59 Martin Geisler <gim...@gi...> + + * docs/src/xml/: class_base_object.xml, class_data_retrieval.xml, + class_db_common.xml, class_db_dba.xml, class_db_layer.xml, + class_db_mysql.xml, class_db_null.xml, class_db_pgsql.xml, + class_locale_common.xml, class_locale_da.xml, class_locale_en.xml, + class_locale_hu.xml, class_metar_parser.xml, class_phpweather.xml, + class_property.xml, classtree_base_object.xml, + classtree_property.xml, elementlist.xml, packagelist.xml, + phpdoc.dtd, warnings_classanalyser.xml, warnings_parser.xml: + + XML sources... + +2001-07-12 19:56 Martin Geisler <gim...@gi...> + + * docs/src/latex/: apidoc.tex, intro.tex, main.tex, + phpweather-a4.tex, phpweather-letter.tex: + + The LaTeX sources. By running one of either phpweather-a4.tex or + phpweather-letter.tex you can produce the documentation for either + A4 or Letterpaper. + +2001-07-12 19:54 Martin Geisler <gim...@gi...> + + * docs/src/: make-docs.sh, php.ini, phpdoc2latex.php: + + A shellscript, a phpscript and an inifile for PHP. Use these tools + to regenerate the documentation. + +2001-07-09 20:31 Mihaly Gyulai <gy...@my...> + + * metar_parser.php: + + Rearranging comments and rounding numbers max. up to 5-6 digits. + +2001-07-09 19:30 Mihaly Gyulai <gy...@my...> + + * stations.csv: + + Name correction for 'Jose Marti'. + +2001-07-09 19:09 Mihaly Gyulai <gy...@my...> + + * db/files/stations.db: + + Name correction for 'Jose Marti'. + +2001-07-09 19:06 Mihaly Gyulai <gy...@my...> + + * db/files/CU.php: + + Name-correction. + +2001-07-08 21:28 Martin Geisler <gim...@gi...> + + * db/db_mysql.php: + + That shouldn't be there... + +2001-07-08 21:27 Martin Geisler <gim...@gi...> + + * db/db_dba.php: + + Ups - updated docs. + +2001-07-08 21:25 Martin Geisler <gim...@gi...> + + * data_retrieval.php: + + That's not needed anymore. + +2001-07-08 19:50 Mihaly Gyulai <gy...@my...> + + * phpweather.php: + + + Rearranging comments. + +2001-07-08 19:43 Mihaly Gyulai <gy...@my...> + + * INSTALL: + + + It's a bit confusing about using 'demo.php'(older version) or + 'index.php' (newer version). I changed it to 'index.php' as this + INSTALL is used in the new version. + + Please choose which one you want to use, Martin! Maybe 'index.php' + would be better in the older version, too (1.56). + + I removed the lines regarding to 'Aalborg, Denmark' and 'Honolulu, + Hawaii', as they're not shown in the new version. + +2001-07-08 19:25 Mihaly Gyulai <gy...@my...> + + * db_layer.php: + + + Rearranging comments. + +2001-07-08 19:21 Mihaly Gyulai <gy...@my...> + + * data_retrieval.php: + + + Rearranging comments, removing typos... + +2001-07-08 18:57 Mihaly Gyulai <gy...@my...> + + * base_object.php: + + + Rearranging comments, correcting typos... + +2001-07-08 18:47 Mihaly Gyulai <gy...@my...> + + * README: + + + Rearranging comments, correcting typos... + +2001-07-08 18:04 Mihaly Gyulai <gy...@my...> + + * stations.csv: + + + Liverpool -> Liverpool / John Lennon (it was published in the news, + maybe it's not official yet) + +2001-07-08 17:26 Mihaly Gyulai <gy...@my...> + + * db/files/GB.php: + + + I modified the 'Liverpool Airport' to 'Liverpool / John Lennon + Airport' as they changed its name. + +2001-07-08 17:09 Mihaly Gyulai <gy...@my...> + + * configurator.php, index.php: + + [no log message] + +2001-07-08 16:09 Martin Geisler <gim...@gi...> + + * README-CVS: + + The diff says it all... + +2001-07-08 15:50 Martin Geisler <gim...@gi...> + + * README: + + A slight update. + +2001-07-05 16:07 Martin Geisler <gim...@gi...> + + * ChangeLog: + + I just updated the ChangeLog. + 2001-07-05 16:05 Martin Geisler <gim...@gi...> * base_object.php, data_retrieval.php, db_layer.php, @@ -12,15 +600,6 @@ These files should also be a little more compatible with PHP3 now. -2001-07-05 16:00 Martin Geisler <gim...@gi...> - - * locales/: locale_common.php, locale_da.php, locale_en.php: - - I've removed the call to require_once() since it's only PHP4 that - understands it. Instead of relying on PHP to manage the required - files, each file now start by defining a constant, so that the page - knows if it's loaded twice. - 2001-07-05 15:53 Martin Geisler <gim...@gi...> * VERSION: @@ -28,13 +607,6 @@ I think it's best if we name the version like this. 1.9.6 is actually a lower version-number than 1.96... -2001-07-01 18:20 Martin Geisler <gim...@gi...> - - * locales/: locale_common.php, locale_da.php, locale_en.php: - - I changed some of the strings so that Gyulai Mihály can translate - it into Hungarian (at least I hope he can :-) - 2001-06-30 19:24 Martin Geisler <gim...@gi...> * index.php: @@ -49,28 +621,15 @@ Added support for Danish. We'll have to figure out a way so that this can be done automatically. -2001-06-30 19:22 Martin Geisler <gim...@gi...> - - * locales/: locale_common.php, locale_en.php: - - An English string was still hiding in locale_common.php. - 2001-06-30 19:20 Martin Geisler <gim...@gi...> * db/db_dba.php: Slight doc change. -2001-06-30 19:19 Martin Geisler <gim...@gi...> - - * locales/locale_da.php: - - I thought that I might as well do the translation into Danish - first... - 2001-06-29 11:51 Martin Geisler <gim...@gi...> - * index.php, phpweather.php, locales/languages.php: + * index.php, phpweather.php: It should now be possible to get a list of languages automatically. The translation of language codes to language names is done via @@ -93,8 +652,7 @@ 2001-06-28 11:44 Martin Geisler <gim...@gi...> - * metar_parser.php, locales/locale_common.php, - locales/locale_en.php: + * metar_parser.php: I've updated the code that produces the weather-string, so that it's more correct now. It probably still needs some testing. @@ -123,18 +681,6 @@ It has been moved to PHPWEATHER_BASE_DIR/locales. -2001-06-27 11:35 Martin Geisler <gim...@gi...> - - * doc/: base_object.html, data_retrieval.html, db_common.html, - db_dba.html, db_layer.html, db_mysql.html, db_null.html, - db_pgsql.html, frame_packagelist.html, locale_common.html, - locale_en.html, metar_parser.html, - packageelementlist_PHP_Weather.html, phpdoc_classtree.html, - phpdoc_elementlist.html, phpdoc_packagelist.html, - phpdoc_xmlfiles.html, phpweather.html: - - Doc update... - 2001-06-27 11:32 Martin Geisler <gim...@gi...> * configurator.php: @@ -155,12 +701,6 @@ base_object.php now contains the version-number, so it should be run through sed. -2001-06-27 11:27 Martin Geisler <gim...@gi...> - - * locales/: locale_common.php, locale_en.php: - - All locale-related files should now be stored here. - 2001-06-27 11:26 Martin Geisler <gim...@gi...> * locale_common.php: @@ -396,25 +936,6 @@ Ups, we have to return true here - if we don't the other function will think that we couldn't connect to the database. -2001-04-27 19:13 Martin Geisler <gim...@gi...> - - * doc/.cvsignore: - - We don't need all those .xml-files. - -2001-04-27 19:09 Martin Geisler <gim...@gi...> - - * doc/: class_base_object.xml, class_data_retrieval.xml, - class_db_common.xml, class_db_dba.xml, class_db_layer.xml, - class_db_mysql.xml, class_db_null.xml, class_db_pgsql.xml, - class_locale_common.xml, class_locale_en.xml, - class_metar_parser.xml, class_phpweather.xml, - classtree_base_object.xml, elementlist.xml, packagelist.xml: - - I don't want these files to be here... They're regenerated every - time I run PHPDoc, so there's no need for them. It's the HTML-files - that are important for the documentation. - 2001-04-27 19:07 Martin Geisler <gim...@gi...> * locale_common.php: @@ -501,24 +1022,6 @@ I think that's the most important change :-) -2001-04-16 15:09 Martin Geisler <gim...@gi...> - - * doc/: base_object.html, class_base_object.xml, - class_data_retrieval.xml, class_db_common.xml, class_db_dba.xml, - class_db_layer.xml, class_db_mysql.xml, class_db_none.xml, - class_db_null.xml, class_db_pgsql.xml, class_locale_common.xml, - class_locale_en.xml, class_metar_parser.xml, class_phpweather.xml, - classtree_base_object.xml, data_retrieval.html, db_common.html, - db_dba.html, db_layer.html, db_mysql.html, db_none.html, - db_null.html, db_pgsql.html, elementlist.xml, locale_common.html, - locale_en.html, metar_parser.html, - packageelementlist_PHP_Weather.html, packagelist.xml, - phpdoc_classtree.html, phpdoc_elementlist.html, - phpdoc_packagelist.html, phpdoc_xmlfiles.html, phpweather.html: - - Updated documentation a bit... Also removed the 'none' database - type and added the 'null' type instead. - 2001-04-16 14:57 Martin Geisler <gim...@gi...> * defaults-dist.php: @@ -583,27 +1086,6 @@ I don't like all those <tab>s... -2001-04-02 19:50 Martin Geisler <gim...@gi...> - - * doc/: class_db_dba.xml, db_dba.html: - - More doc updates... - -2001-04-02 19:40 Martin Geisler <gim...@gi...> - - * doc/: class_data_retrieval.xml, class_db_common.xml, - class_db_dba.xml, class_db_layer.xml, class_db_mysql.xml, - class_db_none.xml, class_db_pgsql.xml, class_locale_common.xml, - class_locale_en.xml, class_metar_parser.xml, class_phpweather.xml, - classtree_base_object.xml, data_retrieval.html, db_common.html, - db_dba.html, db_layer.html, db_mysql.html, db_none.html, - db_pgsql.html, elementlist.xml, locale_common.html, locale_en.html, - metar_parser.html, packageelementlist_PHP_Weather.html, - packagelist.xml, phpdoc_classtree.html, phpdoc_elementlist.html, - phpdoc_packagelist.html, phpdoc_xmlfiles.html, phpweather.html: - - Doc update... - 2001-04-02 19:34 Martin Geisler <gim...@gi...> * data_retrieval.php, db_mysql.php, db_none.php, db_pgsql.php, @@ -663,9 +1145,7 @@ 2001-03-26 20:25 Martin Geisler <gim...@gi...> - * phpweather.php, doc/base_object.html, doc/class_base_object.xml, - doc/class_db_none.xml, doc/class_locale_common.xml, - doc/db_none.html, doc/locale_common.html: + * phpweather.php: Ha-ha!! It works now! When I regenerate the docs, then I don't have to commit all the files to CVS, only those who is actually changed. @@ -679,25 +1159,6 @@ Even more doc-changes. -2001-03-26 20:13 Martin Geisler <gim...@gi...> - - * doc/: class_locale_common.xml, locale_common.html: - - Just some more documentation-fixes. - -2001-03-26 19:31 Martin Geisler <gim...@gi...> - - * doc/: base_object.html, class_base_object.xml, - class_data_retrieval.xml, class_db_common.xml, class_db_layer.xml, - class_db_mysql.xml, class_db_none.xml, class_db_pgsql.xml, - class_locale_common.xml, class_locale_en.xml, - class_metar_parser.xml, class_phpweather.xml, data_retrieval.html, - db_common.html, db_layer.html, db_mysql.html, db_none.html, - db_pgsql.html, elementlist.xml, locale_common.html, locale_en.html, - metar_parser.html, phpdoc_elementlist.html, phpweather.html: - - Just some whitespace changes in the documentation. - 2001-03-25 08:48 Martin Geisler <gim...@gi...> * README-CVS, db_layer.php: @@ -735,22 +1196,7 @@ 2001-03-24 16:40 Martin Geisler <gim...@gi...> - * data_retrieval.php, doc/base_object.html, - doc/class_base_object.xml, doc/class_data_retrieval.xml, - doc/class_db_common.xml, doc/class_db_layer.xml, - doc/class_db_mysql.xml, doc/class_db_none.xml, - doc/class_db_pgsql.xml, doc/class_locale_common.xml, - doc/class_locale_en.xml, doc/class_metar_parser.xml, - doc/class_phpweather.xml, doc/classtree_base_object.xml, - doc/data_retrieval.html, doc/db_common.html, doc/db_layer.html, - doc/db_mysql.html, doc/db_none.html, doc/db_pgsql.html, - doc/elementlist.xml, doc/empty.html, doc/frame_packagelist.html, - doc/index.html, doc/locale_common.html, doc/locale_en.html, - doc/metar_parser.html, doc/packageelementlist_PHP_Weather.html, - doc/packagelist.xml, doc/phpdoc.css, doc/phpdoc.dtd, - doc/phpdoc_classtree.html, doc/phpdoc_elementlist.html, - doc/phpdoc_packagelist.html, doc/phpdoc_xmlfiles.html, - doc/phpweather.html: + * data_retrieval.php: Updated the documentation a bit. @@ -826,21 +1272,7 @@ * index.php, ChangeLog, base_object.php, db_layer.php, db_mysql.php, db_none.php, db_common.php, db_pgsql.php, locale_en.php, phpweather.php, metar_parser.php, - data_retrieval.php, locale_common.php, doc/class_db_common.xml, - doc/class_db_mysql.xml, doc/class_db_none.xml, - doc/class_db_pgsql.xml, doc/class_metar_parser.xml, - doc/class_phpweather.xml, doc/class_data_retrieval.xml, - doc/class_db_layer.xml, doc/class_locale_en.xml, - doc/class_base_object.xml, doc/class_locale_common.xml, - doc/classtree_base_object.xml, doc/packagelist.xml, - doc/elementlist.xml, doc/frame_packagelist.html, - doc/phpdoc_elementlist.html, doc/phpdoc_packagelist.html, - doc/packageelementlist_PHP_Weather.html, doc/db_none.html, - doc/db_mysql.html, doc/db_common.html, doc/db_pgsql.html, - doc/phpweather.html, doc/data_retrieval.html, - doc/metar_parser.html, doc/db_layer.html, doc/locale_en.html, - doc/locale_common.html, doc/base_object.html, - doc/phpdoc_classtree.html, doc/phpdoc_xmlfiles.html: + data_retrieval.php, locale_common.php: Initial revision @@ -849,21 +1281,7 @@ * index.php, ChangeLog, base_object.php, db_layer.php, db_mysql.php, db_none.php, db_common.php, db_pgsql.php, locale_en.php, phpweather.php, metar_parser.php, - data_retrieval.php, locale_common.php, doc/class_db_common.xml, - doc/class_db_mysql.xml, doc/class_db_none.xml, - doc/class_db_pgsql.xml, doc/class_metar_parser.xml, - doc/class_phpweather.xml, doc/class_data_retrieval.xml, - doc/class_db_layer.xml, doc/class_locale_en.xml, - doc/class_base_object.xml, doc/class_locale_common.xml, - doc/classtree_base_object.xml, doc/packagelist.xml, - doc/elementlist.xml, doc/frame_packagelist.html, - doc/phpdoc_elementlist.html, doc/phpdoc_packagelist.html, - doc/packageelementlist_PHP_Weather.html, doc/db_none.html, - doc/db_mysql.html, doc/db_common.html, doc/db_pgsql.html, - doc/phpweather.html, doc/data_retrieval.html, - doc/metar_parser.html, doc/db_layer.html, doc/locale_en.html, - doc/locale_common.html, doc/base_object.html, - doc/phpdoc_classtree.html, doc/phpdoc_xmlfiles.html: + data_retrieval.php, locale_common.php: First checkin... Index: usermap =================================================================== RCS file: /cvsroot/phpweather/phpweather/usermap,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- usermap 13 Jul 2001 09:17:45 -0000 1.1 +++ usermap 17 Mar 2002 14:13:18 -0000 1.2 @@ -1,2 +1,4 @@ gimpster:Martin Geisler <gim...@gi...> -misibacsi:Mihaly Gyulai <gy...@my...> \ No newline at end of file +misibacsi:Mihaly Gyulai <gy...@my...> +iridium:Max Hammond <ir...@us...> + |
From: Martin G. <gim...@us...> - 2002-03-17 14:06:15
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv28083 Modified Files: defaults-dist.php Log Message: New property for pw_text. I'm not actually sure these properties should be collected here, I think it would be better if they were in right in the class-file. I also removed the language property as it isn't used anymore. Index: defaults-dist.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/defaults-dist.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- defaults-dist.php 20 Dec 2001 19:11:47 -0000 1.9 +++ defaults-dist.php 17 Mar 2002 14:06:11 -0000 1.10 @@ -21,14 +21,14 @@ $this->properties['proxy_host'] = ''; $this->properties['proxy_port'] = 3128; -$this->properties['db_hostname'] = ''; /* db_common.php */ +$this->properties['db_hostname'] = ''; /* pw_db_common.php */ $this->properties['db_database'] = ''; $this->properties['db_username'] = ''; $this->properties['db_password'] = ''; $this->properties['db_pconnect'] = false; $this->properties['db_port'] = ''; -$this->properties['db_metars'] = 'metars'; /* db_dba.php */ +$this->properties['db_metars'] = 'metars'; /* pw_db_dba.php */ $this->properties['db_stations'] = 'stations'; $this->properties['db_countries'] = 'countries'; @@ -39,7 +39,7 @@ $this->properties['mark_end'] = '</b>'; $this->properties['exclude'] = array(); -$this->properties['language'] = 'en'; /* phpweather.php */ +$this->properties['orientation'] = 'horizontal'; /* pw_text.php */ // hack around PHP bug - the offset to add to a time reported $this->properties['offset'] = 0; |
From: Martin G. <gim...@us...> - 2002-03-17 14:03:28
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv27879 Added Files: languages.php Log Message: Mapping between language-codes and corresponding English names. --- NEW FILE --- <?php $languages = array( 'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'am' => 'Amharic', 'ar' => 'Arabic', 'as' => 'Assamese', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'be' => 'Byelorussian', 'bg' => 'Bulgarian', 'bh' => 'Bihari', 'bi' => 'Bislama', 'bn' => 'Bengali / Bangla', 'bo' => 'Tibetan', 'br' => 'Breton', 'ca' => 'Catalan', 'co' => 'Corsican', 'cs' => 'Czech', 'cy' => 'Welsh', 'da' => 'Danish', 'de' => 'German', 'dz' => 'Bhutani', 'el' => 'Greek', 'en' => 'English / American', 'eo' => 'Esperanto', 'es' => 'Spanish', 'et' => 'Estonian', 'eu' => 'Basque', 'fa' => 'Persian', 'fi' => 'Finnish', 'fj' => 'Fiji', 'fo' => 'Faeroese', 'fr' => 'French', 'fy' => 'Frisian', 'ga' => 'Irish', 'gd' => 'Gaelic / Scots Gaelic', 'gl' => 'Galician', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ha' => 'Hausa', 'hi' => 'Hindi', 'hr' => 'Croatian', 'hu' => 'Hungarian', 'hy' => 'Armenian', 'ia' => 'Interlingua', 'ie' => 'Interlingue', 'ik' => 'Inupiak', 'in' => 'Indonesian', 'is' => 'Icelandic', 'it' => 'Italian', 'iw' => 'Hebrew', 'ja' => 'Japanese', 'ji' => 'Yiddish', 'jw' => 'Javanese', 'ka' => 'Georgian', 'kk' => 'Kazakh', 'kl' => 'Greenlandic', 'km' => 'Cambodian', 'kn' => 'Kannada', 'ko' => 'Korean', 'ks' => 'Kashmiri', 'ku' => 'Kurdish', 'ky' => 'Kirghiz', 'la' => 'Latin', 'ln' => 'Lingala', 'lo' => 'Laothian', 'lt' => 'Lithuanian', 'lv' => 'Latvian / Lettish', 'mg' => 'Malagasy', 'mi' => 'Maori', 'mk' => 'Macedonian', 'ml' => 'Malayalam', 'mn' => 'Mongolian', 'mo' => 'Moldavian', 'mr' => 'Marathi', 'ms' => 'Malay', 'mt' => 'Maltese', 'my' => 'Burmese', 'na' => 'Nauru', 'ne' => 'Nepali', 'nl' => 'Dutch', 'no' => 'Norwegian', 'oc' => 'Occitan', 'om' => 'Oromo / Afan', 'or' => 'Oriya', 'pa' => 'Punjabi', 'pl' => 'Polish', 'ps' => 'Pashto / Pushto', 'pt' => 'Portuguese', 'qu' => 'Quechua', 'rm' => 'Rhaeto-Romance', 'rn' => 'Kirundi', 'ro' => 'Romanian', 'ru' => 'Russian', 'rw' => 'Kinyarwanda', 'sa' => 'Sanskrit', 'sd' => 'Sindhi', 'sg' => 'Sangro', 'sh' => 'Serbo-Croatian', 'si' => 'Singhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'sm' => 'Samoan', 'sn' => 'Shona', 'so' => 'Somali', 'sq' => 'Albanian', 'sr' => 'Serbian', 'ss' => 'Siswati', 'st' => 'Sesotho', 'su' => 'Sudanese', 'sv' => 'Swedish', 'sw' => 'Swahili', 'ta' => 'Tamil', 'te' => 'Tegulu', 'tg' => 'Tajik', 'th' => 'Thai', 'ti' => 'Tigrinya', 'tk' => 'Turkmen', 'tl' => 'Tagalog', 'tn' => 'Setswana', 'to' => 'Tonga', 'tr' => 'Turkish', 'ts' => 'Tsonga', 'tt' => 'Tatar', 'tw' => 'Twi', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 'vi' => 'Vietnamese', 'vo' => 'Volapuk', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yo' => 'Yoruba', 'zh' => 'Chinese', 'zu' => 'Zulu'); ?> |
From: Martin G. <gim...@us...> - 2002-03-17 14:02:18
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv27373 Added Files: images-test.php Log Message: Really nice test-page for pw_images made by Ray van Beek. --- NEW FILE --- <html> <head> <title>PHP Weather</title> </head> <body> <?php error_reporting(E_ALL); require('phpweather.php'); require('output/pw_text_en.php'); require('output/pw_text_da.php'); require('output/pw_images.php'); $weather = new phpweather(array('icao' => 'EHEH')); $text = new pw_text_en($weather, array()); $images = new pw_images($weather, array()); $metar = $weather->get_metar(); function print_sky_image($metar = '') { global $images; if (!empty($metar)) { $images->weather->set_metar($metar); } echo '<img src="' . $images->get_sky_image() . '" height="50" width="80">'; } function print_winddir_image($metar = '') { global $images; if (!empty($metar)) { $images->weather->set_metar($metar); } echo '<img src="' . $images->get_winddir_image() . '" height="40" width="40">'; } function print_temp_image($metar = '') { global $images; if (!empty($metar)) { $images->weather->set_metar($metar); } echo '<img src="' . $images->get_temp_image() . '" height="50" width="20">'; } ?> <h1>Iconize PHPWeather info</h1> <h2>Introduction</h2> <p>Over the globe, a lot of weatherstations report the local weatherconditions to the <a href="http://weather.noaa.gov/weather/metar.shtml">NOAA organisation</a>, most of the times on an hourly basis. The weatherconditions are reported in the METAR format. The METAR data is available through the internet. For example the METAR data for Eindhoven Airport, Netherlands is:</p> <blockquote><code><? echo $metar ?></code></blockquote> <p>Martin Geisler (<a href="http://www.gimpster.com">www.gimpster.com</a>) has developed a PHP-script that retrieves and parses METAR data into readable text. You can get the PHPWeather script from <a href="http://sourceforge.net/projects/phpweather/">PHP Weather</a>. By this script, the METAR data of above is converted into:</p> <? $text->print_pretty(); ?> <p>I thought it would be neat to represent the METAR data in a graphical way as well. This is not new. Various portals and newspaper sites have this kind of representation also. But there is no way to personalize that representation: the information is statically built into their web-pages.<br> What I had in mind was a form that gives freedom in the choice of the icons and what kind of information that is presented: wind, temperature, sky cover and precipitation. Of course the freedom of choice ends with the one that builds the webpage: the PHP script is executed on the server which contains the webpage. There is no way that a user of the page can personalize representation (at least that is what I have in mind).</p> <p>So here it is. The current weather conditions in icons (so far):</p> <blockquote> <img src="<? echo $images->get_temp_image() ?>" height="50" width="20" border="1"> <img src="<? echo $images->get_winddir_image() ?>" height="40" width="40" border="1"> <img src="<? echo $images->get_sky_image() ?>" height="50" width="80" border="1"> </blockquote> <h2>At first...</h2> <p>I searched for a set of icons on the internet. There are dozens of them. But only few are closely related to METAR data. I have downloaded the set of icons that I thought came very close to the METAR data. Then I have adjusted, changed and updated them to what I think that they should be and to the PHP script that I had in mind.</p> <p>First, I started with the sky cover and precipitation group within the METAR data. The set of icons I have downloaded already distinguises between day and night time, so I decided to take that into account too. METAR data has a group that describes the sky covering in five steps. Alltough sky covering can be described with a maximum of 3 layers, the script uses the layer that has the heaviest sky cover. The reason for this is because that probably describes the weather condition best (from the point of view of someone who looks up to the sky).</p> <p>Then there is a group that describes the 'Present Weather Group'. To me, this is the precipitation and related phenomenas, at least most of the time. To reduce the set of required icons I grouped similar precipitation phenomenas. I limited the script to rain (RA/DZ), snow (SN/SG), hail (GR/GS/PE/IC), thunderstorm (TS) and fog (BR/FG). Those are the most common weather types in the Netherlands. The script can be changed to contain more types (you'll need more icons though!)</p> <p>The script takes both the sky cover figure and the precipitation phenomenas as table entries at searches for the proper image file name. Finally, the time of the metar data is taken into account: during day time (from 6:00 AM to 6:00 PM) a sun with some clouds is displayed. At night time (from 6:00 PM to 6:00 AM) a moon with some clouds is displayed. Of course, when overcast is present, no sun or moon is presented.</p> <p>Refer to the next sections that present two tables with various icons that are resolved when METAR data is processed. One table provides the day time images, while the other provides the night time images. <a href="http://www.devolder.nl/table.txt">Click here</a> to view the code of the 'images.inc' file and <a href="http://www.devolder.nl/images.txt">click here</a> to view the code of this page.</p> <h2>Things to improve</h2> <ul> <li> </li> </ul> <h2>Day time sky cover/precipitation icons</h2> <p>The script creates one icon for a sky over and precipitation combination. Basically, the METAR data distinguishes 5 different sky covering types, which are listed horizontally in the table below. There are a lot of precipitation and related types, but in this script the number is limited to the most common types (at least in the Netherlands ;-): rain, snow, hail, thunderstorm and fog.</p> <p>Remarks:</p> <ul> <li>For rain, three different intensities are distinguished: light, moderate and heavy.</li> <li>For snow and hail, it is assumed that light/moderate and heavy intensities only need to be distinguished when there is overcast (100% sky cover).</li> <li>In case of fog/mist, I use the sky cover figure to increase the 'thickness' of the fog and to blend out sun light. I'm not sure that the skycover is being used as an indication of the 'fogginess'. Anyone?</li> </ul> </p> <? $images->set_time('day'); ?> <table class="weather" border="1"> <tr> <th class="weather" colspan="2" width=200>Sky Cover/<br>Precipitation</th> <th class="weather" width=80>Clear<br>(CLR/SKC)</th> <th class="weather" width=80>Few<br>(FEW)</th> <th class="weather" width=80>Scattered<br>(SCT)</th> <th class="weather" width=80>Broken<br>(BKN)</th> <th class="weather" width=80>Overcast<br>(OVC/VV)</th> </tr> <tr> <th class="weather" colspan=2>None</th> <td><? print_sky_image('CLR') ?></td> <td><? print_sky_image('FEW000') ?></td> <td><? print_sky_image('SCT000') ?></td> <td><? print_sky_image('BKN000') ?></td> <td><? print_sky_image('OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=3>Drizzle/Rain<br>(DZ/RA)</th> <td>light</td> <td rowspan=3><? print_sky_image('CLR') ?></td> <td><? print_sky_image('-RA FEW000') ?></td> <td><? print_sky_image('-RA SCT000') ?></td> <td><? print_sky_image('-RA BKN000') ?></td> <td><? print_sky_image('-RA OVC000') ?></td> </tr> <tr> <td>moderate</td> <td><? print_sky_image('RA FEW000') ?></td> <td><? print_sky_image('RA SCT000') ?></td> <td><? print_sky_image('RA BKN000') ?></td> <td><? print_sky_image('RA OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+RA FEW000') ?></td> <td><? print_sky_image('+RA SCT000') ?></td> <td><? print_sky_image('+RA BKN000') ?></td> <td><? print_sky_image('+RA OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=2>Snow/Snow Grains<br>(SN/SG)</th> <td>light/<br>moderate</td> <td rowspan=2><? print_sky_image('CLR') ?></td> <td rowspan=2><? print_sky_image('SN FEW000') ?></td> <td rowspan=2><? print_sky_image('SN SCT000') ?></td> <td rowspan=2><? print_sky_image('SN BKN000') ?></td> <td><? print_sky_image('SN OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+SN OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=2>Ice Crystals/Ice Pellets/<br>Hail/Small Hail<br>(IC/PE/GR/GS)</th> <td>light/<br>moderate</td> <td rowspan=2><? print_sky_image('CLR') ?></td> <td rowspan=2><? print_sky_image('IC FEW000') ?></td> <td rowspan=2><? print_sky_image('IC SCT000') ?></td> <td rowspan=2><? print_sky_image('IC BKN000') ?></td> <td><? print_sky_image('IC OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+IC OVC000') ?></td> </tr> <tr> <th class="weather" colspan=2>Thunderstorm<br>(TS)</th> <td><? print_sky_image('CLR') ?></td> <td><? print_sky_image('TS FEW000') ?></td> <td><? print_sky_image('TS SCT000') ?></td> <td><? print_sky_image('TS BKN000') ?></td> <td><? print_sky_image('TS OVC000') ?></td> </tr> <tr> <th class="weather" colspan=2>Mist/Fog<br>(BR/FG)</th> <td><? print_sky_image('FG CLR000') ?></td> <td><? print_sky_image('FG FEW000') ?></td> <td><? print_sky_image('FG SCT000') ?></td> <td><? print_sky_image('FG BKN000') ?></td> <td><? print_sky_image('FG OVC000') ?></td> </tr> </table> <p>Note: with the sky cover/precipitation icons, there is no such thing as 'no data'. When both groups are omitted, this could mean sunny and no precipitation, and 'no data' as well. Since the metar exists, I decided to show the 'sunny' icon.</p> <h2>Night time sky cover/precipitation icons</h2> <p>To the night time sky cover/precipitation icons the same remarks as to the day tim icons apply.</p> <? $images->set_time('nite'); ?> <table border="1" class="weather"> <tr> <th class="weather" colspan=2 width=200>Sky Cover/<br>Precipitation</th> <th width=80>Clear<br>(CLR/SKC)</th> <th width=80>Few<br>(FEW)</th> <th width=80>Scattered<br>(SCT)</th> <th width=80>Broken<br>(BKN)</th> <th width=80>Overcast<br>(OVC/VV)</th> </tr> <tr> <th class="weather" colspan=2>None</th> <td><? print_sky_image('CLR') ?></td> <td><? print_sky_image('FEW000') ?></td> <td><? print_sky_image('SCT000') ?></td> <td><? print_sky_image('BKN000') ?></td> <td><? print_sky_image('OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=3>Drizzle/Rain<br>(DZ/RA)</th> <td>light</td> <td rowspan=3><? print_sky_image('CLR') ?></td> <td><? print_sky_image('-RA FEW000') ?></td> <td><? print_sky_image('-RA SCT000') ?></td> <td><? print_sky_image('-RA BKN000') ?></td> <td><? print_sky_image('-RA OVC000') ?></td> </tr> <tr> <td>moderate</td> <td><? print_sky_image('RA FEW000') ?></td> <td><? print_sky_image('RA SCT000') ?></td> <td><? print_sky_image('RA BKN000') ?></td> <td><? print_sky_image('RA OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+RA FEW000') ?></td> <td><? print_sky_image('+RA SCT000') ?></td> <td><? print_sky_image('+RA BKN000') ?></td> <td><? print_sky_image('+RA OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=2>Snow/Snow Grains<br>(SN/SG)</th> <td>light/<br>moderate</td> <td rowspan=2><? print_sky_image('CLR') ?></td> <td rowspan=2><? print_sky_image('SN FEW000') ?></td> <td rowspan=2><? print_sky_image('SN SCT000') ?></td> <td rowspan=2><? print_sky_image('SN BKN000') ?></td> <td><? print_sky_image('SN OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+SN OVC000') ?></td> </tr> <tr> <th class="weather" rowspan=2>Ice Crystals/Ice Pellets/<br>Hail/Small Hail<br>(IC/PE/GR/GS)</th> <td>light/<br>moderate</td> <td rowspan=2><? print_sky_image('CLR') ?></td> <td rowspan=2><? print_sky_image('IC FEW000') ?></td> <td rowspan=2><? print_sky_image('IC SCT000') ?></td> <td rowspan=2><? print_sky_image('IC BKN000') ?></td> <td><? print_sky_image('IC OVC000') ?></td> </tr> <tr> <td>heavy</td> <td><? print_sky_image('+IC OVC000') ?></td> </tr> <tr> <th class="weather" colspan=2>Thunderstorm<br>(TS)</th> <td><? print_sky_image('CLR') ?></td> <td><? print_sky_image('TS FEW000') ?></td> <td><? print_sky_image('TS SCT000') ?></td> <td><? print_sky_image('TS BKN000') ?></td> <td><? print_sky_image('TS OVC000') ?></td> </tr> <tr> <th class="weather" colspan=2>Mist/Fog<br>(BR/FG)</th> <td><? print_sky_image('FG CLR000') ?></td> <td><? print_sky_image('FG FEW000') ?></td> <td><? print_sky_image('FG SCT000') ?></td> <td><? print_sky_image('FG BKN000') ?></td> <td><? print_sky_image('FG OVC000') ?></td> </tr> </table> <p>Note: with the sky cover/precipitation icons, there is no such thing as 'no data'. When both groups are omitted, this could mean 'moony' (as opposed to 'sunny' ;-) and no precipitation, and 'no data' as well. Since the metar exists, I decided to show the 'moony' icon.</p> <? $images->set_time(''); ?> <h2>Wind direction</h2> <p>A dedicated group in the METAR data provides wind related information. Of this data, the wind direction can be visualized graphically (as an arrow indicating the wind direction). I designed 16 wind direction icons (north, north-north-east, north-east etc), a special icon for variable wind direction (speed 6 knots or less) and a calm wind icon. The variable wind direction with speeds greater than 6 knots is not covered by an icon. The icon should then show the 'directional variability', which is pretty complex.</p> <p>Each of the 16 wind direction is mapped onto a icon, e.g. angles from 348.75 degrees through 11.25 degrees are mapped to the 'North' icon. Angles from 11.25 through 33.75 degrees are mapped to 'North-east' etc. This leads to the following icons:</p> <table class="weather" border="1"> <tr> <th>N</th> <th>NNE</th> <th>NE</th> <th>NEE</th> <th>E</th> <th>SEE</th> <th>SE</th> <th>SSE</th> </tr> <tr> <td><?print_winddir_image('00110KT') ?></td> <td><?print_winddir_image('02210KT') ?></td> <td><?print_winddir_image('04510KT') ?></td> <td><?print_winddir_image('06710KT') ?></td> <td><?print_winddir_image('09010KT') ?></td> <td><?print_winddir_image('11210KT') ?></td> <td><?print_winddir_image('13510KT') ?></td> <td><?print_winddir_image('15710KT') ?></td> </tr> <tr> <th>S</th> <th>SSW</th> <th>SW</th> <th>SSW</th> <th>W</th> <th>NWW</th> <th>NW</th> <th>NNW</th> </tr> <tr> <td><?print_winddir_image('18010KT') ?></td> <td><?print_winddir_image('20210KT') ?></td> <td><?print_winddir_image('22510KT') ?></td> <td><?print_winddir_image('24710KT') ?></td> <td><?print_winddir_image('27010KT') ?></td> <td><?print_winddir_image('29210KT') ?></td> <td><?print_winddir_image('31510KT') ?></td> <td><?print_winddir_image('33710KT') ?></td> </tr> <tr> <th>VRB</th> <th>Calm<br>wind</th> <th>No<br>data</th> </tr> <tr> <td><?print_winddir_image('VRB10KT') ?></td> <td><?print_winddir_image('00000KT') ?></td> <td><?print_winddir_image(' ') ?></td> </tr> </table> <h2>Temperature</h2> <p>Another group in the METAR data provides temperature data. Only the actual temperature is being used to show either a blue (below 0 degrees C) or a red (above 0 degrees C) thermometer is shown. I know it is possible to generate images during php script execution with the GD lib, but I think changes in thermometer would be very small and hard to see.</p> <table class="weather" border="1"> <tr> <th>Below<br>0<br>deg C</th> <th>Above<br>0<br>deg C</th> <th>No<br>data</th> </tr> <tr> <td><? print_temp_image('M05/M05') ?></td> <td><? print_temp_image('05/05') ?></td> <td><? print_temp_image(' ') ?></td> </tr> </table> <h2>Change history</h2> <ul> <li>17 feb: EHEH 180825Z 22008KT 2500 R22/2000N -RA BR FEW008 BKN010 04/03 Q1017 YLO YLO BECMG GRN<br> Specifies Light rain, and mist. The icon shown is sun/mist. There is only clouds and rain, and no sun. Maybe the fog phenomena should only be taken into account when CLR or FEW. All others (SCT/BKN/OVC) ignore fog? <blockquote>Changed the mist icons to show clouds as well.</blockquote> </li> <li>19 feb: EHEH 191145Z 29016G30KT 4000 -SHRA BKN020CB 05/04 Q1015 TEMPO 4000 -TSRAGS<br> Specifies light showering rain, but also light thunderstorm of rain and small hail. Results in no image at all. Apparently, the script cannnot resolve this.<br> <blockquote>The metar contains a forcast part (from 'TEMPO...' and further). The script did not detect that and ran into the -TSRAGS part. Now the script stops before RMK|TEMPO|BECMG. </blockquote> </li> <li>25 feb: .... BR OVC020....<br> Specifies mist with overcast. Leads to 'fully white' image. This should be changed to normal overcast image <blockquote>Changed the mist icons to show clouds as well.</blockquote> </li> </ul> </body> </html> |
From: Martin G. <gim...@us...> - 2002-03-17 13:59:31
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv26852 Modified Files: index.php Log Message: The images found by pw_images are now also part of the output. Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- index.php 8 Jul 2001 17:09:24 -0000 1.16 +++ index.php 17 Mar 2002 13:59:26 -0000 1.17 @@ -76,7 +76,7 @@ echo ' <select name="language"> '; - $languages = $GLOBALS['obj']->get_languages(); + $languages = $GLOBALS['obj']->get_languages('text'); if (!empty($GLOBALS['language'])) { $selected = $GLOBALS['language']; @@ -102,7 +102,7 @@ echo ' <p> -<form action="index.php" method="post"> +<form action="index.php" method="get"> <input type="hidden" name="action" value="show_stations"> '; @@ -120,7 +120,7 @@ echo ' <p> -<form action="index.php" method="post"> +<form action="index.php" method="get"> <input type="hidden" name="action" value="show_weather"> '; @@ -142,7 +142,7 @@ echo ' <p> -<form action="index.php" method="post"> +<form action="index.php" method="get"> <input type="hidden" name="action" value="show_weather"> '; @@ -162,12 +162,34 @@ /* We should only display the current weather is the country isn't changed */ $obj->set_icao($icao); - $obj->set_language($language); + include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); + $type = 'pw_text_' . $language; + $text = new $type($obj, array()); echo "<p>This is the current weather in " . $obj->get_location() . ":</p>\n"; - $obj->print_pretty(); + $text->print_pretty(); + + echo "<p>The same information in a table:</p>\n"; + $text->print_table(); + + echo "<p>The matching icons are:</p>\n"; + + include(PHPWEATHER_BASE_DIR . "/output/pw_icons.php"); + + $icons = new pw_icons($obj, array()); + + echo "<blockquote>\n"; + echo '<img src="' . $icons->get_sky_image() . + '" height="50" width="80" border="1"> '; + echo '<img src="' . $icons->get_winddir_image() . + '" height="40" width="40" border="1"> '; + echo '<img src="' . $icons->get_temp_image() . + '" height="50" width="20" border="1">'; + echo "</blockquote>\n"; + + echo "<p>The raw METAR is <code>" . $obj->get_metar() . "</code></p>\n"; } |
From: Martin G. <gim...@us...> - 2002-03-17 13:39:08
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv22745/output Added Files: pw_images.php pw_text.php pw_text_da.php pw_text_en.php pw_text_hu.php pw_text_no.php Log Message: The new output modules. pw_text does that locale_common did before, and pw_text_xx are the localized version of the class. pw_images is new - it selects suitable images for display with or instead of the textual report. --- NEW FILE --- <?php /* Copyright (c) 2002 Raymond van Beek <ra...@de...>. Licensed under the GPL, see the file COPYING. Parts of this code are derived from the phpweather.inc code by Martin Geisler <gim...@gi...> Also see http://www.gimpster.com/php/phpweather/ or http://www.sourceforge.net/projects/phpweather for updates and further instructions on how to use PHP Weather. */ class pw_images extends base_object { var $itime = ''; // ======================================================================= // This section contains user configurable items: The user can // configure the image filenames to be generated by the script. // An array to convert the weather group codes to an index of the // $images and $n_images array. var $phenomena_array = array ('#' => 'None', 'TS' => 'Thun', 'RA' => 'Rain', 'DZ' => 'Rain', 'SN' => 'Snow', 'SG' => 'Snow', 'GR' => 'Hail', 'GS' => 'Hail', 'PE' => 'Hail', 'IC' => 'Hail', 'BR' => 'Fog', 'FG' => 'Fog'); // An array to convert the cloud coverage codes to an index of the // $images and $n_images array. var $coverage = array ('CLR' => '0', 'SKC' => '0', 'FEW' => '1', 'SCT' => '2', 'BKN' => '3', 'OVC' => '4', 'VV' => '4'); var $sky_nodata_image = 'sky_nodata.gif'; // Define a lot of images for daylight weather-group/cloud // condition. It's a 2-dimensional array, indexed by the: // - Precipitation (first index) // - Cloud coverage (second index). var $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') ); // Define a lot of images for nigh time weather-group/cloud // condition. It has the same structure as the daylight array // $images It's a 2-dimensional array, indexed by the: // - Precipitation (first index) // - Cloud coverage (second index). var $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') ); // Define image filenames for: // - 16 wind directions, // - 'no wind direction data' // - variable wind direction (VRB) // - calm wind (00000KT), or 'nodir' var $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'); var $wind_nodata_image = 'wind_nodata.gif'; var $wind_vrb_image = 'vrb.gif'; var $wind_nodir_image = 'nodir.gif'; // Define image filenames for: // - 'no data' condition, // - 'temperature zero or below zero degrees Celcius // - 'temperature above zero degrees Celcius var $temp_nodata_image = 'temp_nodata.gif'; var $temp_low_image = 'templow.gif'; var $temp_high_image = 'temphigh.gif'; // ====================================================================== // The wind_speeds array can be used to convert wind speed values in // [m/s] to [Bft] (beaufort). var $wind_speeds = array ( 'beaufort' => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 'ms' => array (0.3, 1.6, 3.4, 5.5, 8.0, 10.8, 13.9, 17.2, 20.8, 24.5, 28.5, 32.7, 999)); // ------------------------------------------------------------------------ /** * This is where the object with the weather is stored. * * @var phpweather $weather */ var $weather = null; function pw_images($w, $input) { $this->weather = $w; /* We call the parent constructor. */ $this->base_object($input); } // The get_sky_image() function takes the processed metar data and // returns the sky image filename. The function combines the weather // group and cloud group to a specific image. Example html code: // // <img src="< ?php // get_image($processed_metar) // ? >" height="50" width="80" border="1"> function get_sky_image() { $processed_metar_data = $this->weather->decode_metar(); $metar = $processed_metar_data['metar']; $parts = explode(' ', $metar); $num_parts = count($parts); $night = 0; $maxcoverage = 0; for ($i = 0; $i < $num_parts; $i++) { $part = $parts[$i]; if (ereg('RMK|TEMPO|BECMG', $part)) { /* The rest of the METAR is either a remark or temporary information. We skip the rest of the METAR. */ break; } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { if (($regs[2] < 6) || ($regs[2] > 18)) { $night = 1; } } elseif (ereg('^(-|\+|VC)?(TS|SH|FZ|BL|DR|MI|BC|PR|RA|DZ|SN|SG|GR|GS|PE|IC|UP|BR|FG|FU|VA|DU|SA|HZ|PY|PO|SQ|FC|SS|DS)+$', $part)) { /* * Is this the current weather group? */ // Get the intensity and get rid of it in the $part string $intensity = ''; if (ereg('^(-|\+|VC)(..)*$',$part)) { if ($part[0] == '-') { $intensity = '-'; $part = substr($part,1); } elseif ($part[0] == '+') { $intensity = '+'; $part = substr($part,1); } elseif ($part[0] . $part[1] == 'VC') { $intensity = ''; $part = substr($part,2); } } // Now, take only the precipitation types that have images. // 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] != '') { $phenomena = $match[1]; } else { ereg('(..)(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match); if ($match[2] != '') { $phenomena = $match[2]; } } // Not each precipitation type has a single image with it. // Combine similar precipitation types to a phenomena group. // I.e. drizzle (DZ) and rain (RA) are both considered to be // rain (as far as the images are concerned). Add intensity only // in case of rain and snow. if (ereg('^(Snow|Hail)$',$this->phenomena_array[$phenomena])) { if ($intensity == '') { $intensity = '-'; } } if (ereg('^(Rain|Snow|Hail)$',$this->phenomena_array[$phenomena])) { $phenomena_group = $intensity . $this->phenomena_array[$phenomena]; } else { $phenomena_group = $this->phenomena_array[$phenomena]; } } // Now check the cloud coverage. There could be three cloud // layers, so check for all of them. Iconize the most covered // clouds, thus find the highest cloudcoverage layer, by // maximizing the $maxcoverage param elseif (ereg('(SKC|CLR)(...)', $part, $regs)) { $maxcoverage = max($maxcoverage,$this->coverage[$regs[1]]); // if ($maxcoverage < $this->coverage[$regs[1]]) { // $maxcoverage = $this->coverage[$regs[1]]; // } } elseif (ereg('^(VV|FEW|SCT|BKN|OVC)([0-9]{3})(CB|TCU)?$', $part, $regs)) { $maxcoverage = max($maxcoverage,$this->coverage[$regs[1]]); // if ($maxcoverage < $this->coverage[$regs[1]]) { // $maxcoverage = $this->coverage[$regs[1]]; // } } } // If looped through all groups and not found any weather group // (meaning no precipitation?), assume a '#' phenomena, resulting in // a 'None' phenomena group if (empty($phenomena)) { $phenomena = '#'; $phenomena_group = $this->phenomena_array[$phenomena]; } // At this point, the $phenomena_group variable contains the one // index of the $this->images array, while the $maxcoverage // variable contains the other index of the $this->images array. // The correct image can be selected from the array. if (($night == 1) || ($this->itime == 'nite')) { return 'icons/' . $this->n_images[$phenomena_group][$maxcoverage]; } else { return 'icons/' . $this->images[$phenomena_group][$maxcoverage]; } } // ------------------------------------------------------------------------ // The get_winddir_image() function takes the processed metar data and // returns the appropriate wind direction image filename. There are 16 // wind direction icons defined to indicate the wind direction. Beside // the 16 directions, there are icons for variable wind direction, // calm wind and and an icon for the no data condition. Example html // code: // // <img src="< ?php // get_winddir_image($processed_metar) // ? >" height="40" width="40" border="1"> function get_winddir_image() { $processed_metar_data = $this->weather->decode_metar(); if (!empty($processed_metar_data['wind'])) { $wind = $processed_metar_data['wind']; if ($wind['deg'] == 'VRB') { return 'icons/' . $this->wind_vrb_image; } elseif (($wind['deg'] == 0) && ($wind['knots'] == 0)) { return 'icons/' . $this->wind_nodir_image; } else { return 'icons/' . $this->wind_dir_images[round($wind['deg']/22.5)]; } } else { return 'icons/' . $this->wind_nodata_image; } } // ------------------------------------------------------------------------ // The get_temp_image() function takes the processed metar data and // returns the appropriate temperature image filename. It uses the // 'temp_c' value to decide weather a freezing thermometer icon or a // non-freezing thermometer icon. When the 'temp_c' data is not // available, a 'no data' icon filename is returned. Example html // code: // // <img src="< ?php // get_temp_image($processed_metar) // ? >" height="50" width="20" border="1"> function get_temp_image() { $processed_metar_data = $this->weather->decode_metar(); if (!empty($processed_metar_data['temperature'])) { if ($processed_metar_data['temperature']['temp_c'] > 0) { return 'icons/' . $this->temp_high_image; } else { return 'icons/' . $this->temp_low_image; } } else { return 'icons/' . $this->temp_nodata_image; } } // ------------------------------------------------------------------------ // The get_beaufort() function takes the 'wind_meters_per_second' // value from the $decoded_metar array and converts it to beaufort // values. This is done by iterating through a table with windspeeds // in [m/s] and [bft] values. function get_beaufort() { $processed_metar_data = $this->weather->decode_metar(); if (!empty($processed_metar_data['wind'])) { $ms = $processed_metar_data['wind']['meters_per_second']; $cnt = 0; while (($ms > $wind_speeds['ms'][$cnt]) && ($cnt <= 12)) { $cnt++; } return $cnt; } else { return 0; } } // ------------------------------------------------------------------------ // The set_time() function is purely added for overruling the metar // time to night time. It is only intended to support displaying all // weathergroup icons in the table.php script during daytime. function set_time($ntime) { $this->itime = $ntime; } // ------------------------------------------------------------------------ } ?> --- NEW FILE --- <?php /** * Provides all the function needed to generate text output. * * This class has the capability to do a pretty-print, if it is * provided with the right set of strings. It's up to child-classes to * provide these strings, and override the methods in this class, as * necessary. The logic in the pretty-print is built around the English * output, but it should still be possible to make a good translation, by * just translating the strings. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_text.php,v 1.1 2002/03/17 13:39:04 gimpster Exp $ */ class pw_text extends base_object { /** * The strings used in the translation are stored here. [...1108 lines suppressed...] echo ' <th>' . $this->strings['temperature'] . "</th>\n"; echo ' <th>' . $this->strings['pressure'] . "</th>\n"; echo ' <th>' . $this->strings['humidity'] . "</th>\n"; echo " </tr>\n"; echo " <td>$location</td> <td>$date</td> <td>$wind</td> <td>$temperature</td> <td>$pressure</td> <td>$humidity%</td> </tr> </table> "; } } } ?> --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by locale_common to produce Danish output. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_text_da.php,v 1.1 2002/03/17 13:39:04 gimpster Exp $ */ class pw_text_da extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to locale_common() */ function pw_text_da($weather, $input) { $this->strings['charset'] = 'ISO-8859-1'; $this->strings['no_data'] = 'Desværre! Der er ingen data for %s%s%s.'; $this->strings['list_sentences_and'] = ' og '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ' og '; $this->strings['location'] = 'Dette er en rapport for %s%s%s.'; $this->strings['minutes'] = ' minutter'; $this->strings['time_format'] = 'Denne rapport blev lavet for %s siden, kl. %s%s%s UTC.'; $this->strings['time_minutes'] = 'og %s%s%s minutter'; $this->strings['time_one_hour'] = '%sen%s time %s'; $this->strings['time_several_hours'] = '%s%s%s timer %s'; $this->strings['time_a_moment'] = 'et øjeblik'; $this->strings['meters_per_second'] = ' meter pr. sekund'; $this->strings['miles_per_hour'] = ' mil pr. time'; $this->strings['meter'] = ' meter'; $this->strings['meters'] = ' meter'; $this->strings['feet'] = ' fod'; $this->strings['kilometers'] = ' kilometer'; $this->strings['miles'] = ' mil'; $this->strings['and'] = ' og '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' med '; $this->strings['wind_blowing'] = 'Vindhastigheden var '; $this->strings['wind_with_gusts'] = ' med vindstød på up til '; $this->strings['wind_from'] = ' fra '; $this->strings['wind_variable'] = ' fra %svarierende%s retninger.'; + $this->strings['wind_varying'] = ', varierende mellem %s%s%s (%s%s°%s) og %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'Vinden var %sstille%s'; $this->strings['wind_dir'] = array( 'nord', 'nord/nordøst', 'nordøst', 'øst/nordøst', 'øst', 'øst/sydøst', 'sydøst', 'syd/sydøst', 'syd', 'syd/sydvest', 'sydvest', 'vest/sydvest', 'vest', 'vest/nordvest', 'nordvest', 'nord/nordvest', 'nord'); $this->strings['wind_dir_short'] = array( 'N', 'NNØ', 'NØ', 'ØNØ', 'Ø', 'ØSØ', 'SØ', 'SSØ', 'S', 'SSV', 'SV', 'VSV', 'V', 'VNV', 'NV', 'NNV', 'N'); $this->strings['wind_dir_short_long'] = array( 'N' => 'nord', 'NØ' => 'nordøst', 'Ø' => 'øst', 'SØ' => 'sydøst', 'S' => 'syd', 'SV' => 'sydvest', 'V' => 'vest', 'NV' => 'nordvest' ); $this->strings['temperature'] = 'Temperaturen var '; $this->strings['dew_point'] = ', med et dugpunkt på '; $this->strings['altimeter'] = 'Lufttrykket var '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Den relative luftfugtigheden var '; $this->strings['cloud_group_beg'] = 'Der var '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Himlen var %sskyfri%s.'; $this->strings['cloud_height'] = ' skyer i en højde af '; $this->strings['cloud_overcast'] = 'Himlen var %soverskyet%s i en højde af '; $this->strings['cloud_vertical_visibility'] = 'den %svertikale sigtbarhed%s var '; $this->strings['cloud_condition'] = array( 'SKC' => 'skyfri', 'CLR' => 'skyfri', 'FEW' => 'nogle få', 'SCT' => 'spredte', 'BKN' => 'brudte', 'OVC' => 'overskyet'); $this->strings['cumulonimbus'] = ' cumulus skyer'; $this->strings['towering_cumulus'] = ' stakkede cumulus skyer'; $this->strings['cavok'] = ' ingen skyer under %s og ingen cumulus skyer'; $this->strings['currently'] = 'Vejrforholdene er i øjeblikket '; $this->strings['weather'] = array('-' => 'let ', ' ' => 'moderat ', '+' => 'kraftig ', 'VC' => ' i nærheden', 'PR' => ' delvis', 'BC' => ' banker af', 'MI' => ' lave', 'DR' => ' lave drivende', 'BL' => ' blæsende', 'SH' => ' byger med', 'TS' => ' tordenvejr', 'FZ' => ' frysende', 'DZ' => ' finregn', 'RA' => ' regn', 'SN' => ' sne', 'SG' => ' sne korn', 'IC' => ' is krystaller', 'PL' => ' is kugler', 'GR' => ' hagl', 'GS' => ' små hagl', 'UP' => ' ukendt', 'BR' => ' dis', 'FG' => ' tåge', 'FU' => 'røg', 'VA' => 'vulkansk aske', 'DU' => 'udbredt støv', 'SA' => 'sand', 'HZ' => 'tåge/dis', 'PY' => 'byge', 'PO' => 'veludviklet støv/sand hvirvler', 'SQ' => 'vindstød', 'FC' => 'tornado/skypumpe', 'SS' => 'sandstorm/støvstorm'); $this->strings['visibility'] = 'Sigtbarheden var '; $this->strings['visibility_greater_than'] = 'større end '; $this->strings['visibility_less_than'] = 'mindre end '; $this->strings['runway_upward_tendency'] = ' med en %sstigende%s tendens'; $this->strings['runway_downward_tendency'] = ' med en %sfaldende%s tendens'; $this->strings['runway_no_tendency'] = ' uden %snogen distinkt%s tendens'; $this->strings['runway_between'] = 'mellem '; $this->strings['runway_left'] = ' venstre'; $this->strings['runway_central'] = ' midt'; $this->strings['runway_right'] = ' højre'; $this->strings['runway_visibility'] = 'Sigtbarheden var '; $this->strings['runway_for_runway'] = ' for bane '; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by pw_text to produce English * output. * * @author Martin Geisler <gim...@gi...> * @link http://www.gimpster.com/ My homepage. * @version $Id: pw_text_en.php,v 1.1 2002/03/17 13:39:04 gimpster Exp $ */ class pw_text_en extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to locale_common() */ function pw_text_en($weather, $input) { $this->strings['charset'] = 'ISO-8859-1'; $this->strings['no_data'] = 'Sorry! There\'s no data available for %s%s%s.'; $this->strings['list_sentences_and'] = ' and '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', and '; $this->strings['location'] = 'This is a report for %s%s%s.'; $this->strings['minutes'] = ' minutes'; $this->strings['time_format'] = 'The report was made %s ago, at %s%s%s UTC.'; $this->strings['time_minutes'] = 'and %s%s%s minutes'; $this->strings['time_one_hour'] = '%sone%s hour %s'; $this->strings['time_several_hours'] = '%s%s%s hours %s'; $this->strings['time_a_moment'] = 'a moment'; $this->strings['meters_per_second'] = ' meters per second'; $this->strings['miles_per_hour'] = ' miles per hour'; $this->strings['meter'] = ' meter'; $this->strings['meters'] = ' meters'; $this->strings['feet'] = ' feet'; $this->strings['kilometers'] = ' kilometers'; $this->strings['miles'] = ' miles'; $this->strings['and'] = ' and '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' with '; $this->strings['wind_blowing'] = 'The wind was blowing at a speed of '; $this->strings['wind_with_gusts'] = ' with gusts up to '; $this->strings['wind_from'] = ' from '; $this->strings['wind_variable'] = ' from %svariable%s directions.'; $this->strings['wind_varying'] = ', varying between %s%s%s (%s%s°%s) and %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'The wind was %scalm%s'; $this->strings['wind_dir'] = array( 'north', 'north/northeast', 'northeast', 'east/northeast', 'east', 'east/southeast', 'southeast', 'south/southeast', 'south', 'south/southwest', 'southwest', 'west/southwest', 'west', 'west/northwest', 'northwest', 'north/northwest', 'north'); $this->strings['wind_dir_short'] = array( 'N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'); $this->strings['wind_dir_short_long'] = array( 'N' => 'north', 'NE' => 'northeast', 'E' => 'east', 'SE' => 'southeast', 'S' => 'south', 'SW' => 'southwest', 'W' => 'west', 'NW' => 'northwest' ); $this->strings['temperature'] = 'The temperature was '; $this->strings['dew_point'] = ', with a dew-point at '; $this->strings['altimeter'] = 'The atmospheric pressure was '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'The relative humidity was '; $this->strings['cloud_group_beg'] = 'There were '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'The sky was %sclear%s.'; $this->strings['cloud_height'] = ' clouds at a height of '; $this->strings['cloud_overcast'] = 'The sky was %sovercast%s from a height of '; $this->strings['cloud_vertical_visibility'] = 'the %svertical visibility%s was '; $this->strings['cloud_condition'] = array( 'SKC' => 'clear', 'CLR' => 'clear', 'FEW' => 'a few', 'SCT' => 'scattered', 'BKN' => 'broken', 'OVC' => 'overcast'); $this->strings['cumulonimbus'] = ' cumulonimbus'; $this->strings['towering_cumulus'] = ' towering cumulus'; $this->strings['cavok'] = ' no clouds below %s and no cumulonimbus clouds'; $this->strings['currently'] = 'Currently '; $this->strings['weather'] = array( '-' => ' light', ' ' => 'moderate ', '+' => 'heavy ', 'VC' => ' in the vicinity', 'PR' => ' partial', 'BC' => ' patches of', 'MI' => ' shallow', 'DR' => ' low drifting', 'BL' => ' blowing', 'SH' => ' showers of', 'TS' => ' thunderstorm', 'FZ' => ' freezing', 'DZ' => ' drizzle', 'RA' => ' rain', 'SN' => ' snow', 'SG' => ' snow grains', 'IC' => ' ice crystals', 'PL' => ' ice pellets', 'GR' => ' hail', 'GS' => ' small hail', 'UP' => ' unknown', 'BR' => ' mist', 'FG' => ' fog', 'FU' => ' smoke', 'VA' => ' volcanic ash', 'DU' => ' widespread dust', 'SA' => ' sand', 'HZ' => ' haze', 'PY' => ' spray', 'PO' => ' well-developed dust/sand whirls', 'SQ' => ' squalls', 'FC' => ' funnel cloud tornado waterspout', 'SS' => ' sandstorm/duststorm'); $this->strings['visibility'] = 'The overall visibility was '; $this->strings['visibility_greater_than'] = 'greater than '; $this->strings['visibility_less_than'] = 'less than '; $this->strings['visibility_to'] = ' to the '; $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'] = 'The visibility was '; $this->strings['runway_for_runway'] = ' for runway '; $this->strings['wind'] = 'Wind'; $this->strings['date'] = 'Date'; $this->strings['pressure'] = 'Air Pressure'; $this->strings['humidity'] = 'Humidity'; $this->strings['location'] = 'Location'; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by locale_common to produce * Hungarian output. * A magyar szövegû idõjárásjelentéshez a locale_common innen * veszi a sztringeket. * * @author Mihály Gyulai <gy...@my...> * @link http://gyulai.freeyellow.com/ The homepage of the author. * @version $Id: pw_text_hu.php,v 1.1 2002/03/17 13:39:04 gimpster Exp $ */ class pw_text_hu extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to locale_common() * Ezt a paramétert átadjuk locale_common() -nak. */ function pw_text_hu($weather, $input) { $this->strings['charset'] = 'ISO-8859-2'; $this->strings['no_data'] = 'Sajnos nincs adat %s%s%s számára.'; $this->strings['list_sentences_and'] = ' és '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', és '; $this->strings['location'] = 'Idõjárásjelentés %s%s%s számára.'; $this->strings['minutes'] = ' '; $this->strings['time_format'] = 'A jelentés %s perccel ezelõtt készült, %s%s%s UTC-kor.'; $this->strings['time_minutes'] = 'és %s%s%s '; $this->strings['time_one_hour'] = '%segy%s órával %s'; $this->strings['time_several_hours'] = '%s%s%s órával %s'; $this->strings['time_a_moment'] = 'jelenleg'; $this->strings['meters_per_second'] = ' m/s'; $this->strings['miles_per_hour'] = ' mérföld/h'; $this->strings['meter'] = ' m'; $this->strings['meters'] = ' m'; $this->strings['feet'] = ' láb'; $this->strings['kilometers'] = ' km'; $this->strings['miles'] = ' mérföld'; $this->strings['and'] = ' és '; $this->strings['plus'] = ' és '; $this->strings['with'] = ''; $this->strings['wind_blowing'] = 'Szélsebesség: '; $this->strings['wind_with_gusts'] = ' széllökések: '; $this->strings['wind_from'] = ' iránya: '; $this->strings['wind_variable'] = ' %skülönbözõ%s irányokból.'; $this->strings['wind_varying'] = ', változik %s%s%s (%s%s°%s) és %s%s%s (%s%s°%s) között'; $this->strings['wind_calm'] = 'Szél %snem fújt%s'; $this->strings['wind_dir'] = array( 'Észak', 'Észak/Északkelet', 'Északkelet', 'Kelet/Északkelet', 'Kelet', 'Kelet/Délkelet', 'Délkelet', 'Dél/Délkelet', 'Dél', 'Dél/Délnyugat', 'Délnyugat', 'Nyugat/Délnyugat', 'Nyugat', 'Nyugat/Északnyugat', 'Északnyugat', 'Észak/Északnyugat', 'Észak'); $this->strings['wind_dir_short'] = array( 'É', 'É/ÉK', 'ÉK', 'K/ÉK', 'K', 'K/DK', 'DK', 'D/DK', 'D', 'D/DNY', 'DNY', 'NY/DNY', 'NY', 'NY/ÉNY', 'ÉNY', 'É/ÉNY', 'É' ); $this->strings['wind_dir_short_long'] = array( 'É' => 'északi', 'ÉK' => 'északkeleti', 'K' => 'keleti', 'DK' => 'délkeleti', 'D' => 'déli', 'DNY' => 'délnyugati', 'NY' => 'nyugati', 'ÉNY' => 'északnyugati' ); $this->strings['temperature'] = 'A hõmérséklet '; $this->strings['dew_point'] = ', a harmatpont '; $this->strings['altimeter'] = 'A légköri nyomás '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'A relatív páratartalom '; $this->strings['cloud_group_beg'] = 'Az égbolton'; $this->strings['cloud_group_end'] = ' magasságban.'; $this->strings['cloud_clear'] = 'Az égbolt %sfelhõtlen%s volt.'; $this->strings['cloud_height'] = 'felhõ '; $this->strings['cloud_overcast'] = 'az égbolt %sborult%s '; $this->strings['cloud_vertical_visibility'] = 'a %sfüggõleges láthatóság%s '; $this->strings['cloud_condition'] = array( 'SKC' => ' derült', 'CLR' => ' tiszta', 'FEW' => ' néhány ', 'SCT' => ' szórványos ', 'BKN' => ' szakadozott ', 'OVC' => ' borult'); $this->strings['cumulonimbus'] = ' gomoly'; $this->strings['towering_cumulus'] = ' vihar'; $this->strings['cavok'] = ' nincsenek felhõk %s magasságban, és nincs gomolyfelhõ'; $this->strings['currently'] = 'Jellemzõ: '; $this->strings['weather'] = array( '-' => ' könnyû ', ' ' => ' enyhe ', '+' => ' erõs ', 'VC' => ' a közelben', 'PR' => ' részleges', 'BC' => ' szakadozott', 'MI' => ' felszínes', 'DR' => 'enyhe légmozgás', 'BL' => 'széllökés', 'SH' => 'zápor', 'TS' => 'zivatar', 'FZ' => 'fagy', 'DZ' => 'szitáló esõ', 'RA' => 'esõ', 'SN' => 'hó', 'SG' => 'szemcsés hó', 'IC' => 'jégkristály', 'PE' => 'jégdara', 'GR' => 'jégesõ', 'GS' => 'apró jégesõ és/vagy hódara', 'UP' => 'ismeretlen', 'BR' => 'köd', 'FG' => 'sûrû köd', 'FU' => 'füst', 'VA' => 'vulkáni hamu', 'DU' => 'kiterjedt por', 'SA' => 'homok', 'HZ' => 'pára', 'PY' => 'permet', 'PO' => 'por/homok örvény', 'SQ' => 'szélroham', 'FC' => 'felhõtölcsér/tornádó/vízoszlop', 'SS' => 'homokvihar/porvihar' ); $this->strings['visibility'] = 'A láthatóság általában '; $this->strings['visibility_greater_than'] = 'nagyobb, mint '; $this->strings['visibility_less_than'] = 'kisebb, mint '; $this->strings['runway_upward_tendency'] = ' %snövekvõ%s tendenciával'; $this->strings['runway_downward_tendency'] = ' %scsökkenõ%s tendenciával'; $this->strings['runway_no_tendency'] = ' határozott %stendencia nélkül%s'; $this->strings['runway_between'] = 'közötti? '; $this->strings['runway_left'] = ' bal'; $this->strings['runway_central'] = ' középsõ'; $this->strings['runway_right'] = ' jobb'; $this->strings['runway_visibility'] = 'A láthatóság '; $this->strings['runway_for_runway'] = ' a kifutópályán '; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by locale_common to produce * Norwegian output. * * @author Sven-Erik Andersen <sve...@an...> * @version locale_no.php,v 1.3 2001/11/22 02:33:00 sven-erik Exp $ */ class pw_text_no extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to locale_common() */ function pw_text_no($weather, $input) { $this->strings['charset'] = 'ISO-8859-1'; $this->strings['no_data'] = 'Beklager! Det var ingen ingen data tilgjengelig for %s%s%s.'; $this->strings['list_sentences_and'] = ' og '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', og '; $this->strings['location'] = 'Dette er en rapport for %s%s%s.'; $this->strings['minutes'] = ' minutter'; $this->strings['time_format'] = 'Denne rapporten ble laget for %s siden, klokka %s%s%s UTC.'; $this->strings['time_minutes'] = 'og %s%s%s minutter'; $this->strings['time_one_hour'] = '%sone%s time %s'; $this->strings['time_several_hours'] = '%s%s%s timer %s'; $this->strings['time_a_moment'] = 'et øyeblikk'; $this->strings['meters_per_second'] = ' meter per sekund'; $this->strings['miles_per_hour'] = ' miles per time'; $this->strings['meter'] = ' meter'; $this->strings['meters'] = ' meter'; $this->strings['feet'] = ' fot'; $this->strings['kilometers'] = ' kilometer'; $this->strings['miles'] = ' miles'; $this->strings['and'] = ' og '; $this->strings['plus'] = ' plus '; $this->strings['with'] = ' med '; $this->strings['wind_blowing'] = 'Vinden hadde en hastighet på '; $this->strings['wind_with_gusts'] = ' med vindkast opp mot '; $this->strings['wind_from'] = ' fra '; $this->strings['wind_variable'] = ' fra %svariable%s retninger.'; $this->strings['wind_varying'] = ', varierende mellom '; $this->strings['wind_calm'] = 'Vinden var %scalm%s'; $this->strings['wind_dir'] = array( 'nord', 'nord/nordøst', 'nordøst', 'øst/nordøst', 'øst', 'øst/sørøst', 'sørøst', 'sør/sørøst', 'sør', 'sør/sørvest', 'sørvest', 'vest/sørvest', 'vest', 'vest/nordvest', 'nordvest', 'nord/nordvest', 'nord'); $this->strings['wind_dir_short'] = array( 'N', 'NNØ', 'NØ', 'ØNØ', 'Ø', 'ØSØ', 'SØ', 'SSØ', 'S', 'SSV', 'SV', 'VSV', 'V', 'VNV', 'NV', 'NNV', 'N'); $this->strings['wind_dir_short_long'] = array( 'N' => 'nord', 'NE' => 'nordøst', 'E' => 'øst', 'SE' => 'sørøst', 'S' => 'sør', 'SW' => 'sørvest', 'W' => 'vest', 'NW' => 'nordvest' ); $this->strings['temperature'] = 'Temperaturen var '; $this->strings['dew_point'] = ', med ett duggpunkt på '; $this->strings['altimeter'] = 'Lufttrykket var '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Den relative fuktigheten var '; $this->strings['cloud_group_beg'] = 'Det var '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Himmelen var %sclear%s.'; $this->strings['cloud_height'] = ' skyer i en høyde av '; $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'); $this->strings['cumulonimbus'] = ' bygeskyer'; $this->strings['towering_cumulus'] = ' tårnende haugskyer'; $this->strings['cavok'] = ' ingen skyer under %s og ingen bygeskyer'; $this->strings['currently'] = 'Værforholdene er i øjeblikket '; $this->strings['weather'] = array( '-' => 'lett ', ' ' => 'moderat ', '+' => 'kraftig ', 'PR' => 'delvis ', 'BC' => 'banker ', 'MI' => 'shallow ', 'DR' => 'lavt drivende ', 'BL' => 'blåser ', 'SH' => 'skur ', 'TS' => 'tordenvær ', 'FZ' => 'frysende ', 'DZ' => 'duskregn ', 'RA' => 'regn ', 'SN' => 'snø ', 'SG' => 'snø korn ', 'IC' => 'is krystaller ', 'PL' => 'is korn ', 'GR' => 'hagl ', 'GS' => 'små hagl og/eller snø korn ', 'UP' => 'ukjent ', 'BR' => 'dis ', 'FG' => 'tåke ', 'FU' => 'røyk ', 'VA' => 'vulkanisk aske ', 'DU' => 'mye støv ', 'SA' => 'sand ', 'HZ' => 'dis ', 'PY' => 'duskregn ', 'PO' => 'godt utviklede støv/sand virvler ', 'SQ' => 'vindkast ', 'FC' => 'trombe/tornado/skypumpe ', 'SS' => 'sandstorm/støvstorm '); $this->strings['visibility'] = 'Den generelle sikten var '; $this->strings['visibility_greater_than'] = 'større enn '; $this->strings['visibility_less_than'] = 'mindre enn '; $this->strings['runway_upward_tendency'] = ' med en %supward%s tendens'; $this->strings['runway_downward_tendency'] = ' med en %sdownward%s tendens'; $this->strings['runway_no_tendency'] = ' med %sno distinct%s tendens'; $this->strings['runway_between'] = 'mellom '; $this->strings['runway_left'] = ' venstre'; $this->strings['runway_central'] = ' midtre'; $this->strings['runway_right'] = ' høyre'; $this->strings['runway_visibility'] = 'Sikten var '; $this->strings['runway_for_runway'] = ' for rullebane '; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> |
From: Martin G. <gim...@us...> - 2002-03-17 13:37:15
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv22567/output Log Message: Directory /cvsroot/phpweather/phpweather/output added to the repository |
From: Martin G. <gim...@us...> - 2002-03-17 13:36:31
|
Update of /cvsroot/phpweather/phpweather/locales In directory usw-pr-cvs1:/tmp/cvs-serv21911/locales Removed Files: languages.php locale_common.php locale_da.php locale_en.php locale_hu.php locale_no.php Log Message: The locale information is now part of the output-modules. The functionality of locales/locale_common.php has been moved to output/pw_text.php and locales/locale_en.php is now known as output/pw_text_en.php. The reason for this is, that locales_common.php wasn't a common locale, it was really a class that could produce textual output. --- languages.php DELETED --- --- locale_common.php DELETED --- --- locale_da.php DELETED --- --- locale_en.php DELETED --- --- locale_hu.php DELETED --- --- locale_no.php DELETED --- |
From: Martin G. <gim...@us...> - 2002-03-17 13:32:30
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv21415 Modified Files: phpweather.php Removed Files: metar_parser.php Log Message: The METAR parser is now in class phpweather, so there's no need for the file metar_parser.php. Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- phpweather.php 16 Mar 2002 13:55:11 -0000 1.15 +++ phpweather.php 17 Mar 2002 13:32:25 -0000 1.16 @@ -1,112 +1,64 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PHPWEATHER')) { - return; -} else { - define('PHPWEATHER', true); -} /* The location of this file defines the base directory */ define('PHPWEATHER_BASE_DIR', dirname(__FILE__)); -require(PHPWEATHER_BASE_DIR . '/metar_parser.php'); +require(PHPWEATHER_BASE_DIR . '/data_retrieval.php'); /** - * A container-class for the localized object. + * PHP Weather is a class that understands how to parse a raw METAR. * - * This class creates a member-object called output. - * It manages the language of the output. + * The decoded METAR is saved in $decoded_metar, in a language-neutral format. * * @author Martin Geisler <gim...@gi...> - * @link http://phpweather.sourceforge.net/ Homepage for PHP Weather. * @version $Id$ + * @see $decoded_metar */ -class phpweather extends metar_parser { - +class phpweather extends data_retrieval { + /** - * The localized output-object. + * The decoded METAR is stored here. * - * @var object - */ - var $output; - - /** - * This constructor sets the language when the object is created. + * $decoded_metar is an array of arrays. Each sub-array corresponds + * to a group of related weather-info. We have cloud-groups, + * visibility-groups and so on. * - * @param array The initial properties of the object. - * @access public + * @var array */ - function phpweather($input) { - /* We call the parent constructor. */ - $this->metar_parser($input); - - /* We also set the language. */ - $this->set_language($this->properties['language']); - - } - + var $decoded_metar; + /** - * Sets the language. - * - * The language is set by creating an object of the appropriate type, - * like 'locale_en' for English, 'locale_da' for Danish and so on. - * - * @param string The language-code for the language, like 'en' for - * English, 'hu' for Hungarian and so on. + * This constructor does nothing besides passing the input down the + * hierarchy. * - * @access public + * @param array The initial properties of the object. */ - - function set_language($new_language) { - switch ($new_language) { - case 'en': - require_once(PHPWEATHER_BASE_DIR . '/locales/locale_en.php'); - $this->output = new locale_en($this->properties); - break; - case 'da': - require_once(PHPWEATHER_BASE_DIR . '/locales/locale_da.php'); - $this->output = new locale_da($this->properties); - break; - case 'hu': - require_once(PHPWEATHER_BASE_DIR . '/locales/locale_hu.php'); - $this->output = new locale_hu($this->properties); - break; - case 'no': - require_once(PHPWEATHER_BASE_DIR . '/locales/locale_no.php'); - $this->output = new locale_no($this->properties); - break; - default: - $this->error('language not recognized: <code>' . $new_language . '</code> - using <code>en</code>.'); - $this->set_language('en'); - break; - } - } - - /** - * Returns the language. - * - * @return string The language used by the object. - * @access public - */ - - function get_language() { - return $this->properties['language']; + function metar_parser($input) { + /* This class doesn't have any defaults, so it just calls the + * parent constructor. + */ + $this->data_retrieval($input); } + /** * Returns a list of languages. * * @return array An associative array with the language codes as the * keys and the names of the languages as the values. * + * @param string The type of output module you're interested in, eg. + * 'text' for the text output module. + * * @access public */ + function get_languages($type) { + require(PHPWEATHER_BASE_DIR . '/languages.php'); + echo "Finding language for $type\n"; - function get_languages() { - require(PHPWEATHER_BASE_DIR . '/locales/languages.php'); - $dir = opendir(PHPWEATHER_BASE_DIR . '/locales'); + $dir = opendir(PHPWEATHER_BASE_DIR . '/output'); while($file = readdir($dir)) { - if (ereg('^locale_([a-z][a-z])\.php$', $file, $regs)) { + if (ereg("^pw_${type}_([a-z][a-z])\.php$", $file, $regs)) { $output[$regs[1]] = $languages[$regs[1]]; } } @@ -114,40 +66,628 @@ return $output; } + /** - * Calls the print_pretty() function of the output-object. + * Helper-function used to store temperatures. * - * If the METAR is not parsed, then it calls decode_metar() first, - * before it passes the decoded METAR to the print_pretty() function of - * the output-object. + * Given a numerical temperature $temp in Celsius, coded to tenth of + * degree, store in $temp_c, convert to Fahrenheit and store in + * $temp_f. + * + * @param string Temperature to convert, coded to tenth of + * degree, like 1015 + * @param integer Temperature measured in degrees Celsius + * @param integer Temperature measured in degrees Fahrenheit + * @access private + */ + function store_temp($temp, &$temp_c, &$temp_f) { + /* + * Note: $temp is converted to negative if $temp > 100.0 (See + * Federal Meteorological Handbook for groups T, 1, 2 and 4). + * For example, a temperature of 2.6°C and dew point of -1.5°C + * would be reported in the body of the report as "03/M01" and the + * TsnT'T'T'snT'dT'dT'd group as "T00261015"). + */ + + if ($temp[0] == 1) { + $temp[0] = '-'; + } + $temp_c = number_format($temp,1); + /* The temperature in Fahrenheit. */ + $temp_f = number_format($temp * (9/5) + 32, 1); + } + + + /** + * Helper-function used to store speeds. * - * @return string The pretty-printed weather-report. - * @access public + * $value is converted and stored based on $windunit. + * + * @param float The value one seeks to convert. + * @param string The unit of $value. + * @param float &$knots After $value has been converted into knots, + * it will be stored in this variable. + * @param float &$meterspersec After $value has been converted into + * meters per second, it will be stored + * in this variable. + * @param float &$milesperhour After $value has been converted into + * miles per hour, it will be stored + * in this variable. + * @access private */ - - function print_pretty() { - if (empty($this->decoded_metar)) { - $this->decode_metar(); + function store_speed($value, $windunit, &$knots, &$meterspersec, &$milesperhour) { + if ($value == 0) { + $knots = 0; + $meterspersec = 0; + $milesperhour = 0; + return; + } + + if ($windunit == 'KT') { + /* The windspeed measured in knots: */ + $knots = number_format($value); + /* The windspeed measured in meters per second, rounded to one decimal place */ + $meterspersec = number_format($value * 0.5144, 1); + /* The windspeed measured in miles per hour, rounded to one decimal place */ + $milesperhour = number_format($value * 1.1508, 1); + } elseif ($windunit == 'MPS') { + /* The windspeed measured in meters per second */ + $meterspersec = number_format($value); + /* The windspeed measured in knots, rounded to one decimal place */ + $knots = number_format($value / 0.5144, 1); + /* The windspeed measured in miles per hour, rounded to one decimal place */ + $milesperhour = number_format($value / 0.5144 * 1.1508, 1); + } elseif ($windunit == 'KMH') { + /* The windspeed measured in kilometers per hour */ + $meterspersec = number_format($value * 1000 / 3600, 1); + $knots = number_format($value * 1000 / 3600 / 0.5144, 1); + /* The windspeed measured in miles per hour, rounded to one decimal place */ + $milesperhour = number_format($knots * 1.1508, 1); } - return $this->output->print_pretty($this->decoded_metar); } - + + /** - * Calls the print_table() function of the output-object. + * Decodes a raw METAR. * - * If the METAR is not parsed, then it calls decode_metar() first, - * before it passes the decoded METAR to the print_table() function of - * the output-object. + * This function loops over the various parts of the raw METAR, and + * stores the different bits in $decoded_metar. It uses get_metar() to + * retrieve the METAR, so it is not necessary to connect to the database + * before you call this function. * - * @return string The table-printed weather-report. + * @return array The decoded METAR. + * @see $decoded_metar * @access public */ + function decode_metar() { + /* initialization */ + $cloud_group_nr = 0; + $weather_group_nr = 0; + $visibility_group_nr = 0; + $runway_group_nr = 0; + $temp_visibility_miles = ''; + + $decoded_metar['remarks'] = ''; + /* There should always be at least one cloud-group, even if it's + empty. */ + $decoded_metar['clouds'][] = array(); - function print_table() { - if (empty($this->decoded_metar)) { - $this->decode_metar(); + + $decoded_metar['metar'] = $this->get_metar(); + $decoded_metar['location'] = $this->get_location(); + + $parts = explode(' ', $this->metar); + $num_parts = count($parts); + for ($i = 0; $i < $num_parts; $i++) { + $part = $parts[$i]; + + if (ereg('RMK|TEMPO|BECMG|INTER', $part)) { + /* The rest of the METAR is either a remark or temporary + * information. We skip the rest of the METAR. + */ + $decoded_metar['remarks'] .= ' ' . $part; + break; + } elseif ($part == 'METAR') { + /* + * Type of Report: METAR + */ + $decoded_metar['type'] = 'METAR'; + } elseif ($part == 'SPECI') { + /* + * Type of Report: SPECI + */ + $decoded_metar['type'] = 'SPECI'; + } elseif (ereg('^[A-Z]{4}$', $part) && ! isset($decoded_metar['station'])) { + /* + * Station Identifier + */ + $decoded_metar['station'] = $part; + } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { + /* + * Date and Time of Report. + * + * We return a standard Unix UTC/GMT timestamp suitable for + * gmdate(). + * Due to a bug in PHP, on some systems the time reported may + * be incorrect. If you experience this, you can set + * $this->properties['offset'] to be the offset to add. For + * example, if your times generated are 1 hour too early (so + * metars appear an hour older than they are), set + * $this->properties['offset'] to be +1 in your defaults.php + * file. + */ + if ($regs[1] > gmdate('j')) { + /* The day is greather that the current day of month => the + * report is from last month. + */ + $month = gmdate('n') - 1; + } else { + $month = gmdate('n'); + } + $decoded_metar['time'] = gmmktime($regs[2]+$this->properties['offset'], $regs[3], 0, $month, $regs[1], gmdate('Y')); + } elseif (ereg('(AUTO|COR|RTD|CC[A-Z]|RR[A-Z])', $part, $regs)) { + + /* + * Report Modifier: AUTO, COR, CCx or RRx + */ + + $decoded_metar['report_mod'] = $regs[1]; + } elseif (ereg('([0-9]{3}|VRB)([0-9]{2,3})G?([0-9]{2,3})?(KT|MPS|KMH)', $part, $regs)) { + + /* Wind Group */ + + $decoded_metar['wind']['deg'] = $regs[1]; + + $this->store_speed($regs[2], + $regs[4], + $decoded_metar['wind']['knots'], + $decoded_metar['wind']['meters_per_second'], + $decoded_metar['wind']['miles_per_hour'] + ); + + if (!empty($regs[3])) { + + /* We have a report with information about the gust. + * First we have the gust measured in knots. + */ + $this->store_speed($regs[3], + $regs[4], + $decoded_metar['wind']['gust_knots'], + $decoded_metar['wind']['gust_meters_per_second'], + $decoded_metar['wind']['gust_miles_per_hour']); + } + } elseif (ereg('^([0-9]{3})V([0-9]{3})$', $part, $regs)) { + + /* + * Variable wind-direction + */ + + $decoded_metar['wind']['var_beg'] = $regs[1]; + $decoded_metar['wind']['var_end'] = $regs[2]; + } elseif(ereg('^([0-9]{4})([NS]?[EW]?)$', $part, $regs)) { + + /* + * Visibility in meters (4 digits only) + */ + + if ($regs[1] == '0000') { + + /* Special low value */ + + $decoded_metar['visibility'][$visibility_group_nr]['prefix'] = -1; /* Less than */ + + $decoded_metar['visibility'][$visibility_group_nr]['meter'] = 50; + $decoded_metar['visibility'][$visibility_group_nr]['km'] = 0.05; + $decoded_metar['visibility'][$visibility_group_nr]['ft'] = 164; + $decoded_metar['visibility'][$visibility_group_nr]['miles'] = 0.031; + } elseif ($regs[1] == '9999') { + + /* Special high value */ + + $decoded_metar['visibility'][$visibility_group_nr]['prefix'] = 1; + /* Greater than */ + + $decoded_metar['visibility'][$visibility_group_nr]['meter'] = 10000; + $decoded_metar['visibility'][$visibility_group_nr]['km'] = 10; + $decoded_metar['visibility'][$visibility_group_nr]['ft'] = 32800; + $decoded_metar['visibility'][$visibility_group_nr]['miles'] = 6.2; + } else { + + /* Normal visibility, returned in both small and large units. */ + + $decoded_metar['visibility'][$visibility_group_nr]['km'] = number_format($regs[1]/1000, 1); + $decoded_metar['visibility'][$visibility_group_nr]['miles'] = number_format($regs[1]/1609.344, 1); + $decoded_metar['visibility'][$visibility_group_nr]['meter'] = $regs[1] * 1; + $decoded_metar['visibility'][$visibility_group_nr]['ft'] = round($regs[1] * 3.28084); + } + if (!empty($regs[2])) { + $decoded_metar['visibility'][$visibility_group_nr]['dir'] = $regs[2]; + } + + /* We increment $visibility_group_nr so that it's ready for + the next group. */ + $visibility_group_nr++; + + } elseif (ereg('^[0-9]$', $part)) { + + /* + * Temp Visibility Group, single digit followed by space. + */ + + $temp_visibility_miles = $part; + } elseif (ereg('^M?(([0-9]?)[ ]?([0-9])(/?)([0-9]*))SM$', $temp_visibility_miles . ' ' . $part, $regs)) { + + /* + * Visibility Group + */ + + if ($regs[4] == '/') { + $vis_miles = $regs[2] + $regs[3]/$regs[5]; + } else { + $vis_miles = $regs[1]; + } + if ($regs[0][0] == 'M') { + + /* Prefix - less than */ + + $decoded_metar['visibility'][$visibility_group_nr]['prefix'] = -1; /* Less than */ + + } + + /* The visibility measured in miles */ + + $decoded_metar['visibility'][$visibility_group_nr]['miles'] = number_format($vis_miles, 1); + + /* The visibility measured in feet */ + + $decoded_metar['visibility'][$visibility_group_nr]['ft'] = round($vis_miles * 5280, 1); + + /* The visibility measured in kilometers */ + + $decoded_metar['visibility'][$visibility_group_nr]['km'] = number_format($vis_miles * 1.6093, 1); + + /* The visibility measured in meters */ + + $decoded_metar['visibility'][$visibility_group_nr]['meter'] = round($vis_miles * 1609.3); + + /* We increment $visibility_group_nr so that it's ready for + the next group. */ + $visibility_group_nr++; + + } elseif ($part == 'CAVOK') { + + /* CAVOK: Used when the visibility is greater than 10 + * kilometers, the lowest cloud-base is at 5000 feet or more + * and there is no significant weather. + */ + + /* Greater than */ + $decoded_metar['visibility'][$visibility_group_nr]['prefix'] = 1; + + $decoded_metar['visibility'][$visibility_group_nr]['km'] = 10; + $decoded_metar['visibility'][$visibility_group_nr]['meter'] = 10000; + $decoded_metar['visibility'][$visibility_group_nr]['miles'] = 6.2; + $decoded_metar['visibility'][$visibility_group_nr]['ft'] = 32800; + $decoded_metar['cloud_group1']['condition'] = 'CAVOK'; + + /* We increment $visibility_group_nr so that it's ready for + the next group. */ + $visibility_group_nr++; + + } elseif (ereg('^R([0-9]{2})([RLC]?)/([MP]?)([0-9]{4})([DNU]?)V?(P?)([0-9]{4})?([DNU]?)$', $part, $regs)) { + + /* Runway-group */ + + $decoded_metar['runway'][$runway_group_nr]['nr'] = $regs[1]; + if (!empty($regs[2])) { + $decoded_metar['runway'][$runway_group_nr]['approach'] = $regs[2]; + } + + if (!empty($regs[7])) { + + /* We have both min and max visibility since $regs[7] holds + * the max visibility. + */ + + if (!empty($regs[5])) { + /* $regs[5] is tendency for min visibility. */ + $decoded_metar['runway'][$runway_group_nr]['min_tendency'] = $regs[5]; + } + + if (!empty($regs[8])) { + /* $regs[8] is tendency for max visibility. */ + $decoded_metar['runway'][$runway_group_nr]['max_tendency'] = $regs[8]; + } + + if ($regs[3] == 'M') { + + /* Less than. */ + + $decoded_metar['runway'][$runway_group_nr]['min_prefix'] = -1; + } + $decoded_metar['runway'][$runway_group_nr]['min_meter'] = $regs[4] * 1; + $decoded_metar['runway'][$runway_group_nr]['min_ft'] = round($regs[4] * 3.2808); + + if ($regs[6] == 'P') { + + /* Greater than. */ + + $decoded_metar['runway'][$runway_group_nr]['max_prefix'] = 1; + } + $decoded_metar['runway'][$runway_group_nr]['max_meter'] = $regs[7] * 1; + $decoded_metar['runway'][$runway_group_nr]['max_ft'] = round($regs[7] * 3.2808); + + } else { + + /* We only have a single visibility. */ + + if (!empty($regs[5])) { + /* $regs[5] holds the tendency for visibility. */ + $decoded_metar['runway'][$runway_group_nr]['tendency'] = $regs[5]; + } + + if ($regs[3] == 'M') { + + /* Less than. */ + + $decoded_metar['runway'][$runway_group_nr]['prefix'] = -1; + } elseif ($regs[3] == 'P') { + + /* Greater than. */ + + $decoded_metar['runway'][$runway_group_nr]['prefix'] = 1; + } + $decoded_metar['runway'][$runway_group_nr]['meter'] = $regs[4] * 1; + $decoded_metar['runway'][$runway_group_nr]['ft'] = round($regs[4] * 3.2808); + } + + /* We increment $runway_group_nr so that it's ready for the + next group. */ + $runway_group_nr++; + + } elseif (ereg('^(VC)?' . /* Proximity */ + '(-|\+)?' . /* Intensity */ + '(MI|PR|BC|DR|BL|SH|TS|FZ)?' . /* Descriptor */ + '((DZ|RA|SN|SG|IC|PE|GR|GS|UP)+)?' . /* Precipitation */ + '(BR|FG|FU|VA|DU|SA|HZ|PY)?' . /* Obscuration */ + '(PO|SQ|FC|SS)?$', /* Other */ + $part, $regs)) { + + /* + * Current weather-group. + */ + + $decoded_metar['weather'][$weather_group_nr]['proximity'] = $regs[1]; + $decoded_metar['weather'][$weather_group_nr]['intensity'] = $regs[2]; + $decoded_metar['weather'][$weather_group_nr]['descriptor'] = $regs[3]; + $decoded_metar['weather'][$weather_group_nr]['precipitation'] = $regs[4]; + $decoded_metar['weather'][$weather_group_nr]['obscuration'] = $regs[6]; + $decoded_metar['weather'][$weather_group_nr]['other'] = $regs[7]; + + + /* We increment $weather_group_nr so that it's ready for the + next group. */ + $weather_group_nr++; + + } elseif ($part == 'SKC' || $part == 'CLR') { + + /* Cloud-group */ + + + + /* Again we have to translate the code-characters to a + * meaningful string. + */ + + $decoded_metar['clouds'][ $cloud_group_nr]['condition'] = $part; + + /* We increment $cloud_group_nr so that it's ready for the + next group. */ + $cloud_group_nr++; + + } elseif (ereg('^(VV|FEW|SCT|BKN|OVC)([0-9]{3}|///)(CB|TCU)?$', $part, $regs)) { + + /* We have found (another) a cloud-layer-group. */ + + $decoded_metar['clouds'][$cloud_group_nr]['condition'] = $regs[1]; + if (!empty($regs[3])) { + $decoded_metar['clouds'][$cloud_group_nr]['cumulus'] = $regs[3]; + } + if ($regs[2] == '000') { + + /* '000' is a special height. */ + + $decoded_metar['clouds'][$cloud_group_nr]['ft'] = 100; + $decoded_metar['clouds'][$cloud_group_nr]['meter'] = 30; + $decoded_metar['clouds'][$cloud_group_nr]['prefix'] = -1; /* Less than */ + } elseif ($regs[2] == '///') { + + /* '///' means height nil */ + + $decoded_metar['clouds'][$cloud_group_nr]['ft'] = 'nil'; + $decoded_metar['clouds'][$cloud_group_nr]['meter'] = 'nil'; + } else { + $decoded_metar['clouds'][$cloud_group_nr]['ft'] = $regs[2] *100; + $decoded_metar['clouds'][$cloud_group_nr]['meter'] = round($regs[2] * 30.48); + } + + /* We increment $cloud_group_nr so that it's ready for the + next group. */ + $cloud_group_nr++; + + } elseif (ereg('^(M?[0-9]{2})/(M?[0-9]{2})?$', $part, $regs)) { + + /* + * Temperature/Dew Point Group. + * + * The temperature and dew-point measured in Celsius and Fahrenheit. + */ + + $decoded_metar['temperature']['temp_c'] = round(strtr($regs[1], 'M', '-')); + $decoded_metar['temperature']['temp_f'] = round(strtr($regs[1], 'M', '-') * (9/5) + 32); + if (!empty($regs[2])) { + $decoded_metar['temperature']['dew_c'] = round(strtr($regs[2], 'M', '-')); + $decoded_metar['temperature']['dew_f'] = round(strtr($regs[2], 'M', '-') * (9/5) + 32); + } + } elseif(ereg('A([0-9]{4})', $part, $regs)) { + + /* + * Altimeter. + * The pressure measured in inHg. + */ + + $decoded_metar['altimeter']['inhg'] = number_format($regs[1]/100, 2); + + /* The pressure measured in mmHg, hPa and atm */ + + $decoded_metar['altimeter']['mmhg'] = number_format($regs[1] * 0.254, 1, '.', ''); + $decoded_metar['altimeter']['hpa'] = round($regs[1] * 0.33864); + $decoded_metar['altimeter']['atm'] = number_format($regs[1] * 3.3421e-4, 3, '.', ''); + } elseif(ereg('Q([0-9]{4})', $part, $regs)) { + + /* + * Altimeter. + * The specification doesn't say anything about + * the Qxxxx-form, but it's in the METARs. + */ + + /* The pressure measured in hPa */ + + $decoded_metar['altimeter']['hpa'] = round($regs[1]); + + /* The pressure measured in mmHg, inHg and atm */ + + $decoded_metar['altimeter']['mmhg'] = number_format($regs[1] * 0.75006, 1, '.', ''); + $decoded_metar['altimeter']['inhg'] = number_format($regs[1] * 0.02953, 2); + $decoded_metar['altimeter']['atm'] = number_format($regs[1] * 9.8692e-4, 3, '.', ''); + } elseif (ereg('^T([0-9]{4})([0-9]{4})', $part, $regs)) { + + /* + * Temperature/Dew Point Group, coded to tenth of degree Celsius. + */ + + $this->store_temp($regs[1] / 10, + $decoded_metar['temperature']['temp_c'], + $decoded_metar['temperature']['temp_f']); + $this->store_temp($regs[2] / 10, + $decoded_metar['temperature']['dew_c'], + $decoded_metar['temperature']['dew_f']); + } elseif (ereg('^T([0-9]{4}$)', $part, $regs)) { + $this->store_temp($regs[1], + $decoded_metar['temperature']['temp_c'], + $decoded_metar['temperature']['temp_f']); + } elseif (ereg('^1([0-9]{4}$)', $part, $regs)) { + + /* + * 6 hour maximum temperature Celsius, coded to tenth of degree + */ + + $this->store_temp($regs[1] / 10, + $decoded_metar['temp_min_max']['max6h_c'], + $decoded_metar['temp_min_max']['max6h_f']); + } elseif (ereg('^2([0-9]{4}$)', $part, $regs)) { + + /* + * 6 hour minimum temperature Celsius, coded to tenth of degree + */ + $this->store_temp($regs[1] / 10, + $decoded_metar['temp_min_max']['min6h_c'], + $decoded_metar['temp_min_max']['min6h_f']); + } elseif (ereg('^4([0-9]{4})([0-9]{4})$', $part, $regs)) { + + /* + * 24 hour maximum and minimum temperature Celsius, coded to + * tenth of degree + */ + $this->store_temp($regs[1] / 10, + $decoded_metar['temp_min_max']['max24h_c'], + $decoded_metar['temp_min_max']['max24h_f']); + $this->store_temp($regs[2] / 10, + $decoded_metar['temp_min_max']['min24h_c'], + $decoded_metar['temp_min_max']['min24h_f']); + } elseif(ereg('^P([0-9]{4})', $part, $regs)) { + + /* + * Precipitation during last hour in hundredths of an inch + */ + if ($regs[1] == '0000') { + $decoded_metar['precipitation']['in'] = -1; + $decoded_metar['precipitation']['mm'] = -1; + } else { + $decoded_metar['precipitation']['in'] = number_format($regs[1]/100, 2); + $decoded_metar['precipitation']['mm'] = number_format($regs[1]*0.254, 2); + } + } elseif(ereg('^6([0-9]{4})', $part, $regs)) { + + /* + * Precipitation during last 3 or 6 hours in hundredths of an + * inch. + */ + if ($regs[1] == '0000') { + $decoded_metar['precipitation']['in_6h'] = -1; + $decoded_metar['precipitation']['mm_6h'] = -1; + } else { + $decoded_metar['precipitation']['in_6h'] = number_format($regs[1]/100, 2); + $decoded_metar['precipitation']['mm_6h'] = number_format($regs[1]*0.254, 2); + } + } elseif(ereg('^7([0-9]{4})', $part, $regs)) { + + /* + * Precipitation during last 24 hours in hundredths of an inch. + */ + if ($regs[1] == '0000') { + $decoded_metar['precipitation']['in_24h'] = -1; + $decoded_metar['precipitation']['mm_24h'] = -1; + } else { + $decoded_metar['precipitation']['in_24h'] = number_format($regs[1]/100, 2, '.', ''); + $decoded_metar['precipitation']['mm_24h'] = number_format($regs[1]*0.254, 2, '.', ''); + } + } elseif(ereg('^4/([0-9]{3})', $part, $regs)) { + + /* + * Snow depth in inches + */ + + if ($regs[1] == '0000') { + $decoded_metar['precipitation']['snow_in'] = -1; + $decoded_metar['precipitation']['snow_mm'] = -1; + } else { + $decoded_metar['precipitation']['snow_in'] = $regs[1] * 1; + $decoded_metar['precipitation']['snow_mm'] = round($regs[1] * 25.4); + } + } else { + + /* + * If we couldn't match the group, we assume that it was a + * remark. + */ + + $decoded_metar['remarks'] .= ' ' . $part; + } } - return $this->output->print_table($this->decoded_metar); - } + + /* + * Relative humidity + */ + + if (!empty($decoded_metar['temperature']['temp_c']) && + !empty($decoded_metar['temperature']['dew_c'])) { + $decoded_metar['rel_humidity'] = + number_format(pow(10, (1779.75 * ($decoded_metar['temperature']['dew_c'] - + $decoded_metar['temperature']['temp_c']) + / ((237.3 + $decoded_metar['temperature']['dew_c']) * + (237.3 + $decoded_metar['temperature']['temp_c'])) + + 2)), 1); + } + + /* Finally we store our decoded METAR in $this->decoded_metar so + * that other methods can use it. + */ + + $this->decoded_metar = $decoded_metar; + return $decoded_metar; + } } + +?> --- metar_parser.php DELETED --- |
From: Martin G. <gim...@us...> - 2002-03-16 13:55:14
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv18019 Modified Files: phpweather.php Log Message: That should have been commited a long time ago... Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- phpweather.php 17 Jul 2001 12:27:15 -0000 1.14 +++ phpweather.php 16 Mar 2002 13:55:11 -0000 1.15 @@ -37,10 +37,10 @@ * @access public */ function phpweather($input) { - /* We call the parent constructor. */ + /* We call the parent constructor. */ $this->metar_parser($input); - - /* We also set the language. */ + + /* We also set the language. */ $this->set_language($this->properties['language']); } @@ -70,6 +70,10 @@ case 'hu': require_once(PHPWEATHER_BASE_DIR . '/locales/locale_hu.php'); $this->output = new locale_hu($this->properties); + break; + case 'no': + require_once(PHPWEATHER_BASE_DIR . '/locales/locale_no.php'); + $this->output = new locale_no($this->properties); break; default: $this->error('language not recognized: <code>' . $new_language . '</code> - using <code>en</code>.'); |
From: Martin G. <gim...@us...> - 2002-03-15 14:08:05
|
Update of /cvsroot/phpweather/phpweather-1.x/icons In directory usw-pr-cvs1:/tmp/cvs-serv29551/phpweather-1.x/icons Added Files: temp_nodata.gif wind_nodata.gif Log Message: 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... --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-03-15 14:08:04
|
Update of /cvsroot/phpweather/phpweather/icons In directory usw-pr-cvs1:/tmp/cvs-serv29551/phpweather/icons Added Files: temp_nodata.gif wind_nodata.gif Log Message: 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... --- BINARY FILE --- --- BINARY FILE --- |
From: Max H. <ir...@us...> - 2002-03-15 12:01:52
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv607 Modified Files: data_retrieval.php Log Message: Oops Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- data_retrieval.php 15 Mar 2002 11:22:33 -0000 1.18 +++ data_retrieval.php 15 Mar 2002 12:01:48 -0000 1.19 @@ -130,7 +130,7 @@ $this->properties['icao'] = strtoupper(substr($new_metar,0,4)); $this->location = ''; $this->metar = $new_metar; - $this->decoded_metar = decode_metar(); + $this->decoded_metar = $this->decode_metar(); } } |
From: Max H. <ir...@us...> - 2002-03-15 11:37:33
|
Update of /cvsroot/phpweather/phpweather/icons In directory usw-pr-cvs1:/tmp/cvs-serv27055/icons 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 temphigh.gif templow.gif vrb.gif www.gif Log Message: added icons --- 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: Max H. <ir...@us...> - 2002-03-15 11:32:02
|
Update of /cvsroot/phpweather/phpweather/icons In directory usw-pr-cvs1:/tmp/cvs-serv25772/icons Log Message: Directory /cvsroot/phpweather/phpweather/icons added to the repository |
From: Max H. <ir...@us...> - 2002-03-15 11:22:36
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv22999 Modified Files: data_retrieval.php Log Message: Added set_metar() for testing etc Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- data_retrieval.php 19 Dec 2001 09:12:46 -0000 1.17 +++ data_retrieval.php 15 Mar 2002 11:22:33 -0000 1.18 @@ -112,6 +112,29 @@ } /** + * Sets the metar directly, for testing etc + * + * It loads and decodes the metar if it is + * different from the old one. If the new metar is the same as + * the old one, nothing is changed. + * + * Also sets the ICAO to be correct for this metar + * + * @access public + * @param string The METAR we want decoded. + */ + function set_metar($new_metar) { + + if ($new_metar != $this->get_metar()) { + $this->debug('Loading a METAR manually.'); + $this->properties['icao'] = strtoupper(substr($new_metar,0,4)); + $this->location = ''; + $this->metar = $new_metar; + $this->decoded_metar = decode_metar(); + } + } + + /** * Tries to get a METAR from the database. * * It looks in the database, and fetches a new METAR if necessary. |
From: Max H. <ir...@us...> - 2002-03-15 10:37:17
|
Update of /cvsroot/phpweather/phpweather/locales In directory usw-pr-cvs1:/tmp/cvs-serv2769 Modified Files: locale_common.php Log Message: Fixed multiple precipitation types (bug 497585) Index: locale_common.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/locales/locale_common.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- locale_common.php 19 Dec 2001 08:57:47 -0000 1.16 +++ locale_common.php 15 Mar 2002 10:37:14 -0000 1.17 @@ -427,7 +427,13 @@ /* There can only be one of the next three items. */ if (!empty($weather_group['precipitation'])) { - $output .= $this->strings['weather'][$weather_group['precipitation']]; + // precipitation can be more than one kind - need to check for this. + // explode precipitation into chunks of length 2 + $precip = explode(" ",trim(chunk_split($weather_group['precipitation'],2," "))); + foreach($precip AS $ppnow){ + $output .= $this->strings['weather'][$ppnow] . ", "; + } + $output = substr($output,0,-2); // trim off last comma } elseif (!empty($weather_group['obscuration'])) { $output .= $this->strings['weather'][$weather_group['obscuration']]; } elseif (!empty($weather_group['other'])) { |
From: Martin G. <gim...@us...> - 2002-03-11 16:50:12
|
Update of /cvsroot/phpweather/phpweather/docs/src/latex In directory usw-pr-cvs1:/tmp/cvs-serv15376 Modified Files: apidoc.tex installation.tex main.tex phpweather-a4.tex translation.tex Added Files: databases.tex history.tex Log Message: Added some extra files to the documentation. The documentation needs a lot of work right now, but if anybody wants to write something, feel free. You shouldn't be intimidated by the fact that it's written in LaTeX, as long as you're writing plain text, there shouldn't be any problems. --- NEW FILE --- % -*- mode: latex; tex-main-file: "phpweather-a4" -*- \chapter{Database Backends} As it takes about a second to retreive a \metar, \phpw supports caching. \phpw supports several different database backends and it's easy to write support for a new one. \section{What's In a Database Backend?} Each database backend is implemented through a separate class which extends \class{pw\_db\_common}. This is convenient, as \class{db\_common} has some properties needed by almost every back end, most notably \variable{\$}{link\_id}. It is up to the backend to decide how it will implement the functions needed by \phpw, but it is required that each back-end has the following methods: \begin{description} \item[\function{connect}] This will be called whenever the script needs to make sure that we're connected. It must return true if a connection is established, and false otherwise. \item[\function{insert\_metar}] This is called when a new \metar should be inserted into the cache. \item[\function{update\_metar}] If the \metar is already in the cache, this function will be called instead of \function{insert\_metar}. \item[\function{get\_metar}] This function should return the \metar report for a given \icao. If the \metar isn't found in the cache, it should just return an empty string. \item[\function{get\_countries}] This function returns a list of all countries that have airports producing \metar reports. \item[\function{get\_icaos}] Once you've selected a country, you'll use this function to get a list of all airports in that country. \end{description} \section{Writing a New Back-end} If you use \phpw on a system where you don't have access to one of the databases already supported, you could write support for your own database. You should start by taking one of the existing back-ends, and use that as a template. If your database understands SQL, then use a back-end like \class{db\_mysql} as your template, as it also uses SQL. Then go through the file, and adopt the functions to your database. When you're done, send your file to \email{php...@li...} so that it can be included in the package. --- NEW FILE --- % -*- mode: latex; tex-main-file: "phpweather-a4" -*- \chapter{History} I began writing PHP Weather in June 2000. I had been talking with Kristian Kristensen \email{zi...@zi...} about making such a script for a project we were both working on. But it was only after the project was finished, that I began investigating the possibilities of making a script with PHP that could display the current weather. I knew that it was possible to do such a thing, as I had seen a couple of applets (small programs that serves only one purpose, such as displaying the time or the amount of free space on the hard drive, etc.) that could display the weather. I discovered that they got their data from the National Weather Service (NWS) who makes the data available at no cost. The data is available off the Internet via either FTP or HTTP, so it's easy to get hold of it with PHP. The only problem was that the data has to be decoded because it's written in a compact fashion. The data in question is a so-called \metar-report that the airports issue once or twice an hour. I then discovered a script written in Perl that could take a \metar and split it into it's components. The script was written by Jeremy D. Zawodny \email{Je...@Za...} and is licensed under the GPL just like PHP Weather. So there was no problem with me peeping at his code for PHP Weather. I took the logic from the Perl script and wrote a function in PHP that would decode a \metar. But that wouldn't do it - to be useful the decoded data has to be displayed in a nice fashion, preferable so that it's easy to customize. The script should also be able to fetch a \metar from the NWS and once that is done, the \metar should be cached so that the script would run faster after the \metar had been fetched once. The problem is, that it takes about a second to contact the NWS. I started wrapping the actual data in English words to form sentences like in 'The temperature is 5 degrees Celsius (x degrees Fahrenheit)'. Index: apidoc.tex =================================================================== RCS file: /cvsroot/phpweather/phpweather/docs/src/latex/apidoc.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- apidoc.tex 17 Jul 2001 12:25:13 -0000 1.3 +++ apidoc.tex 11 Mar 2002 16:50:07 -0000 1.4 @@ -27,7 +27,7 @@ \item[Author] Martin Geisler \email{gim...@gi...} -\item[Version] \variable{\$}{Id}: base\_object.php,v 1.10 2001/07/08 18:57:34 misibacsi Exp \$ +\item[Version] \variable{\$}{Id}: base\_object.php,v 1.11 2001/07/17 12:12:03 gimpster Exp \$ \item[Filename] \filename{PHPWEATHER_BASE_DIR/base_object.php} @@ -64,3167 +64,3365 @@ [...4787 lines suppressed...] +of +the output-object. + +\begin{funcdesc} + +\item[Definition] \functiondef{public string print\_table(void)} + +\item[Return value] \textbf{string}\hspace{\labelsep} The table-printed weather-report. \end{funcdesc} -% End of function get_icaos() +% End of function print_table() %%%%%%%% -% End of class db_null. +% End of class phpweather. %%%%%%%%%%%%%%%% Index: installation.tex =================================================================== RCS file: /cvsroot/phpweather/phpweather/docs/src/latex/installation.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- installation.tex 18 Jul 2001 10:38:22 -0000 1.1 +++ installation.tex 11 Mar 2002 16:50:08 -0000 1.2 @@ -1,22 +1,21 @@ \chapter{Installation} -It's quite easy to install \phpw. All you have to do, is to unpack the -compressed file you've downloaded from -\url{http://www.sourceforge.net/phpweather/} in a directory on the -webserver. Once that is done you can load the file \filename{demo.php} -in your favorite browser. +It's quite easy to install \phpw. You have to start by going to +\url{http://www.sourceforge.net/phpweather/} and downloading \phpw. +Decompress the file in a directory on the webserver then load the file +\filename{demo.php} in your favorite browser. That's it. You should see a page that lets you chose a country with an airport -that makes a METAR. There is about 3,000 airports in 192 countries -that make a METAR each hour so the chance of finding one near your is +that makes a \metar. There is about 3,000 airports in 192 countries +that make a \metar each hour so the chance of finding one near your is rather good. \section{Further Tweaking} What you've just seen is \phpw in it's default form. You can (and should) change a couple of things. You use the Configurator to do the ---- you've guessed it --- configuration. So load the file called +configuration. So load the file called \filename{configurator.php} and see what happens. You should be presented with a page with a lot of drop-down boxed that Index: main.tex =================================================================== RCS file: /cvsroot/phpweather/phpweather/docs/src/latex/main.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- main.tex 18 Jul 2001 10:34:57 -0000 1.4 +++ main.tex 11 Mar 2002 16:50:08 -0000 1.5 @@ -1,63 +1,72 @@ -% The documentclass is defined in phpweather-x.php, where x is either a4 or letter. +% -*- mode: latex; tex-main-file: "phpweather-a4" -*- +% The documentclass is defined in phpweather-x.php, where x is either +% a4 or letter. + +% This sets the font to Palatino. +%\renewcommand{\rmdefault}{ppl} %\usepackage{palatcm} -%\usepackage{palatino} -\usepackage{xspace} -\usepackage{graphicx} + +\usepackage{xspace,graphicx} \usepackage[bf]{caption2} -\renewcommand{\rmdefault}{ppl} \usepackage{makeidx} \makeindex - \usepackage{url} \newcommand{\Email}{\begingroup \urlstyle{rm}\Url} \newcommand{\email}[1]{\Email{<#1>}} \newcommand{\function}[1]{\textsf{#1(~)}% - \index{#1@\textsf{#1()}}% - \index{Functions!#1@\textsf{#1()}} -} - -\newcommand{\functiondef}[1]{\textsf{#1}} -\newcommand{\funcdesclabel}[1]{\emph{#1:}} -\newenvironment{funcdesc}% - {\begin{list}{}{% - \renewcommand{\makelabel}{\funcdesclabel}% - \setlength{\itemsep}{0.25\baselineskip}% + \index{#1@\textsf{#1(~)}}% + \index{Functions!#1@\textsf{#1(~)}} } + +%\newcommand{\functiondef}[1]{\textsf{#1}} +%\newcommand{\funcdesclabel}[1]{\emph{#1:}} +%\newenvironment{funcdesc}% +% {\begin{list}{}{% +% \renewcommand{\makelabel}{\funcdesclabel}% +% \setlength{\itemsep}{0.25\baselineskip}% % \setlength{\topsep}{0pt}% - \setlength{\partopsep}{0pt}% - \setlength{\parsep}{0pt}% - }% - }% - {\end{list}% -} +% \setlength{\partopsep}{0pt}% +% \setlength{\parsep}{0pt}% +% }% +% }% +% {\end{list}% +%} -\newcommand{\classdef}[1]{\textsf{#1}} -\newcommand{\class}[1]{Class \textsf{#1}% +%\newcommand{\classdef}[1]{\textsf{#1}} +\newcommand{\class}[1]{\textsf{#1}% \index{#1@\textsf{#1}}% \index{Classes!#1@\textsf{#1}}} + \newcommand{\variable}[2]{\textsf{\textbf{#1#2}}% \index{#2@\textsf{\textbf{\protect\makebox[0cm][r]{#1}#2}}}% \index{Variables!#2@\textsf{\textbf{\protect\makebox[0cm][r]{#1}#2}}}} -\newcommand{\icao}[1]{\textsf{#1}} - +%\newcommand{\icao}[1]{\textsf{#1}} \newcommand{\code}[1]{\texttt{#1}} - \newcommand{\filename}{\begingroup \urlstyle{tt}\Url} -\urldef{\AUTHORS}\filename{AUTHORS} -\newcommand{\phpw}{\emph{PHP Weather}\xspace} -\usepackage[colorlinks, - linkcolor=blue, - pdftitle={PHP Weather Usage Guide}, - pdfauthor={Martin Geisler, et al}, - pdfsubject={Documentation for PHP Weather} -]{hyperref} +\newcommand{\phpw}{PHP Weather\xspace} +\newcommand{\metar}{\textsc{metar}\xspace} +\newcommand{\icao}{\textsc{icao}\xspace} + +%\usepackage[colorlinks, +% linkcolor=blue, +% pdftitle={PHP Weather Usage Guide}, +% pdfauthor={Martin Geisler, et al}, +% pdfsubject={Documentation for PHP Weather} +%]{hyperref} + +\hyphenation{mail-ling-list pre-ci-pi-ta-ti-on sto-red} + \title{\phpw Usage Guide} -\author{Martin Geisler \email{gim...@gi...}\thanks{I would like to thank all the people who have helped me make \phpw. See the file \AUTHORS{} for a list.}} + +\author{Martin Geisler \email{gim...@gi...}\thanks{I would +like to thank all the people who have helped me make \phpw. See the +file \texttt{AUTHORS} for a list.}} + \begin{document} \pagenumbering{roman} @@ -78,7 +87,6 @@ \end{quote} - \tableofcontents \include{intro} @@ -88,15 +96,13 @@ \include{installation} +\include{databases} + \include{translation} -%%%%%%%%%% -% -% API doc. -% -%%%%%%%%%% +%\include{apidoc} -\include{apidoc} +\include{history} \include{fdl} Index: phpweather-a4.tex =================================================================== RCS file: /cvsroot/phpweather/phpweather/docs/src/latex/phpweather-a4.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- phpweather-a4.tex 12 Jul 2001 19:56:30 -0000 1.1 +++ phpweather-a4.tex 11 Mar 2002 16:50:08 -0000 1.2 @@ -1,2 +1,2 @@ -\documentclass[a4paper]{report} +\documentclass[a4paper,draft]{report} \input{main} Index: translation.tex =================================================================== RCS file: /cvsroot/phpweather/phpweather/docs/src/latex/translation.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- translation.tex 18 Jul 2001 10:38:22 -0000 1.1 +++ translation.tex 11 Mar 2002 16:50:08 -0000 1.2 @@ -1,3 +1,4 @@ +% -*- mode: latex; tex-main-file: "phpweather-a4" -*- \chapter{Translation} It is quite easy to translate \phpw into another language. This chaper @@ -7,9 +8,9 @@ All the words and sentences used by \phpw is stored in special files called \emph{locales}. You'll find these files in the directory -\filename{PHPWEATHER_BASE_DIR/locales}. Each file has a name like this -\filename{locale_xx.php} where \filename{xx} corrosponds to a -language-code found in +\filename{PHPWEATHER_BASE_DIR/locales}. Each file is named after a +scheme like this \filename{locale_xx.php} where \filename{xx} +corresponds to a language-code found from \filename{PHPWEATHER_BASE_DIR/db/files/countries.php}. So the Danish translation is called \filename{locale_db.php}, the Hungarian is called \filename{locale_hu.php}, etc. @@ -29,31 +30,10 @@ \item Copy your chosen locale, and rename it according to your country-code. -\item Change the top of the locale so that it looks like this: -\begin{verbatim} -<?php -/* This code makes sure that the file is only included once. */ -if (defined('LOCALE_XX')) { - return; -} else { - define('LOCALE_XX', true); -} - -require(PHPWEATHER_BASE_DIR . '/locales/locale_common.php'); - -/** - * Provides all the strings needed by locale_common to - * produce xx-ish output. - * - * @author Foo Bar <fo...@ba...z> - * @link http://www.some.place.com A description of - * the page you've chosen to link to. - * @version $Id$ - */ -class locale_xx extends locale_common { -\end{verbatim} +\item Change the top of the locale so that all occurences of \code{en} +and \code{English} is substituted with \code{xx} and \code{xx-ish}. -This involves +This involves the following steps: \begin{enumerate} \item Changing the lines that defines the constant \code{LOCALE\_EN} so that it defines \code{LOCALE\_XX} instead. @@ -67,8 +47,8 @@ \item If you want, you can make a link to a page of your choice --- perhaps your homepage? -\item Although not stricly necessary, you might change the line with -\code{\$Id$Id$}. +\item You can leave the line with \code{@version} intact. It will be +updated automatically when the file is put under version control. \item Changing the line with \code{class locale\_en} into \code{class locale\_xx} instead. @@ -86,7 +66,10 @@ inches) of precipitation''. I hope you get the idea. \item Remember to translate all special charecters (things like \ae, -\'e, \aa, etc) to their HTML-entities. +\'e, \aa, \"o, etc) to their HTML-entities. Use my list of +HTML-entities at \url{http://www.gimpster.com/linux/entities.php} as a +help if you don't know the correct code for one of the special +characters. \item When you're done, and have tested your translation, send it to the maillinglist at \email{php...@li...}. @@ -107,7 +90,7 @@ The good news is: ``You can!'' Now that \phpw uses objects it's possible for the translator to change almost every aspect of the translation. This can be done, because the translation you've made is -the definition of a class called \class{locale\_xx} where \code{xx} is -the country-code. +the definition of a class called \class{locale\_xx} +where \code{xx} is the country-code. To be continued\ldots |
From: Martin G. <gim...@us...> - 2002-03-11 16:27:44
|
Update of /cvsroot/phpweather/phpweather/docs/ps In directory usw-pr-cvs1:/tmp/cvs-serv8729 Modified Files: phpweather-a4.ps phpweather-letter.ps Log Message: This is mostly a test of the new syncmail script. The idea is that it shouldn't include a diff of these PostScript files. --- BINARY FILE --- --- BINARY FILE --- |
From: Martin G. <gim...@us...> - 2002-03-10 20:22:40
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv15822 Added Files: images.inc list.php table.php Log Message: This is the files that enables you to use icons in PHP Weather - Raymond van Beek <ra...@de...> has made the hard work. --- NEW FILE --- <?php /* Copyright (c) 2002 Raymond van Beek <ra...@de...>. Licensed under the GPL, see the file COPYING. Parts of this code are derived from the phpweather.inc code by Martin Geisler <gim...@gi...> Also see http://www.gimpster.com/php/phpweather/ or http://www.sourceforge.net/projects/phpweather for updates and further instructions on how to use PHP Weather. */ // ======================================================================= // 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. $abs_image_path = 'icons/'; // An array to convert the weather group codes to an index of the // $images and $n_images array. $phenomena_array = array ( '#' => 'None', 'TS' => 'Thun', 'RA' => 'Rain', 'DZ' => 'Rain', 'SN' => 'Snow', 'SG' => 'Snow', 'GR' => 'Hail', 'GS' => 'Hail', 'PE' => 'Hail', 'IC' => 'Hail', 'BR' => 'Fog', 'FG' => 'Fog' ); // An array to convert the cloud coverage codes to an index of the // $images and $n_images array. $coverage = array ( 'CLR' => '0', 'SKC' => '0', 'FEW' => '1', 'SCT' => '2', 'BKN' => '3', 'OVC' => '4', 'VV' => '4' ); // Clear all images if (isset($images)) { unset($images); } if (isset($n_images)) { unset($n_images); } $sky_nodata_image = 'sky_nodata.gif'; // Define a lot of images for daylight weather-group/cloud condition. // It's a 2-dimensional array, indexed by the: // - Precipitation (first index) // - 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') ); // Define a lot of images for nigh time weather-group/cloud condition. // It has the same structure as the daylight array $images // It's a 2-dimensional array, indexed by the: // - Precipitation (first index) // - 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') ); // Define image filenames for: // - 16 wind directions, // - 'no wind direction data' // - variable wind direction (VRB) // - 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'; // 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'; // ====================================================================== // The wind_speeds array can be used to convert wind speed values in [m/s] // to [Bft] (beaufort). $wind_speeds = array ( 'beaufort' => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 'ms' => array (0.3, 1.6, 3.4, 5.5, 8.0, 10.8, 13.9, 17.2, 20.8, 24.5, 28.5, 32.7, 999)); // ------------------------------------------------------------------------ // The get_sky_image() function takes the processed metar data and // returns the sky image filename. The function combines the weather // group and cloud group to a specific image. Example html code: // // <img src="< ?php // get_image($processed_metar) // ? >" 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; $metar = $processed_metar_data['metar']; $parts = explode(' ', $metar); $num_parts = count($parts); $night = 0; $maxcoverage = 0; for ($i = 0; $i < $num_parts; $i++) { $part = $parts[$i]; if (ereg('RMK|TEMPO|BECMG', $part)) { /* The rest of the METAR is either a remark or temporary information. We skip the rest of the METAR. */ break; } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { if (($regs[2] < 6) || ($regs[2] > 18)) { $night = 1; } } elseif (ereg('^(-|\+|VC)?(TS|SH|FZ|BL|DR|MI|BC|PR|RA|DZ|SN|SG|GR|GS|PE|IC|UP|BR|FG|FU|VA|DU|SA|HZ|PY|PO|SQ|FC|SS|DS)+$', $part)) { /* * Is this the current weather group? */ // Get the intensity and get rid of it in the $part string $intensity = ''; if (ereg('^(-|\+|VC)(..)*$',$part)) { if ($part[0] == '-') { $intensity = '-'; $part = substr($part,1); } elseif ($part[0] == '+') { $intensity = '+'; $part = substr($part,1); } elseif ($part[0] . $part[1] == 'VC') { $intensity = ''; $part = substr($part,2); } } // Now, take only the precipitation types that have icons. // 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] != '') { $phenomena = $match[1]; } else { ereg('(..)(TS|RA|DZ|SN|SG|GR|GS|PE|IC|BR|FG)(..)*$',$part,$match); if ($match[2] != '') { $phenomena = $match[2]; } } // Not each precipitation type has a single icon with it. // Combine similar precipitation types to a phenomena group. // I.e. drizzle (DZ) and rain (RA) are both considered to be // rain (as far as the icons are concerned). Add intensity only // in case of rain and snow. if (ereg('^(Snow|Hail)$',$phenomena_array[$phenomena])) { if ($intensity == '') { $intensity = '-'; } } if (ereg('^(Rain|Snow|Hail)$',$phenomena_array[$phenomena])) { $phenomena_group = $intensity . $phenomena_array[$phenomena]; } else { $phenomena_group = $phenomena_array[$phenomena]; } } // Now check the cloud coverage. There could be three cloud // layers, so check for all of them. Iconize the most covered // clouds, thus find the highest cloudcoverage layer, by // maximizing the $maxcoverage param elseif (ereg('(SKC|CLR)(...)', $part, $regs)) { $maxcoverage = max($maxcoverage,$coverage[$regs[1]]); // if ($maxcoverage < $coverage[$regs[1]]) { // $maxcoverage = $coverage[$regs[1]]; // } } elseif (ereg('^(VV|FEW|SCT|BKN|OVC)([0-9]{3})(CB|TCU)?$', $part, $regs)) { $maxcoverage = max($maxcoverage,$coverage[$regs[1]]); // if ($maxcoverage < $coverage[$regs[1]]) { // $maxcoverage = $coverage[$regs[1]]; // } } } // If looped through all groups and not found any weather group // (meaning no precipitation?), assume a '#' phenomena, resulting in // a 'None' phenomena group if ($phenomena == '') { $phenomena = '#'; $phenomena_group = $phenomena_array[$phenomena]; } // At this point, the $phenomena_group variable contains the one // index of the $images array, while the $maxcoverage variable // contains the other index of the $images array. The correct image // can be selected from the array. if (($night == 1) || ($itime == 'nite')) { echo $abs_image_path . $n_images[$phenomena_group][$maxcoverage]; } else { echo $abs_image_path . $images[$phenomena_group][$maxcoverage]; } } // ------------------------------------------------------------------------ // The get_winddir_image() function takes the processed metar data and // returns the appropriate wind direction image filename. There are 16 // wind direction icons defined to indicate the wind direction. Beside // the 16 directions, there are icons for variable wind direction, // calm wind and and an icon for the no data condition. Example html // code: // // <img src="< ?php // get_winddir_image($processed_metar) // ? >" height="40" width="40" border="1"> function get_winddir_image($processed_metar_data) { global $abs_image_path, $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; } else { $array_index = round($processed_metar_data['wind_deg']/22.5); echo $abs_image_path . $wind_dir_images[$array_index]; } } else { echo $abs_image_path . $wind_nodata_image; } } // ------------------------------------------------------------------------ // The get_temp_image() function takes the processed metar data and // returns the appropriate temperature image filename. It uses the // 'temp_c' value to decide weather a freezing thermometer icon or a // non-freezing thermometer icon. When the 'temp_c' data is not // available, a 'no data' icon filename is returned. Example html // code: // // <img src="< ?php // get_temp_image($processed_metar) // ? >" height="50" width="20" border="1"> function get_temp_image($processed_metar_data) { global $abs_image_path, $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; } else { echo $abs_image_path . $temp_low_image; } } else { echo $abs_image_path . $temp_nodata_image; } } // ------------------------------------------------------------------------ // The get_beaufort() function takes the 'wind_meters_per_second' // value from the $decoded_metar array and converts it to beaufort // values. This is done by iterating through a table with windspeeds // in [m/s] and [bft] values. function get_beaufort() { global $wind_speeds, $decoded_metar; $ms = $decoded_metar['wind_meters_per_second']; if ($ms != '') { $cnt = 0; while (($ms > $wind_speeds['ms'][$cnt]) && ($cnt <= 12)) { $cnt++; } return $cnt; } else { return 0; } } // ------------------------------------------------------------------------ // The set_time() function is purely added for overruling the metar // time to night time. It is only intended to support displaying all // weathergroup icons in the table.php script during daytime. function set_time($ntime) { global $itime; $itime = $ntime; } // ------------------------------------------------------------------------ ?> --- NEW FILE --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Listing of the processed METAR</title> </head> <body> <p>You can use this simple script to test PHP Weather. After you have typed in an ICAO, the script will show you the result of the parsing.</p> <form action="list.php"> <p>Select ICAO: <input type="text" name="icao"> <input type="submit"></p> </form> <?php include('./locale_en.inc'); include('./images.inc'); include('./phpweather.inc'); if (empty($icao)) { $metar = get_metar('EHEH'); } else { $metar = get_metar($icao); } $decoded_metar = process_metar($metar); echo "<pre>\n"; while (list($key, $value) = each($decoded_metar)) { echo "[$key] => $value\n"; } ?> </body> </html> --- NEW FILE --- <html> <head> <title>PHP Weather</title> </head> <body> <?php include('./locale_en.inc'); include('./images.inc'); include('./phpweather.inc'); $metar = get_metar('EHEH'); ?> <h1>Iconize PHPWeather info</h1> <h2>Introduction</h2> <p>Over the globe, a lot of weatherstations report the local weatherconditions to the <a href="http://weather.noaa.gov/weather/metar.shtml">NOAA organisation</a>, most of the times on an hourly basis. The weatherconditions are reported in the METAR format. The METAR data is available through the internet. For example the METAR data for Eindhoven Airport, Netherlands is:</p> <blockquote><code><? echo $metar ?></code></blockquote> <p>Martin Geisler (<a href="http://www.gimpster.com">www.gimpster.com</a>) has developed a PHP-script that retrieves and parses METAR data into readable text. You can get the PHPWeather script from <a href="http://sourceforge.net/projects/phpweather/">PHP Weather</a>. By this script, the METAR data of above is converted into:</p> <blockquote><? pretty_print_metar($metar, 'Eindhoven'); ?></blockquote> <p>I thought it would be neat to represent the METAR data in a graphical way as well. This is not new. Various portals and newspaper sites have this kind of representation also. But there is no way to personalize that representation: the information is statically built into their web-pages.<br> What I had in mind was a form that gives freedom in the choice of the icons and what kind of information that is presented: wind, temperature, sky cover and precipitation. Of course the freedom of choice ends with the one that builds the webpage: the PHP script is executed on the server which contains the webpage. There is no way that a user of the page can personalize representation (at least that is what I have in mind).</p> <p>So here it is. The current weather conditions in icons (so far):</p> <blockquote> <? $decoded_metar=process_metar($metar); ?> <img src="<? get_temp_image($decoded_metar) ?>" height="50" width="20" border="1"> <img src="<? get_winddir_image($decoded_metar) ?>" height="40" width="40" border="1"> <img src="<? get_sky_image($decoded_metar) ?>" height="50" width="80" border="1"> </blockquote> <h2>At first...</h2> <p>I searched for a set of icons on the internet. There are dozens of them. But only few are closely related to METAR data. I have downloaded the set of icons that I thought came very close to the METAR data. Then I have adjusted, changed and updated them to what I think that they should be and to the PHP script that I had in mind.</p> <p>First, I started with the sky cover and precipitation group within the METAR data. The set of icons I have downloaded already distinguises between day and night time, so I decided to take that into account too. METAR data has a group that describes the sky covering in five steps. Alltough sky covering can be described with a maximum of 3 layers, the script uses the layer that has the heaviest sky cover. The reason for this is because that probably describes the weather condition best (from the point of view of someone who looks up to the sky).</p> <p>Then there is a group that describes the 'Present Weather Group'. To me, this is the precipitation and related phenomenas, at least most of the time. To reduce the set of required icons I grouped similar precipitation phenomenas. I limited the script to rain (RA/DZ), snow (SN/SG), hail (GR/GS/PE/IC), thunderstorm (TS) and fog (BR/FG). Those are the most common weather types in the Netherlands. The script can be changed to contain more types (you'll need more icons though!)</p> <p>The script takes both the sky cover figure and the precipitation phenomenas as table entries at searches for the proper image file name. Finally, the time of the metar data is taken into account: during day time (from 6:00 AM to 6:00 PM) a sun with some clouds is displayed. At night time (from 6:00 PM to 6:00 AM) a moon with some clouds is displayed. Of course, when overcast is present, no sun or moon is presented.</p> <p>Refer to the next sections that present two tables with various icons that are resolved when METAR data is processed. One table provides the day time images, while the other provides the night time images. <a href="http://www.devolder.nl/table.txt">Click here</a> to view the code of the 'images.inc' file and <a href="http://www.devolder.nl/images.txt">click here</a> to view the code of this page.</p> <h2>Things to improve</h2> <ul> <li> </li> </ul> <h2>Day time sky cover/precipitation icons</h2> <p>The script creates one icon for a sky over and precipitation combination. Basically, the METAR data distinguishes 5 different sky covering types, which are listed horizontally in the table below. There are a lot of precipitation and related types, but in this script the number is limited to the most common types (at least in the Netherlands ;-): rain, snow, hail, thunderstorm and fog.</p> <p>Remarks:</p> <ul> <li>For rain, three different intensities are distinguished: light, moderate and heavy.</li> <li>For snow and hail, it is assumed that light/moderate and heavy intensities only need to be distinguished when there is overcast (100% sky cover).</li> <li>In case of fog/mist, I use the sky cover figure to increase the 'thickness' of the fog and to blend out sun light. I'm not sure that the skycover is being used as an indication of the 'fogginess'. Anyone?</li> </ul> </p> <? set_time('day'); ?> <table class="weather" border="1"> <tr> <th class="weather" colspan="2" width=200>Sky Cover/<br>Precipitation</th> <th class="weather" width=80>Clear<br>(CLR/SKC)</th> <th class="weather" width=80>Few<br>(FEW)</th> <th class="weather" width=80>Scattered<br>(SCT)</th> <th class="weather" width=80>Broken<br>(BKN)</th> <th class="weather" width=80>Overcast<br>(OVC/VV)</th> </tr> <tr> <th class="weather" colspan=2>None</th> <td><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=3>Drizzle/Rain<br>(DZ/RA)</th> <td>light</td> <td rowspan=3><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>moderate</td> <td><img src="<? $test['metar'] = 'RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=2>Snow/Snow Grains<br>(SN/SG)</th> <td>light/<br>moderate</td> <td rowspan=2><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'SN OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+SN OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=2>Ice Crystals/Ice Pellets/<br>Hail/Small Hail<br>(IC/PE/GR/GS)</th> <td>light/<br>moderate</td> <td rowspan=2><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'IC OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+IC OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" colspan=2>Thunderstorm<br>(TS)</th> <td><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" colspan=2>Mist/Fog<br>(BR/FG)</th> <td><img src="<? $test['metar'] = 'FG CLR000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> </table> <p>Note: with the sky cover/precipitation icons, there is no such thing as 'no data'. When both groups are omitted, this could mean sunny and no precipitation, and 'no data' as well. Since the metar exists, I decided to show the 'sunny' icon.</p> <h2>Night time sky cover/precipitation icons</h2> <p>To the night time sky cover/precipitation icons the same remarks as to the day tim icons apply.</p> <? set_time('nite'); ?> <table border="1" class="weather"> <tr> <th class="weather" colspan=2 width=200>Sky Cover/<br>Precipitation</th> <th width=80>Clear<br>(CLR/SKC)</th> <th width=80>Few<br>(FEW)</th> <th width=80>Scattered<br>(SCT)</th> <th width=80>Broken<br>(BKN)</th> <th width=80>Overcast<br>(OVC/VV)</th> </tr> <tr> <th class="weather" colspan=2>None</th> <td><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=3>Drizzle/Rain<br>(DZ/RA)</th> <td>light</td> <td rowspan=3><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '-RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>moderate</td> <td><img src="<? $test['metar'] = 'RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+RA FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = '+RA OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=2>Snow/Snow Grains<br>(SN/SG)</th> <td>light/<br>moderate</td> <td rowspan=2><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'SN BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'SN OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+SN OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" rowspan=2>Ice Crystals/Ice Pellets/<br>Hail/Small Hail<br>(IC/PE/GR/GS)</th> <td>light/<br>moderate</td> <td rowspan=2><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td rowspan=2><img src="<? $test['metar'] = 'IC BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'IC OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <td>heavy</td> <td><img src="<? $test['metar'] = '+IC OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" colspan=2>Thunderstorm<br>(TS)</th> <td><img src="<? $test['metar'] = 'CLR'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'TS OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> <tr> <th class="weather" colspan=2>Mist/Fog<br>(BR/FG)</th> <td><img src="<? $test['metar'] = 'FG CLR000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG FEW000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG SCT000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG BKN000'; get_sky_image($test) ?>" height="50" width="80"></td> <td><img src="<? $test['metar'] = 'FG OVC000'; get_sky_image($test) ?>" height="50" width="80"></td> </tr> </table> <p>Note: with the sky cover/precipitation icons, there is no such thing as 'no data'. When both groups are omitted, this could mean 'moony' (as opposed to 'sunny' ;-) and no precipitation, and 'no data' as well. Since the metar exists, I decided to show the 'moony' icon.</p> <? set_time(''); ?> <h2>Wind direction</h2> <p>A dedicated group in the METAR data provides wind related information. Of this data, the wind direction can be visualized graphically (as an arrow indicating the wind direction). I designed 16 wind direction icons (north, north-north-east, north-east etc), a special icon for variable wind direction (speed 6 knots or less) and a calm wind icon. The variable wind direction with speeds greater than 6 knots is not covered by an icon. The icon should then show the 'directional variability', which is pretty complex.</p> <p>Each of the 16 wind direction is mapped onto a icon, e.g. angles from 348.75 degrees through 11.25 degrees are mapped to the 'North' icon. Angles from 11.25 through 33.75 degrees are mapped to 'North-east' etc. This leads to the following icons:</p> <table class="weather" border="1"> <tr> <th>N</th> <th>NNE</th> <th>NE</th> <th>NEE</th> <th>E</th> <th>SEE</th> <th>SE</th> <th>SSE</th> </tr> <tr> <td><img src="<? $test['wind_deg'] = 1.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 22.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 45.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 67.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 90.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 112.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 135.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 157.5; get_winddir_image($test) ?>" height="40" width="40"></td> </tr> <tr> <th>S</th> <th>SSW</th> <th>SW</th> <th>SSW</th> <th>W</th> <th>NWW</th> <th>NW</th> <th>NNW</th> </tr> <tr> <td><img src="<? $test['wind_deg'] = 180.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 202.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 225.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 247.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 270.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 292.5; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 315.0; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = 337.5; get_winddir_image($test) ?>" height="40" width="40"></td> </tr> <tr> <th>VRB</th> <th>Calm<br>wind</th> <th>No<br>data</th> </tr> <tr> <td><img src="<? $test['wind_deg'] = $strings['wind_vrb_long']; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? $test['wind_deg'] = '0.0'; $test['wind_knots'] = '0.0'; get_winddir_image($test) ?>" height="40" width="40"></td> <td><img src="<? get_winddir_image('') ?>" height="40" width="40"></td> </tr> </table> <h2>Temperature</h2> <p>Another group in the METAR data provides temperature data. Only the actual temperature is being used to show either a blue (below 0 degrees C) or a red (above 0 degrees C) thermometer is shown. I know it is possible to generate images during php script execution with the GD lib, but I think changes in thermometer would be very small and hard to see.</p> <table class="weather" border="1"> <tr> <th>Below<br>0<br>deg C</th> <th>Above<br>0<br>deg C</th> <th>No<br>data</th> </tr> <tr> <td><img src="<? $test['temp_c'] = -1; get_temp_image($test) ?>" height="50" width="20"></td> <td><img src="<? $test['temp_c'] = 1; get_temp_image($test) ?>" height="50" width="20"></td> <td><img src="<? get_temp_image('') ?>" height="50" width="20"></td> </tr> </table> <h2>Change history</h2> <ul> <li>17 feb: EHEH 180825Z 22008KT 2500 R22/2000N -RA BR FEW008 BKN010 04/03 Q1017 YLO YLO BECMG GRN<br> Specifies Light rain, and mist. The icon shown is sun/mist. There is only clouds and rain, and no sun. Maybe the fog phenomena should only be taken into account when CLR or FEW. All others (SCT/BKN/OVC) ignore fog? <blockquote>Changed the mist icons to show clouds as well.</blockquote> </li> <li>19 feb: EHEH 191145Z 29016G30KT 4000 -SHRA BKN020CB 05/04 Q1015 TEMPO 4000 -TSRAGS<br> Specifies light showering rain, but also light thunderstorm of rain and small hail. Results in no image at all. Apparently, the script cannnot resolve this.<br> <blockquote>The metar contains a forcast part (from 'TEMPO...' and further). The script did not detect that and ran into the -TSRAGS part. Now the script stops before RMK|TEMPO|BECMG. </blockquote> </li> <li>25 feb: .... BR OVC020....<br> Specifies mist with overcast. Leads to 'fully white' image. This should be changed to normal overcast image <blockquote>Changed the mist icons to show clouds as well.</blockquote> </li> </ul> </body> </html> |
Update of /cvsroot/phpweather/phpweather-1.x/icons In directory usw-pr-cvs1:/tmp/cvs-serv15369 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 temphigh.gif templow.gif vrb.gif www.gif Log Message: Icons for PHP Weather - yeah! Raymond van Beek <ra...@de...> is the man behind this - thanks a lot! --- NEW FILE --- GIF89aP 4̰ÀxÌL6Ù½ãN9Ú<0¹ØÒ*¡ÒeÐÃ8çh÷Æ ¶(CNA:a£Ì1¿Üâ ýg+¹iÎ'`aG%¬øâL9A¾c7Ø8C&.Jª HÐäV9ÑÈ¢GXTÒÊ/ÎpÓKî cbÁ i+«4ÙxÉâ¢Qe£ALP'þ´èÒ6ä;æS¤¿$Ù`%ETqD Q@báfé(D(`¡J+¾ óÌ6ãà 7:Ì1º 1BCαµ³Ë20Ä&«Ôr0Á$L24#Ó©/Þ²"(¸UxÈ¥Ú5sS rJºÇÎ:YÅG 2æXÞ;ÑüQi¤¦Ê*¬´ÒûéV§^Éáâ ¢óÌ H±ñM"ø(¯2ôM:^Äz=Å7 IÎLÐEäýú©·hÇ^EpÁ÷ N.áEÈ`Ùë`(ì Ì¡ 0 2ª¾w¤ÈÆ'g9` --- NEW FILE --- GIF89aP ÷¡\ع»ÄÇ&L¼0yÈK²@|ÀªÇÂ-½ 8`¯/](pÄË N¼H¡ì#Úµ³^è1é7Yrpøñ$I)TTÑ`Æ*lt!ãC³ÎuïFØÕ÷(Q´þ¡`3Lp"yÈ«aR}3öo·3Ààd<ñD $ÁÀèM Ið±Ìµ.½UÓwðl"TrÀçÄ3ÈøD_+-0þh 2zÁÆi´ÝæXûbÂU4àïÈqÍÒ ÀnC<@ Yr!l×AÇèu¼ %clqÆ%4à ý íìw+i @PPÐlD2[`E¸.ÁhÚÖfàa ;_êLÆ( QÓ¼púÐþ_@C T "z¡\´V5$0U T ÄïXLa.ÐTIàeºd;? ¤ScªPhÀ ^Ðp- =.XZ7LÙÁ~÷£\þS6P 10OAô --- NEW FILE --- GIF89aP ÷¡\"P¸+Ç:àèÈyÇB8t Ì´Ík0HÌ¡ l"T ìçÄc1D<ðþ< yFC b|# × ¤aÏCDÉ+MlbVºâÔ®wÉU±ÂB¿ò&i(Ila Û(ö&åÊD ÙÊâ$ --- NEW FILE --- GIF89aP ݤ¦¡<õñ-ºJÈ!P æ 7Ð uAÇqò!4ÒÈ$!2©©g0X0A@ðÀD0°7Ñ 0\q[|G!ÄûH³n7GuD²H@à@0Ð@@ A:$iD uò|XwÝuÔjgm hrÁ§4° ¬ÀD .¿TÈ?DQ º 0xFàYÿaºá8"A0@´Àì´Kî6Ü$À@·á»Ñ!WȬº 8 È#ÿ[ ,à|Ñl@ûôµC>¹ L·Á!à F|£ÑAh ÿÙ°à¾ôÔÇ?½ Pªp&n&?@P2àpÀ"Fl"ø@°-! 4 Á¢-Üàh@NËH= R >¬H8 Ã.À $ÉâRæ d pÙØÐ!l ñ%6Ìq³ ¯ôæ5Ï©j³Ëd§A¸¹NuÊ3!â'3ë© --- NEW FILE --- GIF89aP ݤ¦¡<õñ-ºJÈ!P æ 7Ð uAÇqò!4ÒÈ$!2©©g0X0A@ðÀD0°7Ñ 0\q[|G!ÄûH³n7GuD²H@à@0Ð@@ A:$iD uò|XwÝuÔjgm hrÁ§4° ¬ÀD .¿TÈ?DQ º 0xFàYÿaºá8"A0@´Àì´Kî6Ü$À@·á»Ñ!WȬº 8 È#ÿ[ ,à|Ñl@ûôµC>¹ L·Á!à F|£ÑAh ÿÙ°à¾ôÔÇ?½ Pªp&n 2© Ð:BÀ`ÙD&0ð `[0Ch@/D[¸ÁÐÀ 8@¢Hb ë0 Ȱ$0 --- NEW FILE --- GIF89aP ݤ¦¡<õñ-ºJÈ!P æ 7Ð uAÇqò!4ÒÈ$!2©©g0X0A@ðÀD0°7Ñ 0\q[|G!ÄûH³n7GuD²H@à@0Ð@@ A:$iD uò|XwÝuÔjgm hrÁ§4° ¬ÀD .¿TÈ?DQ º 0xFàYÿaºá8"A0@´Àì´Kî6Ü$À@·á»Ñ!WȬº 8 È#ÿ[ ,à|Ñl@ûôµC>¹ L·Á!à F|£ÑAh ÿÙ°à¾ôÔÇ?½ Pªp&n 2© ]ÂYHÄJ! ¤ÓL6+M@ÓÝ\H52ÎpjÌD'D --- NEW FILE --- GIF89aP ݤ¦¡<õñ-ºJÈ!P æ 7Ð uAÇqò!4ÒÈ$!2©©g0X0A@ðÀD0°7Ñ 0\q[|G!ÄûH³n7GuD²H@à@0Ð@@ A:$iD uò|XwÝuÔjgm hrÁ§4° ¬ÀD .¿TÈ?DQ º 0xFàYÿaºá8"A0@´Àì´Kî6Ü$À@·á»Ñ!WȬº 8 È#ÿ[ ,à|Ñl@ûôµC>¹ L·Á!à F|£ÑAh ÿÙ°à¾ôÔÇ?½ Pªp&n 2©·r(0,È>,à`f hð èÀ`7øh!*H$Vø°. á3 --- NEW FILE --- GIF89aP óæÁS2;ßH<xȸ¹c: Ç-þßyrk¤2gÓ´§¶à=zð´%A¶ &HBüÁGa< À8 À ÉÇÀl ( Y³7E6Á<a®Â8AîZÈDAEbÇíêá/o0ðOüÀLÖ8r ß8£¦2jJq¥ÚѵíÑp,0k-IP¥ÀP" %Ép :uØG{O (èì1Ï,9Ð&4RFù$Ѱ@ÒGsx¬)pÂþç2û /ðæà ¼éfg[é@4P!Â}_бCyä±'pèr}Ó¥9" ¶ÐK2°tÈìǺùÑp£a^¤¡Ex¼AÄ(x B}t^däò§îðCl¬QGÔQ wÜfla`´qn"Ã]2)·j0J°ÁóµQÓ³>ÇrØÞÅÚWAÃ.p[ÀR ò/2ªi`Ü ZØAÜ0?¸©! fð¶p .|[ªKNDè§1`l"aoÀÃJµº5 áSÄ`BÕøð2þÆSNFêbÄ P5 hËÇc',%Æã®Q3iL"Ù0# q¨ò¦ BÐP¡?ÔØ4Íi²©ZW7õã1 WÔ e¦úÙÏáHC"@$IBPÕP L7 îM¦Ê@JÒ9l´´W --- NEW FILE --- GIF89aP "Ö²%'ÄèÈÁcb 2}F*6ÀhõÌX¬X2b#NÈYR\oÁ²hÈ.wdMÅXLR¤Q6nÈ¡Aâ,¤L:d⨠ìMÃa}ØËn;dj`±ó¨re:eÈY$EªÈ(¢Ä o+$f$«@ÈyTÉÒ¥Û*Y¦ãÂ4^Üð°áÂ!|øóF±j9Fìu±¨Ò'Q¨²åéîG°þü©âCÆ<pDéÓÎUÿ*1Æ8²d Ö-\¸ÐK*¦pW $F xð .Æ 0»à2+§â]>pÞ `£$À a¦]+ MÞ#*ÄG5þ yx21$,í %/À{Ð"6Åç6P"&D¥êDHOºÓddÔ É)BºÑmt *BÒ --- NEW FILE --- GIF89aP -K¦¨ À Ã.¬}Æî2KXü Ó§rå-P@ÁAc :(Dxàà +<!ë4z\é³(ÛYÞâÅ&98=`°@Á$H¨`A±j4ìMñeÑ¡:²×1Hî>e~þ°¡ !Â@ AéÓÎU» #_ÈI4)P*T¨@p·È}¬2Ç 0p @À]@^@lrÈÈnÂù àq¬ÄeÐç Á×Y0ëf± $,g|%ß\;<ÀGÓz@b¤©KóM¬ ¢ÏDÓtÍÄ[,Z¹Ë @Lôà9x<¤WJëI --- NEW FILE --- GIF89aP -K¦¨ À Ã.¬}Æî2KXü Ó§rå-P@ÁAc :(Dxàà +<!ë4z\é³(ÛYÞâÅ&98=`°@Á$H¨`A±j4ìMñeÑ¡:²×1Hî>e~þ°¡ !Â@ AéÓÎU» #_ÈI4)P*T¨@p·È}¬2Ç 0p @À]@^@lrÈÈnÂù àq¬ÄeÐç Ã('H@bØ.xp 7xÆò2Ô þe %TÑ ?^ Þ ÄÇaë w8Á ¨¤à fw"Îã! =ñ`(V'ìWØÃ3B9 °,´ V7Ü1×. H KØ&ª,ÀPáºj@ di$ F ÀBbbT@Í*º ùA<ABHXÖÌð8I¹}Ntx"¦õA² ¡0/Ï.BnÝ`I÷@O$' 6<KOû§D÷6ªQÈÇ áiDú¥*ħB)Ri --- NEW FILE --- GIF89aP -K¦¨ À Ã.¬}Æî2KXü Ó§rå-P@ÁAc :(Dxàà +<!ë4z\é³(ÛYÞâÅ&98=`°@Á$H¨`A±j4ìMñeÑ¡:²×1Hî>e~þ°¡ !Â@ AéÓÎU» #_ÈI4)P*T¨@p·È}¬2Ç 0p @À]@^@lrÈÈnÂù àq¬ÄeÐç ²ípXY [1azF(g1@V àWÁÊ)"A<p<A CXÂ* +fbV¨° Q aY4;d(ïfºÔá ò8¡0-"Ì:B`S¬³X÷8Õë --- NEW FILE --- GIF89aP -K¦¨ À Ã.¬}Æî2KXü Ó§rå-P@ÁAc :(Dxàà +<!ë4z\é³(ÛYÞâÅ&98=`°@Á$H¨`A±j4ìMñeÑ¡:²×1Hî>e~þ°¡ !Â@ AéÓÎU» #_ÈI4)P*T¨@p·È}¬2Ç 0p @À]@^@lrÈÈnÂù àq¬ÄeÐç rè31 UF9A:Ô@Ü'xËÈP¡PE+üPvA4xO($3 þ®`XÇ â,à8î dÅ ; Á¶bÃÔPÎb¬&-À¯Õ âàÁRÂîP ¼0 ³ØDJ£@H+@-è ¢@²X¦E9¢-rÃ|4pÐ ¡ y´Èyrec êxºÜÃj´7¾ñH^hÀ@¶<so}Ø+¥'r$@*aö© AÎ --- NEW FILE --- GIF89aP -K¦¨ À Ã.¬}Æî2KXü Ó§rå-P@ÁAc :(Dxàà +<!ë4z\é³(ÛYÞâÅ&98=`°@Á$H¨`A±j4ìMñeÑ¡:²×1Hî>e~þ°¡ !Â@ AéÓÎU» #_ÈI4)P*T¨@p·È}¬2Ç 0p @À]@^@lrÈÈnÂù àq¬ÄeÐç x4A¡ :p¥Øa#@Å(%z È!Wû.zÜrÅeàÑA@Ab- ú:<!DXÖHm¶á[#Ä¡L¸ò@ j 0ÀbdÁÃe,¡e{l¿Èþ·*+QÈP Ó.Æï --- NEW FILE --- GIF89aP t¼Ñ"J!R¬þØØaE©5xÄ Ä] [ºf%L¸v LÖ@7Ut¤@Nü lrJ,±2'RK;YPã\A0¤OÀ Ì nGîylé¹ º%º@ Q½6ØVÉ!Ín! àðSù#8èJL»wzj[ì§ê *²D 1Àî¶ó~´ß>'Ly»±Yl0 ôIvÀþ-P´ñÎÅÀ¤ dáq¨ó&1 JhâwÊ 0 --- NEW FILE --- GIF89aP ùµgÌ¥¦ JªB¤éVXÆ|tj/\¿B%º5³JÓºô8#ªD¿|ùİ(AÑÅ):tÔ«°äÙ¾`SüÃp =Nôè$(@þH¡Ö!B:þø+xð!>°téAÇ&pA [l óæÁB2;Ïâ +V8©búD þ@@W¹@¤2gÓþ¥¶à,X¬49B¤3÷0¡!ÃÕ¬ÞE·Ù%EWTÁ,01^|vGÞJÈÒñE|UHaI`EQ>xjqØU _$$FZ4a.@Qáb¤mÚÊ¡´L!¨WP±E< 9àÃ~ÐX^@ðÀÿ¡ôWt=*ô£K,1 VôÃn¡ÍØA¥ð p Â"9àéÜ&àkóþ/0À ô 4Q{Ê ¯[çg`ÀXLuok A%È ÃÙµ°¦Ï»«¨B£|xãK# ïÒ2CLËYI> Üð¨04QÐ[>/§:ú®ìËí§©Ëè,m8 LP¡{dB§&´½r«ú¾ ¨³¾ ¼Ì-¿àï» +ÔP¦ñj(/ñ0Ï/ÓÿûÞùÈç¿A=}í«KDਠ)®D%º3MÐjêÌp%¨mñ_ ä"×»ÀϲßÄ<¨P]ð|¾T¾ô¨\Ôê]8pP`bþ(ßË:¼0®|úàå VÑçAJ --- NEW FILE --- GIF89aP Ö¬Ñ\¹BË=®ÔÈ;F1zl¹áîB7ø¨qDI+iØHV& **R(Iá¡¡ÅL12eÊÀJR,!¡K:wðà¹SÇMÊL`TùQeIô8A¼ M5ñA=!"$hm7ÍøPñb è¬SDþ\°@^FÄéÄLA.aÔ(!>xjS&S¢/DaÓ:´`$HAtpBFÜáDI}ðqÇ·¥Q?pÀQ'Mq@Ð H¬II"TP0åQ"À¸Yê&!TD :L!F°È@tF:' $Ð n'@KÀìP@Qá0x cWª×½¡´ w÷R^×(5¾Ó.J,ÚÙß, v c"ÑÁúö78ÅÊTà¨A-hm"é@×W%¯Á0Ï»®T÷ C+FÎ6 Ä3sy: Ò9ÊV!ÄøúÆ<;jÃÈâ÷8´àMd*0,Òqìh×}Éìn"ø¢%¢ÉÙa$zÓ«^EiÈ za.rÉFF$²AJÉI].D½,È+Uy8-EaeBpÙ¾(8µ¤%ã0 --- NEW FILE --- GIF89aP 5ÐÈ»$Å%zôáîB"Tà #È$_ÚHöòåK#)PA1/X¨`ÁÂ@P! 5h¸pA£f ÊHZñq¤Hà .Áò#8bºãæÍ2\jSrF|`HÀ@$¨À< ±FbF}dF·}qÄ>l°Q'Y P @ ;LqHI,° À¸¹ )DÖÅ iW;y1:00ÀÎ)À¸ @Å´JÑÉü T )Å}È<¨ëòü --- NEW FILE --- GIF89aP 5ÐÈ»$Å%zôáîB"Tà #È$_ÚHöòåK#)PA1/X¨`ÁÂ@P! 5h¸pA£f ÊHZñq¤Hà .Áò#8bºãæÍ2\jSrF|`HÀ@$¨À< ±FbF}dF·}qÄ>l°Q'Y P @ ;LqHI,° À¸¹ rAJ0q§h¼yÀ¼ ,ЫbäÀ](¢~ñ _°Æqä!È 1`pé*1ZRËÀNYÀ ÔËÀt$- )DÖÅ iS;y1:00ÀÎ)À¸ IÆ HàMyd0àd|@èÆH/A$A$y´ ôq \!¿IP²LdB>ùÉtRÜäA:yJ --- NEW FILE --- GIF89aP 5ÐÈ»$Å%zôáîB"Tà #È$_ÚHöòåK#)PA1/X¨`ÁÂ@P! 5h¸pA£f ÊHZñq¤Hà .Áò#8bºãæÍ2\jSrF|`HÀ@$¨À< ±FbF}dF·}qÄ>l°Q'Y P @ ;LqHI,° À¸¹ rAJ0q§h¼yÀ¼ ,Ыvt<@G¼°Âl¤1Gy2HL äÀcQ )DÖÅ iS;y1:00ÀÎ)À¸ ÀÄ´ZÑÈbC ceñE.&ªº8?â² d £ $p@=KÀÏ'Ø 47ôÂC#ÿDÄARìb'£ÈÉPFÒp4e#GùÉR¢Rªt%ýZ)?Vdµe._éA[«Ô% \®$å.yÌYÞÒ§d¦1 --- NEW FILE --- GIF89aP 5ÐÈ»$Å%zôáîB"Tà #È$_ÚHöòåK#)PA1/X¨`ÁÂ@P! 5h¸pA£f ÊHZñq¤Hà .Áò#8bºãæÍ2\jSrF|`HÀ@$¨À< ±FbF}dF·}qÄ>l°Q'Y P @ ;LqHI,° À¸¹ rAJ0q§h¼yÀ¼ ,Ыvt¢úqÄ+|ÁFsÄ Ä! §êÃhI-<:e$Pï´4Æ5 Bd]ì¡0 D,A«bC ceñE(&ªº2?â² D £ $p@7K@Î'Ø@G<p°AZ8Ø*1«ÁÚ5 "@v --- NEW FILE --- GIF89aP 5ÐÈ»$Å%zôáîB"Tà #È$_ÚHöòåK#)PA1/X¨`ÁÂ@P! 5h¸pA£f ÊHZñq¤Hà .Áò#8bºãæÍ2\jSrF|`HÀ@$¨À< ±FbF}dF·}qÄ>l°Q'Y P @ ;LqHI,° À¸¹ rAJ0q§h¼yÀ¼ ,Ыvt¢úqÄ+|ÁFsÄ Ä! §êÃhI-<:e$Pï´4Æ5 Bd]ì¡0 D,A«bC ceñE(&ªº2?â² D £ $p@7K@Î'Ø@G<p°AZ8Ø*1«ÁÚ5 "@v ÌÌeäy@$ç([cÂÓÓsA<À --- NEW FILE --- GIF89aP 2Ä0±¢E "I²ä@ *XøÁKAj@²MBÌÀ±eL&Ì@B(]ªôè<pófQ $(uÀÕÁ*Jà¨Òª]Ëvm·hÛÊUû ¬]~èÝË·o¾VÀ <Ðxy×OB ètÇÁm(B&õÉ( WÔo_MP(« ¨VÀo=Àg¥ÂI®-dÁUäTçD¥RÕ¤è*tvNðÔ ¯½Ö@¸tÐ,Ù j D[A§}¸GÉ8#§m K EÁè"õ® EtAQ Í´)Z+§D5[O4R0Óþ 8ÔBÉ ¬RÁJI˨C¾ééÔÝYjjaêPBÁÆY)³vúÕ¾8q ,Õ¦¡@X hLÌìMy!0f1j2W OP 9ÐaÜP'àA½A¬5|à¥Dí&ö0! hP±:ìÁ \ A0@£B2Dà¯Í-&Ö --- NEW FILE --- GIF89aP 5nòÓTG !â]5l8¦jW]Åa~aÔÀzÁaEsde# ×¶¤VZ%`M¦ êøá]ÄA¸_ghÁIy.B4àtif?ùc5hBØãcqÂiáDRm¾iaHÅ)Vif"Æ PèRUéø©D h7 --- NEW FILE --- GIF89aP ©4`EÜf'¤ +í°Åk d°Ð Ä{éÆbzé --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤ào¹áVÜÀ@¨Ð3Dá=è£/ÅW|Á°·ß¡Çü¯9ÇkÁ=î X¸ t A+Øð 賡£ @Ò ôB Àj )¢èBOÞáH@ äY<#hF(1V$cÛF1ªpTaFÂHG9±mLçØÄ8q#äýhGC±Äc#3ÉG¤¼¤"YI6`ô¤&ÉÉP±§ÜâE9T%$MyÄYÊrl%-c˸¬È/mÙKÁÀ1uyKf®2Íæ.LW"$ --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤àoéæVXqE@¨Ð:Daè§/ÅW|Á°·ß¡Çü¯9ÇkÁ=îÇ X°phà ø6ÈAh F1 Ê×½î}/%´BtÚ¥ -`BA¨ºà¡_80bíPD|D!$p°5ar8¢D&:¢GD|@jhBÎ@FÀÃ8Æ2©bEÈ --- NEW FILE --- GIF89aP ©4`EÜf'¤ +í°Åk ÍóBÍV°×5£Ô³ÎýóJGQÛITµÓÍ}5K[S°QÞ --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤àoéæVXqE@¨Ð:Daè§/ÅW|Á°·ß¡Çü¯9ÇkÁ=îÇ X°phà ø6ÈAh ,Qà --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤àoéæVXqE@¨Ð:Daè§/ÅW|Á°·ß¡Çü¯9ÇkÁ=îÇ X°phà ø6ÈAh F1 Ê×½î}/%´Bt¶¤LxÈ5ÀA| --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤àoéæVXqE@¨Ð:Daè§/ÅW|Á°·ß¡Çü¯9ÇkÁ=îÇ X°ph 3 Q@ 6ÈAh@Ip/Ä --- NEW FILE --- GIF89aP " 2Ø`/à@ÄWtƶñsÀ±(~øªn¤àáÆz± Mñ[3İB¥VäÀ;qGÑCN`áEeêjÇyäqHºîÅÔaîh|¡;vVÄ;À0%E&1WX!ÅWxÆr0ÚG ¾â|ñÎð!qn¤¡TXQaAxP?p1FðA`|ËFx¤ËóÖóahÀKÆcáE)TÄoÌAtä GWï)×x¯ËþpÄësÈa.%Td¬{äÁkÞûÚ®b¹å|°AE.`lùSÎÇé§7ÞÇÝÈë°ò}Ô1Gwä.GiW4 @!DQd!&Ôh$dÑÆ®®óü:ãs9¤àoéæVXqE@¨Ð:Daè§/ÅW|Á°·ß¡Çü¯9ÇkÁ=îÇ X°phà ø6ÈAh F1 Ê×½î}/%´BtÚ !Ô --- NEW FILE --- GIF89aP ©W¨s4Z¸0±³gv*M¼PAcÈ,[Ü}¨·H#HâH#¨ÇÇhHÖ 1TwAxeTP|QoèñÇ 4BI%(¦X %Ò[2u_^å0Å¡!ê2I%|" )HÊ&LHil¡IÜ Â°A=8ÅWhácòHä)«´yJ)¤¢ %È_<± \8M°6gØ!4&R+´Ô"餰BÊ&ðÇglá `çE`ACT1²Èþ¤)Nj«¤®I/Å=@1Ià~.àÁO}RÈ«" §Ôzë®|²""z¬? aÄ70±ÅwH#PJ©l믦\*I sعU!`.$Q [lÅYa!¸ *ÿvl«,® "ôÇ(³1uðDlÄQðk¬1TâI)²xìó¤Ý>H"$BÈxà o 74Ñ%òê'´þl5-¢ Ȩ&\WÒÒ0i¡¨&x £H2É'¥hkµÏb njbL QJþ|¯)¢°ÝóÛVÿh £B ¤o§rJ*}£ò&'4¶$¼A¬I% 5ÔÁÓ.H!â& ²+°È",¯¸ÂÊ*§È¹ÈDÉ#0RH§Äõ%LvAGAI/ÖëPì$â$d¢¾ú(FÒ"~´uìÁÇpaE+¼ô@@ |al@ õÛCúà6p÷«ü7$ ¹èß}ðHÁ`( ¸K  Àw%DÂÙ3H GH P ôp H.º¸0 :E mÂd° --- NEW FILE --- GIF89a( --- NEW FILE --- GIF89aP %@¨QÂDU P:©*',qÀq×ÏüþZÔ %4Dñà±ç®¯P>º6ĪªAàñÚÐ^ÿ ÕhÒDdνµgÑ ¼«ÜÊY7àÎm¢s×ÐÓþ&E=xÛ¸'üÌ"ô®Å²%lº:¶VX®YhZÀ´ÕlFýçløÙ $ày¡¹v]_Å\·-ØZà \I=çW` ás® wQÔ l¨!¾AFÁ!%Àlj=XáZñÝ(¡j)x`@ÞwãQõ ªµçàvEa©TVû1g4vù×7.°ÖWê1×AéeEfQK²'B @`lV¶Trü-¨ißMwgèMYÔ&ʹ %P --- NEW FILE --- GIF89aP $paÄ 4x¨\ ÃÅ >É4~QÉC0QRdÒ\:ÀMEéÃF«XmìbdIH29!Å#IäÑ âfè8,Bñ!\pñcI,Jth @Ç 8@¡Ã8(á±bàNiA²ãE Xͺõj,ÇðÁD! *¸6Ð@FÜÎíðBo"5PP(ÐzÖ>þ÷Á5*rDwáºÂ .`GÑøjÄkø. Ø¬Ö ;,An?°B@°ÁbZ(&¸ÞwtÃ?0"¹ X6Á IÔ w3^8ª (_Y ¦ÿñ@ ;dª uð`Dg¯µ¸Z&¯¬µ»§¶ Kô¸`ÀCÄA H6ñèÏ9jÓ @½IF D4Æ1L2Ä ©$*6¨ÁUl GøLFP$&pp%0! ÀLÂò¸` --- NEW FILE --- GIF89aP ~Û+¦wñB)©ÖÀ/Hì6îÒÄnØû +eo9H}aí· Ø\93¨¥Lz²hÒ;¤^-ÁµB ±LøÛ¡6iÈnOSÆ0®¾êå«Ö8É×K»=ø`Ýþ´~Q&¿¤³¯ Xùm¶³Òlçâë/¨>²äµ»}! öþÀ`@ --- NEW FILE --- GIF89aP CÒLQÓnÂ9øî¥dï[@hHj¸àÄÙêÝÛcÍ!EÞ²¬< âXAgfAsD I8pCñÖ;TóLól D+3Ø\u vÐ`±µD ½=¬²î©t &0"ÂhHA¬ Dw=ÙEb¸QÇ 8ÒI¶ü"J'PBÉ$,2H¡¢!hªaÕ²RÜÑÇÂH&ÒïÇÙòÉ%² 6zYY5MYØ*I$xâµ'`ûó¶3$4¢*gjÑMbMB8áþ}BH! ,l0Â0 Aø d?7hfð}^Xð>¤1á ßW@"¤ shCÖP &4Ô{Hb "Ô!Ãå q½ûáH¿!"+DH@ --- NEW FILE --- GIF89aP CÒLQÓnÂ9øî¥dï[@hHj¸àÄÙêÝÛcÍ!EÞ²¬< âXAgfAsD I8pCñÖ;TóLól D+3Ø\u vÐ`±µD ½=¬²î©t &0"ÂhHA¬ Dw=ÙEb¸QÇ 8ÒI¶ü"J'PBÉ$,2H¡¢!hªaÕ²RÜÑÇÂH&ÒïÇÙòÉ%² 6zYY5MYØ*I$xâµ'`ûó¶3$4¢*gjÑMbMB8áµ}BH! ,l0Â0 --- NEW FILE --- GIF89aP CÒLQÓnÂ9øî¥dï[@hHj¸àÄÙêÝÛcÍ!EÞ²¬< âXAgfAsD I8pCñÖ;TóLól D+3Ø\u vÐ`±µD ½=¬²î©t &0"ÂhHA¬ Dw=ÙEb¸QÇ 8ÒI¶ü"J'PBÉ$,2H¡¢!hªaÕ²RÜÑÇÂH&ÒïÇÙòÉ%² 6zYY5MYØ*I$xâµ'`ûó¶3$4¢*gjÑMbMB8áÏ}BH! ,l0Â0 ȼJÐ! @ --- NEW FILE --- GIF89aP CÒLQÓnÂ9øî¥dï[@hHj¸àÄÙêÝÛcÍ!EÞ²¬< âXAgfAsD I8pCñÖ;TóLól D+3Ø\u vÐ`±µD ½=¬²î©t &0"ÂhHA¬ Dw=ÙEb¸QÇ 8ÒI¶ü"J'PBÉ$,2H¡¢!hªaÕ²RÜÑÇÂH&ÒïÇÙòÉ%² 6zYY5MYØ*I$xâµ'`ûó¶3$4¢*gjÑMbMB8á}BH! ,l0Â0 --- NEW FILE --- GIF89aP #-¶ÜiPd2+\ØPa¡jÊÌ 'O~ݰaÅ.°ª¸JUC W:õ5ÃÔXw¨Ý¡cÚ¬NÜШsìDR'TMÛ¶/[ ~]øñ"G»E½êÂo[À:RHfËÃÇ"3pd6|1CR/ðý¯äÓ*|)RÄÈ7 Þ4Âs²B?¸PÛöôi¶¾Y¬nmÄHæ @à ¨Ðàh¡õÃD@ t¸\ÜTzÍuDl'ÈC ´ `Üx࣠J?QpBɬͮ\´Ê`Dà Ê}ûïObg*y®º²£<àsÎ8ÓÙ^çÚ@D6Ñuù%=úW^¡ÌxS+P5k8þ@ 0İ5CüФþJ`wä³÷§ÒL3«òMH°@ r7÷>@þB/ÁBåBÀA#ôÍ`y6¹>Ú ÂU.øA=øÀ:ë<Äî*¨àí<ôPlk,]õ>0ò 'À°|;ðàÖ@\W{ n¹pTÐ-Ö ¾. 5pü|: òi¾DÜ0ÒÃL! D`Ï=E#Ð2lÜ|/ma^x 0iè_8ðïÈG5ý®"ÉDF<8Ø6´¥Æ}ÉäDàL c°äGþ"Ã`h¦tà=> pJh3uk Aüz§¾/ xðè;:ÚHè()§G!ÊñB\ 7pì>p%Ã! Kü²¼¤*÷eEÙcØ\©Gk¢ Z.q)Ül H2¡ V<FXé±äÐrDE¨ÿ$çKVü# ©?ÎÇ\N19q*9°âóRù)m<j°ð%¥)6c¸\òÑ ÀE --- NEW FILE --- GIF89aP QAp¨%G|ÇQÕ405Ñt¦KaCª@¦-y8ßÍ|<á)D YÛA4÷%P ©BC»Y¤6Ô ¹ á#õ,.!xD!µ>2/!D#Íè --- NEW FILE --- GIF89aP fÓÃÂ11pXÁd'R«HyzTGN(/úL@D°g/OVó6&1søÒ%X°\©*EZdHÍ JáPÀ gúça<ÆhXdÀ6,v³à/³M6Üp#ÍÕFb u¬ÄQäàTTäÐCe@Chxà*¦ôrL2ÉSÍ6ÝxÓ 6Ê31À ?l´A<RÉ8"HP ` % P¥/d OXÂzÀ¶$-!"&T£¬<Ç l)Âà Rö4Ûþ¬g'£¿þu£h,ÝTLPµÙ$v1=ÔYô¢Òðl4p`#ÐÍÆ5¢Ab cd65²Mß/þÄC&6AÞM BÄXF4¦aiXTà .xAß\Bb N`¼Dð×k¨e#pa`o?±r[PWk¿øA0WE Kåm ½»Ôv8¶ð`¡Ô*®Ö¡ÏZËZÛÍHwGcÉ ´Z' °Sü!ãy8¶òµhæßø&:ä ñÊDtl Á{-$Ú"%-Hd ^}âÍ»ôEçÜ --- NEW FILE --- GIF89aP fÓÃÂ11pXÁd'R«HyzTGN(/úL@D°g/OVó6&1søÒ%X°\©*EZdHÍ JáPÀ gúça<ÆhXdÀ6,v³à/³M6Üp#ÍÕFb u¬ÄQäàTTäÐCe@Chxà*¦ôrL2ÉSÍ6ÝxÓ 6Ê31À ?l´A<RÉ8"HP ` % .(Î7Ùhs4Ë &hÒH^ܱZjÕ ÕA p~i ÈêÖá _¸@(^Ä}q1bâ, DðÅz 0 (øìF8"þ`"ò`(ìH0®Ñ PS è ud,#ºb6ÂÁ¶cÍ@1vUP{Æ$H'´¹Íll#£5e,jÑm¢ å1%±×!.º7º qÙk6® bà (â!ë&P¡b,#Ó°Æ4r©aÐB¼l.B!1P Ùj7°¾¨v±U>í>8Øö' Úiív·ù¤C+Æ2´×k-T![Üä¾`ßB{ --- NEW FILE --- GIF89aP fÓÃÂ11pXÁd'R«HyzTGN(/úL@D°g/OVó6&1søÒ%X°\©*EZdHÍ JáPÀ gúça<ÆhXdÀ6,v³à/³M6Üp#ÍÕFb u¬ÄQäàTTäÐCe@Chxà*¦ôrL2ÉSÍ6ÝxÓ 6Ê31À ?l´A<RÉ8"HP ` % ´ <[2¬UÄ8ÓÍË0ÂÌÍ3ÁsÌ1¾rÆR¡uì|òÕáï¾âM8ßtYuÕã#N7ÙxÙþ6| =ýqDð#+R2Fltò0Ë4ÓÞ2Ú¼m·Ö SÌÖÄü2*¥ÒäN¤¥ L 2 t¾LgÄF Àê.½#Ì0ÁÀúÊ!ÿÇY)oOÄ´@v¾úÖ{Qìûº0¬ ôavª¦?ÃPM 8`@Pð8ØpD$ÁDäÁ. ¨ ]cÑ5¦Neºà« ls 1 öRßFÜ*½f"ÄÈÄ-ÔâæøZOp8ÉPĽ)SÈTØÀ@püà'º0pÁ³lÌ$í>Üz7ð¬Rq³ª!ñ¥^óàY-`nsÍÛ^íªWmÍü/¾ª[Þ"¾¬t®yaµÞÌê6Z 0G®û×K¿(et5BBº¾Rí, E«f¶dQE --- NEW FILE --- GIF89aP fÓÃÂ11pXÁd'R«HyzTGN(/úL@D°g/OVó6&1søÒ%X°\©*EZdHÍ JáPÀ gúça<ÆhXdÀ6,v³à/³M6Üp#ÍÕFb u¬ÄQäàTTäÐCe@Chxà*¦ôrL2ÉSÍ6ÝxÓ 6Ê31À ?l´A<RÉ8"HP ` % `ðh¨ ¬'D1QxÂÐ8ø!l)Âà AäÁo¨ÂH²Äu`Gq X´b¾(3¢ÁFh4Dzy"äà. d n%":@³ B±è1ág8c×ðμѺ٠èp&a¤E*D`ÝÈe8îµlLÃÃÈ ,:Ø<4ÀHÆ2q+f`#Q¦8¶ÑdWh`'ÈllÑrËm¢ØÅâÐÆÆ6JÃà\Ð8ÀlØ3×P1a --- NEW FILE --- GIF89aP fÓÃÂ11pXÁd'R«HyzTGN(/úL@D°g/OVó6&1søÒ%X°\©*EZdHÍ JáPÀ gúça<ÆhXdÀ6,v³à/³M6Üp#ÍÕFb u¬ÄQäàTTäÐCe@Chxà*¦ôrL2ÉSÍ6ÝxÓ 6Ê31À ?l´A<RÉ8"HP ` % Áßɤ --- NEW FILE --- GIF89aP -y¡ \ú\Z2E"µpS§Õv&@à ׯ`Ãzu¡ìÖ³]Å¥pµí8~0K·®Ý»xèÝËomsâ& +^̸±ãÇl|Ï4SÄ<Ñ 3ãÎ º´éÓ¦ÿRNhY°x !Û D `;ñ!Wð Wó¶s(?6l\úÂu½Þì $5þ(?8óó° ,0!xмh£ Óik° Ñ ë)þJÄFh áè° F¸N Õu DmóEÀ#p_qðÙ7 Øä@,IÕq²-FH #H@ f --- NEW FILE --- GIF89aP *ÇÙó d>Äö )hA XA(l¨Á )$xqsU'[gÝmdÑf+B øâÌã}>W]l9Ø Eù ÙE/Àè <|à*´ðA.À:jæÛÕ ÜFÚÁßr¹0Üá)©Â .̵bu®åxeq×ÝK!aI$$êßuo®¹Ân®¥Ûuw,° :Ø AÍ3à@Ë)Ðm¯¾@êÅ7óËë¶(xÐ5 Ø>ýtI*A 9\ ëÀS,߰§ Ä&ùè àÂMÖÞ+*ÜÞÀÀÔùíÂBx¢;îmë jvÄ?Ϋ®õC²YÇ·ùí.ÒHÛ¼:Õ¿º¾N+ñê¼ @÷Á²$Û¤=À&^ dÿTýµ»Æ¬³ ¤¯vVA«aÓØýlé-tbT"ÿæ ÐÕ¶·0³AqÛ'5¦ òò ¼4ÀäJè/Ö2äµJÂPÖG'¬¨F7ÊQ --- NEW FILE --- GIF89aP TfQ-:`¸ »¹úº6lßÝ4w<ÑáØ@PÁ!°TPJ¡§UW4Å@ÒT gñÐ[m"È`©aþe¶Ü®½F!|°<`£ `ålúb¹ÐUÄ5&°h°]t\P Á ü£zÜÀt04D' Âåí`ðZ·Æ÷e~ç^xpT l3â rÐ5"¡Ûíþ¢l ÒeÉ0 <`An¨¶$14!Ä0 --- NEW FILE --- GIF89aP CÒLQÓ.-j¬X1°A¾{i 'K~ TcÄÑ$¢ %r }¸?̫ѤEÓ$UÑF}(*ØI'D"Hl´Q ´`¤°J.)ÈU×Èýðà !hdG$éYâ¢"J,RÄdL&@*¨P5ÔÀC -H k·Å7"« i`ÐAà«DÿÓc ý;L°òJù ·¯ØEIv`Ñ#Ð>ð¡·ZÐøÐ# B¦õg>yzRÒ®",]ië7¿ ÖT¢JÅi2wº --- NEW FILE --- GIF89aP CÒLQÓ.-j¬X1°A¾{i 'K~ TcÄÑ$¢ %r }¸?̫ѤEÓ$UÑF}(*ØI'D"Hl´Q ´`¤°J.)ÈU×Èýðà !hdG$éYâ¢"J,RÄdL&@*¨P5ÔÀC -H ÉF+FmµÝzU Ñ w*èµHU0¡Dñj`n1±DZ|AqDü\_ÄaÇ \"Ê(?Ùv47E4¨1EB?êÂUTmÜ\vèI'xeÇPbÉ[Ä«A°°.[ ßÏ;ëÕÍAxÈ"LF²"48ç!v¤!ceªÀl=qÄ1Æm8ïÖÌ9§þ!ðÜiÈmà¬Í¥qÄ\!ZG_r2jÒa±.ÄqÜÕHB%T«^íh ¤U¨ Ö,4çZ¼ñ;0çf}ðXdYBøÀ>ÍáC`lÀ --- NEW FILE --- GIF89aP CÒLQÓ.-j¬X1°A¾{i 'K~ TcÄÑ$¢ %r }¸?̫ѤEÓ$UÑF}(*ØI'D"Hl´Q ´`¤°J.)ÈU×Èýðà !hdG$éYâ¢"J,RÄdL&@*¨P5ÔÀC -H ô %ðiL`n^®pì³bÔVÛG0Q}r§PËÈ!ÄQJ$IÑ· d &gL,Q _ÐÆF?ÆqØ1È"2ÇOvâ¢Í¡Ñ"Z --- NEW FILE --- GIF89aP CÒLQÓ.-j¬X1°A¾{i 'K~ TcÄÑ$¢ %r }¸?̫ѤEÓ$UÑF}(*ØI'D"Hl´Q ´`¤°J.)ÈU×Èýðà !hdG$éYâ¢"J,RÄdL&@*¨P5ÔÀC -H Æ:+FmµÝzU Ñ w*èÉ´HU0¡D d&gL,Q _ÐÆF?ÆqØ1È"2ÅOvâ¢ÍÑÑ lÀÖG¬ðcØïJÍÈs"q ÚÎÚ\þGôȨIŹÇqµM/"I´T"z}¤; ñÛÒOHQÄh0 õ¬nC³£Ò '-Þ˰XT$&!ÁÄgL1èpwÉèP^|É"@Xë-¡-IKx!Ú ç}ãvZ¢)F2-"Èüð¸ÒËÁ|RG Î8§Oú->³2·ÅHX»!.I')¾CÑÅ··aï#iÃéVÄ ]¢b ¢ú,&Á --- NEW FILE --- GIF89aP CÒLQÓ.-j¬X1°A¾{i 'K~ TcÄÑ$¢ %r }¸?̫ѤEÓ$UÑF}(*ØI'D"Hl´Q ´`¤°J.)ÈU×Èýðà !hdG$éYâ¢"J,RÄdL&@*¨P5ÔÀC -H Æ:+FmµÝzU Ñ w*èÉ´HU0¡D d&gL,Q _ÐÆF?ÆqØ1È"2ÅOvâ¢ÍÑÑ lÀÖG¬ðcØïJÍÈs"q ÚÎÚ\þGôȨIŹÇqµM/"I´T"z}¤; ñÛÒOHQÄh0 õ¬nC³£Ò '-Þ˰XT$&!ÁÄgL1èpwÉèP^|É"@Xë-¡-IKx!Ú ç}ãvZ¢)F2-"Èüð¸ÒËÁ|RG Î8§Oú->³2·ÅHX»!.I')¾CÑÅ··aï#iÃéVÄ ]¢b ¢ú,&Á qȾ`wuêo{ AõálEÒÓb$ª E¬' ÏA¾ÖCâ5°\£ªP4X1 XhÓÃC.Òw`EáÀ$X8DÂ>\¢!KhøÐ:Âf|hà --- NEW FILE --- GIF89aP A 8Pz³êMGBxÀB ? %¸OD¨]˶m[pã¦uKw ±BÙÌQ£Î L¸°áà %àYèß'kÖ|@@¹²åËhÞ̹³gÏ{,GÍ-/RYù3 Z¿¦ü¹öçD#³uêß9U@ÊõA§Ò¾V > \À¯-Ð À|°<#Å¢µ$©ä³þÀJ` --- NEW FILE --- GIF89a( --- NEW FILE --- GIF89a( --- NEW FILE --- GIF89a( 'UðÀQãÅ RÐhâ&Ê ªÀ±wHTªJQìE²ÃoW¥fÎ¥qóÀÒ¦U|ku²@8&å`Z È©IÓ¶òò --- NEW FILE --- GIF89a( Ã* FwJjÀ+ŰHF0KcTcS4»!ëÖ)Ø¢×&Ûv2`+°¨X L c8z·*aPÇèJO)8#Á˱k7Ó 5%Ñ4ê¦UúL©~EN;5¢R£¾Ö1êi)£¶,@³m >.AÀéã44Èý¶c<>wÎßÃã --- NEW FILE --- GIF89a( `lÈ5AW1«êÀÚT© ý2 --- NEW FILE --- GIF89a( IX\ --- NEW FILE --- GIF89a( --- NEW FILE --- GIF89a( aód:oôtÉÁÇÊC]6訾aô"&Lx@j{lÐ5kQ{¤#ódµnMkgÄÞÊͪ/lþ|$Å·}õ&á] --- NEW FILE --- GIF89a( L:ô # M@våÑÄRåJÓåj¹råyX¦dN0RÂݵ\<åó¯Ü¦ ¬rÄiqÓ¦ZаHCÁ]¼ÍZDà2àÇ8´(Õ3×Ð+ÎZ|¡õò5m½¬©À´wc#mw©Ûí. \ _ --- NEW FILE --- GIF89a( <³jÕ+ò¼Ù'P¡/2 AtkÈnΣki¨ pM:¾ýºöêc¤^IçhidÅS¯6 t#«¸¸.Ðuîàà O¾¼ù --- NEW FILE --- GIF89a( ÌCcÅxØÂq @¸ò°6kΩ<° --- NEW FILE --- GIF89a( ×$Q»Úê3ÈQÃ]æ¤8-ÜQsèüÖ.>·F@CÎ!bWf ùäYÀF@Ë{-Ëh¤8FÏ,fV --- NEW FILE --- GIF89a( ±À |Q¶fbOuöØK«¢5ufÙh#Àª³¬ÙÀ6 b0\ó«8KæéxR©F --- NEW FILE --- GIF89a( !MtÞQ --- NEW FILE --- GIF89a( 2HF4Y#¥ --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a =iäOªWâ`cE§\½! --- NEW FILE --- GIF89a( Created with Animagic GIF V 1.22a by Right to Left Software Inc. To suppress this message in the registered version uncheck "Options | Animagic comment frame" ×$Q»Úê³ÆQÃ]æl8-ÜQsrèüÖ®>·Fl BNbWV ùäYÀ:4Ë{-Ëhh# Ï%fJ ܰjmQ¶¦!bOíöØK«¢eufYh @ª³¬ÙÀ2 1\óë8æéR©8ð# P@&v,(YÃzÃÉvrãÍn®;ùìæA ÄÙñ×£+ýæ À®ãOW>yâB µ7XFU¬À&ÁZè!0ôí6»]«»åJi¾½û¬ cÍ"tÞ0aÀO1UÒØÀ§^¨´1¢Ñ<¨4yõçb<²ôÙÔ«ivÅz ¥"ÀÇ0º<±áÌÌ¡`ÁâØqÀÀ55ÊøI3,ѰPsX-k Ö QÝN©ãDz*Ð8BêÞ· laóä6:eôt¦ÆJC]Zé¨qs¾Ä`ôâ$è!@*¥LÐ5ëQ{¤x§Á³dµnMkgD ÞÊͪ¯lþ|8E·}õ&>ð£] ¾Z]:4ãÊ;Fªª½:ÔãJ%ý*V$ÉR¨ýÊ&7XèµÚWâjöµøW°b{V>hep½b}úùÞÅyPj-}CJ ¤Lɲ¨®ÛÙéÚ}<#y<Ûã°pÐt`¿1 ÏòçУKNa@ °&eµÀNÐdéûßn©Ì(^Ø®Ñâþ¥ ýò*_¡{zR:àzgý#ïøHrÇÏâó/ L©~EN;õ¢R£ÎÖ1ji)£¶C³m È>nÇéã7<äÈ ¶¥>°wÎßÃã LVâ6]Þt S¢((ÊT(Óy@ԩЫMxYxÔ¡Y pJ¡A9p¤ÍAf-¶oÓ»VBÃ)H° ¯ß¿ IX^Ü×.E¼KÐðeì7@7$f¦ã>z &2sÅAübê×°cËM»¶íÛ¸së =@våÑÄRåJÓe2j¹råy²X¦dB0òÁݵ\ <åó¯Ü¦¬rÄiqÓ¦hL±8Á]¼ÍZã2àÇÖ´(Õ3×ÐwÎZ¬¡õ²¥55m½Ì©À´wc#¥wiÛí. \ _ ¤IcE jxøAU vïÈ*uéÌp7Ø:Læ§~³ç4VÇ%¹0ÞryúÌVtÚ5->º/à!N)!"$F A¬Ñª]+4æÞ ±À &¼@·ÌܰA½@<ÔÝ˯1 --- NEW FILE --- GIF89a( à \ͺµë×°cËM»¶m |
From: Martin G. <gim...@us...> - 2002-03-10 20:16:52
|
Update of /cvsroot/phpweather/phpweather-1.x/icons In directory usw-pr-cvs1:/tmp/cvs-serv14706a/icons Log Message: Directory /cvsroot/phpweather/phpweather-1.x/icons added to the repository |
From: Martin G. <gim...@us...> - 2002-03-07 09:49:14
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv13248 Log Message: Initial import into CVS Status: Vendor Tag: gimpster Release Tags: start N phpweather-1.x/COPYING N phpweather-1.x/locale_it.inc N phpweather-1.x/wap.php N phpweather-1.x/locale_en.inc N phpweather-1.x/locale_hu.inc N phpweather-1.x/locale_da.inc N phpweather-1.x/locale_po_br.inc N phpweather-1.x/locale_es.inc N phpweather-1.x/AUTHORS N phpweather-1.x/locale_cz.inc N phpweather-1.x/locale_de.inc N phpweather-1.x/phpweather.inc N phpweather-1.x/locale_nl.inc N phpweather-1.x/cache.xml N phpweather-1.x/locale_no.inc N phpweather-1.x/ChangeLog N phpweather-1.x/demo.php N phpweather-1.x/INSTALL N phpweather-1.x/locale_fr.inc N phpweather-1.x/README N phpweather-1.x/locale_mt.inc No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Martin G. <gim...@us...> - 2002-03-07 09:42:44
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv11313 Modified Files: db_layer.php Log Message: Updated for new db-names. Index: db_layer.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db_layer.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- db_layer.php 8 Jul 2001 19:25:36 -0000 1.10 +++ db_layer.php 7 Mar 2002 09:42:41 -0000 1.11 @@ -7,10 +7,10 @@ } require(PHPWEATHER_BASE_DIR . '/base_object.php'); -require(PHPWEATHER_BASE_DIR . '/db/db_null.php'); -require(PHPWEATHER_BASE_DIR . '/db/db_dba.php'); -require(PHPWEATHER_BASE_DIR . '/db/db_mysql.php'); -require(PHPWEATHER_BASE_DIR . '/db/db_pgsql.php'); +require(PHPWEATHER_BASE_DIR . '/db/pw_db_null.php'); +require(PHPWEATHER_BASE_DIR . '/db/pw_db_dba.php'); +require(PHPWEATHER_BASE_DIR . '/db/pw_db_mysql.php'); +require(PHPWEATHER_BASE_DIR . '/db/pw_db_pgsql.php'); /** * This class is used to maintain the database-object. @@ -54,25 +54,24 @@ * @param $type string The database-type, like 'null', 'mysql' and so on. */ function set_db_type($type) { + $this->properties['db_type'] = $type; switch ($type) { case 'null': - $this->db = new db_null($this->properties); - $this->properties['db_type'] = $type; + $this->db = new pw_db_null($this->properties); break; case 'mysql': - $this->db = new db_mysql($this->properties); - $this->properties['db_type'] = $type; + $this->db = new pw_db_mysql($this->properties); break; case 'pgsql': - $this->db = new db_pgsql($this->properties); - $this->properties['db_type'] = $type; + $this->db = new pw_db_pgsql($this->properties); break; case 'dba': - $this->db = new db_dba($this->properties); - $this->properties['db_type'] = $type; + $this->db = new pw_db_dba($this->properties); break; default: - $this->error('db_type not recognized: <code>' . $this->properties['db_type'] . '</code>, using <code>null</code>.'); + $this->error('db_type not recognized: <code>' . + $this->properties['db_type'] . + '</code>, using <code>null</code>.'); $this->set_db_type('null'); break; } |
From: Martin G. <gim...@us...> - 2002-03-07 09:40:41
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv10774 Added Files: pw_db_common.php pw_db_dba.php pw_db_mysql.php pw_db_null.php pw_db_pgsql.php Removed Files: db_common.php db_dba.php db_mysql.php db_null.php db_pgsql.php Log Message: Applied patch from Carsten Klapp <car...@ma...> - thanks a lot. I also did some reformatting on some of the comments. --- NEW FILE --- <?php /* This code makes sure that the file is only included once. */ if (defined('PW_DB_COMMON')) { return; } else { define('PW_DB_COMMON', true); } require(PHPWEATHER_BASE_DIR . '/base_object.php'); /** * Common class for all the database-types. * * It contains some properties most database-types need, like * $is_connected, $link_id and $result_id. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_db_common.php,v 1.1 2002/03/07 09:40:38 gimpster Exp $ */ class pw_db_common extends base_object { /** * Maintains the status of the database-connection. * * @var boolean * @access public */ var $is_connected; /** * contains the link_id used when querying. * * @var integer * @access private */ var $link_id; /** * contains the result_id used when fetching rows from a result-set. * * @var integer * @access private */ var $result_id; /** * Initializes the database-object. * * $is_connected, $link_id and $result_id is set to false, to * indicate that we're not connected. * * @param array the initial properties of the object * @see $is_connected, $link_id, $result_id */ function pw_db_common($input) { /* We start by calling the parent constructor. */ $this->base_object($input); /* We're not connected at first, so we set these variables to indicate that. */ $this->is_connected = false; $this->link_id = false; $this->result_id = false; } } ?> --- NEW FILE --- <?php /* This code makes sure that the file is only included once. */ if (defined('PW_DB_DBA')) { return; } else { define('PW_DB_DBA', true); } require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'dba' database-type. This type of database is a * wrapper itself, so you have to pass a handler to it as the index * 'db_handler', when you create it. * * It implements all the methods necessary to insert, update and * retrive METARs using a Berkeley DB style database. This is a * file-based database, so you have to make sure that you have write * access to the directory where you place the database. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_db_dba.php,v 1.1 2002/03/07 09:40:38 gimpster Exp $ */ class pw_db_dba extends pw_db_common { /** * A link ID to the stations database. * * We have to maintain a different link ID for each database used. * * @var integer * @access private */ var $link_stations_id; /** * A link ID to the countries database. * * We have to maintain a different link ID for each database used. * * @var integer * @access private */ var $link_countries_id; /** * Constructor. * * It just calls the parent constructor. * * @param array the initial properties of the object */ function pw_db_dba($input) { /* We just call the parent constructor. */ $this->pw_db_common($input); } /** * Gets the type of the database. * * @return string The type of the database, 'dba' in this case. * @access public */ function get_type() { return 'dba'; } /** * Establishes a connection to the database. It is assumed, that the * database is already created. * * If there has already been made a connection to the database, this * function just returns true, and nothing will be changed. This * means that it is safe to call this instead of testing * $is_connected. * * If $properties['db_pconnect'] is true, then a persistent * connection will be established. $db_hostname is used as the path * for the database. * * @return boolean Returns true, if a connection were established, * false otherwise. * * @access public * * @see disconnect(), $is_connected */ function connect() { if ($this->is_connected) { return true; } if (!$this->properties['db_pconnect']) { $this->is_connected = $this->link_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_metars'], 'w', $this->properties['db_handler']); $this->link_stations_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_stations'], 'r', $this->properties['db_handler']); $this->link_countries_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_countries'], 'r', $this->properties['db_handler']); } else { $this->is_connected = $this->link_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_metars'], 'w', $this->properties['db_handler']); $this->link_stations_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_stations'], 'r', $this->properties['db_handler']); $this->link_countries_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_countries'], 'r', $this->properties['db_handler']); } return $this->is_connected; } /** * Disconnects from the database. * * If we're already disconnected from the database, this function * will just return true. * * @return boolean Since dba_close() doesn't return any value, this * function always returns true. * @access public * @see connect(), $is_connected */ function disconnect() { if ($this->is_connected) { dba_close($this->link_id); $this->is_connected = false; } return true; } /** * Inserts a METAR into the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see update_metar() */ function insert_metar($station, $metar, $timestamp) { dba_insert($station, $metar . ':' . $timestamp, $this->link_id); } /** * Updates an existing METAR in the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see insert_metar() */ function update_metar($station, $metar, $timestamp) { dba_replace($station, $metar . ':' . $timestamp, $this->link_id); } /** * Gets a METAR form the database. * * @param string The ICAO of the station. * @return array The raw METAR and UNIX timestamp as an array, in * that order. * @access public */ function get_metar($station) { if (dba_exists($station, $this->link_id)) { $row = dba_fetch($station, $this->link_id); $this->debug("Returning this row from the DBA database:<br><code>$row</code>"); return explode(':', $row); } else { return false; } } /** * Translates an ICAO into a station name * * The boring ICAO (e.g. EKYT) is translated into something like * 'Aalborg, Denmark'. * * @param string The ICAO one want's to translate. * @return string The full name of the station, including country. * @access public */ function lookup_icao($icao) { if (dba_exists($icao, $this->link_stations_id)) { list($name, $country) = explode(':', dba_fetch($icao, $this->link_stations_id)); return "$name, $country"; } else { return $icao; } } /** * Creates the necessary files. * * @return bool Returns true is the files were created, false * otherwise. * @access private */ function create_tables() { /* The following code is taken from connect(). The difference is, that all the databases are created and truncated by this code. */ if (!$this->properties['db_pconnect']) { $this->is_connected = $this->link_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_metars'], 'n', $this->properties['db_handler']); $this->link_stations_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_stations'], 'n', $this->properties['db_handler']); $this->link_countries_id = dba_open(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_countries'], 'n', $this->properties['db_handler']); } else { $this->is_connected = $this->link_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_metars'], 'n', $this->properties['db_handler']); $this->link_stations_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_stations'], 'n', $this->properties['db_handler']); $this->link_countries_id = dba_popen(PHPWEATHER_BASE_DIR . '/db/files/' . $this->properties['db_countries'], 'n', $this->properties['db_handler']); } return $this->is_connected; } /** * Inserts the stations into the database. * * It is assumed that create_tables() has been called previously * (and that it returned true). * * @param array This three-dimensional array starts with a list of * contry-codes. For each country-code the ICAOs and corresponding * locations in that particular country are listed as key => value * pairs. * @param array An associative array with country-codes as the keys * and the names of the countries as the values. * @return bool * @access private */ function insert_stations($data, $countries) { while(list($cc, $country) = each($countries)) { while(list($icao, $location) = each($data[$cc])) { /* We insert all the stations in a given country into the database. */ dba_insert($icao, "$location:$country", $this->link_stations_id); $icaos[] = $icao; /* We collect the ICAOs for later. */ } /* Now that we've collected all the ICAOs in the country, lets insert the country with it's data into the database. The name of the country is seperated from the list of ICAOs by a single semi-colon (;). The ICAOs are seperated by a normal colon (:). */ dba_insert($cc, $country . ';' . implode(':', $icaos), $this->link_countries_id); unset($icaos); /* We can now forget about the ICAOs. */ } return true; } /** * Returns a list of available countries. * * @return array An associative array with the country-codes as * the keys and the names of the countries as the * values. * @access public */ function get_countries() { if (!$this->connect()) { return false; } $cc = dba_firstkey($this->link_countries_id); /* We need the first key. */ while ($data = dba_fetch($cc, $this->link_countries_id)) { list($country) = explode(';', $data); /* The above statement extracts the name of the country. It's seperated from the ICAOs by a semi-colon (;) */ $countries[$cc] = $country; $cc = dba_nextkey($this->link_countries_id); } asort($countries); // Let's sort the countries. return $countries; } /** * Returns an array of stations. * * @param string The country-code. * @param string This parameter is passed by reference. The name * of the country that corresponds to the * country-code is stored here. * @return array An associative array with the ICAO as the key * and the name of the station as the values. The * name of the country is not added to the name of * the station. * @access public */ function get_icaos($cc, &$country) { if (!$this->connect()) { return false; } /* The name of the country is seperated from the list of ICAOs by * a single semi-colon (;) */ list($country, $icaos) = explode(';', dba_fetch($cc, $this->link_countries_id)); /* The ICAOs are seperated by a normal colon (:) */ $icaos = explode(':', $icaos); while (list(, $icao) = each($icaos)) { list($location) = explode(':', dba_fetch($icao, $this->link_stations_id)); $locations[$icao] = $location; } return $locations; } } ?> --- NEW FILE --- <?php /* This code makes sure that the file is only included once. */ if (defined('PW_DB_MYSQL')) { return; } else { define('PW_DB_MYSQL', true); } require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'mysql' database-type. * * It implements all the methods necessary to insert, update and retrive METARs using a MySQL database. You'll need access to a MySQL database to be able to use this object. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_db_mysql.php,v 1.1 2002/03/07 09:40:38 gimpster Exp $ */ class pw_db_mysql extends pw_db_common { /** * This constructor does nothing besides calling the parent constructor. * * @param array the initial properties of the object */ function pw_db_mysql($input) { $this->pw_db_common($input); } /** * Gets the type of the database. * * @return string The type of the database, 'mysql' in this case. * @access public */ function get_type() { return 'mysql'; } /** * Establishes a connection to the database. * * If there has already been made a connection to the database, this * function just returns true, and nothing will be changed. This * means that it is safe to call this instead of testing * $is_connected. If $properties['db_pconnect'] is true, then a * persistent connection will be established. * * @return boolean Returns true, if a connection were established, * false otherwise. * @access public * @see disconnect() */ function connect() { /* Connect to the MySQL server */ if ($this->is_connected) { return true; } if (!$this->properties['db_pconnect']) { $this->link_id = mysql_connect($this->properties['db_hostname'], $this->properties['db_username'], $this->properties['db_password']); } else { $this->link_id = mysql_pconnect($this->properties['db_hostname'], $this->properties['db_username'], $this->properties['db_password']); } if ($this->link_id) { $this->is_connected = true; $this->select_db(); } else { $this->is_connected = false; } return $this->is_connected; } /** * Disconnects from the database. * * If we're already disconnected from the database, this function * will just return true. * * @return boolean If the disconnec was succesfull then it returns * true, otherwise it returns false. * @access public * @see connect() */ function disconnect() { if (!$this->is_connected || mysql_close($this->link_id)) { $this->is_connected = false; return true; } else { return false; } } /** * Selects a database. * * @return boolean Returns true on success, false otherwise. * @access public */ function select_db() { return mysql_select_db($this->properties['db_database'], $this->link_id); } /** * Executes a SQL-query. * * $result_id is updated as well * * @param string The SQL-statement. * @return boolean True on success, false otherwise. * @access public */ function query($query) { $this->result_id = mysql_query($query, $this->link_id) or $this->error("SQL-statement failed: $query<br>MySQL said " . mysql_error() . ' (' . mysql_errno() . ')'); return $this->result_id; } /** * Fetches a row as an array from the database. * * @return array The next row from the result-set. * @access public */ function fetch_row() { return mysql_fetch_row($this->result_id); } /** * Fetches a row as an associative array from the database. * * @return array The next row from the result-set, as an associative * array. * @access public */ function fetch_array() { return mysql_fetch_array($this->result_id); } /** * Returns the number of rows in the result-set. * * @return integer The number of rows in the current result-set. * @access public */ function num_rows() { return mysql_num_rows($this->result_id); } /** * Inserts a METAR into the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see update_metar() */ function insert_metar($icao, $metar, $timestamp) { $this->query("INSERT INTO " . $this->properties['db_metars'] . " SET icao = '$icao', metar = '$metar', " . "timestamp = FROM_UNIXTIME($timestamp)"); } /** * Updates an existing METAR in the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see insert_metar() */ function update_metar($icao, $metar, $timestamp) { $this->query("UPDATE " . $this->properties['db_metars'] . " SET metar = '$metar', " . "timestamp = FROM_UNIXTIME($timestamp) " . "WHERE icao = '$icao'"); } /** * Gets a METAR form the database. * * @param string The ICAO of the station. * @return string The raw METAR as an array from the database. * @access public */ function get_metar($icao) { $this->query("SELECT metar, UNIX_TIMESTAMP(timestamp) FROM " . $this->properties['db_metars'] . " WHERE icao = '$icao'"); return $this->fetch_row(); } /** * Creates the necessary tables in the database. * * @return bool Returns true if it could connect to the database, * false otherwise. * @access private */ function create_tables() { if (!$this->connect()) { return false; // Failure! } /* First we make a table for the METARs */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_metars']); $this->query('CREATE TABLE ' . $this->properties['db_metars'] . '( icao varchar(4) NOT NULL, metar varchar(255) NOT NULL, timestamp timestamp(14), PRIMARY KEY (icao), UNIQUE icao (icao) )'); /* Then we make a table for the stations. */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_stations']); $this->query('CREATE TABLE ' . $this->properties['db_stations'] . '( icao varchar(4) NOT NULL, name varchar(255) NOT NULL, cc char(2) NOT NULL, country varchar(128) NOT NULL, PRIMARY KEY (icao), UNIQUE icao (icao), KEY cc (cc) )'); return true; // Succes! } /** * Translates an ICAO into a station name * * The boring ICAO (e.g. EKYT) is translated into something like * 'Aalborg, Denmark'. * * @param string The ICAO one want's to translate. * @return string The full name of the station, including country. * @access public */ function lookup_icao($icao) { $this->query('SELECT name, country FROM ' . $this->properties['db_stations'] . " WHERE icao = '$icao'"); if ($this->num_rows()) { $row = $this->fetch_row(); return "$row[0], $row[1]"; } else { return $icao; } } /** * Inserts the stations into the database. * * It is assumed that create_tables() has been called previously * (and that it returned true), so that the necessary tables are * already created. * * @param array This three-dimensional array starts with a list of * contry-codes. For each country-code the ICAOs and corresponding * locations in that particular country are listed as key => value * pairs. * @param array An associative array with country-codes as the keys * and the names of the countries as the values. * @return bool * @access private */ function insert_stations($data, $countries) { if (!$this->connect()) { return false; } while(list($cc, $country) = each($countries)) { /* The country names might contain dangerous characters. */ $country = addslashes($country); while(list($icao, $location) = each($data[$cc])) { /* The station name might also be dangerous. */ $location = addslashes($location); $this->query('INSERT INTO ' . $this->properties['db_stations'] . " VALUES ('$icao', '$location', '$cc', '$country')"); } } return true; } /** * Returns a list of available countries. * * @return array An associative array with the country-codes as the * keys and the names of the countries as the values. * @access public */ function get_countries() { if (!$this->connect()) { return false; } $this->query('SELECT DISTINCT cc, country FROM ' . $this->properties['db_stations'] . ' ORDER BY country'); while($row = $this->fetch_row()) { $rows[$row[0]] = $row[1]; } return $rows; } /** * Returns an array of stations. * * @param string The country-code. * @param string This parameter is passed by reference. The name of * the country that corresponds to the country-code is stored here. * @return array An associative array with the ICAO as the key and * the name of the station as the values. The name of the country is * not added to the name of the station. * @access public */ function get_icaos($cc, &$country) { if (!$this->connect()) { return false; } $this->query('SELECT icao, name, country FROM ' . $this->properties['db_stations'] . " WHERE cc = '$cc' ORDER BY name"); /* We have to do this manually the first time, so that we can set $country */ list($icao, $name, $country) = $this->fetch_row(); $rows[$icao] = $name; while(list($icao, $name) = $this->fetch_row()) { $rows[$icao] = $name; } return $rows; } } ?> --- NEW FILE --- <?php /* This code makes sure that the file is only included once. */ if (defined('PW_DB_NULL')) { return; } else { define('PW_DB_NULL', true); } require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'null' database-type * * It pretends to be a database, but really it isn't :-) It just * implements all the functions one would expect from a database, and * then returns true or false or with empty strings and arrays as * appropriate. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_db_null.php,v 1.1 2002/03/07 09:40:38 gimpster Exp $ */ class pw_db_null extends pw_db_common { /** * This constructor does nothing besides calling the parent constructor. * * @param array the initial properties of the object */ function pw_db_null($input) { $this->pw_db_common($input); } /** * Gets the type of the database. * * @return string The type of the database, 'null' in this case. * @access public */ function get_type() { return 'null'; } /** * Pretends to establish a connection to the database. * * Like all the other methods of this database object, this doesn't * do anything useful. * * @return boolean Always returns true, so that other functions that * depends on a connection to the database doesn't fail because of * this. * @access public */ function connect() { return true; } /** * Pretends to insert a METAR into the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see update_metar() */ function insert_metar($station, $metar, $timestamp) { ; } /** * Pretends to update an existing METAR in the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see insert_metar() */ function update_metar($station, $metar, $timestamp) { ; } /** * Pretends to return a METAR form the database. * * @param string The ICAO of the station. * @return string Since we don't have a database, we just return an * empty string. * @access public */ function get_metar($station) { return ''; } /** * Translates an ICAO into a station name * * @param string The ICAO to translate. * @return string The translated ICAO. * @access public */ function lookup_icao($icao) { $linesize = 128; $fp = fopen(PHPWEATHER_BASE_DIR . '/db/files/stations.db', 'r'); $result = ''; $left = 0; $right = filesize(PHPWEATHER_BASE_DIR . '/db/files/stations.db')/$linesize; while ($left < $right) { fseek($fp, $linesize * round(($left+$right)/2)); $data = fgetcsv($fp, $linesize, ';'); if ($data[0] > $icao) { $right = floor(($left+$right)/2); } elseif ($data[0] < $icao) { $left = ceil(($left+$right)/2); } else { $left = $right; $result = trim($data[1]); } } fclose($fp); return $result; } /** * Makes sure that it's possible to create the files. * * The method doesn't create any files, it just veryfies that it's * we have write permission to PHPWEATHER_BASE_DIR/db. * @return bool True if it's possible to create files. * @access private */ function create_tables() { return is_writable(PHPWEATHER_BASE_DIR . '/db'); } /** * Inserts the stations into the database. * * It is assumed that create_tables() has been called previously * (and that it returned true), so that we can create the necessary * files. insert_stations() populates PHPWEATHER_BASE_DIR/db/files/ * with a file for each country. The files contain PHP code, so that * $country and $icaos will be set, if the file is included. * * @param array This three-dimensional array starts with a list of * contry-codes. For each country-code the ICAOs and corresponding * locations in that particular country are listed as key => value * pairs. * @param array An associative array with country-codes as the keys * and the names of the countries as the values. * @return bool * @access private */ function insert_stations($data, $countries) { while(list($cc, $country) = each($countries)) { $fp = fopen(PHPWEATHER_BASE_DIR . "/db/files/$cc.php", 'w'); fputs($fp, "<?php\n/* File with stationnames in $countries[$cc] */\n\n"); fputs($fp, "\$country = '" . addslashes($countries[$cc]) . "';\n\n"); fputs($fp, "\$icaos = array(\n"); /* We do it ourselves the first time */ list($icao, $location) = each($data[$cc]); fputs($fp, " '$icao' => '" . addslashes($location) . "'"); $stations[$icao] = "$location, $countries[$cc]"; while(list($icao, $location) = each($data[$cc])) { fputs($fp, ",\n '$icao' => '" . addslashes($location) . "'"); $stations[$icao] = "$location, $countries[$cc]"; } fputs($fp, "\n);\n\n?>\n"); fclose($fp); } /* We write a file with all the stations. Each line is 128 bytes long so that it's easy to find a given station again. */ $fp = fopen(PHPWEATHER_BASE_DIR . '/db/files/stations.db', 'w'); if ($fp) { ksort($stations); reset($stations); while(list($icao, $location) = each($stations)) { $str = str_pad("$icao;$location", 127)."\n"; fputs($fp, $str); } fclose($fp); } /* We also write a file with all the countries. */ $fp = fopen(PHPWEATHER_BASE_DIR . '/db/files/countries.php', 'w'); if ($fp) { fputs($fp, "<?php\n/* File with names of all countries. */\n\n\$countries = array(\n"); reset($countries); list($cc, $country) = each($countries); $country = addslashes($country); fputs($fp, " '$cc' => '$country'"); while(list($cc, $country) = each($countries)) { $country = addslashes($country); fputs($fp, ",\n '$cc' => '$country'"); } fputs($fp, "\n);\n\n?>\n"); fclose($fp); } return true; } /** * Returns a list of available countries. * * It uses the file PHPWEATHER_BASE_DIR/db/files/countries.php * created by insert_stations(). * * @return array An associative array with the country-codes as the * keys and the names of the countries as the values. * @access public */ function get_countries() { require_once(PHPWEATHER_BASE_DIR . '/db/files/countries.php'); return $countries; } /** * Returns an array of stations. * * @param string The country-code. * @param string This parameter is passed by reference. The name of * the country that corresponds to the country-code is stored here. * @return array An associative array with the ICAO as the key and * the name of the station as the values. The name of the country is * not added to the name of the station. * @access public */ function get_icaos($cc, &$country) { include(PHPWEATHER_BASE_DIR . "/db/files/$cc.php"); return $icaos; } } ?> --- NEW FILE --- <?php /* This code makes sure that the file is only included once. */ if (defined('PW_DB_PGSQL')) { return; } else { define('PW_DB_PGSQL', true); } require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'pgsql' database-type * * It implements all the methods necessary to insert, update and * retrive METARs using a PostgreSQL database. * * @author Kristian Kristensen <co...@zi...> * @version $Id: pw_db_pgsql.php,v 1.1 2002/03/07 09:40:38 gimpster Exp $ */ class pw_db_pgsql extends pw_db_common { /** * This constructor does nothing besides calling the parent constructor. * * @param array the initial properties of the object */ function pw_db_pgsql($input = array()) { $this->pw_db_common($input); } /** * Gets the type of the database. * * @return string The type of the database, 'pgsql' in this case. * @access public */ function get_type() { return 'pgsql'; } /** * Establishes a connection to the database. * * If there has already been made a connection to the database, this * function just returns true, and nothing will be changed. This * means that it is safe to call this instead of testing * $is_connected. If $properties['db_pconnect'] is true, then a * persistent connection will be established. * * @return boolean Returns true, if a connection were established, * false otherwise. * @access public * @see disconnect() */ function connect() { /* Connect to the PostgreSQL server */ if ($this->is_connected) { return true; } if (!$this->properties['db_pconnect']) { $this->link_id = pgsql_connect($this->properties['db_database']); } else { $this->link_id = pgsql_pconnect($this->properties['db_database']); } if ($this->link_id) { $this->is_connected = true; $this->select_db(); } else { $this->is_connected = false; } return $this->is_connected; } /** * Disconnects from the database. * * If we're already disconnected from the database, this function * will just return true. * * @return boolean If the disconnec was succesfull then it returns * true, otherwise it returns false. * @access public * @see connect() */ function disconnect() { if (!$this->is_connected || pg_close($this->link_id)) { $this->is_connected = false; return true; } else { return false; } } /** * Selects a database. * * @return boolean Returns true on success, false otherwise. * @access public */ function select_db() { if ($this->is_connected) { return true; } else { return false; } } /** * Executes a SQL-query. * * $result_id is updated as well * * @param string The SQL-statement. * @return boolean True on success, false otherwise. * @access public */ function query($query) { return ($this->result_id = pg_exec( $this->link_id, $query)); } /** * Fetches a row as an array from the database. * * @return array The next row from the result-set. * @access public */ function fetch_row() { return pg_fetch_row($this->result_id,0); } /** * Fetches a row as an associative array from the database. * * @return array The next row from the result-set, as an associative * array. * @access public */ function fetch_array() { return pg_fetch_array($this->result_id,0); } /** * Returns the number of rows in the result-set. * * @return integer The number of rows in the current result-set. * @access public */ function num_rows() { return pg_numrows($this->result_id); } /** * Inserts a METAR into the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see update_metar() */ function insert_metar($station, $metar, $timestamp) { $this->query('INSERT INTO ' . $this->properties['db_metars'] . " SET station = '$station', metar = '$metar', " . "timestamp = FROM_UNIXTIME($timestamp)"); } /** * Updates an existing METAR in the database. * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. * @access public * @see insert_metar() */ function update_metar($station, $metar, $timestamp) { $this->query('UPDATE ' . $this->properties['db_metars'] . " SET metar = '$metar', timestamp = '$timestamp' " . "WHERE station = '$station'"); } /** * Gets a METAR form the database. * * @param string The ICAO of the station. * @return string The raw METAR as an array from the database. * @access public */ function get_metar($station) { $this->query('SELECT metar, timestamp FROM ' . $this->properties['db_metars'] . " WHERE station = '$station'"); return $this->fetch_row(); } } ?> --- db_common.php DELETED --- --- db_dba.php DELETED --- --- db_mysql.php DELETED --- --- db_null.php DELETED --- --- db_pgsql.php DELETED --- |