Sorry, det var en helt forkert kode, jeg har indsat, sorry....
*************************************************************************************
<?php
session_start();
require("functions.php");
if($_SESSION["ip"] && $_SESSION["sesid"])
{
$a=new shop();
$a->tjek_session($_SESSION["ip"], $_SESSION["sesid"]);
if($a->err_no)
{
// unregister session
session_unregister("ip");
session_unregister("sesid");
// kill the session
session_destroy();
header("location: $PHP_SELF");
}
}
if(!$_SESSION["ip"] && !$_SESSION["sesid"])
{
$a=new shop();
$a->lav_session();
if($a->err_no)
{
//header("location: index.php");
echo "$a->err";
}
else
{
$sesid=$a->sesid;
$ip=$a->ip;
session_register(sesid);
session_register(ip);
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>Naturlatex.dk - Flydende naturlatex</TITLE>
<META NAME="Title" CONTENT="Naturlatex.dk">
<META NAME="Description" CONTENT="Naturlatex.dk er et firma der sælger flydende Naturlatex til brug af eksempelvis produktion af våben til rollespil, kunst mm.">
<META NAME="Keywords" CONTENT="Naturlatex, natur-latex, natur latex, latex, natur">
<META NAME="Robots" CONTENT="ALL">
<LINK REV=made href="mailto:lawi.aps@get2net.dk">
<META HTTP-EQUIV="Reply-to" CONTENT="lawi.aps@get2net.dk">
<META NAME="DC.Title" CONTENT="Naturlatex.dk">
<META NAME="DC.Description" CONTENT="Naturlatex.dk er et firma der sælger flydende Naturlatex til brug af eksempelvis produktion af våben til rollespil, kunst mm.">
<META NAME="DC.Subject" CONTENT="Naturlatex, natur-latex, natur latex, latex, natur">
<LINK REL="schema.dc" HREF="
http://purl.org/metadata/dublin_core_elements"><style>
<!--
a{text-decoration:none}
//-->
</style>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
</script>
<meta name="generator" content="Namo WebEditor v4.0">
<script language="javascript" type="text/javascript">
var arr = [
["Valg 1",[
["Mandag (til afhentning)"],
["Tirsdag (til afhentning)"],
["Onsdag (til afhentning)"],
["Torsdag (til afhentning)"],
["Fredag (til afhentning)"]]],
["Valg 2",[
["Mandag (leveret til adr.)"],
["Tirsdag (leveret til adr.)"],
["Onsdag (leveret til adr.)"],
["Torsdag (leveret til adr.)"],
["Fredag (leveret til adr.)"]]],
["Valg 3",[
["Leveres hurtigst, på billigste måde."]]]
];
//alert(arr1[1][1])
function initSels(){
createOpts(document.getElementById('sel1'));
createOpts(document.getElementById('sel3'));
}
function createOpts(sel){
var s = new Array();
var num = 0, txt = "arr";
var ar = opt = null;
var n = sel.selectedIndex;
var args = createOpts.arguments.length;
for(var i=1;args>i;i++){
s[i-1] = document.getElementById(createOpts.arguments[i]);
if(s[i-1]==sel)num=i;
}
if(args>1){
if(s[num])sel = s[num];
else return;
}
if(n==0&&args>1){
for(i=num;args>i+1;i++){
s[i].length = 0;
opt = document.createElement('OPTION');
s[i].appendChild(opt);
opt.value = "";
opt.text = "Vælg leveringsform";
}
return true
};
for(i=0;num>i;i++){
txt+="["+(s[i].selectedIndex-1)+"][1]";
}
ar = eval(txt);
sel.length = 0;
opt = document.createElement('OPTION');
sel.appendChild(opt);
opt.value = "";
opt.text = "----------------- Vælg -----------------";
for(i=0;ar.length>i;i++){
opt = document.createElement('OPTION');
sel.appendChild(opt);
if(typeof ar[i] == 'object'){
opt.value = ar[i][0];
opt.text = ar[i][0];
}else{
opt.value = ar[i];
opt.text = ar[i];
}
}
if(args>num+2){
for(i=num+1;args-1>i;i++){
s[i].length = 0;
opt = document.createElement('OPTION');
s[i].appendChild(opt);
opt.value = "";
opt.text = "Vælg leveringsform";
}
}
}
</script>
<script language="JavaScript1.2">
function validering(f){
if(f.navn.value=='') {
alert('Du skal udfylde feltet med dit navn!');
f.navn.focus();
return false;
}
if(f.adresse.value=='') {
alert('Du skal udfylde feltet med din adresse!');
f.adresse.focus();
return false;
}
if(f.by.value=='') {
alert('Du skal udfylde feltet med din by.!');
f.post.focus();
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#CCCCCC" link="black" vlink="black" alink="#3366CC" onload="dynAnimation();">
<center>
<?php include("top.php"); ?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="695" height="1">
<tr>
<td width="695" height="14" background="images/site_01.jpg">
<?php
// --------------------------------------------------
// Siden starter her
// --------------------------------------------------
$a=new shop();
$a->vis_kurv($_SESSION["sesid"]);
if($a->err_no)
{
echo "<table id='AutoNumber1' style='border-collapse: collapse' align='center' border='0' cellpadding='0' cellspacing='0' width='653' height='0' bordercolor='#111111'>
<tr>
<td>
<p>Der skete en fejl i visningen af indkøbskurven.<br>tryk på refresh i din browser for at prøve igen.</p>
</td>
</tr>
</table>";
}
elseif($a->num<=0)
{
?>
<table id="AutoNumber1" style="border-collapse: collapse" align="center" border="0" cellpadding="0" cellspacing="0" width="653" height="0" bordercolor="#111111">
<tr>
<td width="7" height="159">
<p> </p>
</td>
<td width="643" height="159">
<p><font color="#3366CC" face="Verdana"><span style="font-size:14pt;">Indkøbskurv</span></font><font face="Verdana" size="2"><br>På
denne side kan du se, hvad du har i din
indkøbskurv.<br><br></font><font color="#3366CC"><a href="shoppen.php"><font face="Verdana" size="2" color="red">Tilbage til shoppen
</font></a></font>
</p>
<hr color="#3366CC">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="1">
<tr>
<td width="12%" bgcolor="#FFFFFF" height="47">
<table border="0" width="100%" height="1" cellspacing="0" cellpadding="0">
<tr>
<td width="8%" height="18" align="left">
<b><font face="Verdana" size="2" color="#3366CC">Antal:</font></b>
</td>
<td width="64%" height="18" align="left">
<font color="#3366CC"><b><font face="Verdana" size="2">Produkt</font></b><font face="Verdana" size="2"><b>:</b></font></font>
</td>
<td width="14%" height="18">
<b><font face="Verdana" size="2" color="#3366CC">Pris/stk:</font></b>
</td>
<td width="13%" height="18" align="left">
<b><font face="Verdana" size="2" color="#3366CC">Pris:</font></b>
</td>
</tr>
<tr>
<td width="99%" colspan="4" height="1">
<br><font face="Verdana" size="2">Du har ingen varer i din indkøbskurv.<br>Du
kan gå til shoppen for at finde dine ønskede
produkter.<br> </font>
</td>
</tr>
<tr>
<td width="60%" colspan="2" height="1">
</td>
<td width="23%" height="1">
</td>
<td width="16%" height="1" align="left">
</td>
</tr>
<tr>
<td width="99%" colspan="4" height="1">
<img border="0" src="images/lines_double_b.jpg" width="637" height="4">
<br> <p align="left"> </p>
</td>
</tr>
</center>
</table>
<?php// </td>
//</table>
// </td>
//</table>
?>
<?php
}
else
{
?>
<table id="AutoNumber1" style="border-collapse: collapse" align="center" border="0" cellpadding="0" cellspacing="0" width="653" height="0" bordercolor="#111111">
<tr>
<td width="7" height="159">
<p> </p>
</td>
<td width="643" height="159">
<p><font color="#3366CC" face="Verdana"><span style="font-size:14pt;">Indkøbskurv</span></font><font color="#3366CC"><FONT face="Verdana" size="2"><br>På
denne side kan du se hvad du har i din
indkøbskurv.</FONT><br><br><a href="shoppen.php"><font face="Verdana" size="2" color="red">Tilbage til shoppen
</font></a></font>
</p>
<hr color="#3366CC">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="1">
<tr>
<td width="12%" bgcolor="#FFFFFF" height="47">
<table border="0" width="100%" height="1" cellspacing="0" cellpadding="0">
<tr>
<td width="8%" height="18" align="left">
<b><font face="Verdana" size="2" color="#3366CC">Antal:</font></b>
</td>
<td width="64%" height="18" align="left">
<font color="#3366CC"><b><font face="Verdana" size="2">Produkt</font></b><font face="Verdana" size="2"><b>:</b></font></font>
</td>
<td width="14%" height="18">
<b><font face="Verdana" size="2" color="#3366CC">Pris/stk:</font></b>
</td>
<td width="13%" height="18" align="left">
<b><font face="Verdana" size="2" color="#3366CC">Pris:</font></b>
</td>
</tr>
<p align="right">
<?php
$samlet=0;
$antal_varer=0;
for($i = 0; $i <$a->num; $i=$i+1)
{
$total=$a->antal[$i]*$a->produkt_pris[$i];
$samlet=$samlet+$total;
$antal_varer=$antal_varer+$a->antal[$i];
echo " </p><tr>
<td width='8%' height='21'>
<font face='Verdana' size='2'>" .$a->antal[$i]. "</font>
</td>
<td width='64%' height='21'>
<font face='Verdana' size='2'>" .$a->produkt_navn[$i]. " <a href='bestil.php?slet=ok&produkt=" .$a->id[$i]. "'><font color='#FF0000'>[Slet]</font></a></font><b><font face='Verdana' size='1' color='#3366CC'><br>
</font></b>
</td>
<td width='14%' height='21'>
<font face='Verdana' size='2'>" .$a->produkt_pris[$i]. " kr.</font>
</td>
<td width='13%' height='21' align='left'>
<font face='Verdana' size='2'>$total kr.</font>
</td>
</tr>";
}
?>
<tr>
<td width="99%" colspan="4" height="1">
<img border="0" src="images/lines.jpg" width="637" height="3">
</td>
</tr>
<tr>
<td width="60%" colspan="2" height="1">
<b><font face="Verdana" size="2">Samlet pris inkl. moms + evt. leverings omk.</font></b>
</td>
<td width="23%" height="1">
<a href="betingelser.php"><font face="Verdana" size="2" color="red">(se betingelser)</font></a>
</td>
<td width="16%" height="1" align="left">
<b><font color="#000000" face="Verdana" size="2"><?php echo "$samlet"; ?> kr.</font></b>
</td>
</tr>
<tr>
<td width="99%" colspan="4" height="1">
<img border="0" src="images/lines_double_b.jpg" width="637" height="4">
<br> <br> <table border="0" width="100%">
<tr>
<td width="100%"><b><font face="Verdana" color="#3366CC" size="3">Indtast
dine oplysninger nedenfor.</font></b></td>
</tr>
<tr>
<td width="100%">
<hr color="#3366CC">
</td>
</tr>
</table>
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="1">
<tr>
<td width="12%" bgcolor="#FFFFFF" height="47">
<table border="0" width="100%" height="70" cellspacing="0" cellpadding="0">
<tr>
<td width="99%" height="21">
<form name="sels" method='post' action='kurv02.php' onsubmit="return validering(this);">
<table border="0" width="641">
<tr>
<td width="220"><font face="Verdana" size="2"><b>For og efternavn:</b>
</font>
</td>
<td width="195"><font face="Verdana" size="2"><b>E-mail:</b></font></td>
<td width="206" rowspan="9">
<div align="right">
<table border="0" width="193" bordercolor="#000000" cellspacing="0" height="143">
<tr>
<td width="189" bordercolor="#000000" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" height="141" bgcolor="#637DB0" background="images/back_tabel_blue.jpg">
<p align="center"><font face="Verdana" size="2" color="#FFFFFF">Ordre modtaget inden <br>
kl. 15.00, sendes efterfølgende arbejdsdag.<br>
<br>
Levering i Storkøbenhavn<br>
mandag til fredag 11-14:00</font></p>
<p align="center"><font face="Verdana" size="2" color="#FFFFFF"><b>Naturlatex.dk</b></font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="220">
<font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" name="navn" size="35" tabindex="1" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font>
</td>
<td width="195"><font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" name="email" tabindex="5" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font> </td>
</tr>
<tr>
<td width="220">
<font face="Verdana" size="2"><b>Evt. firma/institution:</b></font> </td>
<td width="195"><font face="Verdana" size="2"><b>Telefonnr.:</b>
</font> </td>
</tr>
<tr>
<td width="220">
<font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" tabindex="2" name="firma" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font>
</td>
<td width="195"><font face="Verdana" size="2"><b><INPUT TYPE="text" tabindex="6" class="but" name="tlf" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font> </td>
</tr>
<tr>
<td width="220">
<font face="Verdana" size="2"><b>Adresse:</b>
</font> </td>
<td width="195"><font face="Verdana" size="2"><b>Telefax:</b>
</font> </td>
</tr>
<tr>
<td width="220"><font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" tabindex="3" name="adresse" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font> </td>
<td width="195"><font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" tabindex="7" name="fax" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font> </td>
</tr>
<tr>
<td width="220">
<font face="Verdana" size="2"><b>Postnr. / By:</b></font> </td>
<td width="195"><b><font face="Verdana" size="2">Leveringsform:</font></b></td>
</tr>
<tr>
<td width="220"><font face="Verdana" size="2"><b><INPUT TYPE="text" class="but" name="by" tabindex="4" size="35" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border: 1 solid #000000"></b>
</font> </td>
<td width="195">
<b><select size="1" name="betaling" id="sel1" onchange="createOpts(this,'sel1','sel2');" style="font-family: Verdana; font-size: 10; color: #000000; background-color: #FFFFFF; border-style: solid; border-width: 1">
<option value="" selected>Vælg</option>
<option>Afhentes på lager (vælg dag)</option>
<option>Levering i Stor kbh. (vælg dag)</option>
<option>Levering i øvrige Dk (vælg)</option>
</select> </b></td>
</tr>
<tr>
<td width="220"><font face="Verdana" size="2" color="#999999"><b>Antal
varer:</b></font></td>
<td width="195"><font face="Verdana" size="2" color="#999999"><b>Pris
inkl. moms</b></font></td>
</tr>
<tr>
<td width="220"><font face="Verdana" size="2" color="#999999"><?php echo "$antal_varer"; ?></font></td>
<td width="195"><font face="Verdana" size="2" color="#999999"><?php echo "$samlet"; ?>
kr.</font></td>
<td></td>
</tr>
<tr>
<td width="220"></td>
<td width="195"></td>
<td></td>
</tr>
</table>
</td>
</tr>
</center>
<tr>
<td width="99%" height="4">
<hr color="#000000" size="1">
<p><font face="Verdana" size="2"><b>Jeg ønsker at afhente / eller få leveret mine varer på adressen følgende dag:</b></font>
<select size="1" name="dag" id="sel2" style="font-family: Verdana; font-size: 10 px">
<option>Vælg leveringsform</option>
</select></p>
<hr color="#000000" size="1">
</td>
</tr>
<tr>
<td width="99%" height="3">
<input type='hidden' name='antal' value='<?php echo "$antal_varer"; ?>'>
<input type='hidden' name='samlet' value='<?php echo "$samlet"; ?>'>
<p align="right"><a href="betingelser.php"><font face="Verdana" size="2" color="#FF0000">Husk
at
læse
betingelserne
før
du
handler. </font></a><font face="Verdana" size="2" color="#FF0000">
</font>
<input type="submit" value="Send" style="border:1 solid #000000; cursor:pointer; cursor:hand; width:120"> <input type="reset" style="border:1 solid #000000; cursor:hand; cursor:pointer; width:120"></form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></center> </td>
</tr>
</center>
</table><?php
//siden slutter her
}
?>
</td>
</tr>
</table>
<hr color="#000000" size="1"> <p align="center"><font color="#637DB0" size="2" face="Verdana"> </font><img border="0" src="images/hol_logo.jpg" width="120" height="12"><font size="2" face="Verdana" color="#999999">
Skebjergvej 33 * Hal 18, 2765 Smørum<br>
<font face="Verdana"><b><font size="2">Tlf:</font></b><font size="2">
(+45) 4468 9568 (Mellem kl.9:00-16:30) </font></font><b>Fax: </b>4468
3568 <b>E-mail: </b>Info@naturlatex.dk</font></p>
</td>
<td width="3" height="159">
<p></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="695" height="1">
<p align="center"><img src="images/bund.jpg" width="695" height="8" border="0"></p>
</td>
</tr>
</table>
</td>
</table>
</td>
</table>
</center>
</body>
</html>