<?php require "inc/lib.inc.php"; require "inc/db.inc.php"; $name = add_cliar($_POST['name']); $email = add_cliar($_POST['email']); $phone = add_cliar($_POST['phone']); $address = add_cliar($_POST['address']); $time = time(); $oredeId = $basket['orderid']; $str = $name . ' | ' . $email . ' | ' . $phone . ' | ' . $address . ' | ' . $oredeId . ' | ' . $time . "\n"; if (false === file_put_contents('admin/' . ORDERS_LOG, $str, FILE_APPEND)) { die('error file'); } saveOrder($time); ?> <html> <head> <title>Сохранение данных заказа</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> </head> <body> <p>Ваш заказ принят.</p> <p><a href="catalog.php">Вернуться в каталог товаров</a></p> </body> </html>
<?php // подключение библиотек require "inc/lib.inc.php"; require "inc/db.inc.php"; $id_goods = add_cliar($_GET['id']); if ($id_goods) { delete_goods($id_goods); } header('Location: basket.php'); exit;
<?php // ����������� ��������� require "inc/lib.inc.php"; require "inc/db.inc.php"; $id_elem = add_cliar($_GET['id_elem']); $quentity = 1; add_basket($id_elem, $quentity); header('Location: catalog.php'); exit;
<?php // подключение библиотек require "secure/session.inc.php"; require "../inc/lib.inc.php"; require "../inc/db.inc.php"; $title = add_cliar($_POST['title']); $author = add_cliar($_POST['author']); $pubyear = add_cliar($_POST['pubyear']); $price = add_cliar($_POST['price']); if (!add_to_catalog($title, $author, $pubyear, $price)) { echo 'EROOR ADD GOODS'; } else { header('Location: add2cat.php'); exit; }