Example #1
0
    $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"]);
    $description = trimStr($_POST["description"]);
    $keywords = trimStr($_POST["keywords"]);
    if ($_POST["save"] == "save") {
        mysql_query("INSERT INTO `cat_price` (`id`, `marka`, `model`, `group`, `nomer`, `name`, `price`, `k1`, `k2`, `k3`, `k4`,\n\t\t\t\t\t\t`k5`, `k6`, `k7`, `k8`, `k9`, `attr`, `text`, `title`, `description`, `keywords`)\n\t\t\t\t\tVALUES (NULL, '{$marka}', '{$model}', '{$group}', '{$nomer}', '{$names}', '{$price}', '{$k1}', '{$k2}', '{$k3}', '{$k4}', '{$k5}',\n\t\t\t\t\t\t'{$k6}', '{$k7}', '{$k8}', '{$k9}', '{$data_attr}', '{$text}', '{$title}', '{$description}', '{$keywords}')");
        header("Location: marka.php?marka=" . $marka . "&model=" . $model);
    } else {
        mysql_query("UPDATE `cat_price` SET\n\t\t\t\t\t`marka`='{$marka}',\n\t\t\t\t\t`model`='{$model}',\n\t\t\t\t\t`group`='{$group}',\n\t\t\t\t\t`nomer`='{$nomer}',\n\t\t\t\t\t`name`='{$names}',\n\t\t\t\t\t`price`='{$price}',\n\t\t\t\t\t`k1`='{$k1}',\n\t\t\t\t\t`k2`='{$k2}',\n\t\t\t\t\t`k3`='{$k3}',\n\t\t\t\t\t`k4`='{$k4}',\n\t\t\t\t\t`k5`='{$k5}',\n\t\t\t\t\t`k6`='{$k6}',\n\t\t\t\t\t`k7`='{$k7}',\n\t\t\t\t\t`k8`='{$k8}',\n\t\t\t\t\t`k9`='{$k9}',\n\t\t\t\t\t`attr`='{$data_attr}',\n\t\t\t\t\t`text`='{$text}',\n\t\t\t\t\t`title`='{$title}',\n\t\t\t\t\t`description`='{$description}',\n\t\t\t\t\t`keywords`='{$keywords}'\n\t\t\t\t\tWHERE `id` = {$_POST["save"]}");
        header("Location: marka.php?marka=" . $marka . "&model=" . $model);
    }
}
include "fns/models/product.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title><?php 
Example #2
0
 <?php 
#$page_list = array();
if (!empty($page_list)) {
    echo "<table width='100%' border='0' cellspacing='0' cellpadding='5'>\r\r\n          \t<tr>\r\r\n\t\t\t<td class='listheader'>&nbsp;</td>\r\r\n           \t<td class='listheader' nowrap>Date &nbsp;<a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form/s/" . $i . "')' title='Click to add a class'><img src='" . base_url() . "images/add_item.png' border='0'/></a></td>\r\r\n\t\t\t<td class='listheader' nowrap>Incident detail</td>\r\r\n           \t<td class='listheader' nowrap>Response</td>\r\r\n\t\t\t<td class='listheader' nowrap>Action taken</td>\r\r\n\t\t\t</tr>";
    $counter = 0;
    foreach ($page_list as $row) {
        #Show one row at a time
        echo "<tr id='tr_" . $row['incidentid'] . "' class='listrow " . ($counter % 2 ? '' : 'grey_list_row') . "'>\r\r\n\t\t<td class='leftListCell rightListCell' valign='bottom' width='1%' nowrap>";
        #if(check_user_access($this,'delete_deal')){
        echo "<a href='javascript:void(0)' onclick=\"asynchDelete('" . base_url() . "classes/delete_class/i/" . encryptValue($row['incidentid']) . "', 'Are you sure you want to delete this incident? \\nThis operation can not be undone. \\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.', 'tr_" . $row['incidentid'] . "');\" title=\"Click to remove this class.\"><img src='" . base_url() . "images/delete.png' border='0'/></a>";
        #}
        #if(check_user_access($this,'update_deals')){
        echo " &nbsp;&nbsp; <a href='" . base_url() . "classes/load_class_form/i/" . encryptValue($row['incidentid']) . "' title=\"Click to edit this class details.\"><img src='" . base_url() . "images/edit.png' border='0'/></a>";
        #}
        echo "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . date("j M, Y", GetTimeStamp($row['incidentdate'])) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top'>" . trimStr($row['incidentdetails'], 80) . "</td>\t\t\t\t\r\r\n\t\t\t\t<td valign='top' nowrap>" . ucwords($row['response']) . "</td>\t\t\r\r\n\t\t\t\t<td valign='top' class='rightListCell'>" . trimStr($row['actiontaken'], 50) . "</td>\t\t\r\r\n\t\t\t</tr>";
        $counter++;
    }
    echo "<tr>\r\r\n\t<td colspan='5' align='right'  class='layer_table_pagination'>" . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "classes/manage_classes/p/%d", 'results') . "</td>\r\r\n\t</tr>\r\r\n\t</table>";
} else {
    if (!empty($student_details)) {
        echo "<div>" . $student_details['firstname'] . " has not had any disciplinary incidents so far. Click <a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form/s/" . $i . "')' title='Click to add a class'><i>here</i></a> to add an incident</div>";
    } else {
        echo "<div>No disciplinary incidents have been registered so far. Click <a class='fancybox fancybox.ajax' href='" . base_url() . "discipline/load_incident_form')' title='Click to add a class'><i>here</i></a> to add a new incident</div>";
    }
}
Example #3
0
<?php

include "models/function.php";
require_once "classes/Catalog.php";
$t = "catalog";
$obj = new Catalog();
$title = "Каталог продукции";
$record = false;
if (isset($_POST["go"])) {
    if (!$_POST["url"]) {
        $url = replaceStr(translitIt(trimStr($_POST["name"])));
    } else {
        $url = $_POST["url"];
    }
    if ($_POST["go"] == "save") {
        $obj->insertSection($obj->insertSectionSql(), $_POST["section"], $url, $_POST["name"], $_POST["title"], $_POST["desc"], $_POST["keywords"]);
        header("Location: " . $_SERVER['REQUEST_URI']);
    } else {
        $obj->updateSection($obj->updateSectionSql(), $_POST["section"], $url, $_POST["name"], $_POST["title"], $_POST["desc"], $_POST["keywords"], $_POST['go']);
        header("Location: " . $_SERVER['REQUEST_URI']);
    }
}
if (isset($_GET["delete"])) {
    Delete::del($_GET["title"], $_GET["delete"]);
    header("Location: pages.php");
}
if (isset($_GET["id"])) {
    require_once "classes/Product.php";
    $objP = new Product();
    $record = $objP->ProductSelect($_GET["id"]);
    $sectionName = $obj->selectId($_GET["id"]);
Example #4
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']);
Example #5
0
    $name_img = $objImg->upload($_FILES, $_POST["photo_now"]);
    $objAttr = new AttrValue();
    $data_attr = $objAttr->conbine($_POST["attr"], $_POST["val"]);
    if (isset($_POST["related"]) and $_POST["related"]) {
        $related = array_slice($_POST["related"], 0, 4);
        $data_related = serialize($related);
    } 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']);
Example #6
0
function getRawPiCodes($page)
{
    $currentOffset = 0;
    $re = "/\\[(pi.*?):([^\\(]*?|(.*?)\\((.*?)\\))\\]/ms";
    $matchReturns = preg_match_all($re, $page, $matches, PREG_SET_ORDER);
    $piCodes = array();
    foreach ($matches as $code) {
        $theCode = array("name" => trimStr($code[1]), "params" => trimStr($code[2]), "function" => null, "arguments" => null);
        if (isset($code[3])) {
            $theCode["function"] = $code[3];
            //"/" . str_replace(".", "/", $code[3]);
            if (isset($code[4])) {
                $argumentStr = trimStr($code[4]);
                $parsedArgs = array();
                $args = explode(",", $argumentStr);
                foreach ($args as $arg) {
                    $explArg = explode(":", $arg);
                    $argName = $explArg[0];
                    $argVal = $explArg[1];
                    $parsedArgs[$argName] = $argVal;
                    //restoreExternalized($argVal);
                }
                $theCode["arguments"] = $parsedArgs;
            }
        }
        array_push($piCodes, $theCode);
    }
    return $piCodes;
}
Example #7
0
include "models/function.php";
IncludeClass::inc(array("Pages"));
$param = "section";
$record = false;
if (isset($_POST["go"])) {
    $obj = new Pages();
    if (!$_POST["url"]) {
        $url = replaceStr(translitIt($_POST["name"]));
    } else {
        $url = $_POST["url"];
    }
    if ($_POST["go"] == "save") {
        $obj->insertSection($obj->insertSectionSql(), $_POST["section"], $url, trimStr($_POST["name"]));
        header("Location: " . $_SERVER['REQUEST_URI']);
    } else {
        $obj->updateSection($obj->updateSectionSql(), $_POST["section"], $url, trimStr($_POST["name"]), $_POST['go']);
        header("Location: " . $_SERVER['REQUEST_URI']);
    }
}
if (isset($_POST["pages"])) {
    if ($_POST["pages"] == "insert") {
        array_pop($_POST);
        DB::insert(DB::insertSql("pages", $_POST), $_POST);
        header("Location: " . $_SERVER['REQUEST_URI']);
    } else {
        array_pop($_POST);
        $id = array_pop($_POST);
        DB::update(DB::updateSql("pages", $_POST), $_POST, $id);
        header("Location: " . $_SERVER['REQUEST_URI']);
    }
}