$_SESSION['limit'] = 7; //���������� ��������� �������� ������ �� ��������� $limit = $_SESSION['limit']; } else { $_SESSION['limit'] += 7; $limit = $_SESSION['limit']; } } else { unset($_SESSION['limit']); $_SESSION['limit'] = 7; //���������� ��������� �������� ������ �� ��������� $limit = $_SESSION['limit']; } require_once 'class.php'; $obj = new Product(); switch ($_POST["form"]) { case 'selectId': $result = $obj->selectId($_POST['id'], $_POST['category'], $limit); echo json_encode($result); break; case 'search': $result = $obj->search($_POST["id"], $_POST["capacity"], $_POST["frame"], $_POST["price"], $_POST["waterproof"], $_POST['category'], $_POST["weight"], $_POST['sort'], $limit); echo json_encode($result); break; case 'moreInfo': $result = $obj->moreInfo($_POST["id"]); $result[0]['attr'] = unserialize($result[0]['attr']); $result[0]['img'] = unserialize($result[0]['img']); echo json_encode($result); break; }
$obj->update($obj->updateSql(), trimStr($_POST["section"]), trimStr($_POST["name"]), trimStr($_POST["nomer"]), trimStr($_POST["brand"]), trimStr($_POST["viscous"]), trimStr($_POST["type"]), trimStr($_POST["volume"]), trimStr($_POST["kol"]), trimStr($_POST["price"]), trimStr($_POST["text"]), $data_related, $data_attr, trimStr($_POST["title"]), trimStr($_POST["description"]), trimStr($_POST["keywords"]), $name_img, trimStr($_POST["img_title"]), trimStr($_POST["img_alt"]), $_POST['go']); header("Location: production.php?id=" . $_POST["section"]); } } if (isset($_GET["delete"])) { $delete = new Delete(); $delete->del($_GET["title"], $_GET["delete"]); header("Location: production.php?id=" . $_GET["delete"]); } require_once "classes/Catalog.php"; $section = new Catalog(); require_once "classes/Product.php"; $objEdit = new Product(); $related = $objEdit->selectAll(); if (isset($_GET["edit"])) { $record = $objEdit->selectId($_GET['edit']); $nowSection = $objEdit->selectSectionId($_GET['edit']); } require_once 'view/tpl_top.php'; ?> <div class="app app-header-fixed "> <?php include "view/header.php"; $active_d = "class=\"active\""; include "view/nav.php"; ?> <!-- content --> <div id="content" class="app-content" role="main"> <div class="app-content-body "> <div class="hbox hbox-auto-xs hbox-auto-sm"> <div class="col">