I startup this script for my page but, and it's working Translate it to Dutch.
But now i will place the footer in the script but it's gray out and the page is now longer loaded on the site when i use the footer.
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Historie per dag</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<link href="dayfile.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
<script type="text/javascript" src="lib/dropmenu/dropdowntabs.js"></script>
</head>
<body>
<div id="bg_clouds">
<div id="main">
<!-- header and main menu begins -->
<?php
require_once('header_menu.php');
?>
<script type="text/javascript">
// Select menu current item highlight
//SYNTAX: tabdropdown.init("menu_id", [item menu, start from 0])
tabdropdown.init("mainmenu", 0)
</script>
<div style="height:13px"></div>
<!-- header ends -->
<div class="header_top"></div>
<div class="header">
<div id="wrapper">
<div id="slider-wrapper">
<div id="slider" class="nivoSlider">
<img src="style/header1.jpg" alt="" />
<img src="style/header2.jpg" alt=""/>
<img src="style/header3.jpg" alt="" />
</div>
</div>
</div>
<script type="text/javascript" src="lib/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="lib/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</div>
<div class="header_bot"></div>
<div style="height:15px"></div>
<?php
############################################################################
# A Project of TNET Services, Inc.
############################################################################
# E X P E R I M E N T A L C O D E
############################################################################
# Project: Cumulus Project
# Package: dayfile.php
# Module: dayfile.php
# Version: 0.12 - 2010-02-12
# Purpose: Reads a copy of the dayfile.txt
# And displays it
# Authors: Kevin W. Reed <programs@tnet.com>
# TNET Services, Inc.
# Copyright: (c) 1992-2010 Copyright TNET Services, Inc.
#
# License:
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
############################################################################
# Location of the dayfile.txt
#
# This needs to point to where your dayfile.txt is relative to where this
# script is running.
#
# Normally... This will work because the daytime.txt and this script are
# in the same directory (folder)
$SITE['dayfile'] = './dayfile.txt';
#
# Need to know where the realtime.txt file is too. We look there to get
# the Unit types of the values for temp, wind, press, and rain...
#
# Normal would be something like
$SITE['realtime'] = './realtime.txt';
#
############################################################################
## OVERRIDE VALUES... REMOVE IF YOU ARE USING THIS SCRIPT
$SITE['realtime'] = './realtime.txt';
$SITE['dayfile'] = './dayfile.txt';
############################################################################
############################################################################
# Really shouldn't need to change anything below here unless you want to
# change the language...
############################################################################
// Fields of realtime.txt file - DON'T CHANGE!! Even for language
$SITE['rfields'] = array(
"date","time","temp","hum","dew","wspeed","wgust","bearing","rrate",
"rfall","press","wdir","beaufort","windunit","tempunit","pressunit","rainunit",
"windrun","presstrend","rmonth","ryear","rfallY","intemp","inhum","wchill",
"temptrendval","tempTH","TtempTH","tempTL","TtempTL",
"windTM","TwindTM","wgustTM","TwgustTM",
"pressTH","TpressTH","pressTL","TpressTL",
"version","build","rmaxgust","heatindex","humidex","UV","ET","SolarRad",
"avgbearing","rlhour", "forecast", "daylight", "finestat");
// Values in the dayfile.txt - DON'T CHANGE!! Even for language
$SITE['dfields'] = array (
'date',
'gusthi','gusthidir','gusthitm',
'tempmin','tempmintm',
'tempmax','tempmaxtm',
'pressmin','pressmintm',
'pressmax','pressmaxtm',
'rainratemax','rainratemaxtm', 'raintot',
'tempavg',
'winrun', 'winavghi','winavghitm'
);
// Values for correlating Windrun units based on windunits
$windrununits = array (
'm/s' => 'Meters/Sec',
'mph' => 'Miles',
'km/h' => 'Kilometers',
'kts' => 'Nautical Miles' );
// Check for Options
check_sourceview();
// Option to override year?
if ( isset($_GET['y'] )) {
$year = intval($_GET['y']);
} else {
$year = date('Y');
}
// Option to override month?
if (isset($_GET['m'] )) {
$month = intval($_GET['m']);
} else {
$month = date('m');
}
// Get Units Info from the realtime.txt file
// Read data into array
$DATA = get_raw($SITE['realtime'],' ');
$SITE['tempunit'] = ret_rval('tempunit');
$SITE['windunit'] = ret_rval('windunit');
$SITE['pressunit'] = ret_rval('pressunit');
$SITE['rainunit'] = ret_rval('rainunit');
$SITE['windrununit'] = $windrununits[ret_rval('windunit')];
// READ the dayfile into the $raw array
$raw = file($SITE['dayfile']);
// Display the data
echo '<h1>Maandoverzicht</h1>';
display_month($year,$month) ;
echo 'De gegevens worden iedere nacht om 00:12 bijgewerkt';
// Function to parse the month needed.
// Allows multiple display_month calls above.
function display_month($year,$month) {
global $raw, $SITE;
$months = array ("Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus",
"September","Oktober","November","December");
echo '<h2>' . $months[$month -1 ] . ' ' . $year . '</h2><br/>';
echo '<table id="daytable">
<th>Dag</th>
<th>Hoogste Temp</th><th>Laagste Temp</th><th>Gemiddelde Temp</th>
<th>Luchtdruk Hoog<br/>(' . $SITE['pressunit'] . ')</th><th>Luchtdruk Laag<br/>(' .
$SITE['pressunit'] . ')</th>
<th>Hoogtse windvlaag<br/>(' . $SITE['windunit'] . ')</th><th>Wind richting</th><th>Wind snelheid<br/>(' .
$SITE['windrununit'] . ')</th>
<th>Totale neerslag<br/>(' . $SITE['rainunit'] . ')</th><th>Max Regeninstensiteit<br/>' .
$SITE['rainunit'] . '/hr</th></tr>';
// Set found counter to 0
$found = 0;
// Read the array now looking for data in the data set we want
foreach($raw as $key) {
if (strpos($key, ";") !==FALSE ){
$values = preg_split('/;/',$key);
} else {
$values = preg_split('/,/',$key);
}
// Check to see if this is in the date data set
if ($year == "20" . substr($values[ret_val('date')],6,2)
&& $month == substr($values[ret_val('date')],3,2) ) {
// Date
echo '<tr><td class="day">' . substr($values[ret_val('date')],0,2) . '</td>';
// Temps
echo '<td>' . $values[ret_val('tempmax')] . '°' . $SITE['tempunit'] . '</td><td>' .
$values[ret_val('tempmin')] .
'°' . $SITE['tempunit'] . '</td><td>' . $values[ret_val('tempavg')] . '°' .
$SITE['tempunit'] . '</td>';
// Pressure
echo '<td>' . $values[ret_val('pressmax')] . '</td><td>' .
$values[ret_val('pressmin')] . '</td>';
// Wind
echo '<td>' . $values[ret_val('gusthi')] . '</td><td>' .
windDir($values[ret_val('gusthidir')]) .
'</td><td>' . $values[ret_val('winrun')] . '</td>';
// Rain
echo '<td>' . $values[ret_val('raintot')] . '</td><td>' .
$values[ret_val('rainratemax')] . '</td>';
echo '</tr>' . $LF;
$found++;
}
}
echo '</table>';
// If we found no records, output an error:
if (!$found) {
echo "<p><strong>Sorry, er zijn geen gegevens gevonden voor " .
$months[$month -1 ] . ' ' . $year . "</strong></p>";
}
}
// Return the array position of the variable
function ret_val($lookup) {
global $SITE;
$rtn = array_search ( $lookup , $SITE['dfields'] );
if ($rtn !== FALSE) {
return( $rtn );
} else {
return("-");
}
}
// Return the array position of the variable
function ret_rval($lookup) {
global $SITE, $DATA;
$rtn = array_search ( $lookup , $SITE['rfields'] );
if ($rtn !== FALSE) {
return( $DATA[$rtn] );
} else {
return("-");
}
}
// Standard Source view option check
function check_sourceview () {
global $SITE;
if ( isset($_GET['view']) && $_GET['view'] == 'sce' ) {
$filenameReal = __FILE__;
$download_size = filesize($filenameReal);
header('Pragma: public');
header('Cache-Control: private');
header('Cache-Control: no-cache, must-revalidate');
header("Content-type: text/plain");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
header('Connection: close');
readfile($filenameReal);
exit;
}
}
// Calculate Word WinDir from Bearing
function windDir ($winddir) {
if (!isset($winddir)) {
return "---";
}
$windlabel = array ("N","NNO", "NO", "ONO", "O", "OZO", "ZO", "ZZO", "Z",
"ZZW","ZW", "WZW", "W", "WNW", "NW", "NNW");
$dir = $windlabel[ fmod((($winddir + 11) / 22.5),16) ];
return "$dir";
}
// Function to read the data file with the
// Delimiter provided
function get_raw( $rawfile , $del ) {
$rawdata = array();
$fd = fopen( $rawfile, "r" );
if ( $fd ) {
$rawinfo = '';
while (! feof ( $fd ) ) {
$rawinfo .= fread( $fd, 8192 );
}
fclose($fd);
$rawdata = explode ( $del, $rawinfo );
} else {
$rawdata[0]= -9999;
}
return $rawdata;
}
</div>
<div class="cont_bot"></div>
<!-- content ends -->
<!-- footer begins -->
<div id="footer">
<a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a> | Weather Blues Template by <a href="http://weatherbyyou.com">Weather by You!</a>
<p style="width:100%; font-family:helvetica; font-size:10px; color:#fff">Copyright 2011. <!-- Do not remove -->Designed by <a href="http://www.metamorphozis.com/free_templates/free_templates.php" title="Free Web Templates">Free Web Templates</a>, coded by <a href="http://www.myfreecsstemplates.com/" title="Free CSS Templates">Free CSS Templates</a><!-- end --></p>
</div>
<!-- footer ends -->
</div>
</div>
</body>
</html>