From 4c50a925973cae47323ab48fa607c48143d86cfe Mon Sep 17 00:00:00 2001 From: Arno Schoenmakers <schoenmakers@astron.nl> Date: Mon, 25 Feb 2008 08:20:30 +0000 Subject: [PATCH] Bug #1160: Made code changes to run application in PHP 5.0.4 (original code was for PHP 5.1) --- .../tool/CRAFT/algemene_functionaliteit/comp_bewerken.php | 6 ++++-- .../CRAFT/algemene_functionaliteit/comp_toevoegen.php | 6 +++--- .../comp_toevoegen_leverancier.php | 7 ++++--- .../CRAFT/algemene_functionaliteit/melding_toevoegen.php | 4 +++- support/tool/CRAFT/includes/admin_top.php | 2 +- support/tool/CRAFT/includes/login_funcs.php | 2 +- support/tool/CRAFT/includes/vars.php | 8 ++++---- support/tool/CRAFT/main/instellingen.php | 2 +- support/tool/CRAFT/main_statistieken/componenten.php | 4 ++-- support/tool/CRAFT/main_statistieken/historie.php | 4 ++-- 10 files changed, 25 insertions(+), 20 deletions(-) diff --git a/support/tool/CRAFT/algemene_functionaliteit/comp_bewerken.php b/support/tool/CRAFT/algemene_functionaliteit/comp_bewerken.php index 8f7a9ee4b42..5088d8fffbd 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/comp_bewerken.php +++ b/support/tool/CRAFT/algemene_functionaliteit/comp_bewerken.php @@ -405,7 +405,9 @@ } else { //de tijdzone waarin we leven instellen, wordt dit niet gedaan dan klaagt PHP - date_default_timezone_set ("Europe/Amsterdam"); + + //date_default_timezone_set ("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); if (isset($_GET['c']) && $_GET['c'] != 0 ) { $query = "SELECT * FROM comp_lijst WHERE Comp_Lijst_ID ='". $_GET['c'] ."'"; @@ -707,4 +709,4 @@ } else echo('Er is geen component geselecteerd om te wijzigen.<br>Selecteer hiernaast een component.'); } -?> \ No newline at end of file +?> diff --git a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php index 375268617dc..fedc38a13a0 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php +++ b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen.php @@ -351,8 +351,8 @@ //er mag niet opgeslagen worden, dus toon het formulier met invoervelden else { //de tijdzone waarin we leven instellen, wordt dit niet gedaan dan klaagt PHP - date_default_timezone_set ("Europe/Amsterdam"); - + //date_default_timezone_set("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); ?> <form name="theForm" method="post" action="<?php echo($_SESSION['huidige_pagina']); ?>"> @@ -635,4 +635,4 @@ <?php } -?> \ No newline at end of file +?> diff --git a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_leverancier.php b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_leverancier.php index 077e3524496..e9321b36d69 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_leverancier.php +++ b/support/tool/CRAFT/algemene_functionaliteit/comp_toevoegen_leverancier.php @@ -6,8 +6,9 @@ include_once("../includes/vars.php"); //de tijdzone waarin we leven instellen, wordt dit niet gedaan dan klaagt PHP - date_default_timezone_set ("Europe/Amsterdam"); - + //date_default_timezone_set ("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); + if (isset($_GET['c']) && $_GET['c'] != 0) { $query = "SELECT Geleverd_Door FROM comp_type WHERE Comp_Type = '".$_GET['c']."'"; $resultaat = mysql_query($query); @@ -34,4 +35,4 @@ } ?> </body> -</html> \ No newline at end of file +</html> diff --git a/support/tool/CRAFT/algemene_functionaliteit/melding_toevoegen.php b/support/tool/CRAFT/algemene_functionaliteit/melding_toevoegen.php index 8f03e8b78db..9e50519f9ed 100644 --- a/support/tool/CRAFT/algemene_functionaliteit/melding_toevoegen.php +++ b/support/tool/CRAFT/algemene_functionaliteit/melding_toevoegen.php @@ -201,7 +201,9 @@ else { if ((isset($_GET['c']) && $_GET['c'] != 0) || (isset($_GET['b']))) { //de tijdzone waarin we leven instellen, wordt dit niet gedaan dan klaagt PHP - date_default_timezone_set ("Europe/Amsterdam"); + //date_default_timezone_set("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); + ?> <form name="theForm" method="post" action="<?php echo($_SESSION['huidige_pagina']); if(isset($_GET['c'])) echo("&c=" . $_GET['c']); if(isset($_GET['b'])) echo("&b=".$_GET['b']); ?>"> diff --git a/support/tool/CRAFT/includes/admin_top.php b/support/tool/CRAFT/includes/admin_top.php index be8fc6618d7..4133f211f9b 100644 --- a/support/tool/CRAFT/includes/admin_top.php +++ b/support/tool/CRAFT/includes/admin_top.php @@ -47,4 +47,4 @@ } //niemand ingelogt, dus bezoeker naar de inlogpagina sturen else header("Location: index.php"); -?> \ No newline at end of file +?> diff --git a/support/tool/CRAFT/includes/login_funcs.php b/support/tool/CRAFT/includes/login_funcs.php index 93ced3f49dd..6a5204bfcba 100644 --- a/support/tool/CRAFT/includes/login_funcs.php +++ b/support/tool/CRAFT/includes/login_funcs.php @@ -113,4 +113,4 @@ return true; } -?> \ No newline at end of file +?> diff --git a/support/tool/CRAFT/includes/vars.php b/support/tool/CRAFT/includes/vars.php index c4239a51a46..af68fb1a276 100644 --- a/support/tool/CRAFT/includes/vars.php +++ b/support/tool/CRAFT/includes/vars.php @@ -1,8 +1,8 @@ <?php - $db_host = 'localhost'; - $db_user = 'root'; - $db_password = 'zw0lle'; + $db_host = 'wop37.nfra.nl'; + $db_user = 'wsrt'; + $db_password = 'wsrt'; $database = 'lofar-craft'; mysql_connect($db_host, $db_user, $db_password); mysql_select_db($database); -?> \ No newline at end of file +?> diff --git a/support/tool/CRAFT/main/instellingen.php b/support/tool/CRAFT/main/instellingen.php index 9c5a7a5d320..f34aed85404 100644 --- a/support/tool/CRAFT/main/instellingen.php +++ b/support/tool/CRAFT/main/instellingen.php @@ -177,4 +177,4 @@ </table> </form> -<?php } ?> \ No newline at end of file +<?php } ?> diff --git a/support/tool/CRAFT/main_statistieken/componenten.php b/support/tool/CRAFT/main_statistieken/componenten.php index c2a68788773..98789f97c70 100644 --- a/support/tool/CRAFT/main_statistieken/componenten.php +++ b/support/tool/CRAFT/main_statistieken/componenten.php @@ -6,8 +6,8 @@ require_once($_SESSION['pagina'] . 'includes/login_funcs.php'); include("status_object.php"); - date_default_timezone_set ("Europe/Amsterdam"); - + //date_default_timezone_set ("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); $Objecten_Array = array(); function zet_timestamp_om($timestamp) { diff --git a/support/tool/CRAFT/main_statistieken/historie.php b/support/tool/CRAFT/main_statistieken/historie.php index a0e0dd00da0..63be93e691e 100644 --- a/support/tool/CRAFT/main_statistieken/historie.php +++ b/support/tool/CRAFT/main_statistieken/historie.php @@ -69,8 +69,8 @@ <h2>Historie</h2> <?php - date_default_timezone_set ("Europe/Amsterdam"); - + //date_default_timezone_set ("Europe/Amsterdam"); + putenv("TZ=Europe/Amsterdam"); //wanneer er een datum ingevuld is, dan een situatie reconstrueren if(controleer_datum($_SESSION['type_overzicht'])) { //de samengestelde datum splitten op de spatie (formaat is als volgt: 2007-08-26 12:01:56) -- GitLab