javascriptfejl under upload via cms-system
Jeg har en lidt træls javascriptfejl som jeg ikke lige kan gennemskue, har sikkert stirret mig blind på den ;-PDen mærkelige er, at jeg i siden, af 2 "funktioner" en til upload af nyt indhold, og en til redigering af indhold, og fejlen opstår kun ved upload af nyt indhold, selvom de er næsten identiske. Men hele koden kommer her:
<?php
session_start();
include 'include/forbindelse.php';
include 'include/funktioner.php';
$uploaddir = "uploads/";
$thumbnail_dir = "images/thumbnail/";
if ( isset( $_POST['submit'] ) && $_POST['submit'] == "Slet") {
$id = $_POST['produktId'];
$produktBillede = mysql_query("SELECT sti FROM RS_Tilbud WHERE id = '$id'");
$proBil = mysql_fetch_array($produktBillede);
unlink($proBil[sti]);//Sletter tilhørende billede
mysql_query("DELETE FROM RS_Tilbud WHERE id = '$id'");
header("location: adminProdukter.php");
}
if (isset($_POST['submit']) && $_POST['submit'] == "Upload" && $_POST['rettype'] == "redigere") {
$billede = $_FILES['nyhedsBillede']['name'];
$type = strrchr($billede, ".");// For at finde filtypen til tjek af jpeg kontra jpg
$billede = strtolower($billede);// ændre alt til små bogstaver
$thumbnail;// Til stien til thumbnail
$source = $_FILES['tilbudsBillede']['tmp_name'];
$tekst = $_POST['tilbudsTekst'];
$overskrift = $_POST['tilbudsOverskrift'];
$prisFør = $_POST['tilbudsPrisFør'];
$prisEfter = $_POST['tilbudsPrisEfter'];
$type = $_POST['tilbudsType'];
$oprettelsesDato = date('Ymd');
$startDato = $_POST['startÅr'].$_POST['startMåned'].$_POST['startDag'];
$slutDato = $_POST['slutÅr'].$_POST['slutMåned'].$_POST['slutDag'];
if (is_file($source)) {//Fanger hvis billede ikke skal ændres
if (is_uploaded_file($source)) {
if (tjektype($_FILES['tilbudsBillede']['type'])) {
$dest = $uploaddir . $_FILES['tilbudsBillede']['name'];
$dest = tjekfilnavn($dest);
//Sletning af det tidligere billede
$queryGammelSti = mysql_query("SELECT sti FROM RS_Tilbud WHERE tilbudsId = $_POST[produktId]");
$gammelSti = mysql_fetch_array($queryGammelSti);
if (file_exists($gammelSti[sti])) {//Tjekker om den gamle fil findes, så den kan slettes hvsi true
if (move_uploaded_file($source, $dest)) {
list($width, $height) = getimagesize($uploaddir.$_FILES['tilbudsBillede']['name']);
$new_width = 100;
$krympefaktor = $new_width/$width;
$new_height = round($height * $krympefaktor);
$destinationImage = imagecreatetruecolor($new_width, $new_height);
if(tjektype($_FILES['tilbudsBillede']['type'] == "image/pjpeg")) {
$sourceImage = imagecreatefromjpeg($thumbnail_dir);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
if ($type == ".jpeg") {
imagejpeg($destinationImage, $thumbnail_dir.basename($billede, ".jpeg")."_thumb.jpeg");
$thumbnail = $thumbnail_dir.basename($billede, ".jpeg")."_thumb.jpeg";// Stien til thumbnail
} else {
imagejpeg($destinationImage, $thumbnail_dir.basename($billede, ".jpg")."_thumb.jpg");
$thumbnail = $thumbnail_dir.basename($billede, ".jpg")."_thumb.jpg";// Stien til thumbnail
}
} else if(tjektype($_FILES['tilbudsBillede']['type'] == "image/png")) {
$sourceImage = imagecreatefrompng($thumbnail_dir);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
imagepng($destinationImage, $thumbnail_dir.basename($billede, ".png")."_thumb.png");
}/* else if(tjektype($_FILES['tilbudsBillede']['type'] == "image/gif")) {
$sourceImage = imagecreatefrompng($thumbnail);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
imagepng($destinationImage, $thumbnail_dir.basename($billede, ".gif")."_thumb.gif");
}*/
unlink($gammelSti[sti]);//Sletter det gamle billede
mysql_query("UPDATE RS_Tilbud SET overskrift='$overskrift', tekst='$tekst',
prisFør='$prisFør', prisEfter='$prisEfter', sti='$dest', type='$type',
startDato='$startDato', slutDato='$slutDato', thumbnail ='$thumbnail'
WHERE tilbudsId = '$_POST[produktId]'");
header("location: adminProdukt.php?produktId=$_POST[produktId]");
} else {
$besked = "Der blev ikke gemt noget";
}
} else {
$besked = "Du prøvede at slette en fil som ikke findes";
}
} else {
$besked = "Du prøvede at gemme et billedeformat som ikke er tilladt. Du kan gemme billeder i JPEG og PNG formaterne.";
}
} else {
$besked = "Ulovlig handling! - redigere";
}
} else { //Opdater info hvis ikke billedet skal ændres
mysql_query("UPDATE RS_Tilbud SET overskrift='$overskrift', tekst='$tekst', prisFør='$prisFør',
prisEfter='$prisEfter', type='$type', startDato='$startDato', slutDato='$slutDato'
WHERE tilbudsId = '$_POST[produktId]'");
header("location: adminProdukt.php?produktId=$_POST[produktId]");
}
}
if (isset($_POST['submitNy']) && $_POST['submitNy'] == "Upload" && $_POST['rettype'] == "ny") {
$billede = $_FILES['tilbudsBilledeNy']['name'];
$type = strrchr($billede, ".");// For at finde filtypen til tjek af jpeg kontra jpg
$billede = strtolower($billede);// ændre alt til små bogstaver
$thumbnail;// Til stien til thumbnail
$dest = $uploaddir . $billede;//$_FILES['tilbudsBilledeNy']['name'];
$dest = tjekfilnavn($dest);
$tekst = $_POST['tilbudsTekstNy'];
$overskrift = $_POST['tilbudsOverskriftNy'];
$prisFør = $_POST['tilbudsPrisFørNy'];
$prisEfter = $_POST['tilbudsPrisEfterNy'];
$type = $_POST['tilbudsTypeNy'];
$oprettelsesDato = date('Ymd');
$startDato = $_POST['startÅrNy'].$_POST['startMånedNy'].$_POST['startDagNy'];
$slutDato = $_POST['slutÅrNy'].$_POST['slutMånedNy'].$_POST['slutDagNy'];
$source = $_FILES['tilbudsBilledeNy']['tmp_name'];
if (is_uploaded_file($source)) {
if (tjektype($_FILES['tilbudsBilledeNy']['type'])) {
if (move_uploaded_file($source, $dest)) {
list($width, $height) = getimagesize($dest);
$new_width = 100;
$krympefaktor = $new_width/$width;
$new_height = round($height * $krympefaktor);
$destinationImage = imagecreatetruecolor($new_width, $new_height);
if(tjektype($_FILES['tilbudsBilledeNy']['type'] == "image/pjpeg")) {
$sourceImage = imagecreatefromjpeg($dest);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
if ($type == ".jpeg") {
imagejpeg($destinationImage, $thumbnail_dir.basename($billede, ".jpeg")."_thumb.jpeg");
$thumbnail = $thumbnail_dir.basename($billede, ".jpeg")."_thumb.jpeg";// Stien til thumbnail
} else {
imagejpeg($destinationImage, $thumbnail_dir.basename($billede, ".jpg")."_thumb.jpg");
$thumbnail = $thumbnail_dir.basename($billede, ".jpg")."_thumb.jpg";// Stien til thumbnail
}
} else if(tjektype($_FILES['tilbudsBilledeNy']['type'] == "image/png")) {
$sourceImage = imagecreatefrompng($dest);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
imagepng($destinationImage, $thumbnail_dir.basename($billede, ".png")."_thumb.png");
$thumbnail = $thumbnail_dir.basename($billede, ".png")."_thumb.png";// Stien til thumbnail
} /*else if(tjektype($_FILES['tilbudsBillede']['type'] == "image/gif")) {
$sourceImage = imagecreatefromgif($dest);
imagecopyresampled($destinationImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, imagesx($sourceImage), imagesy($sourceImage));
imagegif($destinationImage, $thumbnail_dir.basename($billede, ".gif")."_thumb.gif");
$thumbnail = $thumbnail_dir.basename($billede, ".gif")."_thumb.gif";// Stien til thumbnail
}*/
mysql_query("INSERT INTO RS_Tilbud (tekst, sti, thumbnail, overskrift, prisFør, prisEfter, type, oprettelsesDato, startDato, slutDato)
VALUES ('$tekst', '$dest', '$thumbnail', '$overskrift', '$prisFør', '$prisEfter', '$type', '$oprettelsesDato', '$startDato', '$slutDato')") or die (mysql_error());
$besked = "Tekst og billede gemt";
} else {
$besked = "Der blev ikke gemt noget";
}
} else {
$besked = "Du prøvede at gemme et billedeformat som ikke er tilladt. Du kan gemme billeder i JPEG og PNG formaterne.";
}
} else {
$besked = "Ulovlig handling!";
}
}
function tjektype($type) {
$tilladt = array('image/x-png', 'image/png', 'image/pjpeg', 'image/jpeg');
if(!in_array($type, $tilladt)) {
return false;
}else{
return true;
}
}
function tjekfilnavn($filnavn) {
$i = 0;
$ext = strrchr($filnavn, '.');
$navn = substr($filnavn, 0, -strlen($ext));
while (is_file($filnavn)) {
$i++;
$filnavn = $navn . "_" . sprintf("%03u", $i) . $ext;
}
return $filnavn;
}
?>
<html>
<head>
<title>Randers Sport</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<link href="style/stylesheet.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
billede1 = new Image();
billede1.src = 'images/ingen_pil.gif';
billede2 = new Image();
billede2.src = 'images/roed_pil.gif';
function validate(form){
if (form.rettype.value != "redigere") {
if (form.tilbudsBillede.value == "") {
alert('Du skal uploade et billede sammen med produktbeskrivelse');
return false;
}
}
}
//-->
</script>
</head>
<body bgcolor="ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/r%F8d%20pil.gif')">
<? if (isset($HTTP_SESSION_VARS['valid_user'])) {?>
<table align="center">
<tr>
<td>
<table width="700" cellpadding="0" cellspacing="0" border="0">
<tr>
<!-- header start -->
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24" height="24"></td><td width="170" bgcolor="#0C1C8C"></td><td width="151"></td><td width="355"></td>
</tr>
<tr>
<td height="61"></td><td width="321" colspan="2"><a href="login.php" class="hand"><img src="images/intersportlogo.jpg" border="0"></a></td><td valign="bottom" bgcolor="#999999" style="padding-left:13px; padding-bottom:14px;" class="banner1">Randers Sport <font class="banner2">admin. - produkt</font></td>
</tr>
</table>
</td>
<!-- header slut -->
<!-- kvartalsbillede start -->
<td height="600" width="63" rowspan="3" valign="top"><img src="<?=kvartalbillede()?>"></td>
<!-- kvartalsbillede slut -->
<!-- clips start -->
<td width="168" valign="top" rowspan="3">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="168" height="24"></td>
</tr>
<tr>
<td height="168"><img src="images/firkant_F50.jpg"></td>
</tr>
<tr>
<td height="24"></td>
</tr>
<tr>
<td height="168"><img src="images/firkant_selectkonk.jpg"></td>
</tr>
<tr>
<td height="24"></td>
</tr>
<tr>
<td height="168"><img src="images/firkant_loebeprogram.jpg"></td>
</tr>
<tr>
<td height="24"></td>
</tr>
</table>
</td>
<!-- clips slut -->
</tr>
<tr>
<td valign="top" height="491">
<!-- menu start -->
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<!-- celle til de celler som indeholder pilen start -->
<td width="24" bgcolor="#FFFFFF" valign="top">
<table cellpadding="0" cellspacing="0">
<tr>
<td height="20"><img src="images/ingen_pil.gif" name="hvid"></td>
</tr>
<tr>
<td height="20"><img src="images/ingen_pil.gif" name="dk"></td>
</tr>
<tr>
<td height="20"><img src="images/roed_pil.gif"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"><img src="images/ingen_pil.gif" name="sd"></td>
</tr>
<tr>
<td height="20"><img src="images/ingen_pil.gif" name="war"></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
<!-- celle til de celler som indeholder pilen start -->
<!-- celle til selve menuen -->
<td width="170" valign="top">
<table height="445" width="170" cellpadding="0" cellspacing="0">
<tr>
<td height="20" width="100%" bgcolor="#0C1C8C" style="padding-left:10px;" class="menu1"><a class="menu1" href="logout.php?link=http://www.intersport.com" onMouseOut="document.images['hvid'].src=billede1.src" onMouseOver="document.images['hvid'].src=billede2.src">INTERNATIONAL</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:10px;" class="menu1"><a class="menu1" href="logout.php?link=http://www.intersport.dk" onMouseOut="document.images['dk'].src=billede1.src" onMouseOver="document.images['dk'].src=billede2.src">NATIONAL</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:10px;" class="menu1"><a class="menu1" href="logout.php?link=http://www.randerssport.dk">lokalt</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;" class="menu2"><a href="admin.php" class="menu2">forside</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminNyheder.php" class="menu2">nyheder</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;" class="menu2rollover">produkter</td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminKobsbetingelse.php" class="menu2ø">Købsbetingelser</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminAabningstider.php" class="menu2">åbningstider</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminClub_intersport.php" class="menu2">club intersport</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminHistorie.php" class="menu2">om randers sport</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminStillinger.php" class="menu2">ledige stillinger</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminKontakt.php" class="menu2">kontakt os</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="adminLexicon.php" class="menu2">lexicon</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:20px;"><a href="logout.php" class="menu2">Log ud</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C"></td><!-- luft imellem menu2 og menu1-->
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:10px;" class="menu1"><a class="menu1" href="logout.php?link=http://www.sport-direct.dk" onMouseOut="document.images['sd'].src=billede1.src" onMouseOver="document.images['sd'].src=billede2.src">sport direct</a></td>
</tr>
<tr>
<td height="20" bgcolor="#0C1C8C" style="padding-left:10px;" class="menu1"><a class="menu1" href="logout.php?link=http://www.walk-and-run.dk" onMouseOut="document.images['war'].src=billede1.src" onMouseOver="document.images['war'].src=billede2.src">walk and run</a></td>
</tr>
<tr>
<td bgcolor="#0C1C8C"></td><!-- Den tager "resten" af pladsen, så cellerne ovenover holder deres størrelse -->
</tr>
</table>
<!-- Selve menu slut -->
<!-- bundmenu start -->
<table cellpadding="0" cellspacing="0" width="170">
<tr valign="top">
<td align="center" valign="middle" height="46" width="42,5" bgcolor="#0C1C8C"></td>
<td align="center" valign="middle" height="46" width="42,5" bgcolor="#0C1C8C"><a href="index.php"></a></td>
<td align="center" valign="middle" height="46" width="42,5" bgcolor="#0C1C8C"><a href="kontakt.php"></a></td>
<td align="center" valign="middle" height="46" width="42,5" bgcolor="#0C1C8C"></td>
</tr>
</table>
<!-- bundmenu slut -->
</td>
</tr>
</table>
<!-- menu slut -->
</td>
<!-- mainframe start -->
<td width="506" valign="top" height="515">
<table border="0" cellpadding="0" cellspacing="0" height="515">
<tr>
<td width="506" height="12" bgcolor="#DDDDDD" colspan="3"></td>
</tr>
<tr valign="top">
<td height="455" bgcolor="#DDDDDD" width="12"></td>
<td>
<table height="100%" width="100%">
<tr valign="top">
<td align="center">
<!-- nyhedsområde start -->
<form name="adminProdukt" method="post" action="<?echo $PHP_SELF?>" enctype="multipart/form-data" onSubmit = "return validate(this)">
<? if (isset($_GET[produktId])) {?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" width="482" colspan="3"></td>
</tr>
<tr>
<td><a href="adminProdukttype.php" target="_self">Tilbage til hovedoversigt</a></td><td align="right"><a href="adminProdukter.php?produkttype=<?=$_GET[produkttype]?>" target="_self">Tilbage til produktoversigt</a></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" width="100%" height="100%">
<table border="0">
<? $produkter = mysql_query("SELECT * FROM RS_Tilbud WHERE tilbudsId = '$_GET[produktId]'");
while ($produkt = mysql_fetch_array($produkter)){?>
<tr>
<td class="text3">Overskrift:</td><td colspan="2"><input name="tilbudsOverskrift" type="text" value="<?=$produkt[overskrift]?>" maxlength="50" size="56"></td>
</tr>
<tr>
<td class="text3">Tekst:</td>
<td colspan="2"><textarea name="tilbudsTekst" cols="42" rows="8"><?=$produkt[tekst]?></textarea></td>
</tr>
<tr>
<td rowspan="2" class="text3" width="20">Nuværende billede:</td><td rowspan="2"><img src="<?=$produkt[sti]?>" height="100" width="150"></td>
</tr>
<tr>
<td width="150">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="text3">Pris før:</td><td><input name="tilbudsPrisFør" type="text" value="<?=$produkt[prisFør]?>" size="5"></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td class="text3" width="60%">Pris efter:</td><td><input name="tilbudsPrisEfter" type="text" value="<?=$produkt[prisEfter]?>" size="5"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="text3">Nyt billede:</td><td colspan="2"><input name="tilbudsBillede" type="file" size="42"></td>
</tr>
<tr>
<td class="text3">Produkttype:</td><td colspan="2"><input name="tilbudsType" type="text" value="<?=$produkt[type]?>" size="56"></td>
</tr>
<tr>
<td colspan="3" width="100%">
<table width="100%">
<tr>
<td width="17%"></td><td class="text3" width="15%" align="center">Dag</td><td width="15%" class="text3" align="center">Måned</td><td class="text3" width="15%" align="center">År</td><td width="55%"></td>
</tr>
<tr>
<td class="text3">Startdato:</td><td align="center"><input name="startDag" type="text" value="<??>" size="2" maxlength="2"></td><td align="center"><input name="startMåned" type="text" value="<??>" size="2" maxlength="2"></td><td align="center"><input name="startÅr" type="text" value="<??>" size="4" maxlength="4"></td><td></td>
</tr>
<tr>
<td class="text3">Slutdato:</td><td align="center"><input name="SlutDag" type="text" value="<??>" size="2" maxlength="2"></td><td align="center"><input name="slutMåned" type="text" value="<??>" size="2" maxlength="2"></td><td align="center"><input name="slutÅr" type="text" value="<??>" size="4" maxlength="4"></td><td><input name="produktId" type="hidden" value="<?=$_GET[produktId]?>"><input name="rettype" type="hidden" value="redigere"><input name="submit" type="submit" value="Upload"></td>
</tr>
</table>
</td>
</tr>
<? }?>
</table>
</td>
</tr>
</table>
<? } else {//nyt tilbud?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="adminProdukttype.php" target="_self">Tilbage til hovedoversigt</a></td>
</tr>
<tr>
<td align="center" valign="top" width="482" height="100%">
<table>
<tr>
<td class="text3">Overskrift:</td>
<td colspan="3"><input name="tilbudsOverskriftNy" type="text" maxlength="50" size="50"></td>
</tr>
<tr>
<td class="text3">Tekst:</td>
<td colspan="3"><textarea name="tilbudsTekstNy" cols="38" rows="10"></textarea></td>
</tr>
<tr>
<td class="text3">Billede:</td>
<td colspan="3"><input name="tilbudsBilledeNy" type="file" size="37"></td>
</tr>
<tr>
<td class="text3">Pris før:</td>
<td colspan="3"><input name="tilbudsPrisFørNy" type="text" size="50"></td>
</tr>
<tr>
<td class="text3">Pris efter:</td>
<td colspan="3"><input name="tilbudsPrisEfterNy" type="text" size="50"></td>
</tr>
<tr>
<td class="text3">Produkttype:</td>
<td colspan="3"><input name="tilbudsTypeNy" type="text" size="50"></td>
</tr>
<tr>
<td></td>
<td class="text3">Dag</td>
<td class="text3">Måned</td>
<td class="text3">År</td>
</tr>
<tr>
<td class="text3">Startdato:</td>
<td><input name="startDagNy" type="text" size="2" maxlength="2"></td>
<td><input name="startMånedNy" type="text" size="2" maxlength="2"></td>
<td><input name="startÅrNy" type="text" size="4" maxlength="4"></td>
</tr>
<tr>
<td class="text3">Slutdato:</td>
<td><input name="SlutDagNy" type="text" size="2" maxlength="2"></td>
<td><input name="slutMånedNy" type="text" size="2" maxlength="2"></td>
<td><input name="slutÅrNy" type="text" size="4" maxlength="4"></td>
</tr>
<tr>
<td><input name="rettype" type="hidden" value="ny"><input name="submitNy" type="submit" value="Upload"></td>
</tr>
<tr>
<td class="text1"><?=$besked?></td>
</tr>
</table>
</td>
</tr>
</table>
<? }?>
</form>
<!-- nyhedsområde slut -->
</td>
<td height="100%" width="10"></td>
</tr>
</table>
</td>
<td bgcolor="#DDDDDD" width="12"></td>
</tr>
<!-- nyhedsscript start -->
<tr>
<td bgcolor="#DDDDDD" height="12"></td>
<td bgcolor="#DDDDDD" valign="middle"></td>
<td bgcolor="#DDDDDD"></td>
</tr>
<!-- nyhedscript slut -->
<tr>
<td height="24" colspan="3"></td>
</tr>
</table>
</td>
<!-- mainframe slut -->
</tr>
</table>
</td>
</tr>
</table>
<? } else {
header("location: ingenAdgang.php");
}?>
</body>
</html>
