Beispiel #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>
Beispiel #2
0
 public function getAllProperty($intPage = 0, $selectField = '*', $whereClause = '', $orderBy = '')
 {
     if ($whereClause) {
         $whereClause = ' WHERE ' . $whereClause;
     }
     if ($orderBy) {
         $orderBy = ' ORDER BY ' . $orderBy;
     }
     if ($intPage > 0) {
         $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array($selectField, Model_Property::TBL_SL_PROPERTY, $whereClause . $orderBy . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE));
     } else {
         $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array($selectField, Model_Property::TBL_SL_PROPERTY, $whereClause . $orderBy));
     }
     //echo '<br>SQL:'.$strSQL;
     $arrResult = $this->_objConnection->selectCommand($strSQL);
     if (!$arrResult) {
         global_common::writeLog('get All sl_property:' . $strSQL, 1, $_mainFrame->pPage);
         return null;
     }
     $objDataType = new Model_Datatype($this->_objConnection);
     $allDataType = $objDataType->getAllDatatype();
     $dataTypes = array();
     foreach ($allDataType as $key => $info) {
         $dataTypes[$info[global_mapping::DataTypeID]] = $info;
         unset($dataTypes[$key]);
     }
     $count = count($arrResult);
     for ($index = 0; $index < $count; $index++) {
         $arrResult[$index][global_mapping::DataTypeID] = $dataTypes[$arrResult[$index][global_mapping::DataTypeID]];
     }
     //print_r($arrResult);
     return $arrResult;
 }