phpweather-checkins Mailing List for PHP Weather (Page 4)
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: Etienne T. <eti...@us...> - 2003-09-08 04:20:48
|
Update of /cvsroot/phpweather/phpweather/db In directory sc8-pr-cvs1:/tmp/cvs-serv24907/db Modified Files: pw_db_mysql.php pw_db_null.php Log Message: Added TAF support. Modified data_retrieval.php, defaults-dist.php, phpweather.php, pw_db_mysql.php, pw_db_null.php. Needs to add output functionality and support all backends. Index: pw_db_mysql.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_mysql.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- pw_db_mysql.php 28 Aug 2002 10:05:55 -0000 1.6 +++ pw_db_mysql.php 8 Sep 2003 04:20:44 -0000 1.7 @@ -223,6 +223,53 @@ return $this->fetch_row(); } + /** + * Inserts a TAF into the database. + * + * @param string The ICAO of the station. + * @param string The raw TAF. + * @param integer A standard UNIX timestamp. + * @access public + * @see update_taf() + */ + function insert_taf($icao, $taf, $timestamp) { + $this->query(sprintf('INSERT INTO %s SET icao = "%s", ' . + 'taf = "%s", timestamp = FROM_UNIXTIME(%d)', + $this->properties['db_tafs'], $icao, + addslashes($taf), intval($timestamp))); + } + + /** + * Updates an existing TAF in the database. + * + * @param string The ICAO of the station. + * @param string The raw TAF. + * @param integer A standard UNIX timestamp. + * @access public + * @see insert_taf() + */ + function update_taf($icao, $taf, $timestamp) { + $this->query(sprintf('UPDATE %s' . + ' SET taf = "%s", timestamp = FROM_UNIXTIME(%d)' . + ' WHERE icao = "%s"', + $this->properties['db_tafs'], addslashes($taf), + intval($timestamp), $icao)); + } + + /** + * Gets a TAF form the database. + * + * @param string The ICAO of the station. + * @return string The raw TAF as an array from the database. + * @access public + */ + function get_taf($icao) { + $this->query(sprintf('SELECT taf, UNIX_TIMESTAMP(timestamp)' . + ' FROM %s WHERE icao = "%s"', + $this->properties['db_tafs'], $icao)); + return $this->fetch_row(); + } + /** * Creates the necessary tables in the database. @@ -241,6 +288,15 @@ $this->query('CREATE TABLE ' . $this->properties['db_metars'] . '( icao char(4) NOT NULL, metar varchar(255) NOT NULL, + timestamp timestamp(14), + PRIMARY KEY (icao), + UNIQUE icao (icao))'); + + /* First we make a table for the TAFs */ + $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_tafs']); + $this->query('CREATE TABLE ' . $this->properties['db_tafs'] . '( + icao char(4) NOT NULL, + taf varchar(255) NOT NULL, timestamp timestamp(14), PRIMARY KEY (icao), UNIQUE icao (icao))'); Index: pw_db_null.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_null.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_db_null.php 28 Aug 2002 10:05:55 -0000 1.4 +++ pw_db_null.php 8 Sep 2003 04:20:44 -0000 1.5 @@ -98,6 +98,44 @@ } /** + * Pretends to insert a TAF into the database. + * + * @param string The ICAO of the station. + * @param string The raw TAF. + * @param integer A standard UNIX timestamp. + * @access public + * @see update_taf() + */ + function insert_taf($station, $taf, $timestamp) { + ; + } + + /** + * Pretends to update an existing TAF in the database. + * + * @param string The ICAO of the station. + * @param string The raw TAF. + * @param integer A standard UNIX timestamp. + * @access public + * @see insert_taf() + */ + function update_taf($station, $taf, $timestamp) { + ; + } + + /** + * Pretends to return a TAF 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_taf($station) { + return ''; + } + + /** * Fetches information about an ICAO. * * @param string The ICAO one want's to translate. |
From: Martin G. <gim...@us...> - 2003-09-02 18:06:43
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv5838 Modified Files: AUTHORS Log Message: Latest contributers. Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather/AUTHORS,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- AUTHORS 3 Aug 2003 22:23:12 -0000 1.14 +++ AUTHORS 2 Sep 2003 18:06:33 -0000 1.15 @@ -131,3 +131,6 @@ Renato Gallmetzer <ren...@re...> Provided us with an Italian translation. + +Pablo Alcaraz (pabloa) + Updated the Spanish translation and other bugfixes. |
From: Martin G. <gim...@us...> - 2003-09-02 18:06:20
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv5155 Modified Files: index.php Log Message: We actually require those files... Versions of PHP prior to 4.0.2 distinguished between include() and require() in that require() were handled unconditionally in a preprocessor-like fashion whereas include() only read the file when needed. Now that both functions (or rather language constructs) work the same we can switch to require(). Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- index.php 28 Dec 2002 14:22:26 -0000 1.39 +++ index.php 2 Sep 2003 18:06:08 -0000 1.40 @@ -92,11 +92,11 @@ if (! empty($icao)) { /* We should only display the current weather if we have station ($icao) */ - include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); + require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); $type = 'pw_text_' . $language; $text = new $type($weather); - include(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); + require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $icons = new pw_images($weather); $output .= '<p>This is the current weather in ' . |
From: Martin G. <gim...@us...> - 2003-09-02 17:59:48
|
Update of /cvsroot/phpweather/phpweather/db In directory sc8-pr-cvs1:/tmp/cvs-serv4344/db Modified Files: pw_db_dba.php Log Message: This should load the DBA extension on systems that doesn't do this by default. Index: pw_db_dba.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_dba.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- pw_db_dba.php 28 Aug 2002 10:05:55 -0000 1.9 +++ pw_db_dba.php 2 Sep 2003 17:59:44 -0000 1.10 @@ -38,18 +38,24 @@ var $link_countries_id; /** - * Constructor. - * - * It just calls the parent constructor. + * This constructor makes sure that the DBA extension is loaded and + * then calls the parent constructor. * * @param array the initial properties of the object */ function pw_db_dba($input) { - /* We just call the parent constructor. */ + /* We have to load the DBA extension on some systems: */ + if (!extension_loaded('dba')) { + if (ereg('win', PHP_OS)) { + dl('php_dba.dll'); + } else { + dl('dba.so'); + } + } $this->pw_db_common($input); } - /** + /** * Gets the type of the database. * * @return string The type of the database, 'dba' in this case. @@ -59,7 +65,7 @@ return 'dba'; } - /** + /** * Establishes a connection to the database. It is assumed, that the * database is already created. * |
From: Martin G. <gim...@us...> - 2003-09-02 17:57:31
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv3734 Modified Files: pw_text.php pw_text_es.php Log Message: Patches from Pablo Alcaraz (pabloa) that update the Spanish translation and fixes a bug with the visibility display. Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- pw_text.php 14 Jun 2003 23:37:09 -0000 1.19 +++ pw_text.php 2 Sep 2003 17:57:20 -0000 1.20 @@ -13,7 +13,7 @@ * just translating the strings. * * @author Martin Geisler <gim...@gi...> - * @version $Id$ + * @version pw_text.php,v 1.17 2003/03/05 19:53:24 gimpster Exp */ class pw_text extends pw_output { @@ -496,7 +496,7 @@ return; } } - + /** * Function used to parse a runway-group. * @@ -607,13 +607,12 @@ } if (empty($dir)) { - $output = $prefix . + $output = $prefix . $this->pref_units($this->properties['mark_begin'] . $metric . $this->properties['mark_end'] . $me_unit, $this->properties['mark_begin'] . $imperial . $this->properties['mark_end'] . $im_unit); } else { - $output = $prefix . $this->pref_units($this->properties['mark_begin'] . $metric . $this->properties['mark_end'] . $me_unit, @@ -624,6 +623,7 @@ $this->strings['wind_dir_short_long'][$dir] . $this->properties['mark_end']; } + return $output; } @@ -633,11 +633,11 @@ $location, $this->properties['mark_end']); } - + function print_pretty_time($time) { - $minutes_old = (int) ((time() - $time)/60); - if ($minutes_old >= 60) { - $hours = (int) ((time() - $time)/3600); + $minutes_old = round((time() - $time)/60); + if ($minutes_old > 60) { + $hours = round((time() - $time)/3600); $minutes = $minutes_old % 60; if ($minutes < 1) { $minutes = ''; @@ -756,9 +756,9 @@ $this->pref_units($this->properties['mark_begin'] . $dew_c . $this->properties['mark_end'] . ' °C', $this->properties['mark_begin'] . $dew_f . - $this->properties['mark_end'] . ' °F'); + $this->properties['mark_end'] . ' °F') . '.'; } - return $output . '.'; + return $output; } function print_pretty_altimeter($altimeter) { @@ -854,19 +854,21 @@ function print_pretty_visibility($visibility) { $output[0] = $this->parse_visibility_group($visibility[0]); - + if (!empty($visibility[1])) { - $output[1] = $this->parse_visibility_group($visibility[1]); + if( $visibility[1]['meter'] != $visibility[0]['meter']) { + $output[1] = $this->parse_visibility_group($visibility[1]); + } } else { $output[1] = ''; } - + if (!empty($visibility[2])) { $output[2] = $this->parse_visibility_group($visibility[2]); } else { $output[2] = ''; } - + return $this->strings['visibility'] . $this->list_sentences($output[0], $output[1], $output[2]) . '.'; } Index: pw_text_es.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_es.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_text_es.php 28 Aug 2002 21:13:40 -0000 1.4 +++ pw_text_es.php 2 Sep 2003 17:57:21 -0000 1.5 @@ -6,9 +6,9 @@ * Provides all the strings needed by pw_text to produce Spanish * output. * - * @author Jesús Peñas <jp...@ed...> + * @author Jess Peas <jp...@ed...> * @link http://www.educaplus.org/ My homepage. - * @version $Id$ + * @version pw_text_es.php,v 1.4 2002/08/28 21:13:40 gimpster Exp */ class pw_text_es extends pw_text { @@ -23,7 +23,7 @@ $this->strings['list_sentences_and'] = ' y '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', y '; - $this->strings['location'] = 'Informe meteorológico para %s%s%s.'; + $this->strings['location'] = 'Informe meteorológico para %s%s%s.'; $this->strings['minutes'] = ' minutos'; $this->strings['time_format'] = ' El informe se hizo hace %s, a las %s%s%s UTC.'; $this->strings['time_minutes'] = 'y %s%s%s minutos'; @@ -35,16 +35,16 @@ $this->strings['meter'] = ' metros'; $this->strings['meters'] = ' metros'; $this->strings['feet'] = ' pies'; - $this->strings['kilometers'] = ' kilómetros'; + $this->strings['kilometers'] = ' kilómetros'; $this->strings['miles'] = ' millas'; $this->strings['and'] = ' y '; - $this->strings['plus'] = ' además de '; + $this->strings['plus'] = ' ademá de '; $this->strings['with'] = ' con '; $this->strings['wind_blowing'] = ' El viento soplaba a una velocidad de '; - $this->strings['wind_with_gusts'] = ' con ráfagas de '; + $this->strings['wind_with_gusts'] = ' con ráagas de '; $this->strings['wind_from'] = ' del '; - $this->strings['wind_variable'] = ' con %sdirección variable%s'; - $this->strings['wind_varying'] = ', variando entre %s%s%s (%s%sº%s) y %s%s%s (%s%sº%s)'; + $this->strings['wind_variable'] = ' con %sdirección variable%s'; + $this->strings['wind_varying'] = ', variando entre %s%s%s (%s%s%s) y %s%s%s (%s%s%s)'; $this->strings['wind_calm'] = ' El aire estaba en %scalma%s'; $this->strings['wind_dir'] = array( 'norte', @@ -93,12 +93,12 @@ 'NW' => 'noroeste' ); $this->strings['temperature'] = ' La temperatura era '; - $this->strings['dew_point'] = ', con un punto de rocío de '; - $this->strings['altimeter'] = ' La presión atmosférica era '; + $this->strings['dew_point'] = ', con un punto de rocío de '; + $this->strings['altimeter'] = ' La presión atmosférica era '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; - $this->strings['rel_humidity'] = ' Había una humedad relativa del '; - $this->strings['feelslike'] = ' La sensación térmica era de '; + $this->strings['rel_humidity'] = ' Había una humedad relativa del '; + $this->strings['feelslike'] = ' La sensación térmica era de '; $this->strings['cloud_group_beg'] = ' En cuanto a la nubosidad, '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = ' El cielo estaba %sdespejado%s.'; @@ -115,8 +115,8 @@ 'OVC' => 'nublado'); $this->strings['cumulonimbus'] = ' tipo cumulonimbos'; //towering_cumulus son nubes de desarrollo vertical (cumulus congestus) - $this->strings['towering_cumulus'] = ' tipo cúmulos'; - $this->strings['cavok'] = ' sin nubes por debajo de %s y sin presencia de cumulonimbos'; + $this->strings['towering_cumulus'] = ' tipo cúmulos'; + $this->strings['cavok'] = ' sin nubes por debajo de %s y sin presencia de cumulusnimbos'; $this->strings['currently'] = ' Actualmente '; $this->strings['weather'] = array( @@ -132,28 +132,28 @@ 'SH' => ' chubascos,', 'TS' => ' tormenta', 'FZ' => ' helada', - 'DZ' => ' llovizna', + 'DZ' => ' garúa', 'RA' => ' lluvia', 'SN' => ' nieve', 'SG' => ' cinarra', 'IC' => ' cristales de hielo', 'PL' => ' hielo granulado', 'GR' => ' granizo', - 'GS' => ' granizo pequeño', + 'GS' => ' granizo pequeño', 'UP' => ' desconocido', 'BR' => ' neblina', 'FG' => ' niebla', 'FU' => ' humo', - 'VA' => ' ceniza volcánica', + 'VA' => ' ceniza volc�ica', 'DU' => ' polvareda', 'SA' => ' arena', 'HZ' => ' calima', - 'PY' => ' rocío', - 'PO' => ' probable aparición de remolinos de polvo o arena', + 'PY' => ' rocío', + 'PO' => ' probable aparición de remolinos de polvo o arena', 'SQ' => ' turbonadas', 'FC' => ' trombas/tornados/huracanes', 'SS' => ' tempestad de arena o polvo'); - $this->strings['visibility'] = ' En este momento la visibilidad global era '; + $this->strings['visibility'] = ' En aquel momento la visibilidad global era '; $this->strings['visibility_greater_than'] = 'mayor de '; $this->strings['visibility_less_than'] = 'menor de '; $this->strings['visibility_to'] = ' de '; @@ -245,4 +245,4 @@ } -?> \ No newline at end of file +?> |
From: Martin G. <gim...@us...> - 2003-08-03 22:23:14
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv29392/output Added Files: pw_text_it.php pw_text_tr.php Log Message: Lots of new translations! --- NEW FILE --- <?php require_once(PHPWEATHER_BASE_DIR . '/output/pw_text.php'); /** * Provides all the strings needed by pw_text to produce Italian * output. * * @author Renato Gallmetzer <renatogl [at] renatogl [dot] com> * @link http://www.renatogl.com/ My homepage. * @version pw_text_en.php,v 1.9 2002/10/20 15:57:15 gimpster Exp */ class pw_text_it extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to pw_text(). */ function pw_text_it($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-1'; $this->strings['no_data'] = 'Spiacente! Nessun dato disponibile per %s%s%s.'; $this->strings['list_sentences_and'] = ' e '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', e '; $this->strings['location'] = 'Informazione meteo per %s%s%s.'; $this->strings['minutes'] = ' minuti'; $this->strings['time_format'] = 'La situazione meteo è di %s fa, delle %s%s%s UTC.'; $this->strings['time_minutes'] = 'e %s%s%s minuti'; $this->strings['time_one_hour'] = '%sun\'%sora %s'; $this->strings['time_several_hours'] = '%s%s%s ore %s'; $this->strings['time_a_moment'] = 'al momento'; $this->strings['meters_per_second'] = ' metri al secondo'; $this->strings['miles_per_hour'] = ' miglia all\'ora'; $this->strings['meter'] = ' metro'; $this->strings['meters'] = ' metri'; $this->strings['feet'] = ' piedi'; $this->strings['kilometers'] = ' chilometri'; $this->strings['miles'] = ' miglia'; $this->strings['and'] = ' e '; $this->strings['plus'] = ' più '; $this->strings['with'] = ' con '; $this->strings['wind_blowing'] = 'Vento alla velocità di '; $this->strings['wind_with_gusts'] = ' con raffiche fino a '; $this->strings['wind_from'] = ' da '; $this->strings['wind_variable'] = ' da direzioni %svariabili%s.'; $this->strings['wind_varying'] = ', variabile da %s%s%s (%s%s°%s) a %s%s%s (%s%s°%s)'; $this->strings['wind_calm'] = 'Vento %scalmo%s'; $this->strings['wind_dir'] = array( 'nord', 'nord/nordest', 'nordest', 'est/nordest', 'est', 'est/sudest', 'sudest', 'sud/sudest', 'sud', 'sud/sudwest', 'sudwest', 'west/sudwest', 'west', 'west/nordwest', 'nordwest', 'nord/nordwest', 'nord'); $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' => 'nord', 'NE' => 'nordest', 'E' => 'est', 'SE' => 'sudest', 'S' => 'sud', 'SW' => 'sudovest', 'W' => 'ovest', 'NW' => 'nordovest' ); $this->strings['temperature'] = 'Temperature di '; $this->strings['dew_point'] = ', temperatura di rugiada a '; $this->strings['altimeter'] = 'Pressione atmosferica di '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Umidità relativa di '; $this->strings['feelslike'] = 'Sensazione termica '; $this->strings['cloud_group_beg'] = 'Nuvolosità: '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Cielo %schiaro%s.'; $this->strings['cloud_height'] = ' nubi ad una altitudine di '; $this->strings['cloud_overcast'] = 'Cielo %scoperto%s a partire da un\'altitudine di '; $this->strings['cloud_vertical_visibility'] = 'una %svisibilità verticale%s di '; $this->strings['cloud_condition'] = array( 'SKC' => 'sereno', 'CLR' => 'sereno', 'FEW' => 'poco nuvoloso', 'SCT' => 'nuvolosità sparsa', 'BKN' => 'nuvolosità a tratti', 'OVC' => 'novoloso'); $this->strings['cumulonimbus'] = ' cumulonimbi'; $this->strings['towering_cumulus'] = ' cumuli'; $this->strings['cavok'] = ' assenza di nuvole sotto %s ed assenza di cumulonimbi'; $this->strings['currently'] = 'Attualmente '; $this->strings['weather'] = array( '-' => ' leggero', ' ' => ' moderato ', '+' => ' forte ', 'VC' => ' nelle vicinanze di', 'PR' => ' parziale', 'BC' => ' pezzi di', 'MI' => ' pianeggiante', 'DR' => ' scivolante in piano', 'BL' => ' soffiante', 'SH' => ' rovesci di', 'TS' => ' temporale', 'FZ' => ' gelo', 'DZ' => ' pioviggine', 'RA' => ' pioggia', 'SN' => ' neve', 'SG' => ' grani di neve', 'IC' => ' cristalli di ghiaccio', 'PL' => ' ganelli di ghiaccio', 'GR' => ' grandine', 'GS' => ' leggera grandine', 'UP' => ' sconosciuto', 'BR' => ' foschia', 'FG' => ' nebbia', 'FU' => ' fumo', 'VA' => ' cenere vulcanica', 'DU' => ' polvere sparsa', 'SA' => ' sabbia', 'HZ' => ' foschia', 'PY' => ' pioggerella', 'PO' => ' vortici di sabbia o polvere', 'SQ' => ' raffiche', 'FC' => ' imbuto di tromba d\'aria', 'SS' => ' tempesta di sabbia o polvere'); $this->strings['visibility'] = 'Visibilità totale di '; $this->strings['visibility_greater_than'] = 'maggiore di '; $this->strings['visibility_less_than'] = 'minore di '; $this->strings['visibility_to'] = ' fino a '; $this->strings['runway_upward_tendency'] = ' con tendenza a %ssalire%s'; $this->strings['runway_downward_tendency'] = ' con tendenza a %sscendere%s'; $this->strings['runway_no_tendency'] = ' con tendenza %snon distinguibile%s'; $this->strings['runway_between'] = 'tra '; $this->strings['runway_left'] = ' sinistra'; $this->strings['runway_central'] = ' centrale'; $this->strings['runway_right'] = ' destra'; $this->strings['runway_visibility'] = 'Visibilità di '; $this->strings['runway_for_runway'] = ' per la pista d\'atterraggio runway '; /* 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 Turkish * output. * * @author Ferhat Bingol <s0...@st...> * @version pw_text_en.php,v 1.9 2002/10/20 15:57:15 gimpster Exp */ class pw_text_tr extends pw_text { /** * This constructor provides all the strings used. * * @param array This is just passed on to pw_text(). */ function pw_text_tr($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-9'; $this->strings['no_data'] = 'Üzgünüz! %s%s%s için veri bulunmuyor.'; $this->strings['list_sentences_and'] = ' ve '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', ve '; $this->strings['location'] = '%s%s%s için hazýrlanan rapor.'; $this->strings['minutes'] = ' dakika'; $this->strings['time_format'] = 'Rapor %s önce saat %s%s%s UTC de hazýrlanmýþ.'; $this->strings['time_minutes'] = 've %s%s%s dakika'; $this->strings['time_one_hour'] = '%sone%s saat %s'; $this->strings['time_several_hours'] = '%s%s%s saat %s'; $this->strings['time_a_moment'] = 'a moment'; $this->strings['meters_per_second'] = ' metre / saniye'; $this->strings['miles_per_hour'] = ' mil / saat'; $this->strings['meter'] = ' metre'; $this->strings['meters'] = ' metre'; $this->strings['feet'] = ' feet'; $this->strings['kilometers'] = ' kilometre'; $this->strings['miles'] = ' mil'; $this->strings['and'] = ' ve '; $this->strings['plus'] = ' artý '; $this->strings['with'] = ' ile '; $this->strings['wind_blowing'] = 'Rüzgarýn esme hýzý '; $this->strings['wind_with_gusts'] = ' deðerine kadar ulaþan gust '; $this->strings['wind_from'] = ' , yönü '; $this->strings['wind_variable'] = ' %svariable% yönünde.'; $this->strings['wind_varying'] = ', %s%s%s (%s%s°%s) ve %s%s%s (%s%s°%s) arasýnda deðiþken'; $this->strings['wind_calm'] = 'Rüzgar %scalm%'; $this->strings['wind_dir'] = array( 'kuzey', 'kuzey/kuzeydoðu', 'kuzeydoðu', 'batý/kuzeydoðu', 'doðu', 'doðu/güneydoðu', 'güneydoðu', 'güney/güneydoðu', 'güney', 'güney/güneybatý', 'güneybatý', 'batý/güneybatý', 'batý', 'batý/kuzeybatý', 'kuzeybatý', 'kuzey/kuzeybatý', 'kuzey'); $this->strings['wind_dir_short'] = array( 'K', 'KKD', 'KD', 'DKD', 'D', 'DGD', 'GD', 'GGD', 'G', 'GGB', 'GB', 'BGB', 'B', 'BKB', 'KB', 'KKB', 'K'); $this->strings['wind_dir_short_long'] = array( 'K' => 'kuzey', 'KD' => 'kuzeydoðu', 'D' => 'doðu', 'GDE' => 'güneydoðu', 'G' => 'güney', 'GB' => 'güneybatý', 'B' => 'batý', 'KB' => 'kuzeybatý' ); $this->strings['temperature'] = 'Sýcaklýk '; $this->strings['dew_point'] = ', mevcut dew-point '; $this->strings['altimeter'] = 'Atmosferýk basýnç '; $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'Relativ humidity '; $this->strings['feelslike'] = 'Hissedilen sýcaklýk '; $this->strings['cloud_group_beg'] = 'Bulunan '; $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Gökyüzü %sclear%s.'; $this->strings['cloud_height'] = ' bulutlarýn yüksekliði '; $this->strings['cloud_overcast'] = 'Gökyüzü %sovercast% olduðu yükselik '; $this->strings['cloud_vertical_visibility'] = 'görüþ mesafesi %svertical visibility% '; $this->strings['cloud_condition'] = array( 'SKC' => 'açýk', 'CLR' => 'açýk', 'FEW' => 'az', 'SCT' => 'scattered', 'BKN' => 'yer yer bulutlu', 'OVC' => 'overcast'); $this->strings['cumulonimbus'] = ' kumulonimbus'; $this->strings['towering_cumulus'] = ' towering kumulus'; $this->strings['cavok'] = ' %s altýnda bulut bulunmuyor ve kumulonimbus bulutlarý yok'; $this->strings['currently'] = 'Þu anda '; $this->strings['weather'] = array( '-' => ' light', ' ' => ' moderate ', '+' => ' heavy ', 'VC' => ' bölgede', 'PR' => ' kýsmi', 'BC' => ' patches of', 'MI' => ' sýð', 'DR' => ' düþük yoðunlukta', 'BL' => ' esen', 'SH' => ' saðnak', 'TS' => ' fýrtýna', 'FZ' => ' dondurucu', 'DZ' => ' çiseleyen', 'RA' => ' yaðmur', 'SN' => ' kar', 'SG' => ' parça karlý', 'IC' => ' buz kristalleri', 'PL' => ' buz parçalý', 'GR' => ' dolu', 'GS' => ' az dolulu', 'UP' => ' bilinmeyen', 'BR' => ' sis', 'FG' => ' sisli', 'FU' => ' parçalý sisli', 'VA' => ' volkanik dumanlý', 'DU' => ' widespread dust', 'SA' => ' kum', 'HZ' => ' puslu', 'PY' => ' sprey', 'PO' => ' well-developed dust/sand whirls', 'SQ' => ' bora', 'FC' => ' (funnel cloud tornado waterspout)', 'SS' => ' kur/kil fýrtýnasý'); $this->strings['visibility'] = 'Görüþ mesafesi '; $this->strings['visibility_greater_than'] = 'deðerinden büyük '; $this->strings['visibility_less_than'] = 'deðerinden düþük '; $this->strings['visibility_to'] = ' '; $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'] = 'arasýnda '; $this->strings['runway_left'] = ' sol'; $this->strings['runway_central'] = ' merkez'; $this->strings['runway_right'] = ' sað'; $this->strings['runway_visibility'] = 'Görüþ '; $this->strings['runway_for_runway'] = ' uçak pisti için '; /* We run the parent constructor */ $this->pw_text($weather, $input); } } ?> |
From: Martin G. <gim...@us...> - 2003-08-03 22:23:14
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv29392 Modified Files: AUTHORS Log Message: Lots of new translations! Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather/AUTHORS,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- AUTHORS 8 May 2003 19:42:35 -0000 1.13 +++ AUTHORS 3 Aug 2003 22:23:12 -0000 1.14 @@ -125,3 +125,9 @@ Jim Whitehead <ji...@tw...> Fixed the rounding of hours and minutes in the pretty-printed report. + +Ferhat Bingol <s0...@st...> + Made a Turkish translation. + +Renato Gallmetzer <ren...@re...> + Provided us with an Italian translation. |
From: Ondrej J. <ne...@us...> - 2003-08-03 15:10:04
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv31358 Modified Files: pw_text_cs.php pw_text_sk.php Log Message: Updated links in source headers. Index: pw_text_cs.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_cs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- pw_text_cs.php 1 Oct 2002 19:03:15 -0000 1.2 +++ pw_text_cs.php 3 Aug 2003 15:10:01 -0000 1.3 @@ -7,11 +7,11 @@ * output. * * @author Václav Øíkal <va...@ph...> - * @author Ondrej Jombík <ne...@po...> + * @author Ondrej Jombík <ne...@pl...> * @author Radoslava Fedáková <mor...@po...> * @link http://vac.ath.cx/ - * @link http://www.nepto.sk/ Nepto.SK - homepage - * @link http://www.platon.sk/ Platon software development group + * @link http://nepto.sk/ Ondrej's personal homepage + * @link http://platon.sk/ Platon Software Development Group * * @version pw_text_cs.php,v 1.0 2002/09/22 21:13:40 gimpster Exp */ Index: pw_text_sk.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_sk.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- pw_text_sk.php 19 Dec 2002 01:07:24 -0000 1.5 +++ pw_text_sk.php 3 Aug 2003 15:10:01 -0000 1.6 @@ -6,10 +6,10 @@ * Provides all the strings needed by pw_text to produce Slovak * output. * - * @author Ondrej Jombík <ne...@po...> + * @author Ondrej Jombík <ne...@pl...> * @author Radoslava Fedáková <mor...@po...> - * @link http://www.nepto.sk/ Nepto.SK - homepage - * @link http://www.platon.sk/ Platon software development group + * @link http://nepto.sk/ Ondrej's personal homepage + * @link http://platon.sk/ Platon Software Development Group * @version $Id$ */ |
From: Martin G. <gim...@us...> - 2003-07-01 10:15:39
|
Update of /cvsroot/phpweather/phpweather/config In directory sc8-pr-cvs1:/tmp/cvs-serv15345 Modified Files: make_config.php pw_option.php pw_option_integer.php pw_option_multi_select.php pw_option_select.php pw_option_text.php Log Message: Updated the Configuration Builder to match the new dependency classes and added the fetch_method option. Also, the generated PHP code for the defaults.php file now deals correctly with embedded single and double quotes in strings. Not that there's much need for these (except possibly in mark_begin and mark_end) but they're now properly escaped. Index: make_config.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/make_config.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- make_config.php 20 Apr 2003 13:12:43 -0000 1.9 +++ make_config.php 1 Jul 2003 10:15:36 -0000 1.10 @@ -21,8 +21,9 @@ require_once('pw_optiongroup.php'); /* A couple of dependencies: */ -require_once('pw_dependency.php'); +require_once('pw_dependency_equal.php'); require_once('pw_dependency_or.php'); +require_once('pw_dependency_and.php'); /* We have to strip slashes from the GPC variables. */ if (get_magic_quotes_gpc() == 1) { @@ -49,12 +50,16 @@ if (empty($HTTP_SESSION_VARS)) { /* Common dependencies: */ - $db_dep = new pw_dependency_or('db_type', array('mysql', 'pgsql', 'dba')); - $sql_dep = new pw_dependency_or('db_type', array('mysql', 'pgsql')); - $dba_dep = new pw_dependency('db_type', 'dba'); - $proxy_dep = new pw_dependency('use_proxy', 'true'); - $adodb_dep = new pw_dependency('db_type', 'adodb'); - $adodb_ext_dep = new pw_dependency('db_adodb_ext', 'true'); + $sql_dep = new pw_dependency_or(new pw_dependency_equal('db_type', 'mysql'), + new pw_dependency_equal('db_type', 'pgsql')); + $dba_dep = new pw_dependency_equal('db_type', 'dba'); + $db_dep = new pw_dependency_or($sql_dep, $dba_dep); + + $fsockopen_dep = new pw_dependency_equal('fetch_method', 'fsockopen'); + $proxy_dep = new pw_dependency_equal('use_proxy', 'true'); + + $adodb_dep = new pw_dependency_equal('db_type', 'adodb'); + $adodb_ext_dep = new pw_dependency_equal('db_adodb_ext', 'true'); $not_empty_validator = new pw_validator_ereg("Sorry, the empty string '' cannot be " . "used here", '^.+$'); @@ -84,7 +89,7 @@ "errors, warnings, and debug-information PHP Weather " . "will print. It is suggested that you always include " . "errors in the output and perhaps also warnings.", - array(), + false, array('1' => 'Errors only', '2' => 'Warnings only', '4' => 'Debug information only', @@ -97,13 +102,13 @@ new pw_option_text('icao', 'This will be the default station used by PHP Weather. ' . 'You should enter a valid four-letter ICAO.', - array(), $icao_validator, 'EKYT'); + false, $icao_validator, 'EKYT'); $HTTP_SESSION_VARS['pref_units'] = new pw_option_select('pref_units', 'You may choose to display the data in several ' . 'formats. Please choose one that fits your need.', - array(), + false, array('both_metric' => 'Metric first, then imperial', 'both_imperial' => 'Imperial first, then metric', 'only_metric' => 'Only metric', @@ -114,7 +119,7 @@ 'PHP Weather can produce textual output using ' . 'in several languages - please select your default ' . 'from the list.', - array(), + false, get_languages('text'), 'en'); @@ -125,32 +130,43 @@ "offset here. For example, if your times generated are 1 " . "hour too early (so METARs appear an hour older than they " . "are), set this option to be +1.", - array(), false, 0); + false, false, 0); + + $HTTP_SESSION_VARS['fetch_method'] = + new pw_option_select('fetch_method', + "PHP Weather can fetch the METAR reports from the NWS using " . + "one of two different methods: using either the file() or " . + "the fsockopen() function. You should start with file() and " . + "then change it to fsockopen() if you discover that file() " . + "has been disabled or you need to use a proxy server.", + false, + array('file' => 'Use the file() function', + 'fsockopen' => 'Use the fsockopen() function')); $HTTP_SESSION_VARS['use_proxy'] = new pw_option_boolean('use_proxy', "Set this option to 'Yes' to enable support for a " . "proxy server.", - array(), + $fsockopen_dep, array('false' => 'No', 'true' => 'Yes')); $HTTP_SESSION_VARS['proxy_host'] = new pw_option_text('proxy_host', "This is the hostname of the proxy server.", - array($proxy_dep), $host_validator); + $proxy_dep, $host_validator); $HTTP_SESSION_VARS['proxy_port'] = new pw_option_integer('proxy_port', "This is the port number of the proxy server. The " . "default is what is used by the Squid proxy server. " . "Another common port number is '8080'", - array($proxy_dep), $port_validator, 3128); + $proxy_dep, $port_validator, 3128); $HTTP_SESSION_VARS['db_type'] = new pw_option_select('db_type', 'PHP Weather can use several kinds of databases.', - array(), + false, array('null' => 'No database at all', 'mysql' => 'A MySQL database', 'pgsql' => 'A PostgreSQL database', @@ -162,7 +178,7 @@ "We need to know where we can find the ADOdb library. " . "The default is for a Debian GNU/Linux system, but " . "you'll probably have to change it.", - array($adodb_dep), + $adodb_dep, false, // we could try to validate the path... '/usr/share/adodb'); @@ -172,7 +188,7 @@ "wrapper library. You can get a list of drivers from " . '<a href="http://php.weblogs.com/ADODB_Manual#drivers">' . "the ADOdb Manual</a>.", - array($adodb_dep), + $adodb_dep, $not_empty_validator); $HTTP_SESSION_VARS['db_adodb_ext'] = @@ -181,7 +197,7 @@ "then set this option to 'Yes'. PHP might have been " . "compiled with support for MySQL, but the extension " . "isn't necessarily loaded.", - array($adodb_dep), + $adodb_dep, array('false' => 'No', 'true' => 'Yes')); $HTTP_SESSION_VARS['db_adodb_ext_name'] = @@ -191,7 +207,7 @@ "you're using MySQL, then the extension is called " . "'mysql', or if you're using PostgreSQL, then it's " . "called 'pgsql'.", - array($adodb_ext_dep), + $adodb_ext_dep, $not_empty_validator); $HTTP_SESSION_VARS['db_adodb_ext_file'] = @@ -201,7 +217,7 @@ "'mysql' extension with the MySQL database, then the " . "file to load is either 'mysql.so' on a Unix based " . "system, or 'mysql.dll' on a Windows based system.", - array($adodb_ext_dep), + $adodb_ext_dep, $not_empty_validator); $HTTP_SESSION_VARS['db_handler'] = @@ -209,7 +225,7 @@ "If you've chosen to use a Berkeley DB style database " . "through the PHP database abstraction layer (DBA), then " . "please select the handler you would like to use.", - array($dba_dep), + $dba_dep, array('dbm' => 'dbm - The oldest (original) type of ' . 'Berkeley DB style databases', 'ndbm' => 'ndbm - a newer and more flexible type.', @@ -223,7 +239,7 @@ "will always use the data it finds in the database, " . "even if it's too old. But if the data isn't there, " . "it will still fetch new data from the Internet.", - array($db_dep), + $db_dep, array('false' => 'No', 'true' => 'Yes')); $HTTP_SESSION_VARS['cache_timeout'] = @@ -235,14 +251,15 @@ "seconds (1 hour), but some stations make two " . "reports each hour, so you might want to lower this " . "number to perhaps 2400 or even 1800.", - array(new pw_dependency('always_use_db', 'false'), $db_dep), + new pw_dependency_and(new pw_dependency_equal('always_use_db', 'false'), + $db_dep), false, '3600'); $HTTP_SESSION_VARS['db_pconnect'] = new pw_option_boolean('db_pconnect', "If you want to make a persistent connection to the " . "database, then set this option to 'Yes'.", - array($sql_dep), + $sql_dep, array('false' => 'No', 'true' => 'Yes')); $HTTP_SESSION_VARS['db_port'] = @@ -250,26 +267,26 @@ 'If you have to use a non-standard port when ' . 'connecting to the database, then please specify it ' . 'here. If not, then just leave this field blank.', - array($sql_dep), $port_validator_empty); + $sql_dep, $port_validator_empty); $HTTP_SESSION_VARS['db_hostname'] = new pw_option_text('db_hostname', 'This is the hostname that PHP Weather will use, ' . 'if you choose to use a database-backend, that ' . 'supports network connections.', - array($sql_dep), $host_validator); + $sql_dep, $host_validator); $HTTP_SESSION_VARS['db_database'] = new pw_option_text('db_database', 'This is the name of the database that PHP Weather ' . 'should use.', - array($sql_dep), $table_validator); + $sql_dep, $table_validator); $HTTP_SESSION_VARS['db_username'] = new pw_option_text('db_username', 'This is the username that PHP Weather will use ' . 'for accessing the database.', - array($sql_dep)); + $sql_dep); $HTTP_SESSION_VARS['db_password'] = new pw_option_text('db_password', @@ -277,26 +294,26 @@ 'trying to make a connection to the database. Please ' . "remember to protect the file after you've stored the " . "password in it.", - array($sql_dep)); + $sql_dep); $HTTP_SESSION_VARS['db_metars'] = new pw_option_text('db_metars', 'This is the name of the table that is used ' . 'to cache the METARs.', - array($db_dep), $table_validator, 'pw_metars'); + $db_dep, $table_validator, 'pw_metars'); $HTTP_SESSION_VARS['db_stations'] = new pw_option_text('db_stations', 'This is the name of the database/table that is used ' . 'to store the names of the stations.', - array($db_dep), $table_validator, 'pw_stations'); + $db_dep, $table_validator, 'pw_stations'); $HTTP_SESSION_VARS['db_countries'] = new pw_option_text('db_countries', 'This is the name of the database that is used to ' . 'store the names of the countries together with ' . 'country-codes.', - array($dba_dep), $table_validator, 'pw_countries'); + $dba_dep, $table_validator, 'pw_countries'); $HTTP_SESSION_VARS['mark_begin'] = @@ -306,14 +323,14 @@ 'this to happen, then just use an empty string. ' . "Other good choices include <code><i></code>, <code><font " . 'color="red"></code>, etc.', - array(), false, '<b>'); + false, false, '<b>'); $HTTP_SESSION_VARS['mark_end'] = new pw_option_text('mark_end', 'This string is placed after all the changable parts. ' . 'You should make sure that it closes any tags ' . "you've opened in <code>mark_begin</code>.", - array(), false, '</b>'); + false, false, '</b>'); $HTTP_SESSION_VARS['exclude'] = new pw_option_multi_select('exclude', @@ -322,7 +339,7 @@ 'runways-visibility, then select it in this list. ' . 'You can select several options at once in Netscape ' . 'by holding down Ctrl while clicking on the option.', - array(), + false, array('time' => 'Leave out the time part', 'wind' => 'Leave out the wind part', 'runway' => 'Leave out information about runways')); @@ -344,6 +361,7 @@ new pw_optiongroup('general_group', 'General Options', 'This is some general options for PHP Weather.', array('verbosity', 'icao', 'pref_units', 'language', 'offset', + 'fetch_method', 'use_proxy', 'proxy_host', 'proxy_port'), !empty($HTTP_POST_VARS['general_group_visible'])); Index: pw_option.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_option.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_option.php 28 Dec 2002 00:52:54 -0000 1.4 +++ pw_option.php 1 Jul 2003 10:15:36 -0000 1.5 @@ -31,15 +31,11 @@ var $description = ''; /** - * The dependencies of this option. + * The dependency of this option. * - * If this option depends on other options, then their names will be - * listed in this array. If this options doesn't have any - * dependencies, then the array will be empty. - * - * @var array + * @var object */ - var $dependencies = array(); + var $dependency = null; /** * The current value of the option. @@ -73,11 +69,11 @@ */ var $validator; - function pw_option($name, $description, $dependencies, + function pw_option($name, $description, $dependency = false, $validator = false, $default = false) { $this->name = $name; $this->description = $description; - $this->dependencies = $dependencies; + $this->dependency = $dependency; if ($validator) { $this->validator = $validator; } else { @@ -120,22 +116,14 @@ /** * Checks to see if this option is ready to be displayed. * - * When this method is called, the option will go through it's - * dependencies and make sure that they're all satisfied. You - * shouldn't use an option that isn't ready. - * - * @return boolean True if the option is ready to be displayed, - * false otherwise. + * @return boolean Returns true if the option is ready to be + * displayed, false otherwise. */ function is_ready() { - $ready = true; - foreach($this->dependencies as $dependency) { - if (!$dependency->check()) { - $ready = false; - break; - } - } - return $ready; + if (empty($this->dependency)) + return true; + else + return $this->dependency->check(); } /** @@ -155,7 +143,7 @@ * Updates the current value. * * @param array New values. This array should have the same - * structure as $_REQUEST which means that it should contain + * structure as $HTTP_POST_VARS which means that it should contain * option_name_value => value pairs where option_name is the name of * an option. */ @@ -166,6 +154,21 @@ } /** + * Escapes a string. + * + * The string can then be can be wrapped in single quotes and safely + * read back using PHP to get the original string. + * + * @param string The string that should be escaped. + * @return string The escaped string. + */ + function escape_str($str) { + $str = str_replace('\\', '\\\\', $str); + $str = str_replace('\'', '\\\'', $str); + return $str; + } + + /** * Returns the configuration. * * @return string A string suitable for inclusion in the @@ -176,7 +179,7 @@ if ($this->is_ready() && $this->is_valid() && $this->value != $this->default) { return "/* $this->name */\n\$this->properties['$this->name'] = " . - "'$this->value';\n\n"; + "'" . $this->escape_str($this->value) . "';\n\n"; } else { return ''; } Index: pw_option_integer.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_option_integer.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_option_integer.php 12 Apr 2002 22:01:49 -0000 1.1 +++ pw_option_integer.php 1 Jul 2003 10:15:36 -0000 1.2 @@ -1,12 +1,14 @@ <?php class pw_option_integer extends pw_option_text { - function pw_option_integer($name, $description, $dependencies, + function pw_option_integer($name, $description, $dependency = false, $validator = false, $default = false) { if (!$validator) { - $validator = new pw_validator_ereg("Sorry, '%s' is not an integer.", '^[-+]?[0-9]+$'); + $validator = new pw_validator_ereg("Sorry, '%s' is not an integer.", + '^[-+]?[0-9]+$'); } - $this->pw_option_text($name, $description, $dependencies, $validator, $default); + $this->pw_option_text($name, $description, $dependency, + $validator, $default); } function get_config() { Index: pw_option_multi_select.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_option_multi_select.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_option_multi_select.php 7 Apr 2002 18:38:20 -0000 1.1 +++ pw_option_multi_select.php 1 Jul 2003 10:15:36 -0000 1.2 @@ -4,8 +4,8 @@ var $choices = array(); - function pw_option_multi_select($name, $description, $dependencies, $choices) { - $this->pw_option($name, $description, $dependencies); + function pw_option_multi_select($name, $description, $dependency = false, $choices) { + $this->pw_option($name, $description, $dependency); $this->choices = $choices; } @@ -51,8 +51,12 @@ function get_config() { if ($this->is_ready() && $this->is_valid() && !empty($this->value)) { - return "/* $this->name */\n\$this->properties['$this->name'] = array(\n" . - " '" . implode("',\n '", $this->value) . "'\n);\n"; + /* Escape the value using the static pw_option::escape_str + * method as a callback */ + $escaped = array_map(array('pw_option', 'escape_str'), $this->value); + return "/* $this->name */\n" . + "\$this->properties['$this->name'] = array(\n" . + " '" . implode("',\n '", $escaped) . "'\n);\n"; } else { return ''; } Index: pw_option_select.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_option_select.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- pw_option_select.php 28 Dec 2002 00:52:54 -0000 1.2 +++ pw_option_select.php 1 Jul 2003 10:15:36 -0000 1.3 @@ -4,12 +4,12 @@ var $choices = array(); - function pw_option_select($name, $description, $dependencies, + function pw_option_select($name, $description, $dependency = false, $choices, $default = false) { if ($default && isset($choices[$default])) { - $this->pw_option($name, $description, $dependencies, false, $default); + $this->pw_option($name, $description, $dependency, false, $default); } else { - $this->pw_option($name, $description, $dependencies, false, key($choices)); + $this->pw_option($name, $description, $dependency, false, key($choices)); } $this->choices = $choices; } @@ -19,9 +19,11 @@ } function show() { + if ($this->is_ready()) { - echo "<dt>Option <code>$this->name</code>: "; + echo "<dt>Option <code>$this->name</code>: "; echo '<select name="' . $this->name . '_value">'; + foreach ($this->choices as $choice => $label) { if ($choice == $this->value) { echo '<option selected="selected" value="' . @@ -36,12 +38,12 @@ echo '<p style="color: green">Input accepted.</p>'; } else { echo '<p style="color: red">Please correct your input: "' . - $this->value . '" is not amount your choices.</p>'; + $this->value . '" is not among your choices.</p>'; } echo "\n</dd>\n"; } } - + } ?> Index: pw_option_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_option_text.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- pw_option_text.php 29 May 2002 20:42:56 -0000 1.3 +++ pw_option_text.php 1 Jul 2003 10:15:36 -0000 1.4 @@ -1,18 +1,20 @@ <?php class pw_option_text extends pw_option { - function pw_option_text($name, $description, $dependencies, + function pw_option_text($name, $description, $dependency, $validator = false, $default = false) { - $this->pw_option($name, $description, $dependencies, $validator, $default); + $this->pw_option($name, $description, $dependency, $validator, $default); } function show() { + if ($this->is_ready()) { echo "<dt>Option <code>$this->name</code>: "; echo '<input type="text" name="' . $this->name . '_value" value="' . htmlentities($this->value) . '" onkeyup="' . $this->validator->get_javascript($this->name) . "\" /></dt>\n"; + echo '<dd><p>' . $this->description . "</p>\n"; if ($this->is_valid()) { echo '<p id="' . $this->name . '"><font color="green">Input accepted.</font></p>'; |
From: Martin G. <gim...@us...> - 2003-07-01 10:05:08
|
Update of /cvsroot/phpweather/phpweather/config In directory sc8-pr-cvs1:/tmp/cvs-serv13992 Modified Files: pw_dependency_or.php pw_dependency.php Added Files: pw_dependency_and.php pw_dependency_equal.php pw_dependency_not.php Log Message: The dependency classes can now handle full Boolean expressions with the pw_dependency_or, pw_dependency_and, and pw_dependency_not classes. The old pw_dependency class is now called pw_dependency_equal because it depends on a given option being equal to a given value. The pw_dependency class is only there to act as some form of interface although it isn't strictly necessary. --- NEW FILE --- <?php require_once('pw_dependency.php'); /** * An 'and' dependency. * * This dependency is a collection of several dependencies and will * only be satisfied when all of them is satisfied. The logic is * short-circuit so that the evaluation stops as soon as the answer is * known, that is, as soon as one of the dependencies fail. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_dependency_and.php,v 1.1 2003/07/01 10:05:04 gimpster Exp $ * @package PHP Weather Configurator */ class pw_dependency_and extends pw_dependency { /** * Constructs a new 'and' dependency. * * @param mixed A variable number of other dependencies. This * dependency is satisfied if and only if all the dependencies * satisfied. */ function pw_dependency_and() { $this->pw_dependency(func_get_args()); } /** * Checks the dependency. * * All the dependencies that were used to create this dependency is * tested one after another. * * @return boolean Returns true if and only if all all the * dependencies are satisfied. */ function check() { foreach ($this->dep as $d) { if (!$d->check()) return false; } return true; } } ?> --- NEW FILE --- <?php require_once('pw_dependency.php'); /** * Depends on an option being ready and having a particular value. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_dependency_equal.php,v 1.1 2003/07/01 10:05:04 gimpster Exp $ * @package PHP Weather Configurator * @abstract */ class pw_dependency_equal extends pw_dependency { /** * The name of an option. * * @var string The name of the option that should be checked. */ var $option; /** * Constructs a new dependency. * * @param string $option The name of the option that must satisfy * the dependency. * @param string $dep The required value of the option. * */ function pw_dependency_equal($option, $dep) { $this->option = $option; $this->pw_dependency($dep); } /** * Check the dependency. * * The dependency is tested using value equality (==) and not the * more restrictive type and value equality (===). Additionally the * option must be ready to be displayed. * * @return boolean Returns true if the dependency is satisfied, * false otherwise. */ function check() { global $HTTP_SESSION_VARS; return ($HTTP_SESSION_VARS[$this->option]->is_ready() && $HTTP_SESSION_VARS[$this->option]->get_value() == $this->dep); } } ?> --- NEW FILE --- <?php require_once('pw_dependency.php'); /** * An 'not' dependency. * * This dependency negates another dependency and is satisfied if and * only if the other dependency fails. * * @author Martin Geisler <gim...@gi...> * @version $Id: pw_dependency_not.php,v 1.1 2003/07/01 10:05:04 gimpster Exp $ * @package PHP Weather Configurator */ class pw_dependency_not extends pw_dependency { /** * Constructs a new 'not' dependency. * * @param object $dependency The dependency that should be negated. */ function pw_dependency_not($dependency) { $this->pw_dependency($dependency); } /** * Checks the dependency. * * @return boolean Returns true if and only if the dependency wasn't * satisfied. */ function check() { return !$this->dep->check(); } } ?> Index: pw_dependency_or.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_dependency_or.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- pw_dependency_or.php 28 Dec 2002 00:52:54 -0000 1.3 +++ pw_dependency_or.php 1 Jul 2003 10:05:04 -0000 1.4 @@ -1,10 +1,15 @@ <?php +require_once('pw_dependency.php'); + /** * An 'or' dependency. * * This dependency is a collection of several dependencies, but it - * will be satisfied as long a just one of them is satisfied. + * will be satisfied as long at least one of them is satisfied. The + * logic is short-circuit so that the evaluation stops as soon as the + * answer is known, that is, as soon as one of the dependencies is + * satisfied. * * @author Martin Geisler <gim...@gi...> * @version $Id$ @@ -13,25 +18,28 @@ class pw_dependency_or extends pw_dependency { /** - * Constructs a new 'or' dependency. - * - * @param string $option The name of the option that must satisfy - * one of the dependencies. - * - * @param array $dependencies This should be an array of strings. If - * the value of $option equals just one of these strings, then the - * dependency is satisfied. + * Constructs a new 'and' dependency. * + * @param mixed A variable number of other dependencies. This + * dependency is satisfied if at least one of the dependencies + * satisfied. */ - function pw_dependency_or($option, $dependencies) { - $this->pw_dependency($option, $dependencies); + function pw_dependency_or() { + $this->pw_dependency(func_get_args()); } + /** + * Checks the dependency. + * + * All the dependencies that were used to create this dependency is + * tested one after another until one of them is satisfied. + * + * @return boolean Returns true if at least one of the + * dependencies are satisfied. + */ function check() { - global $HTTP_SESSION_VARS; - $value = $HTTP_SESSION_VARS[$this->option]->get_value(); foreach ($this->dep as $d) { - if ($value == $d) return true; + if ($d->check()) return true; } return false; } Index: pw_dependency.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_dependency.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- pw_dependency.php 28 Dec 2002 00:52:54 -0000 1.3 +++ pw_dependency.php 1 Jul 2003 10:05:04 -0000 1.4 @@ -11,41 +11,30 @@ class pw_dependency { /** - * The name of an option. + * Other dependencies that this dependency depends on. * - * @var string The name of the option that should be checked. - */ - var $option; - - /** - * The value that the option must have to satisfy this dependency. - * - * @var string The required value. + * @var mixed Depending on the subclass, this can be an array of + * other dependencies, a string to match or something else. */ var $dep; /** * Constructs a new dependency. * - * @param string $option The name of the option that must satisfy - * the dependency. - * @param string $dep The required value of the option. - * + * @param string $dep Other dependencies. */ - function pw_dependency($option, $dep) { - $this->option = $option; + function pw_dependency($dep) { $this->dep = $dep; } /** - * Checks a dependency. + * Check the dependency. * - * @return boolean True if the dependency is satisfied, false - * otherwise. + * @return boolean Returns false because this is an abstract method. + * @abstract */ function check() { - global $HTTP_SESSION_VARS; - return ($HTTP_SESSION_VARS[$this->option]->get_value() == $this->dep); + trigger_error('Abstract method', E_USER_ERROR); } } ?> |
From: Martin G. <gim...@us...> - 2003-07-01 09:34:57
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv10186 Modified Files: data_retrieval.php Log Message: Added PhpDoc comments to get_metar_file() and get_metar_socket(). Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- data_retrieval.php 29 Oct 2002 08:52:43 -0000 1.30 +++ data_retrieval.php 1 Jul 2003 09:34:54 -0000 1.31 @@ -128,7 +128,18 @@ } } - + /** + * Retrieves a METAR report using fsockopen(). + * + * The communication with the proxy (if one is needed) and the NWS + * is done using fsockopen(). This should be used when the file() + * function is disabled. + * + * @access private + * @param string The ICAO for which the report will be fetched. + * @return array The raw METAR report line by line in an array. + * @see get_metar_file() + */ function get_metar_socket($icao) { $host = 'weather.noaa.gov'; $location = "/pub/data/observations/metar/stations/$icao.TXT"; @@ -178,6 +189,18 @@ } + /** + * Retrieves a METAR report using file(). + * + * The communication with the NWS is done using file(). This should + * only be used when a direct connection to the NWS can be + * established, the proxy settings isn't used with file(). + * + * @access private + * @param string The ICAO for which the report will be fetched. + * @return array The raw METAR report line by line in an array. + * @see get_metar_socket() + */ function get_metar_file($icao) { $host = 'weather.noaa.gov'; $location = "/pub/data/observations/metar/stations/$icao.TXT"; |
From: Martin G. <gim...@us...> - 2003-06-14 23:37:12
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv14029/output Modified Files: pw_text.php Log Message: The final full-stop would be omitted if the dew-point was missing in the report. Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- pw_text.php 8 May 2003 19:42:36 -0000 1.18 +++ pw_text.php 14 Jun 2003 23:37:09 -0000 1.19 @@ -756,9 +756,9 @@ $this->pref_units($this->properties['mark_begin'] . $dew_c . $this->properties['mark_end'] . ' °C', $this->properties['mark_begin'] . $dew_f . - $this->properties['mark_end'] . ' °F') . '.'; + $this->properties['mark_end'] . ' °F'); } - return $output; + return $output . '.'; } function print_pretty_altimeter($altimeter) { |
From: Martin G. <gim...@us...> - 2003-06-14 23:35:41
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv13941 Modified Files: test.php Log Message: Now with the entire decoded METAR. Index: test.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/test.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- test.php 10 Nov 2002 23:10:46 -0000 1.6 +++ test.php 14 Jun 2003 23:35:38 -0000 1.7 @@ -50,13 +50,24 @@ $type = 'pw_text_' . $language; $text = new $type($weather); + + echo "<h2>Report made by <code>$type</code></h2>\n"; - echo "<blockquote>\n" . $text->print_pretty() . "</blockquote>\n"; + echo "<p>\n" . $text->print_pretty() . "</p>\n"; + + echo "<h2>Images selected by <code>pw_images</code></h2>\n"; $icons = new pw_images($weather); echo '<p><img src="'.$icons->get_sky_image().'" /> '; echo '<img src="'.$icons->get_winddir_image().'" /> '; echo '<img src="'.$icons->get_temp_image().'" /></p>'; + + echo "<h2>The decoded METAR follows</h2>\n"; + + echo "<pre>\n"; + print_r($weather->decode_metar()); + echo "</pre>\n"; + } ?> |
From: Martin G. <gim...@us...> - 2003-06-14 23:35:02
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv13726 Modified Files: phpweather.php Log Message: Fixed decoded of UK temperature parts with missing dew-point, thanks to the report and explanation given by Tom McDonald and Nick B. Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- phpweather.php 2 Sep 2002 18:17:47 -0000 1.32 +++ phpweather.php 14 Jun 2003 23:34:59 -0000 1.33 @@ -439,7 +439,7 @@ } $decoded_metar['clouds'][] = $group; - } elseif (ereg('^(M?[0-9]{2})/(M?[0-9]{2})?$', $part, $regs)) { + } elseif (ereg('^(M?[0-9]{2})/(M?[0-9]{2}|//)?$', $part, $regs)) { /* * Temperature/Dew Point Group. */ @@ -447,7 +447,11 @@ round(strtr($regs[1], 'M', '-')); $decoded_metar['temperature']['temp_f'] = round(strtr($regs[1], 'M', '-') * (9/5) + 32); - if (!empty($regs[2])) { + + /* The dewpoint could be missing, this is indicated by the + * second group being empty at most places, but in the UK they + * use '//' instead of the missing temperature... */ + if (!empty($regs[2]) && $regs[2] != '//') { $decoded_metar['temperature']['dew_c'] = round(strtr($regs[2], 'M', '-')); $decoded_metar['temperature']['dew_f'] = |
From: Martin G. <gim...@us...> - 2003-05-09 01:02:52
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv16678/output Modified Files: pw_text.php Log Message: Instead of rounding the $minutes_old and $hours, we truncate. The old code would make a report that is 6000 seconds old look like it was 2 hours and 40 minutes old because the 1.66 hours were rounded upward to 2 hours. Thanks goes to Jim Whitehead for pointing this out and fixing it. Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- pw_text.php 5 Mar 2003 19:53:24 -0000 1.17 +++ pw_text.php 8 May 2003 19:42:36 -0000 1.18 @@ -635,9 +635,9 @@ } function print_pretty_time($time) { - $minutes_old = round((time() - $time)/60); - if ($minutes_old > 60) { - $hours = round((time() - $time)/3600); + $minutes_old = (int) ((time() - $time)/60); + if ($minutes_old >= 60) { + $hours = (int) ((time() - $time)/3600); $minutes = $minutes_old % 60; if ($minutes < 1) { $minutes = ''; |
From: Martin G. <gim...@us...> - 2003-05-09 01:02:49
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv16678 Modified Files: AUTHORS make-release.sh Log Message: Instead of rounding the $minutes_old and $hours, we truncate. The old code would make a report that is 6000 seconds old look like it was 2 hours and 40 minutes old because the 1.66 hours were rounded upward to 2 hours. Thanks goes to Jim Whitehead for pointing this out and fixing it. Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather/AUTHORS,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- AUTHORS 20 Apr 2003 13:12:41 -0000 1.12 +++ AUTHORS 8 May 2003 19:42:35 -0000 1.13 @@ -121,3 +121,7 @@ Andrew Simpson (andrewsimpson) Reported problems with the use of short open tags in a couple of files. + +Jim Whitehead <ji...@tw...> + Fixed the rounding of hours and minutes in the pretty-printed + report. Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- make-release.sh 20 Apr 2003 13:12:43 -0000 1.9 +++ make-release.sh 8 May 2003 19:42:36 -0000 1.10 @@ -88,4 +88,3 @@ echo "done." fi - |
From: Martin G. <gim...@us...> - 2003-04-22 20:49:30
|
Update of /cvsroot/phpweather/phpweather/config In directory sc8-pr-cvs1:/tmp/cvs-serv2054 Modified Files: make_db.php Log Message: More fixes from Andrew Simpson (andrewsimpson). This closes #724856. Index: make_db.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/make_db.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- make_db.php 29 May 2002 20:42:56 -0000 1.3 +++ make_db.php 22 Apr 2003 20:49:26 -0000 1.4 @@ -45,7 +45,7 @@ if (!empty($HTTP_POST_VARS['do_sql'])) { echo "<blockquote>\n"; - define('PHPWEATHER_BASE_DIR', dirname(__FILE__) . '/..'); + define('PHPWEATHER_BASE_DIR', realpath(dirname(__FILE__) . '/..')); require_once(PHPWEATHER_BASE_DIR . '/db_layer.php'); $db = new db_layer(); @@ -65,7 +65,7 @@ $countries[$cc] = $country; $num_countries++; //echo "<p>Now processing stations in $country.</p>\n"; - } elseif ($row[0] != '#' && $row != '') { + } elseif (!empty($row) && $row[0] != '#') { list($icao, $name) = explode(';', $row, 2); $num_rows++; $data[$cc][$icao] = $name; |
From: Martin G. <gim...@us...> - 2003-04-20 13:22:06
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv10643 Modified Files: ChangeLog Log Message: Latest ChangeLog entries. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ChangeLog 5 Mar 2003 21:00:56 -0000 1.12 +++ ChangeLog 20 Apr 2003 13:22:02 -0000 1.13 @@ -1,3 +1,26 @@ +2003-04-20 13:20 Martin Geisler <gim...@gi...> + + * VERSION: + + PHP Weather 2.1.2. + +2003-04-20 13:12 Martin Geisler <gim...@gi...> + + * AUTHORS, INSTALL, README, README-CVS, defaults-dist.php, + images-test.php, make-release.sh, config/make_config.php, + config/pw_validator_ereg.php, config/pw_validator_range.php: + + Updated copyright statements a bit, and reworded some paragraphs. + + Fixed the last couple of short open tags that were still hiding... + Thanks goes to Andrew Simpson (andrewsimpson) for reporting this. + +2003-03-05 21:00 Martin Geisler <gim...@gi...> + + * ChangeLog: + + Latest ChangeLog entries. + 2003-03-05 20:18 Martin Geisler <gim...@gi...> * VERSION: |
From: Martin G. <gim...@us...> - 2003-04-20 13:21:03
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv10262a Modified Files: VERSION Log Message: PHP Weather 2.1.2. Index: VERSION =================================================================== RCS file: /cvsroot/phpweather/phpweather/VERSION,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- VERSION 5 Mar 2003 20:18:53 -0000 1.10 +++ VERSION 20 Apr 2003 13:20:58 -0000 1.11 @@ -1 +1 @@ -2.1.1 +2.1.2 |
From: Martin G. <gim...@us...> - 2003-04-20 13:13:05
|
Update of /cvsroot/phpweather/phpweather/config In directory sc8-pr-cvs1:/tmp/cvs-serv7461/config Modified Files: make_config.php pw_validator_ereg.php pw_validator_range.php Log Message: Updated copyright statements a bit, and reworded some paragraphs. Fixed the last couple of short open tags that were still hiding... Thanks goes to Andrew Simpson (andrewsimpson) for reporting this. Index: make_config.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/make_config.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- make_config.php 28 Dec 2002 14:15:47 -0000 1.8 +++ make_config.php 20 Apr 2003 13:12:43 -0000 1.9 @@ -453,7 +453,7 @@ options might appear. Continue to change the options until they all say <span style="color: green">Input accepted.</span></p> -<form action="<? echo $HTTP_SERVER_VARS['PHP_SELF'] . '?' . SID ?>" method="post"> +<form action="<?php echo $HTTP_SERVER_VARS['PHP_SELF'] . '?' . SID ?>" method="post"> <p>You can <input type="submit" name="download" value="Download the Configuration" /> or <input type="reset" Index: pw_validator_ereg.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_validator_ereg.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- pw_validator_ereg.php 13 Apr 2002 13:12:29 -0000 1.3 +++ pw_validator_ereg.php 20 Apr 2003 13:12:43 -0000 1.4 @@ -1,4 +1,4 @@ -<? +<?php /** * Validates input against a regular expression. * Index: pw_validator_range.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/config/pw_validator_range.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- pw_validator_range.php 13 Apr 2002 13:12:29 -0000 1.4 +++ pw_validator_range.php 20 Apr 2003 13:12:43 -0000 1.5 @@ -1,4 +1,4 @@ -<? +<?php /** * Validates an integer. * |
From: Martin G. <gim...@us...> - 2003-04-20 13:12:50
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv7461 Modified Files: AUTHORS INSTALL README README-CVS defaults-dist.php images-test.php make-release.sh Log Message: Updated copyright statements a bit, and reworded some paragraphs. Fixed the last couple of short open tags that were still hiding... Thanks goes to Andrew Simpson (andrewsimpson) for reporting this. Index: AUTHORS =================================================================== RCS file: /cvsroot/phpweather/phpweather/AUTHORS,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- AUTHORS 4 Mar 2003 14:36:27 -0000 1.11 +++ AUTHORS 20 Apr 2003 13:12:41 -0000 1.12 @@ -1,18 +1,28 @@ -Main author: Martin Geisler <gim...@gi...> +AUTHORS file for PHP Weather #VERSION# #DATE# -*- text -*- +Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> +Licensed under the GNU GPL. See the file COPYING for details. + + +Contributers to PHP Weather +--------------------------- +Everybody listed below has helped me in some way with the creation of +PHP Weather, and I'm very grateful to all of them. If, by some +mistake, your name isn't listed below, then send me a mail, and I'll +add it. --Martin Geisler <gim...@gi...> + +The names are, in somewhat chronological order: -A big thanks goes to all these persons, who have helped me make PHP -Weather: Kristian Kristensen <zi...@zi...> - He made the interface to PostgreSQL. + Original discussions and a interface to PostgreSQL. Jeremy D. Zawodny <Je...@Za...> For writing Geo::METAR, where I found the logick needed in PHP Weather. See http://www.wcnet.org/jzawodn/perl/Geo-METAR/index.html Enrico Lodolo <e.l...@bo...> - For suggesting that I use http to get the metars instead of the much - slower ftp. + For suggesting that I use HTTP to get the METARs instead of the much + slower FTP. Stefan Wiesendanger <ste...@ep...> For rewritting some large case- and switch-statements as a couple of @@ -107,3 +117,7 @@ Konrad Tadesse Finally, a working German translation. + +Andrew Simpson (andrewsimpson) + Reported problems with the use of short open tags in a couple of + files. Index: INSTALL =================================================================== RCS file: /cvsroot/phpweather/phpweather/INSTALL,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- INSTALL 20 May 2002 17:41:17 -0000 1.7 +++ INSTALL 20 Apr 2003 13:12:41 -0000 1.8 @@ -1,5 +1,5 @@ -Installation instructions for PHP Weather #VERSION# #DATE# -Copyright (C) 2000-2002 Martin Geisler <gim...@gi...> +INSTALL file for PHP Weather #VERSION# #DATE# -*- text -*- +Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. @@ -7,7 +7,7 @@ ----------------- You can always get the latest version from - http://www.phpweather.net + http://sourceforge.net/project/showfiles.php?group_id=23245 Installation @@ -27,7 +27,7 @@ the METARs it fetches so that things can go faster. To help you with this task you'll find a couple of scripts in the -config/ subdirectory. The make_config.php script helps you build a +config/ subdirectory. The make_config.php script helps you build a configuration-file for PHP Weather and the make_db.php script will try and make the necessary database tables for you after you've configured PHP Weather. @@ -37,20 +37,30 @@ Bugs? ----- -If you find a bug or have a feature request for PHP Weather, please -don't hesitate to report it at http://sourceforge.net/projects/phpweather/ -We have a mailing list for general discussions about PHP Weather, -but before you can send mails to the list, you have to subscribe -to it - go to this page to subscribe: +If you find a bug or have a feature request for PHP Weather, please +don't hesitate to report it using the right tracker at SourceForge: + + http://sourceforge.net/tracker/?group_id=23245 + +We have a mailing list for general discussions about PHP Weather, +where you can ask questions and talk about anything with relation to +PHP Weather. Before you can send mails to the list, you have to +subscribe to it --- go to this page to subscribe: http://lists.sourceforge.net/lists/listinfo/phpweather-devel -If PHP Weather is decoding a METAR incorrectly, please remember to -include that METAR you're having problems with when you send a -message or submit a bug. Without it, we can't really help you. - -This version of PHP Weather only works with PHP4. The PHP Weather -1.x series work with PHP3, and are available from the project -page on sourceforge. +If PHP Weather is decoding a METAR incorrectly, please remember to +include that METAR you're having problems with when you send a message +or submit a bug. Without it, we can't really help you. You'll find +the METAR below the report on index.php. + +This and future versions of PHP Weather does not work with PHP3. If +this is a problem for you, then first try and upgrade your webserver, +PHP3 is a very old release now. If you cannot upgrade, then you can +use the PHP Weather 1.x series which offer you most of the +functionality found in PHP Weather 2.x. You can still download PHP +Weather 1.x from the project page on SourceForge: + + http://sourceforge.net/project/showfiles.php?group_id=23245 -Enjoy! - Martin Geisler <gim...@gi...> +Enjoy! --- Martin Geisler <gim...@gi...> Index: README =================================================================== RCS file: /cvsroot/phpweather/phpweather/README,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- README 26 Aug 2002 16:56:27 -0000 1.14 +++ README 20 Apr 2003 13:12:42 -0000 1.15 @@ -1,5 +1,5 @@ -README for PHP Weather #VERSION# #DATE# -Copyright (C) 2000-2002 Martin Geisler <gim...@gi...> +README for PHP Weather #VERSION# #DATE# -*- text -*- +Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. @@ -7,10 +7,10 @@ -------------------- PHP Weather is a script that makes it easy to show the current weather on your webpage. Airports all over the world make a so-called METAR -report once an hour. A METAR report is an aviation weather report to -be used primarily by airplanes. The report contains data, in a +report once an hour. A METAR report is an aviation weather report to +be used primarily by airplanes. The report contains data, in a shorthand form, about temperature, wind speed and direction, -cloud-coverage and much more. PHP Weather converts this format into +cloud-coverage and much more. PHP Weather converts this format into both imperial and metric units, caches the data in MySQL, Postgres or DBM database for fast retrieval, and makes them easily available in PHP scripts. @@ -38,20 +38,29 @@ How to contact us ----------------- If you find a bug or have a feature request for PHP Weather, please -don't hesitate to report it at SourceForge using the Bug Tracker: +don't hesitate to report it at SourceForge using one of the available +trackers: - http://sourceforge.net/tracker/?group_id=23245&atid=377952 + http://sourceforge.net/tracker/?group_id=23245 -We have a mailing list for general discussions about PHP Weather, but -before you can send mails to the list, you have to subscribe to it - -go to this page to subscribe: +We have a mailing list for general discussions about PHP Weather, +where you can ask questions and talk about anything with relation to +PHP Weather. Before you can send mails to the list, you have to +subscribe to it --- go to this page to subscribe: http://lists.sourceforge.net/lists/listinfo/phpweather-devel -If the problem you're reporting has to do with the decoding of a -specific METAR report, then please remember to include the METAR in -your report. Without it, we can't really help you. +If PHP Weather is decoding a METAR incorrectly, please remember to +include that METAR you're having problems with when you send a message +or submit a bug. Without it, we can't really help you. You'll find +the METAR below the report on index.php. You can always get the newest version at + http://sourceforge.net/project/showfiles.php?group_id=23245 + +and you'll find additionally information at + http://www.phpweather.net/ + +Enjoy! --- Martin Geisler <gim...@gi...> Index: README-CVS =================================================================== RCS file: /cvsroot/phpweather/phpweather/README-CVS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- README-CVS 26 Aug 2002 16:56:27 -0000 1.4 +++ README-CVS 20 Apr 2003 13:12:42 -0000 1.5 @@ -1,13 +1,16 @@ -************************************************************************ -* PHP Weather - a METAR decoder * -************************************************************************ +README-CVS for PHP Weather -*- text -*- +Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> +Licensed under the GNU GPL. See the file COPYING for details. + +README for CVS code +------------------- Since you have this file, you must be using a CVS version of PHP -Weather. The CVS version contains the latest ideas but also the latest -bugs... +Weather. The CVS version contains the latest ideas but also the +latest bugs... It should work most of the time, but don't be too surprised if it -doesn't. You should follow the CVS commits-maillinglist if you're +doesn't. You should follow the CVS commits-maillinglist if you're interested in getting email every time CVS has changed: http://lists.sourceforge.net/lists/listinfo/phpweather-checkins @@ -16,4 +19,4 @@ understanding how PHP Weather works, since the changes are described in the messages. --- Martin Geisler <gim...@gi...> +Beware and enjoy! --- Martin Geisler <gim...@gi...> Index: defaults-dist.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/defaults-dist.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- defaults-dist.php 21 Jan 2003 22:27:28 -0000 1.16 +++ defaults-dist.php 20 Apr 2003 13:12:42 -0000 1.17 @@ -4,10 +4,11 @@ /* This file holds the original defaults used by PHP Weather. If you * want to change something, you should follow these procedures: * - * Use the script config/make_config.. If you don't want to use that - * for some reason, then it's also simple to edit this file manually: + * Use the script config/make_config.php. If you don't want to use + * that for some reason, then it's also simple to edit this file + * manually: * - * 1) save this file as 'defaults.php' + * 1) save this file as 'defaults.php' in this directory. * 2) change the options you want * 3) remove everything you didn't change * Index: images-test.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/images-test.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- images-test.php 20 Mar 2002 19:26:50 -0000 1.2 +++ images-test.php 20 Apr 2003 13:12:42 -0000 1.3 @@ -60,7 +60,7 @@ available through the internet. For example the METAR data for Eindhoven Airport, Netherlands is:</p> -<blockquote><code><? echo $metar ?></code></blockquote> +<blockquote><code><?php echo $metar ?></code></blockquote> <p>Martin Geisler (<a href="http://www.gimpster.com">www.gimpster.com</a>) has developed a @@ -69,7 +69,7 @@ href="http://sourceforge.net/projects/phpweather/">PHP Weather</a>. By this script, the METAR data of above is converted into:</p> -<? $text->print_pretty(); ?> +<?php $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 @@ -87,9 +87,9 @@ 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"> +<img src="<?php echo $images->get_temp_image() ?>" height="50" width="20" border="1"> +<img src="<?php echo $images->get_winddir_image() ?>" height="40" width="40" border="1"> +<img src="<?php echo $images->get_sky_image() ?>" height="50" width="80" border="1"> </blockquote> <h2>At first...</h2> @@ -164,7 +164,7 @@ </ul> </p> -<? $images->set_time('day'); ?> +<?php $images->set_time('day'); ?> <table class="weather" border="1"> <tr> @@ -177,76 +177,76 @@ </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> + <td><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('FEW000') ?></td> + <td><?php print_sky_image('SCT000') ?></td> + <td><?php print_sky_image('BKN000') ?></td> + <td><?php 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> + <td rowspan=3><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('-RA FEW000') ?></td> + <td><?php print_sky_image('-RA SCT000') ?></td> + <td><?php print_sky_image('-RA BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('RA FEW000') ?></td> + <td><?php print_sky_image('RA SCT000') ?></td> + <td><?php print_sky_image('RA BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('+RA FEW000') ?></td> + <td><?php print_sky_image('+RA SCT000') ?></td> + <td><?php print_sky_image('+RA BKN000') ?></td> + <td><?php 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> + <td rowspan=2><?php print_sky_image('CLR') ?></td> + <td rowspan=2><?php print_sky_image('SN FEW000') ?></td> + <td rowspan=2><?php print_sky_image('SN SCT000') ?></td> + <td rowspan=2><?php print_sky_image('SN BKN000') ?></td> + <td><?php print_sky_image('SN OVC000') ?></td> </tr> <tr> <td>heavy</td> - <td><? print_sky_image('+SN OVC000') ?></td> + <td><?php 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> + <td rowspan=2><?php print_sky_image('CLR') ?></td> + <td rowspan=2><?php print_sky_image('IC FEW000') ?></td> + <td rowspan=2><?php print_sky_image('IC SCT000') ?></td> + <td rowspan=2><?php print_sky_image('IC BKN000') ?></td> + <td><?php print_sky_image('IC OVC000') ?></td> </tr> <tr> <td>heavy</td> - <td><? print_sky_image('+IC OVC000') ?></td> + <td><?php 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> + <td><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('TS FEW000') ?></td> + <td><?php print_sky_image('TS SCT000') ?></td> + <td><?php print_sky_image('TS BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('FG CLR000') ?></td> + <td><?php print_sky_image('FG FEW000') ?></td> + <td><?php print_sky_image('FG SCT000') ?></td> + <td><?php print_sky_image('FG BKN000') ?></td> + <td><?php print_sky_image('FG OVC000') ?></td> </tr> </table> @@ -260,7 +260,7 @@ <p>To the night time sky cover/precipitation icons the same remarks as to the day tim icons apply.</p> -<? $images->set_time('nite'); ?> +<?php $images->set_time('nite'); ?> <table border="1" class="weather"> <tr> <th class="weather" colspan=2 width=200>Sky Cover/<br>Precipitation</th> @@ -272,76 +272,76 @@ </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> + <td><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('FEW000') ?></td> + <td><?php print_sky_image('SCT000') ?></td> + <td><?php print_sky_image('BKN000') ?></td> + <td><?php 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> + <td rowspan=3><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('-RA FEW000') ?></td> + <td><?php print_sky_image('-RA SCT000') ?></td> + <td><?php print_sky_image('-RA BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('RA FEW000') ?></td> + <td><?php print_sky_image('RA SCT000') ?></td> + <td><?php print_sky_image('RA BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('+RA FEW000') ?></td> + <td><?php print_sky_image('+RA SCT000') ?></td> + <td><?php print_sky_image('+RA BKN000') ?></td> + <td><?php 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> + <td rowspan=2><?php print_sky_image('CLR') ?></td> + <td rowspan=2><?php print_sky_image('SN FEW000') ?></td> + <td rowspan=2><?php print_sky_image('SN SCT000') ?></td> + <td rowspan=2><?php print_sky_image('SN BKN000') ?></td> + <td><?php print_sky_image('SN OVC000') ?></td> </tr> <tr> <td>heavy</td> - <td><? print_sky_image('+SN OVC000') ?></td> + <td><?php 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> + <td rowspan=2><?php print_sky_image('CLR') ?></td> + <td rowspan=2><?php print_sky_image('IC FEW000') ?></td> + <td rowspan=2><?php print_sky_image('IC SCT000') ?></td> + <td rowspan=2><?php print_sky_image('IC BKN000') ?></td> + <td><?php print_sky_image('IC OVC000') ?></td> </tr> <tr> <td>heavy</td> - <td><? print_sky_image('+IC OVC000') ?></td> + <td><?php 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> + <td><?php print_sky_image('CLR') ?></td> + <td><?php print_sky_image('TS FEW000') ?></td> + <td><?php print_sky_image('TS SCT000') ?></td> + <td><?php print_sky_image('TS BKN000') ?></td> + <td><?php 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> + <td><?php print_sky_image('FG CLR000') ?></td> + <td><?php print_sky_image('FG FEW000') ?></td> + <td><?php print_sky_image('FG SCT000') ?></td> + <td><?php print_sky_image('FG BKN000') ?></td> + <td><?php print_sky_image('FG OVC000') ?></td> </tr> </table> @@ -351,7 +351,7 @@ as well. Since the metar exists, I decided to show the 'moony' icon.</p> -<? $images->set_time(''); ?> +<?php $images->set_time(''); ?> <h2>Wind direction</h2> <p>A dedicated group in the METAR data provides wind related @@ -437,9 +437,9 @@ <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> + <td><?php print_temp_image('M05/M05') ?></td> + <td><?php print_temp_image('05/05') ?></td> + <td><?php print_temp_image(' ') ?></td> </tr> </table> Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- make-release.sh 21 Jan 2003 22:25:39 -0000 1.8 +++ make-release.sh 20 Apr 2003 13:12:43 -0000 1.9 @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2001 Martin Geisler <gim...@gi...> +# Copyright 2001--2003 Martin Geisler <gim...@gi...> # You're free to use this as described in the GPL. # # This small script retrieves the latest version of PHP Weather, pack @@ -23,7 +23,7 @@ rm README-CVS VERSION make-release.sh update-changelog.sh rm usermap $(find . -name '.cvsignore') -for file in README INSTALL base_object.php doc/src/phpweather.texi; do +for file in README INSTALL AUTHORS base_object.php doc/src/phpweather.texi; do sed -e "s/#VERSION#/$VERSION/g" -e "s/#DATE#/$DATE/g" $file > tmp mv -f tmp $file done |
From: Martin G. <gim...@gi...> - 2003-03-06 21:47:43
|
Ondrej Jombik <ne...@po...> writes: >> > Added Files: >> > pw_text_de.php >> > Log Message: >> > Super! A German translation from Konrad Tadesse. >> Forgetting about translating also the 'tendency' sentences? > > I remember, that I had problems with these too... Yes, it's unfortunately not so obvious how all the sentences are used... especially when you're not used to the this jargon. It would be nice with examples that explained exactly where each string is used. Just an idea if someone is looking for something to do... :-) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Ondrej J. <ne...@po...> - 2003-03-05 23:19:31
|
> > Added Files: > > pw_text_de.php > > Log Message: > > Super! A German translation from Konrad Tadesse. > Forgetting about translating also the 'tendency' sentences? I remember, that I had problems with these too... -- _/| Ondrej Jombik - ne...@ph... - http://www.nepto.sk - OJ812-RIPE <_ \ Platon SDG - open source software development - http://platon.sk `\| Nech operacia X na mnozine G tvori grupu, potom plati... rundu! '` |
From: Martin G. <gim...@us...> - 2003-03-05 21:01:05
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv16891 Modified Files: ChangeLog Log Message: Latest ChangeLog entries. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ChangeLog 5 Mar 2003 20:02:16 -0000 1.11 +++ ChangeLog 5 Mar 2003 21:00:56 -0000 1.12 @@ -1,3 +1,20 @@ +2003-03-05 20:18 Martin Geisler <gim...@gi...> + + * VERSION: + + This is version 2.1.1. + +2003-03-05 20:02 Martin Geisler <gim...@gi...> + + * ChangeLog: + + Most significant entries in the ChangeLog since 2.1.0: + + * New German translation by Konrad Tadesse. * Configuration + problem in output modules (bug #613963) fixed. * Added a simple + page to help people test their connectivity. * The arrows that + show the wind direction can be reversed. + 2003-03-05 19:56 Martin Geisler <gim...@gi...> * base_object.php: |
From: Martin G. <gim...@us...> - 2003-03-05 20:19:02
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv29039 Modified Files: VERSION Log Message: This is version 2.1.1. Index: VERSION =================================================================== RCS file: /cvsroot/phpweather/phpweather/VERSION,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- VERSION 28 Dec 2002 13:40:05 -0000 1.9 +++ VERSION 5 Mar 2003 20:18:53 -0000 1.10 @@ -1 +1 @@ -2.1.0 +2.1.1 |