Esempio n. 1
0
<?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"]);
Esempio n. 2
0
include "fns/function.php";
if (isset($_POST["go"])) {
    if ($_POST["go"] == "section") {
        $value = trimStr($_POST["names"]);
        $url = del_extra(translitIt($value));
        if ($_POST["edit"] == "") {
            mysql_query("INSERT INTO `list_section` (`id`, `value`, `url`) VALUES (NULL, '{$value}', '{$url}')");
            header("Location: " . $_SERVER['REQUEST_URI']);
        } else {
            mysql_query("UPDATE `list_section` SET `value`='{$value}',`url`='{$url}' WHERE `id`={$_POST['edit']}");
            header("Location: " . $_SERVER['REQUEST_URI']);
        }
    } else {
        if ($_POST["go"] == "subsection") {
            $value = trimStr($_POST["names"]);
            $url = del_extra(translitIt($value));
            if ($_POST["edit"] == "") {
                mysql_query("INSERT INTO `list_subsection` (`id`, `parent`, `value`, `url`) VALUES (NULL, '{$_POST['section']}', '{$value}', '{$url}')");
                header("Location: " . $_SERVER['REQUEST_URI']);
            } else {
                mysql_query("UPDATE `list_subsection` SET `parent`='{$_POST['section']}', `value`='{$value}',`url`='{$url}' WHERE `id`={$_POST['edit']}");
                header("Location: " . $_SERVER['REQUEST_URI']);
            }
        }
    }
}
if (isset($_POST["save"])) {
    if ($_POST["save"] == "save") {
        mysql_query("INSERT INTO `koreacars`.`pages` (`id`, `section`, `subsection`, `title`, `title_b`, `meta_description`, `meta_keywords`, `text`, `onoff`) \n\t\t\t\tVALUES (NULL, '{$_GET['section']}', '{$_GET['subsection']}', '{$_POST['title']}', '{$_POST['title_b']}', '{$_POST['meta_description']}',\n\t\t\t\t\t'{$_POST['meta_keywords']}', '{$_POST['text']}', 'off');");
        header("Location: " . $_SERVER['REQUEST_URI']);
    } else {