コード例 #1
0
<?php

include_once "config.php";
require_once 'functions.php';
require_once 'lang.php';
require_once $FOLDER->class . "/class.mysql.php";
require_once $FOLDER->class . "/class.session.php";
$db = new mysql();
$lang = language_set::session_set();
if (isset($_POST[sorting])) {
    $sort = explode(',', rtrim($_POST[sorting], ','));
    $maxSort = count($sort);
    for ($y = 0; $y < $maxSort; $y++) {
        $exp = explode(':', $sort[$y]);
        mysql_query("UPDATE " . constant("TABLE_" . strtoupper($_POST[table])) . " SET `ordering`='{$exp[1]}' WHERE `id`='{$exp[0]}'");
    }
}
コード例 #2
0
if ( isset($_GET['product_id'])) $product_id = preg_replace('#[^0-9]+#i', '', $_GET['product_id']);
if ( isset($_GET['pn'])) $pn = preg_replace('#[^0-9]+#i', '', $_GET['pn']);
if ( isset($_GET['brand_id'])) $brand_id = preg_replace('#[^0-9]+#i', '', $_GET['brand_id']);
if ( isset($_GET['id_prod'])) $id_prod = preg_replace('#[^0-9]+#i', '', $_GET['id_prod']);
if ( isset($_GET['crit'])) $crit = preg_replace('#[^0-9]+#i', '', $_GET['crit']);
if ( isset($_GET['brand_prod'])) $brand_prod = preg_replace('#[^0-9]+#i', '', $_GET['brand_prod']);
if ( isset($_POST['search_test']))   $search_test = "yes";
if ( isset($_POST['kurs_category'])) $kurs_category = preg_replace('#[^0-9]+#i', '', $_POST['kurs_category']);
if ( isset($_POST['kurs_city']))     $kurs_city = $_POST['kurs_city'];
if ( isset($_POST['kurs_lang']))     $kurs_lang = preg_replace('#[^a-z]+#i', '', $_POST['kurs_lang']);
if ( isset($_POST['date_to']))       $date_to = protect($_POST['date_to']);
if ( isset($_POST['date_from']))     $date_from = protect($_POST['date_from']);
if ( isset($_POST['proverka_reg']))  $proverka_reg = "yes";
*/
$languages = new language_set();
$lang = $languages->session_set();
$counter = new counter_set();
$counter->add_counter();
$SQL = $db->query("Select * From " . TABLE_SETTINGS . "");
$Row = $db->fetch($SQL);
define("TITLE", $Row[0]);
define("INDEX_PAGE_ID", $Row[1]);
define("DESCRIPTION", $Row[3]);
define("KEYWORDS", $Row[4]);
define("MAIN_MAIL", $Row[5]);
define("TMR", $Row[6]);
if ($id == INDEX_PAGE_ID) {
    //header("Location:".DIR."/");
}
if (!$id) {
    $id = 1;