Example #1
0
	if($search)
	{
		$search .= ' and (`'.global_mapping::ProductName.'` like \'%'.global_common::escape_mysql_string($keyword).'%\' or `'.global_mapping::Description.'` like \'%'.global_common::escape_mysql_string($keyword).'%\')' ;
	}
	else
	{
		$search .= '(`'.global_mapping::ProductName.'` like \'%'.global_common::escape_mysql_string($keyword).'%\' or `'.global_mapping::Description.'` like \'%'.global_common::escape_mysql_string($keyword).'%\')' ;
	}
}
*/
if ($catID) {
    $searchGroup = global_mapping::ArticleTypeID . '= \'' . $catID . '\'';
}
$allProperties = $objProperty->getPropertyByCat($catID, 0, $total);
$allDataTypes = $objDataType->getAllDatatype();
$allGroups = $objGroup->getAllPropertyGroup(0, '', $searchGroup, '');
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_property.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_property.js');
?>
"></script>
<div id="admin-property" class="admin-page">
	<div class="row-fluid">
		<div class="span12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
				Manage Property
			</h3>
		</div>
Example #2
0
if($keyword)
{
	if($search)
	{
		$search .= ' and (`'.global_mapping::ProductName.'` like \'%'.global_common::escape_mysql_string($keyword).'%\' or `'.global_mapping::Description.'` like \'%'.global_common::escape_mysql_string($keyword).'%\')' ;
	}
	else
	{
		$search .= '(`'.global_mapping::ProductName.'` like \'%'.global_common::escape_mysql_string($keyword).'%\' or `'.global_mapping::Description.'` like \'%'.global_common::escape_mysql_string($keyword).'%\')' ;
	}
}
*/
if ($catID) {
    $searchGroup = global_mapping::ArticleTypeID . '= \'' . $catID . '\'';
}
$allGroups = $objPropertyGroup->getAllPropertyGroup(0, '', $searchGroup, '', $total);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_property.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_propertygroup.js');
?>
"></script>
<div id="admin-property-group" class="admin-page">
	<div class="row-fluid">
		<div class="span12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
				Manage Property Group
			</h3>
		</div>
Example #3
0
 $row = 0;
 $stack = array();
 //ignore header
 $line_of_text = fgetcsv($handle);
 while (!feof($handle)) {
     $line_of_text = fgetcsv($handle);
     if ($line_of_text) {
         array_push($stack, $line_of_text);
     }
 }
 fclose($handle);
 $count = count($stack);
 echo '<br>Count:' . $count;
 for ($i = 0; $i < $count; $i++) {
     $where = global_mapping::ArticleTypeID . '=' . $stack[$i][4] . ' and ' . global_mapping::PropertyGroupName . '=\'' . trim($stack[$i][1]) . '\'';
     $existedGroups = $objPropertyGroup->getAllPropertyGroup(0, '*', $where, '');
     if (count($existedGroups) <= 0) {
         $groupID = $objPropertyGroup->insert($stack[$i][1], $stack[$i][1], $stack[$i][4], $i + 10, $createdBy);
     } else {
         $groupID = $existedGroups[0][0];
     }
     $where = global_mapping::PropertyGroupID . '=' . $groupID . ' and ' . global_mapping::PropertyName . '=\'' . trim($stack[$i][0]) . '\'';
     $existedProperties = $objProperty->getAllProperty(0, '*', $where, '');
     if (count($existedProperties) <= 0) {
         $objProperty->insert($groupID, $stack[$i][0], $stack[$i][2], 1, $stack[$i][3], $createdBy, 1);
         echo 'Inserted a new property ' . $stack[$i][0] . ' Group:' . $stack[$i][1] . 'Cat: ' . $stack[$i][4];
         echo "<br>";
     } else {
         echo 'Existed property ' . $stack[$i][0] . ' Group:' . $stack[$i][1] . 'Cat: ' . $stack[$i][4];
         echo "<br>";
     }
Example #4
0
$objArticle = new Model_Article($objConnection);
$objArticleType = new Model_ArticleType($objConnection);
$objPropertyGroup = new Model_PropertyGroup($objConnection);
$objProperty = new Model_Property($objConnection);
$objProduct = new Model_Product($objConnection);
$objProductProperty = new Model_ProductProperty($objConnection);
$objManufactory = new Model_Manufactory($objConnection);
//$propertyInfo = $objProduct->getPropertyInfoByID(30);
//print_r($propertyInfo);
$intMode = 0;
//add mode
$parentTypes = $objArticleType->getAllArticleType(0, null, 'ParentID=0', 'Level');
$allTypes = $objArticleType->getAllArticleType(0, null, 'ParentID!=0', 'Level');
//set default selected section
$currentParentType = $parentTypes[0][global_mapping::ArticleTypeID];
$allGroups = $objPropertyGroup->getAllPropertyGroup(0, '*', '', '');
$allManuFactories = $objManufactory->getAllManufactory(0, '*', '', global_mapping::ManufactoryName);
//print_r($allGroups);
$allGroupIDs = global_common::getArrayColumn($allGroups, global_mapping::PropertyGroupID);
$strQueryIN = global_mapping::PropertyGroupID . ' IN(' . global_common::convertToQueryIN($allGroupIDs) . ')';
//echo($allCities);
$allProperties = $objProperty->getAllProperty(0, '*', $strQueryIN, '`Order`');
//print_r($allProperties);
if ($_pgR["pid"]) {
    $productID = $_pgR["pid"];
    $product = $objProduct->getProductByID($productID);
    $intMode = 1;
    //edit mode
    $createBy = $product[global_mapping::CreatedBy];
    $currentUserID = $_SESSION[global_common::SES_C_USERINFO][global_mapping::UserID];
    if ($createBy != $currentUserID) {