Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'core/init.php';
- $full_name = ($_GET['full_name']);
- $full_name2 = ($_GET['full_name2']);
- $email = ($_GET['email']);
- $phone = ($_GET['phone']);
- $phone2 = ($_GET['phone2']);
- $notation = ($_GET['notation']);
- $description = ($_GET['description']);
- $recipient = ($_GET['recipient']);
- $delivery = ($_GET['delivery']);
- $street = ($_GET['street']);
- $pay_method = ($_GET['pay-method']);
- $cart_id = ($_GET['cart_id']);
- $sub_total = ($_GET['sub_total']);
- $metadata = array(
- "cart_id" => $cart_id,
- "sub_total" => $sub_total,
- );
- $db->query("UPDATE cart SET paid = 1 WHERE id = '{$cart_id}'");
- $db->query("INSERT INTO transactions (cart_id, full_name, full_name2, email, phone, phone2, notation, recipient, pay_method, delivery, street, sub_total, description)
- VALUES ('$cart_id', '$full_name', '$full_name2', '$email', '$phone', '$phone2', '$notation', '$recipient', '$pay_method', '$delivery', '$street', '$sub_total', '$description')");
- $domain = ($_SERVER['HTTP_HOST'] != 'localhost')? '.'.$_SERVER['HTTP_HOST']:false;
- setcookie(CART_COOKIE,'',1,"/",$domain,false);
- include 'includes/head.php';
- include 'includes/navigation.php';
- include 'includes/headerpartial.php';
- //Отправка сообщения на почту.
- $message = "На сайте новая заявка! Сумма заказа: ".number_format($sub_total)." рублей.";
- $to = "kalagur.a@yandex.ru";
- $from = "admin@florentis.ru";
- $subject = "Заявка";
- $headers = "From: $from\r\nReply-to: $from\r\nContent-type: text/plain; charset=utf-8\r\n";
- mail($to, $subject, $message, $headers);
- ?>
- <h1 class="text-center text_success">Спасибо за покупку!</h1>
- <p>Стоимость вашего заказа составила <?=number_format($sub_total);?> рублей. </p>
- <p>Номер вашего заказа: <strong><?=$cart_id;?></strong>.</p>
- <p>В ближайшее время с вами свяжется по телефону наш менеджер для уточнения деталей доставки и времени доставки.</p>
- <?php
- include 'includes/footer.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement