include "models/function.php"; $param = "opt"; if (isset($_POST["go"])) { if ($_POST["go"] == "save") { array_pop($_POST); DB::insert(DB::insertSql($param, $_POST), $_POST); header("Location: " . $param . ".php"); } else { $id = array_pop($_POST); DB::update(DB::updateSql($param, $_POST), $_POST, $id); header("Location: " . $param . ".php"); } } if (isset($_GET["delete"])) { Delete::del($_GET["title"], $_GET["delete"]); header("Location: " . $param . ".php"); } $records = DB::select($param); require_once 'view/tpl_top.php'; ?> <div class="app app-header-fixed"> <?php include "view/tpl_popup_opt.php"; include "view/header.php"; $active_b = "class=\"active\""; include "view/nav.php"; ?> <!-- content --> <div id="content" class="app-content" role="main"> <div class="app-content-body ">
<?php require_once '../func/admin.class.php'; $authorizer = new Authorizer(); $uid = $authorizer->isLogged(); require_once '../func/admin.class.php'; require_once '../inc/vars.php'; $delete = new Delete(MT_TABLE); if ($_POST['_id']) { $delete->del($_POST['_id']); echo '<p><a href="#" onclick="return c_delete()">Close</a></p>'; }
<?php include "models/function.php"; $promo = DB::select("promo"); if (isset($_GET['delete'])) { $array = DB::selectID($_GET['table'], $_GET['delete']); Delete::del($_GET['table'], $_GET['delete']); Delete::del_touch('zakaz', 'nzakaz', $array[0]['id']); //var_dump($array); } $record = DB::select("count_zakaz"); require_once 'view/tpl_top.php'; ?> <div class="app app-header-fixed "> <?php include "view/header.php"; $active_e = "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"> <div class="bg-light lter b-b wrapper-md wrapper-md__i"> <h1 class="m-n font-thin h3 inline">Заказы</h1> </div> <div class="wrapper-md"> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default">
} else { $data_related = ""; } require_once "classes/Product.php"; $obj = new Product(); if ($_POST["go"] == "save") { $fff = $obj->insert($obj->insertSql(), 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"])); header("Location: production.php?id=" . $_POST["section"]); } else { $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