Example #1
0
<?php

include "models/function.php";
$param = "price";
if (isset($_POST['go'])) {
    DB::updatePM("UPDATE price SET kol='0'");
    $results = Price::importPrice($_FILES);
    foreach ($results as $result) {
        $res_tmp = DB::selectParam($param, "nomer", $result['nomer']);
        if (!$res_tmp) {
            $search[] = array("nomer" => $result['nomer']);
        }
        $arrUpdate = DB::updatePM("UPDATE price SET kol='{$result['kol']}' WHERE nomer = '{$result['nomer']}'");
    }
}
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">
					<div class="bg-light lter b-b wrapper-md wrapper-md__i">
						<h1 class="m-n font-thin h3 inline">Обновление прайс листа</h1>
					</div>
Example #2
0
include "models/function.php";
$param = "provider";
if (isset($_POST["go"])) {
    if ($_POST["go"] == "save") {
        array_pop($_POST);
        DB::insert(DB::insertSql($param, $_POST), $_POST);
        header("Location: pricelist.php");
    } else {
        $id = array_pop($_POST);
        DB::update(DB::updateSql($param, $_POST), $_POST, $id);
        header("Location: pricelist.php");
    }
}
if (isset($_POST["update"])) {
    IncludeClass::inc(array('Price'));
    Price::importPrice($_FILES, $_POST["update"]);
    header("Location: pricelist.php");
}
if (isset($_GET["delete"])) {
    Delete::del($_GET["title"], $_GET["delete"]);
    header("Location: pricelist.php");
}
$records = DB::select($param);
require_once 'view/tpl_top.php';
?>
<div class="app app-header-fixed">
    <?php 
include "view/tpl_popup_provider.php";
include "view/header.php";
$active_h = "class=\"active\"";
include "view/nav.php";