"Drugs", price=> 5.95, pic=>"weed.jpg", size=> array("2 ton", "3 ton")), #Tombstone Made In Metal CD - 10€ #Tombstone Made In Metal T-shirt - 14€ #Tombstone Cap model 1 - 10€ #Tombstone Cap model 2 - 10€ array(name =>"Made In Metal CD ",price=>10.00,pic=>"album.jpg"), array(name =>"T-shirt",price=>15.00,pic=>"tshirt.jpg",size=> array("S", "M") ), array(name =>"Cap model 1",price=>10.00,pic=>"cap1.jpg" ), array(name =>"Cap model 2",price=>10,pic=>"cap2.jpg"), ); #AND !empty($_POST['firstname']) AND !empty($_POST['lastname']) AND !empty($_POST['adress']) AND !empty($_POST['postal']) AND !empty($_POST['country']) AND !empty($_POST['email']) if($_GET['action'] == "send" AND !empty($_POST['firstname']) AND !empty($_POST['lastname']) AND !empty($_POST['adress']) AND !empty($_POST['postal']) AND !empty($_POST['city']) AND !empty($_POST['country']) AND !empty($_POST['email']) AND !empty($_POST['payment']) AND $_POST['firstname'] != "FIRST NAME" AND $_POST['lastname'] != "LAST NAME" and $_POST['adress'] != "ADRESS" AND $_POST['postal'] != "POSTAL CODE" and $_POST['city'] != "CITY" AND $_POST['country'] != "COUNTRY" AND $_POST['email'] != "E-MAIL"){ if($_POST['info'] == "ADDITIONAL INFO"){$_POST['info'] = "";} if($_POST['state'] == "STATE"){$_POST['state'] = "";} if($_POST['shipto'] == "fin"){$shippingfee = 4.60;}elseif($_POST['shipto'] == "eu"){$shippingfee = 6.10;}else{$shippingfee = 7.90;} if($_POST['payment'] == 3){$shippingfee = $shippingfee + 7;$payment = 'Cash on delivery +7€ (You pay at the post office, ONLY TO FINLAND)';}elseif($_POST['payment'] == 1){$payment = 'I will pay by Paypal';}else{$payment = 'I will pay by bank transfer';} $totalprice = $shippingfee; echo '
Ship to:
'.$_POST['firstname'].' '.$_POST['lastname'].'
'.$_POST['adress'].'
'.$_POST['postal'].' '.$_POST['city'].'
'.$_POST['state'].'
'.$_POST['country'].'

'.$_POST['email'].'
Comment: '.$_POST['info'].'

'.$payment.'
'; $count = count($products); # Loopar igenom produkter for ($row = 0; $row < $count; $row++) { $itemname = $products[$row][name]; $price = $products[$row][price]; #Kör igenom storlekan # Produktere me size arrayn: if(!empty($products[$row][size])){ # Kör igenom storleiks arrayn foreach ($products[$row][size] as $s){ if(!empty($_POST['item'][$row][$s]) AND is_numeric($_POST['item'][$row][$s]) AND $_POST['item'][$row][$s] > 0 ){ $amount = floor($_POST['item'][$row][$s]); $input .= ''; echo ''; $totalprice = $totalprice + $amount*$price; unset($amount); } } } # all ader produkts elseif(!empty($_POST['item'][$row]) AND is_numeric($_POST['item'][$row]) AND $_POST['item'][$row] > 0){ $amount = floor($_POST['item'][$row]); $input .= ''; echo ''; $totalprice = $totalprice + $amount*$price; unset($amount); } } # echo $totalprice; # echo '
Ship to: '.$_POST['firstname'].' '.$_POST['lastname'].'
'.$_POST['adress'].'
'.$_POST['postal'].'
'.$_POST['country'].'
'.$_POST['email'].'
Comment: '.$_POST['info']; echo '
PRODUCTS PRICE PER UNIT SIZE AMOUNT PRICE
'.$itemname.''.$price.' €'.$s.''.$amount.''.$amount*$price.' €
'.$itemname.''.$price.' €'.$s.''.$amount.''.$amount*$price.' €
Shipping fee'.number_format($shippingfee, 2, '.', '').' €
total: '.number_format($totalprice, 2, '.', '').' €
'; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; $input .= ' '; echo $input.'
'; include 'footer.php'; die; } elseif($_GET['action'] == "confirm"){ #blir väl ti loop igenom produktan ännu ein gang. # Konföörmar beställning, no ere för seint att änder se :( /*echo ' KONFÖÖRMED!
Ship to: '.$_POST['firstname'].' '.$_POST['lastname'].'
'.$_POST['adress'].'
'.$_POST['postal'].'
'.$_POST['country'].'
'.$_POST['email'].'
Comment: '.$_POST['info'].'


'; $mail .= 'Ship to: '.$_POST['firstname'].' '.$_POST['lastname'].'
'.$_POST['adress'].'
'.$_POST['postal'].'
'.$_POST['country'].'
'.$_POST['email'].'
Comment: '.$_POST['info'].''; */ if($_POST['shipto'] == "fin"){$shippingfee = 4.60;}elseif($_POST['shipto'] == "eu"){$shippingfee = 6.10;}else{$shippingfee = 7.90;} if($_POST['payment'] == 3){$shippingfee = $shippingfee + 7;$payment = 'Cash on delivery +7€ (You pay at the post office, ONLY TO FINLAND) ';}elseif($_POST['payment'] == 1){$payment = 'I will pay by Paypal';}else{$payment = 'I will pay by bank transfer';} $totalprice = $shippingfee; echo 'Thank you for your order!'; $count = count($products); # Loopar igenom produkter for ($row = 0; $row < $count; $row++) { $itemname = $products[$row][name]; $price = $products[$row][price]; #Kör igenom storlekan # Produktere me size arrayn: if(!empty($products[$row][size])){ # Kör igenom storleiks arrayn foreach ($products[$row][size] as $s){ if(!empty($_POST['item'][$row][$s]) AND is_numeric($_POST['item'][$row][$s]) AND $_POST['item'][$row][$s] > 0 ){ $amount = floor($_POST['item'][$row][$s]); #echo 'Item: '.$itemname.' Size: '.$s.' Amount: '.$amount.' Price: '.$amount*$price.'
'; $mail .= 'Item: '.$itemname.' Size: '.$s.' Amount: '.$amount.' Price: '.$amount*$price.'
'; $totalprice = $totalprice + $amount*$price; unset($amount); } } } # all ader produkts elseif(!empty($_POST['item'][$row]) AND is_numeric($_POST['item'][$row]) AND $_POST['item'][$row] > 0){ $amount = floor($_POST['item'][$row]); #echo 'Item: '.$itemname.' amount: '.$amount.' Price: '.$amount*$price.'
'; $mail .= 'Item: '.$itemname.' amount: '.$amount.' Price: '.$amount*$price.'
'; $totalprice = $totalprice + $amount*$price; unset($amount); } } $mail .= '
Shipping fee: '.$shippingfee.''; #echo '
Total price: '.$totalprice; $mail .= '

Total price: '.$totalprice.''; $mail .= '
Send to:

'.$_POST['firstname'].' '.$_POST['lastname'].'
'.$_POST['adress'].'
'.$_POST['postal'].' '.$_POST['city'].'
'.$_POST['state'].'
'.$_POST['country'].'
'.$_POST['email'].'
'.$payment.'
Comment: '.$_POST['info']; #echo '


Send to rockstar\'s email:
'.$mail.'
'; # Extra kryddor fö mail funktion $headers = "From: webshop@tombstone.fi\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: 8bit\r\n\r\n"; mail($sendto , "ORDER || ".$_POST['firstname']." ".$_POST['lastname']." ", $mail, $headers); include 'footer.php'; die; } else{ echo '
'; echo '
'; # Antal produkter man kan köp som mest $maxamount = 10; # Räknar antal produkter $count = count($products); # Loopar igenom produkter for ($row = 0; $row < $count; $row++) { $itemname = $products[$row][name]; $price = $products[$row][price]; if(!empty($products[$row][size])){ # Kör igenom storleiks arrayn foreach ($products[$row][size] as $s){ #
AMOUNT

$sizes .= ''.$s.'

';} } else{ $amount = 'AMOUNT
'; #$i=0; #while($i <= $maxamount){ # $amount .= ' # ';$i++; #} #$amount .= ''; } if(!empty($products[$row][pic])){$img = 'pic';} echo '
'.$img.'
'.$itemname.'
'.$price.' €
'; #echo "
".$img." ".$itemname."
".$price." e
"; echo '
'; echo $amount; echo $sizes; echo '
'; unset($img, $amount, $i, $s, $sizes); } # if(!empty($_POST['firstname'])){$fname = $_POST['firstname'];}else{$fname = 'FIRST NAME';} if(!empty($_POST['lastname'])){$lname = $_POST['lastname'];}else{$lname = 'LAST NAME';} if(!empty($_POST['adress'])){$fadress = $_POST['adress'];}else{$fadress = 'ADDRESS';} if(!empty($_POST['postal'])){$fpostal = $_POST['postal'];}else{$fpostal = 'ZIP/POSTAL CODE';} if(!empty($_POST['city'])){$fcity = $_POST['city'];}else{$fcity = 'CITY';} if(!empty($_POST['state'])){$fcountry = $_POST['state'];}else{$fstate = 'STATE';} if(!empty($_POST['country'])){$fcountry = $_POST['country'];}else{$fcountry = 'COUNTRY';} if(!empty($_POST['email'])){$femail = $_POST['email'];}else{$femail = 'E-MAIL';} if(!empty($_POST['info'])){$finfo = $_POST['info'];}else{$finfo = 'ADDITIONAL INFO';} echo '



SHIP TO
PAYMENT METHOD

Paypal
Bank transfer
Cash on delivery +7€
(You pay at the post office, ONLY TO FINLAND)

Order information:
There are several ways to pay for your order. We recommend Paypal for the purchase. It\'s the fastest and easiest way to pay.

When we have received your order, we will send you the information you need to your e-mail within 24 hours.

If you want more information about anything related to the webstore, please take contact to band@tombstone.fi
'; } include 'footer.php'; ?>