Får Blank Side.
Hej Eksperter.Sidder her med et mega problem...
har en side som virker perfekt på min, ingen problemer osv.
men når jeg så smider den op på min "kundes" webhotel, får jeg blank side.
Side der kan se hvad der er galt ? fejl osv.
- BlackScorpion.
Koden ser sådan her ud.
------------------------------------
<?php
session_start();
require("../admin/config.inc.php");
require("../includes/functions.inc.php");
?>
<html>
<head>
<style type="text/css">
.td.header {
font-size: 12px;
color: #000000;
border-bottom: 1px solid #CCCCCC;
}
A:link, A:visited, A:active {
color: #000000;
text-decoration: none;
font-size: 12px;
}
A:hover {
text-decoration: underline;
color: #000000;
font-size: 12px;
}
input {
border: 1px solid black;
font-size: 12px;
}
.content {
font-size: 12px;
}
</style>
<script type="text/javascript">
function valider(){
var kl1 = document.getElementById('kl1');
var kl2 = document.getElementById('kl2');
var regexp = new RegExp('([0-1][0-9]|2[0-3])\.[0-5][0-9]$');
if (kl1.value == kl2.value) {
alert('Du skal angive 2 forskellige tidspunkter.');
return false;
}
else if(kl1.value > kl2.value) {
alert('Det angivet \'Fra\' tidspunkt er senere det angivet \'Til\' tidspunkt');
return false;
}
else if (!kl1.value.match(regexp)){
alert('Det angivet \'Fra\' tidspunkt er ugyldigt.');
return false;
}
else if (!kl2.value.match(regexp)) {
alert('Det angivet \'Til\' tidspunkt er ugyldigt.');
return false;
}
else{
return true;
}
}
</script>
</head>
<body topmargin="5" leftmargin="5">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="header">
<?php
$day_names = array(0 => 'Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag');
$month = date('m', $_REQUEST['date']);
$month_name = date('F', $_REQUEST['date']);
switch($month) {
case "01": $month_name = "Januar"; break;
case "02": $month_name = "Februar"; break;
case "03": $month_name = "Marts"; break;
case "05": $month_name = "Maj"; break;
case "06": $month_name = "Juni"; break;
case "07": $month_name = "Juli"; break;
case "10": $month_name = "Oktober"; break;
}
$day_name = date("w", $_REQUEST['date']);
$day = $day_names[$day_name];
echo $day ." d. ".date("j", $_REQUEST['date'])." ".$month_name." ".date("Y", $_REQUEST['date']);
?>
</td>
<td align="right" class="header">
<a href="#" onclick="parent.hideBox(); parent.location.reload(true)">Luk Vindue</a><br>
</td>
</tr>
<tr>
<td colspan="2" align="center" class="content">
<br style="font-size: 5px">
Kan arbejde: <br>
<table cellpadding="0" cellspacing="0" border="0" width="200" class="content">
<tr>
<form action="popup_date_update.php" method="POST" name="reg" onsubmit="return valider();">
<td align="right">
<?php
connect($mysql_host, $mysql_user, $mysql_pass, '********');
$sql = "select * from scanvikar.calendar1 where userid = '$_SESSION[cprnr]' AND int_date = '$_REQUEST[date]'";
if(mysql_num_rows($result = mysql_query($sql))) {
while($content = mysql_fetch_array($result)) {
extract($content);
echo "<input type=\"hidden\" name=\"int_date\" value=\"".$_REQUEST['date']."\">\n";
echo "<input type=\"hidden\" name=\"new\" value=\"no\">\n";
echo "Fra : <input type=\"text\" name=\"work_start\" value=\"" . $work_start . "\" id=\"kl1\" onblur=\"this.value = this.value.replace(':','.');\" maxlength=\"5\" onclick=\"this.value=''\"><br>\n";
echo "Til : <input type=\"text\" name=\"work_end\" value=\"".$work_end . "\" id=\"kl2\" onblur=\"this.value = this.value.replace(':','.');\" maxlength=\"5\" onclick=\"this.value=''\"><br>\n";
echo "<input type=\"submit\" value=\" Opdater \"><br>\n";
}
}
else {
echo "<input type=\"hidden\" name=\"int_date\" value=\"".$_REQUEST['date']."\">\n";
echo "<input type=\"hidden\" name=\"new\" value=\"yes\">\n";
echo "Fra : <input type=\"text\" name=\"work_start\" id=\"kl1\" value=\"00.00\" onblur=\"this.value = this.value.replace(':','.');\" maxlength=\"5\" onclick=\"this.value=''\"><br>\n";
echo "Til : <input type=\"text\" name=\"work_end\" id=\"kl2\" value=\"00.00\" onblur=\"this.value = this.value.replace(':','.');\" maxlength=\"5\" onclick=\"this.value=''\"><br>\n";
echo "<input type=\"submit\" value=\" Opdater \"><br>\n";
}
?>
</td>
</form>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
---------------------------