phpweather-checkins Mailing List for PHP Weather (Page 15)
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: Max H. <ir...@us...> - 2002-03-26 22:08:04
|
Update of /cvsroot/phpweather/web/include In directory usw-pr-cvs1:/tmp/cvs-serv5957 Modified Files: footer.php Log Message: Testing new logo Index: footer.php =================================================================== RCS file: /cvsroot/phpweather/web/include/footer.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- footer.php 24 Mar 2002 22:55:33 -0000 1.2 +++ footer.php 26 Mar 2002 22:00:43 -0000 1.3 @@ -2,6 +2,9 @@ <hr> <a href="http://sourceforge.net/projects/phpweather/"><img +src="http://phpweather.sourceforge.net/phplogo-white.gif" width="88" +height="31" border="0" alt="PHP Weather Logo" align="left"></a> +<a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=23245" width="88" height="31" border="0" alt="SourceForge Logo" align="right"></a> |
|
From: Martin G. <gim...@us...> - 2002-03-26 22:08:04
|
Update of /cvsroot/phpweather/web
In directory usw-pr-cvs1:/tmp/cvs-serv5663
Modified Files:
index.php
Log Message:
Alternate text for the images.
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/web/index.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- index.php 25 Mar 2002 22:10:17 -0000 1.14
+++ index.php 26 Mar 2002 22:00:21 -0000 1.15
@@ -22,11 +22,11 @@
echo '<p>Current weather in ' . $weather->get_location() . ': <br />' .
'<img src="' . $images->get_sky_image() .
- '" height="50" width="80" border="1"> ' .
+ '" height="50" width="80" border="1" alt="Current weather"> ' .
'<img src="' . $images->get_winddir_image() .
- '" height="40" width="40" border="1"> ' .
+ '" height="40" width="40" border="1" alt="Current wind"> ' .
'<img src="' . $images->get_temp_image() .
- '" height="50" width="20" border="1"></p>';
+ '" height="50" width="20" border="1" alt="Current temperature"></p>';
echo "<p>A textual report looks like this:</p>\n";
@@ -118,11 +118,11 @@
echo "<blockquote>\n";
echo '<img src="' . $icons->get_sky_image() .
- '" height="50" width="80" border="1"> ';
+ '" height="50" width="80" border="1" alt="Current weather"> ';
echo '<img src="' . $icons->get_winddir_image() .
- '" height="40" width="40" border="1"> ';
+ '" height="40" width="40" border="1" alt="Current wind"> ';
echo '<img src="' . $icons->get_temp_image() .
- '" height="50" width="20" border="1">';
+ '" height="50" width="20" border="1" alt="Current temperature">';
echo "</blockquote>\n";
|
|
From: Max H. <ir...@us...> - 2002-03-26 22:07:33
|
Update of /cvsroot/phpweather/web/include In directory usw-pr-cvs1:/tmp/cvs-serv8294 Modified Files: footer.php Log Message: frig it Index: footer.php =================================================================== RCS file: /cvsroot/phpweather/web/include/footer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- footer.php 26 Mar 2002 22:00:43 -0000 1.3 +++ footer.php 26 Mar 2002 22:07:29 -0000 1.4 @@ -2,7 +2,7 @@ <hr> <a href="http://sourceforge.net/projects/phpweather/"><img -src="http://phpweather.sourceforge.net/phplogo-white.gif" width="88" +src="http://phpweather.sourceforge.net/phpweather-white.gif" width="88" height="31" border="0" alt="PHP Weather Logo" align="left"></a> <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=23245" width="88" |
|
From: Max H. <ir...@us...> - 2002-03-26 22:05:16
|
Update of /cvsroot/phpweather/web
In directory usw-pr-cvs1:/tmp/cvs-serv7464
Modified Files:
index.php
Log Message:
Minor updates
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/web/index.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- index.php 26 Mar 2002 22:00:21 -0000 1.15
+++ index.php 26 Mar 2002 22:05:13 -0000 1.16
@@ -20,7 +20,7 @@
'mark_end' => '</font>'));
$images = new pw_images($weather, array('icons_path' => 'phpweather/icons/'));
-echo '<p>Current weather in ' . $weather->get_location() . ': <br />' .
+echo '<p>Current weather for ' . $weather->get_location() . ': <br />' .
'<img src="' . $images->get_sky_image() .
'" height="50" width="80" border="1" alt="Current weather"> ' .
'<img src="' . $images->get_winddir_image() .
@@ -133,8 +133,8 @@
-->
-Due to limitations of the SourceForge server, we can not load the most up-to-date information for all stations here. To see
-PHPWeather working properly, you can go <a href="http://www.warwick.ac.uk/~msufi/phpweather" target="new">here</a>.
+<p>Due to limitations of the SourceForge server, we can not load the most up-to-date information for all stations here. To see
+PHPWeather working properly, you can go <a href="http://www.warwick.ac.uk/~msufi/phpweather" target="new">here</a>.</p>
<?
require_once('include/footer.php');
|
|
From: Martin G. <gim...@gi...> - 2002-03-26 22:05:06
|
Max Hammond <ir...@us...> writes: > Update of /cvsroot/phpweather/phpweather/icons > In directory usw-pr-cvs1:/tmp/cvs-serv2793 >=20 > Added Files: > phpweather-black.gif phpweather-white.gif=20 > Log Message: > New icons - What do we think? I think they look great! Very cool! =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
|
From: Martin G. <gim...@us...> - 2002-03-26 21:58:28
|
Update of /cvsroot/phpweather/web/include
In directory usw-pr-cvs1:/tmp/cvs-serv4800
Modified Files:
header.php
Log Message:
We need a DOCTYPE.
Index: header.php
===================================================================
RCS file: /cvsroot/phpweather/web/include/header.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- header.php 18 Mar 2002 17:46:57 -0000 1.5
+++ header.php 26 Mar 2002 21:58:25 -0000 1.6
@@ -9,6 +9,7 @@
include(dirname(__FILE__) . '/navigation.php');
?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PHP Weather: <?php echo $pages[$PHP_SELF]['title'] ?></title>
|
|
From: Max H. <ir...@us...> - 2002-03-26 21:56:59
|
Update of /cvsroot/phpweather/web In directory usw-pr-cvs1:/tmp/cvs-serv4330 Added Files: phpweather-white.gif Log Message: New logo? --- BINARY FILE --- |
|
From: Max H. <ir...@us...> - 2002-03-26 21:50:36
|
Update of /cvsroot/phpweather/phpweather/icons In directory usw-pr-cvs1:/tmp/cvs-serv2793 Added Files: phpweather-black.gif phpweather-white.gif Log Message: New icons - What do we think? --- BINARY FILE --- --- BINARY FILE --- |
|
From: Max H. <ir...@us...> - 2002-03-26 20:09:51
|
Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv4100
Modified Files:
index.php
Log Message:
Increased font size
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/index.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- index.php 26 Mar 2002 16:31:03 -0000 1.21
+++ index.php 26 Mar 2002 20:09:48 -0000 1.22
@@ -4,8 +4,8 @@
<style type="text/css">
<!--
BODY {
- font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size: 12px;
+ font-family: Verdana, Tahoma, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 13px;
}
-->
</style>
|
|
From: Mihaly G. <mis...@us...> - 2002-03-26 19:52:23
|
Update of /cvsroot/phpweather/phpweather/output In directory usw-pr-cvs1:/tmp/cvs-serv31335 Modified Files: pw_text_hu.php Log Message: Adding the Hungarian translation of word 'windchill'. Index: pw_text_hu.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_hu.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- pw_text_hu.php 24 Mar 2002 17:25:48 -0000 1.3 +++ pw_text_hu.php 26 Mar 2002 19:52:19 -0000 1.4 @@ -8,7 +8,7 @@ * A magyar szövegû idõjárásjelentéshez a locale_common innen * veszi a sztringeket. * - * @author Mihály Gyulai <gy...@my...> + * @author Mihály Gyulai * @link http://gyulai.freeyellow.com/ The homepage of the author. * @version $Id$ */ @@ -106,7 +106,7 @@ $this->strings['hPa'] = ' hPa'; $this->strings['inHg'] = ' inHg'; $this->strings['rel_humidity'] = 'A relatív páratartalom '; - $this->strings['windchill'] = 'The temperature including windchill was '; + $this->strings['windchill'] = 'A hõérzet '; $this->strings['cloud_group_beg'] = 'Az égbolton'; $this->strings['cloud_group_end'] = ' magasságban.'; $this->strings['cloud_clear'] = 'Az égbolt %sfelhõtlen%s volt.'; |
|
From: Martin G. <gim...@us...> - 2002-03-26 18:52:46
|
Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv14260
Modified Files:
pw_db_common.php pw_db_mysql.php pw_db_pgsql.php
Log Message:
It's now up to the database backend to do it's own quoting on the data
it receives in insert_metar() and update_metar(). This is because the
backends have different needs: the 'real' databases want quotes quoted
whereas the dba backend has to do escape colons.
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- pw_db_common.php 26 Mar 2002 17:37:58 -0000 1.10
+++ pw_db_common.php 26 Mar 2002 18:52:43 -0000 1.11
@@ -104,17 +104,17 @@
$icao = substr($metar, 0, 4);
if (list($m, $t) = $this->get_metar($icao)) {
- if ($t <= $timestamp) {
+ if ($t < $timestamp && $m != $metar) {
/* The METAR in the database is older than the new METAR, so
* we go ahead with the update: */
- $this->update_metar($icao, addslashes($metar), $timestamp);
+ $this->update_metar($icao, $metar, $timestamp);
$updated++;
} else {
$skipped++;
}
} else {
/* There's no timestamp to check against in this case: */
- $this->insert_metar($icao, addslashes($metar), $timestamp);
+ $this->insert_metar($icao, $metar, $timestamp);
$inserted++;
}
Index: pw_db_mysql.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_mysql.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- pw_db_mysql.php 25 Mar 2002 19:32:18 -0000 1.3
+++ pw_db_mysql.php 26 Mar 2002 18:52:43 -0000 1.4
@@ -173,7 +173,7 @@
*/
function insert_metar($icao, $metar, $timestamp) {
$this->query("INSERT INTO " . $this->properties['db_metars'] .
- " SET icao = '$icao', metar = '$metar', " .
+ " SET icao = '$icao', metar = '" . addslashes($metar) . "', " .
"timestamp = FROM_UNIXTIME($timestamp)");
}
@@ -189,7 +189,7 @@
*/
function update_metar($icao, $metar, $timestamp) {
$this->query("UPDATE " . $this->properties['db_metars'] .
- " SET metar = '$metar', " .
+ " SET metar = '" . addslashes($metar) . "', " .
"timestamp = FROM_UNIXTIME($timestamp) " .
"WHERE icao = '$icao'");
}
Index: pw_db_pgsql.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_pgsql.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- pw_db_pgsql.php 20 Mar 2002 19:26:50 -0000 1.2
+++ pw_db_pgsql.php 26 Mar 2002 18:52:44 -0000 1.3
@@ -157,7 +157,8 @@
*/
function insert_metar($station, $metar, $timestamp) {
$this->query('INSERT INTO ' . $this->properties['db_metars'] .
- " SET station = '$station', metar = '$metar', " .
+ " SET station = '$station', " .
+ "metar = '" . addslashes($metar) . "', " .
"timestamp = FROM_UNIXTIME($timestamp)");
}
@@ -173,7 +174,8 @@
*/
function update_metar($station, $metar, $timestamp) {
$this->query('UPDATE ' . $this->properties['db_metars'] .
- " SET metar = '$metar', timestamp = '$timestamp' " .
+ " SET metar = '" . addslashes($metar) .
+ "', timestamp = '$timestamp' " .
"WHERE station = '$station'");
}
|
|
From: Martin G. <gim...@us...> - 2002-03-26 18:50:10
|
Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv13610
Modified Files:
pw_db_dba.php
Log Message:
Aha! Some METARs had colons in them, which is the same character I use
to separate the METAR from the timestamp. When the data was retrieved
later and run through explode, this caused trouble.
Index: pw_db_dba.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_dba.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- pw_db_dba.php 25 Mar 2002 23:26:10 -0000 1.6
+++ pw_db_dba.php 26 Mar 2002 18:50:06 -0000 1.7
@@ -141,6 +141,10 @@
/**
* Inserts a METAR into the database.
*
+ * Any colons (:) in the METAR is changed into semi-colons (;). The
+ * colons has nothing to do in the body of the METAR, so this wont
+ * effect the parsing as the remarks isn't parsed anyway.
+ *
* @param string The ICAO of the station.
* @param string The raw METAR.
* @param integer A standard UNIX timestamp.
@@ -149,12 +153,16 @@
*/
function insert_metar($station, $metar, $timestamp) {
$this->debug("Inserting this row into the DBA database:<br><code>$metar:$timestamp</code>");
- dba_insert($station, $metar . ':' . $timestamp, $this->link_id);
+ dba_insert($station, strtr($metar, ':', ';') . ':' . $timestamp, $this->link_id);
}
/**
* Updates an existing METAR in the database.
*
+ * Any colons (:) in the METAR is changed into semi-colons (;). The
+ * colons has nothing to do in the body of the METAR, so this wont
+ * effect the parsing as the remarks isn't parsed anyway.
+ *
* @param string The ICAO of the station.
* @param string The raw METAR.
* @param integer A standard UNIX timestamp.
@@ -163,7 +171,7 @@
*/
function update_metar($station, $metar, $timestamp) {
$this->debug("Updating this row in the DBA database:<br><code>$metar:$timestamp</code>");
- dba_replace($station, $metar . ':' . $timestamp, $this->link_id);
+ dba_replace($station, strtr($metar, ':', ';') . ':' . $timestamp, $this->link_id);
}
/**
|
|
From: Max H. <ir...@us...> - 2002-03-26 18:44:21
|
Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv12789/output
Modified Files:
pw_text_no.php
Log Message:
Updated norwegian translation, thanks to Sven-Erik
Index: pw_text_no.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text_no.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- pw_text_no.php 24 Mar 2002 17:25:48 -0000 1.2
+++ pw_text_no.php 26 Mar 2002 18:44:18 -0000 1.3
@@ -97,7 +97,7 @@
$this->strings['hPa'] = ' hPa';
$this->strings['inHg'] = ' inHg';
$this->strings['rel_humidity'] = 'Den relative fuktigheten var ';
- $this->strings['windchill'] = 'Temperaturen, med vindkylde, var ';
+ $this->strings['windchill'] = 'Temperaturen, med vindfaktor, var ';
$this->strings['cloud_group_beg'] = 'Det var ';
$this->strings['cloud_group_end'] = '.';
$this->strings['cloud_clear'] = 'Himmelen var %sclear%s.';
|
|
From: Max H. <ir...@us...> - 2002-03-26 18:39:50
|
Update of /cvsroot/phpweather/phpweather/icons In directory usw-pr-cvs1:/tmp/cvs-serv11600/icons Added Files: tempchilled.gif Log Message: Added icon for windchilled temperature, updated test.php to include images --- BINARY FILE --- |
|
From: Max H. <ir...@us...> - 2002-03-26 18:39:50
|
Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv11600/output
Modified Files:
pw_images.php
Log Message:
Added icon for windchilled temperature, updated test.php to include images
Index: pw_images.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_images.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- pw_images.php 20 Mar 2002 19:26:50 -0000 1.3
+++ pw_images.php 26 Mar 2002 18:39:45 -0000 1.4
@@ -205,6 +205,7 @@
var $temp_nodata_image = 'temp_nodata.gif';
var $temp_low_image = 'templow.gif';
var $temp_high_image = 'temphigh.gif';
+ var $temp_windchilled_image = 'tempchilled.gif';
// ======================================================================
// The wind_speeds array can be used to convert wind speed values in
@@ -405,7 +406,9 @@
$processed_metar_data = $this->weather->decode_metar();
if (!empty($processed_metar_data['temperature'])) {
- if ($processed_metar_data['temperature']['temp_c'] > 0) {
+ if (!empty($processed_metar_data['windchill'])) {
+ return $this->properties['icons_path'] . $this->temp_windchilled_image;
+ } elseif ($processed_metar_data['temperature']['temp_c'] > 0) {
return $this->properties['icons_path'] . $this->temp_high_image;
} else {
return $this->properties['icons_path'] . $this->temp_low_image;
|
|
From: Max H. <ir...@us...> - 2002-03-26 18:39:50
|
Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv11600
Modified Files:
test.php
Log Message:
Added icon for windchilled temperature, updated test.php to include images
Index: test.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/test.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- test.php 24 Mar 2002 16:43:24 -0000 1.2
+++ test.php 26 Mar 2002 18:39:45 -0000 1.3
@@ -7,7 +7,7 @@
<body>
<?php
-error_reporting(E_ERROR);
+error_reporting(E_ALL);
require('phpweather.php');
require('pw_utilities.php');
@@ -18,10 +18,15 @@
$language = "en";
include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php");
+ include(PHPWEATHER_BASE_DIR . "/output/pw_images.php");
$type = 'pw_text_' . $language;
$text = new $type($weather, array());
$text->print_pretty();
+$icons = new pw_images($weather, array());
+echo '<img src="'.$icons->get_sky_image().'" />';
+echo '<img src="'.$icons->get_winddir_image().'" />';
+echo '<img src="'.$icons->get_temp_image().'" />';
?>
|
|
From: Martin G. <gim...@us...> - 2002-03-26 17:38:02
|
Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv27802
Modified Files:
pw_db_common.php
Log Message:
The reports might be duplicated in the cycle files, and two reports
might even have the same timestamp. This should make sure, that the
newest report (the one furthest down in the file) overwrites any
previous reports.
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- pw_db_common.php 26 Mar 2002 00:11:04 -0000 1.9
+++ pw_db_common.php 26 Mar 2002 17:37:58 -0000 1.10
@@ -104,7 +104,7 @@
$icao = substr($metar, 0, 4);
if (list($m, $t) = $this->get_metar($icao)) {
- if ($t < $timestamp) {
+ if ($t <= $timestamp) {
/* The METAR in the database is older than the new METAR, so
* we go ahead with the update: */
$this->update_metar($icao, addslashes($metar), $timestamp);
|
|
From: Martin G. <gim...@gi...> - 2002-03-26 16:53:00
|
Max Hammond <ir...@us...> writes: > Update of /cvsroot/phpweather/phpweather > In directory usw-pr-cvs1:/tmp/cvs-serv3648 >=20 > Modified Files: > index.php=20 > Log Message: > Change of heart about the best way to include the style, already :) How about the style-sheet? Why not just use that? I took the one I use at gimpster.com and commented most of the customizations out. =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
|
From: Max H. <ir...@us...> - 2002-03-26 16:38:23
|
Update of /cvsroot/phpweather/web/include
In directory usw-pr-cvs1:/tmp/cvs-serv7014/include
Modified Files:
navigation.php
Log Message:
I think we can take 'the internet' for granted :P
Index: navigation.php
===================================================================
RCS file: /cvsroot/phpweather/web/include/navigation.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- navigation.php 18 Mar 2002 16:51:37 -0000 1.1
+++ navigation.php 26 Mar 2002 16:38:20 -0000 1.2
@@ -91,7 +91,7 @@
function print_parents($start_node) {
global $pages;
- echo '<p class="nav-parents">The Internet';
+ echo '<p class="nav-parents">Home';
$parents = find_parents($start_node, $pages);
$count = count($parents);
if (empty($pages[$start_node]['children'])) {
|
|
From: Max H. <ir...@us...> - 2002-03-26 16:31:06
|
Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv3648
Modified Files:
index.php
Log Message:
Change of heart about the best way to include the style, already :)
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/index.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- index.php 26 Mar 2002 16:26:38 -0000 1.20
+++ index.php 26 Mar 2002 16:31:03 -0000 1.21
@@ -1,8 +1,16 @@
<html>
<head>
<title>PHP Weather - test</title>
+ <style type="text/css">
+<!--
+BODY {
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+ -->
+ </style>
</head>
-<body style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px;">
+<body>
<h1>PHP Weather - test</h1>
<p>This is the default test page for PHP Weather. For more information, please visit
|
|
From: Martin G. <gim...@us...> - 2002-03-26 16:29:35
|
Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv1233
Modified Files:
phpweather.php
Log Message:
Extra check to ensure consistency in the decoded METAR. The problem
was METARs like this one:
EGBE 260820Z 0200KT 340V060 CAVOK 06/02 Q1033
This METAR has a malformed wind-group: '0200KT 340V060', but the last
part of it would be parsed correctly. So there would be information
about variable wind-direction, but no information about the speed.
Index: phpweather.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- phpweather.php 25 Mar 2002 20:26:33 -0000 1.19
+++ phpweather.php 26 Mar 2002 16:29:32 -0000 1.20
@@ -256,7 +256,8 @@
$decoded_metar['wind']['gust_meters_per_second'],
$decoded_metar['wind']['gust_miles_per_hour']);
}
- } elseif (ereg('^([0-9]{3})V([0-9]{3})$', $part, $regs)) {
+ } elseif (ereg('^([0-9]{3})V([0-9]{3})$', $part, $regs) &&
+ !empty($decoded_metar['wind'])) {
/*
* Variable wind-direction
|
|
From: Max H. <ir...@us...> - 2002-03-26 16:26:41
|
Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv1925 Modified Files: index.php Log Message: Added inline style to body element, added information about our homepage and NOAA, changed error_reporting to E_ERROR - it throws up a lot of junk that will only be interesting to developers Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- index.php 18 Mar 2002 18:10:15 -0000 1.19 +++ index.php 26 Mar 2002 16:26:38 -0000 1.20 @@ -2,12 +2,14 @@ <head> <title>PHP Weather - test</title> </head> -<body> +<body style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px;"> <h1>PHP Weather - test</h1> - +<p>This is the default test page for PHP Weather. For more information, please visit +<a href="http://www.phpweather.net">http://www.phpweather.net</a>.</p> +<p>Data is taken from the <a href="http://weather.noaa.gov">National Weather Service</a> at NOAA.</p> <?php -error_reporting(E_ALL); +error_reporting(E_ERROR); /* Checkpoint, we store the time */ $time[] = array(microtime(), 'start'); |
|
From: Martin G. <gim...@us...> - 2002-03-26 10:44:56
|
Update of /cvsroot/phpweather/phpweather-1.x
In directory usw-pr-cvs1:/tmp/cvs-serv31572
Modified Files:
locale_nl.inc
Log Message:
Updated translation thanks to Raymond van Bek <r_v...@ho...>.
I've also reformated the text - I don't know if it's worth doing, but
I think it it looks better this way.
Index: locale_nl.inc
===================================================================
RCS file: /cvsroot/phpweather/phpweather-1.x/locale_nl.inc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- locale_nl.inc 25 Mar 2002 21:50:35 -0000 1.3
+++ locale_nl.inc 26 Mar 2002 10:44:53 -0000 1.4
@@ -1,10 +1,11 @@
<?php
/*
-* This file holds the Dutch translation of PHP Weather. To use it,
-* just include it in the main phpweather.inc file.
-*
-* Author: Nicky Haan <ni...@ne...>
-*/
+ * This file holds the Dutch translation of PHP Weather. To use it,
+ * just include it in the main phpweather.inc file.
+ *
+ * Author: Nicky Haan <ni...@ne...>
+ * Raymond van Bek <r_v...@ho...>
+ */
/* Unsets old language variables and loads new ones. */
if (isset($strings)) {
@@ -18,79 +19,110 @@
/* Load the new strings */
$strings = array(
- 'no_data' => '<blockquote><p>Helaas, er is geen data beschikbaar voor %s.</p></blockquote>',
+ 'no_data' => '<blockquote><p>Helaas, er is geen data ' .
+ 'beschikbaar voor %s.</p></blockquote>',
'mm_inches' => '<b>%s</b> mm (<b>%s</b> inch',
'precip_a_trace' => 'een spoor',
'precip_there_was' => 'Er was %s neerslag ',
- 'sky_str_format1' => 'er was <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)',
+ 'sky_str_format1' => 'er was <b>%s</b> op een hoogte van ' .
+ '<b>%s</b> meter (<b>%s</b> voet)',
'sky_str_clear' => 'er was <b>geen</b> bewolking',
- 'sky_str_format2' => ', <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet) en <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)',
- 'sky_str_format3' => ' en <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)',
- 'sky_cavok' => 'There are no clouds below <b>1,524</b> meter (<b>5,000</b> feet)',
+ 'sky_str_format2' => ', <b>%s</b> op een hoogte van <b>%s</b> ' .
+ 'meter (<b>%s</b> voet) en <b>%s</b> op een ' .
+ 'hoogte van <b>%s</b> meter (<b>%s</b> voet)',
+ 'sky_str_format3' => ' en <b>%s</b> op een hoogte van <b>%s</b> ' .
+ 'meter (<b>%s</b> voet)',
+ 'sky_cavok' => 'Er is geen bewolking beneden <b>1,524</b> ' .
+ 'meter (<b>5,000</b> voet)',
'clouds' => ' bewolking',
'clouds_cb' => ' buienwolken',
'clouds_tcu' => ' stapelwolking',
- 'visibility_format' => 'De zichtbaarheid was <b>%s</b> kilometer (<b>%s</b> mijl).',
- 'wind_str_format1' => 'met windsnelheden van <b>%s</b> meter per seconde(<b>%s</b> mijl per uur)',
- 'wind_str_format2' => ', met vlagen tot <b>%s</b> meter per seconde (<b>%s</b> mijl per uur),',
+ 'visibility_format' => 'De zichtbaarheid was <b>%s</b> kilometer ' .
+ '(<b>%s</b> mijl).',
+ 'wind_str_format1' => 'met windsnelheden van <b>%s</b> meter ' .
+ 'per seconde(<b>%s</b> mijl per uur)',
+ 'wind_str_format2' => ', met vlagen tot <b>%s</b> meter per ' .
+ 'seconde (<b>%s</b> mijl per uur),',
'wind_str_format3' => ' vanuit <b>%s</b>',
'wind_str_calm' => '<b>kalm</b>',
'wind_vrb_long' => 'variable richtingen',
'wind_vrb_short' => 'VAR',
- 'windchill' => ' the windchill was <b>%s</b> °C (<b>%s</b> °F) ',
+ 'windchill' => ' de gevoelstemperatuur is ' .
+ '<b>%s</b> °C (<b>%s</b> °F) ',
'precip_last_hour' => 'in het laatste uur. ',
'precip_last_6_hours' => 'in de laatste 3 tot 6 uur. ',
'precip_last_24_hours' => 'in de laatste 24 uur. ',
- 'precip_snow' => 'Er is <b>%s</b> mm (<b>%s</b> inch) sneeuw op de grond. ',
- 'temp_min_max_6_hours' => 'De maximum en minumum temperaturen over de laatste 6 uur waren <b>%s</b> en <b>%s</b> graden Celsius (<b>%s</b> en <b>%s</b> graden Fahrenheit).',
- 'temp_max_6_hours' => 'De maximum temperatuur over de laatste 6 uur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit). ',
- 'temp_min_6_hours' => 'De minumum temperatuur over de laatste 6 uur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit). ',
- 'temp_min_max_24_hours' => 'De maximum en minumum temperaturen over de laatste 24 uur waren <b>%s</b> en <b>%s</b> graden Celsius (<b>%s</b> en <b>%s</b> graden Fahrenheit). ',
- 'runway_vis' => 'The visibility for runway <b>%s</b> is <b>%s</b> meters (<b>%s</b> feet).',
- 'runway_vis_min_max' => 'The visibility for runway <b>%s</b> varies between <b>%s</b> meters (<b>%s</b> feet) and <b>%s</b> meters (<b>%s</b> feet).',
+ 'precip_snow' => 'Er is <b>%s</b> mm (<b>%s</b> inch) ' .
+ 'sneeuw op de grond. ',
+ 'temp_min_max_6_hours' => 'De maximum en minumum temperaturen over ' .
+ 'de laatste 6 uur waren <b>%s</b> en ' .
+ '<b>%s</b> graden Celsius (<b>%s</b> en ' .
+ ' <b>%s</b> graden Fahrenheit).',
+ 'temp_max_6_hours' => 'De maximum temperatuur over de laatste 6 ' .
+ 'uur was <b>%s</b> graden Celsius ' .
+ '(<b>%s</b> graden Fahrenheit). ',
+ 'temp_min_6_hours' => 'De minumum temperatuur over de laatste 6 ' .
+ 'uur was <b>%s</b> graden Celsius ' .
+ '(<b>%s</b> graden Fahrenheit). ',
+ 'temp_min_max_24_hours' => 'De maximum en minumum temperaturen over ' .
+ 'de laatste 24 uur waren <b>%s</b> en ' .
+ '<b>%s</b> graden Celsius (<b>%s</b> en ' .
+ '<b>%s</b> graden Fahrenheit). ',
+ 'runway_vis' => 'De zichtbare baanlengte voor startbaan ' .
+ '<b>%s</b> is <b>%s</b> meter (<b>%s</b> voet).',
+ 'runway_vis_min_max' => 'De zichtbare baanlengte voor startbaan ' .
+ '<b>%s</b> varieert tussen <b>%s</b> meter ' .
+ '(<b>%s</b> voet) en <b>%s</b> meter ' .
+ '(<b>%s</b> voet).',
'light' => 'Licht ',
'moderate' => 'Gematigd ',
'Heavy' => 'Zwaar ',
'nearby' => 'Dichtbij ',
'current_weather' => 'Het huidige weer is <b>%s</b>. ',
- 'pretty_print_metar' => '<blockquote><p><b>%s</b> minuten geleden, om <b>%s</b> UTC, de wind blies %s nabij %s. De temperatuur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit), %s en de barometerdruk was <b>%s</b> hPa (<b>%s</b> inHg). De relatieve vochtigheid was <b>%s%%</b>. %s %s %s %s %s</p></blockquote>');
+ 'pretty_print_metar' => '<blockquote><p><b>%s</b> minuten geleden, ' .
+ 'om <b>%s</b> UTC, de wind blies %s nabij %s. ' .
+ 'De temperatuur was <b>%s</b> graden Celsius ' .
+ '(<b>%s</b> graden Fahrenheit), %s en de ' .
+ 'barometerdruk was <b>%s</b> hPa (<b>%s</b> ' .
+ 'inHg). De relatieve vochtigheid was ' .
+ '<b>%s%%</b>. %s %s %s %s %s</p></blockquote>');
$wind_dir_text_short_array = array(
'N',
- 'N/NO',
+ 'NNO',
'NO',
- 'O/NO',
+ 'ONO',
'O',
- 'O/ZO',
+ 'OZO',
'ZO',
- 'Z/ZO',
+ 'ZZO',
'Z',
- 'Z/ZW',
+ 'ZZW',
'ZW',
- 'W/ZW',
+ 'WZW',
'W',
- 'W/NW',
+ 'WNW',
'NW',
- 'N/NW',
+ 'NNW',
'N');
$wind_dir_text_array = array(
'Noord',
- 'Noord/Noordoost',
+ 'Noord-noordoost',
'Noordoost',
- 'Oost/Noordoost',
+ 'Oost-noordoost',
'Oost',
- 'Oost/Zuidoost',
+ 'Oost-zuidoost',
'Zuidoost',
- 'Zuid/Zuidoost',
+ 'Zuid-zuidoost',
'Zuid',
- 'Zuid/Zuidwest',
+ 'Zuid-zuidwest',
'Zuidwest',
- 'West/Zuidwest',
+ 'West-zuidwest',
'West',
- 'West/Noordwest',
+ 'West-noordwest',
'Noordwest',
- 'North/Noordwest',
+ 'Noord-noordwest',
'Noord');
$weather_array = array(
@@ -133,3 +165,4 @@
'BKN' => 'gebroken',
'OVC' => 'betrekkelijk');
?>
+
|
|
From: Martin G. <gim...@us...> - 2002-03-26 00:11:07
|
Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv23067
Modified Files:
pw_db_common.php
Log Message:
This keeps getting better and better... :-)
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- pw_db_common.php 25 Mar 2002 23:50:10 -0000 1.8
+++ pw_db_common.php 26 Mar 2002 00:11:04 -0000 1.9
@@ -79,6 +79,7 @@
$inserted = 0;
$updated = 0;
+ $skipped = 0;
while (!feof($fp)) {
@@ -102,24 +103,31 @@
/* The ICAO is always the first four characters in the METAR: */
$icao = substr($metar, 0, 4);
- if ($this->get_metar($icao)) {
- $this->update_metar($icao, addslashes($metar), $timestamp);
- $updated++;
+ if (list($m, $t) = $this->get_metar($icao)) {
+ if ($t < $timestamp) {
+ /* The METAR in the database is older than the new METAR, so
+ * we go ahead with the update: */
+ $this->update_metar($icao, addslashes($metar), $timestamp);
+ $updated++;
+ } else {
+ $skipped++;
+ }
} else {
+ /* There's no timestamp to check against in this case: */
$this->insert_metar($icao, addslashes($metar), $timestamp);
$inserted++;
}
- if (($inserted + $updated) % 100 == 0) {
- printf("Inserted %6d new METARs, updated %6d METARs...\n",
- $inserted, $updated);
+ if (($inserted + $updated + $skipped) % 100 == 0) {
+ printf("Inserted: %5d, Updated: %5d, Skipped: %5d\n",
+ $inserted, $updated, $skipped);
flush();
}
} /* while (!feof($fp)) */
- printf("Inserted %6d new METARs, updated %6d METARs...\n",
- $inserted, $updated);
+ printf("Inserted: %5d, Updated: %5d, Skipped: %5d\n",
+ $inserted, $updated, $skipped);
fclose($fp);
}
|
|
From: Martin G. <gim...@us...> - 2002-03-25 23:50:15
|
Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv17167
Modified Files:
pw_db_common.php
Log Message:
A flush() here should make the output even better :-)
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- pw_db_common.php 25 Mar 2002 23:33:29 -0000 1.7
+++ pw_db_common.php 25 Mar 2002 23:50:10 -0000 1.8
@@ -77,7 +77,6 @@
$fp = fopen($file, 'r');
- $i = 0;
$inserted = 0;
$updated = 0;
@@ -111,13 +110,16 @@
$inserted++;
}
- if ($i % 100 == 0) {
+ if (($inserted + $updated) % 100 == 0) {
printf("Inserted %6d new METARs, updated %6d METARs...\n",
$inserted, $updated);
+ flush();
}
- $i++;
} /* while (!feof($fp)) */
+
+ printf("Inserted %6d new METARs, updated %6d METARs...\n",
+ $inserted, $updated);
fclose($fp);
}
|