<?php include "fns/function.php"; if (isset($_GET["id"])) { $product = mysql_assoc("SELECT * FROM `cat_price` WHERE id={$_GET["id"]}"); $marka_view = view_marka($product[0]["marka"]); $model_view = view_model($product[0]["model"]); $group_view = view_group($product[0]["group"]); } if (isset($_POST["save"])) { $marka = trimStr($_POST["addProduct_marka"]); $model = trimStr($_POST["addProduct_model"]); $group = trimStr($_POST["addProduct_group"]); $nomer = trimStr($_POST["nomer"]); $names = trimStr($_POST["names"]); $url = del_extra(translitIt($names)); $price = trimStr($_POST["price"]); $k1 = trimStr($_POST["k1"]); $k2 = trimStr($_POST["k2"]); $k3 = trimStr($_POST["k3"]); $k4 = trimStr($_POST["k4"]); $k5 = trimStr($_POST["k5"]); $k6 = trimStr($_POST["k6"]); $k7 = trimStr($_POST["k7"]); $k8 = trimStr($_POST["k8"]); $k9 = trimStr($_POST["k9"]); $text = trimStr($_POST["text"]); $attr = $_POST["attr"]; $val = $_POST["val"]; $data_attr = serialize(array_combine($attr, $val)); $title = trimStr($_POST["title"]);
<?php if ($product_count == null) { ?> <div class="panel-heading">В этой группе нет товаров</div> <?php } elseif ($product_count == 1 and $product == false) { ?> <div class="panel-heading">Выберите модель</div> <?php } else { ?> <div class="panel-heading"><?php echo view_marka($_GET['marka']); ?> - <?php echo view_model($_GET['model']); ?> </div> <div class="table-responsive"> <table class="table table-striped b-t b-light"> <thead> <tr> <th width="50"><i class="fa fa-file-image-o"></i></th> <th>Наименование</th> <th style="width:80px;"></th> </tr> </thead> <tbody> <?php foreach ($product as $key => $value) { ?>