Пример #1
0
<?php

/* TODO: Add code here */
require 'config/globalconfig.php';
include_once 'class/model_product.php';
include_once 'class/model_property.php';
include_once 'class/model_productproperty.php';
include_once 'class/model_propertygroup.php';
include_once 'class/model_productprice.php';
include_once 'class/model_articletype.php';
include_once 'class/model_retailer.php';
include_once 'class/model_status.php';
include_once 'class/model_city.php';
$objProduct = new Model_Product($objConnection);
$objProperty = new Model_Property($objConnection);
$objProductProperty = new Model_ProductProperty($objConnection);
$objPropertyGroup = new Model_PropertyGroup($objConnection);
$objProductPrice = new Model_ProductPrice($objConnection);
$objArticleType = new Model_ArticleType($objConnection);
$objRetailer = new Model_Retailer($objConnection);
if ($_pgR["act"] == Model_Product::ACT_ADD || $_pgR["act"] == Model_Product::ACT_UPDATE) {
    if (global_common::isCLogin()) {
        //get user info
        $c_userInfo = $_SESSION[global_common::SES_C_USERINFO];
        $properties = $_pgR['Properties'];
        //$properties = html_entity_decode($properties,ENT_COMPAT ,'UTF-8' );
        $productName = $_pgR['ProductName'];
        $productName = html_entity_decode($productName, ENT_COMPAT, 'UTF-8');
        $catalogueID = $_pgR['CatalogueID'];
        $catalogueID = html_entity_decode($catalogueID, ENT_COMPAT, 'UTF-8');
        $imageLink = $_pgR['ImageLink'];
Пример #2
0
include_once 'class/model_propertygroup.php';
include_once 'class/model_datatype.php';
include_once 'class/model_adtype.php';
include_once 'class/model_city.php';
//get catId from _article.inc
//$catID = $_pgR['cid'];
$objCity = new Model_City($objConnection);
$allCities = $objCity->getAllCity();
$page = $_pgR["p"] ? $_pgR["p"] : 1;
if (!$_pgR["cid"]) {
    global_common::redirectByScript("index.php");
}
$keyword = $_pgR['kw'];
$objArticleType = new model_ArticleType($objConnection);
$objProduct = new Model_Product($objConnection);
$objProductProperty = new Model_ProductProperty($objConnection);
$objManufactory = new Model_Manufactory($objConnection);
$catID = $_pgR['cid'];
//Just get from "article_list.php"
//$district = $_pgR['ds'];
$keyword = $_pgR['kw'];
$manu = $_pgR['manu'];
$properties = $_pgR['property'];
$filterProperty = '';
foreach ($properties as $key => $info) {
    //echo $key;
    if ($info) {
        $filterProperty .= '(GROUP_CONCAT(\'&&\',propertyid, propertyvalue,\'&&\') LIKE \'%&&' . $key . $info . '&&%\') And ';
    }
}
if ($filterProperty) {