예제 #1
0
파일: index.php 프로젝트: roni5/sela
<?php

/* TODO: Add code here */
require 'config/globalconfig.php';
include_once 'class/model_articletype.php';
include_once 'class/model_article.php';
include_once 'class/model_user.php';
$objArticleType = new model_ArticleType($objConnection);
$objArticle = new model_Article($objConnection);
$arrCategory = $objArticleType->getAllArticleType();
$objUser = new Model_User($objConnection);
if ($_pgR["act"] == Model_User::ACT_LOGIN) {
}
?>

<?php 
include_once 'include/_header.inc';
include_once 'include/_menu.inc';
include_once 'include/_cat_list.inc';
?>

<?php 
//footer
include_once 'include/_footer.inc';
예제 #2
0
파일: post.php 프로젝트: vietlethanh/oceo
foreach ($properties as $key => $info) {
    //echo $key;
    if ($info) {
        $filterProperty .= '(GROUP_CONCAT(\'&&\',propertyid, propertyvalue,\'&&\') LIKE \'%&&' . $key . $info . '&&%\') And ';
    }
}
if ($filterProperty) {
    $filterProperty = global_common::cutLast($filterProperty, 4);
    $filterProperty = '1=1 GROUP BY productid HAVING ' . $filterProperty;
    //echo $filterProperty;
    $productProperties = $objProductProperty->getAllProductProperty(0, global_mapping::ProductID, $filterProperty);
    $productIDs = global_common::getArrayColumn($productProperties, global_mapping::ProductID);
    $productInIDs = global_common::convertToQueryIN($productIDs);
}
$search = '';
$_arrCategories = $objArticleType->getAllArticleType(0, null, '`ParentID`=0', 'Level');
//echo $catID;
$cat = $objArticleType->getArticleTypeByID($catID);
//print_r($cat);
$_currentParentCatID = $catID;
if ($cat) {
    $_currentParentCatID = $cat[global_mapping::ParentID];
    $search = '`' . global_mapping::CatalogueID . '` = ' . $catID . ' ';
}
if ($city) {
    if ($search) {
        $search = 'ProductID IN( select ProductID where CityID =`' . global_mapping::CityID . '` = ' . $city . ') ';
    } else {
        $search = ' and `' . global_mapping::CityID . '` = ' . $city . ' ';
    }
}
}
if ($adTypeID) {
    if ($condition) {
        $condition .= ' and ' . global_mapping::AdTypeID . '=' . $adTypeID;
    } else {
        $condition .= global_mapping::AdTypeID . '=' . $adTypeID;
    }
}
if ($deleted) {
    $condition .= ' And ' . global_mapping::IsDeleted . '=1';
} else {
    $condition .= ' And (' . global_mapping::IsDeleted . '=0 or ' . global_mapping::IsDeleted . ' is null)';
}
$allAds = $objAdvertising->getAllAdvertising(0, null, $condition, null);
$allAdType = $objAdType->getAllAdType(0, null, null, null);
$allCats = $objArticleType->getAllArticleType(0, null, 'ParentID=0', null);
$_SESSION[global_common::SES_C_CUR_PAGE] = "admin/admin_advertising.php";
include_once 'include/_admin_header.inc';
?>
<script type="text/javascript" src="<?php 
echo $_objSystem->locateJs('user_advertising.js');
?>
"></script>
<div id="admin-advertising">
	<div class="row-fluid">
		<div class="span12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
				Manage Advertising
			</h3>
		</div>
예제 #4
0
///
/// </summary>
chdir("..");
/* TODO: Add code here */
require 'config/globalconfig.php';
require 'include/_permission_admin.inc';
include_once 'class/model_articletype.php';
include_once 'class/model_article.php';
include_once 'class/model_user.php';
$objArticleType = new model_ArticleType($objConnection);
$objArticle = new model_Article($objConnection);
$catID = $_pgR["cid"];
$page = $_pgR["p"] ? $_pgR["p"] : 1;
$inactive = $_pgR["inactive"];
$expired = $_pgR["expired"];
$allCats = $objArticleType->getAllArticleType(0, null, 'ParentID=0', null);
if ($catID == 0) {
    $allCatIDs = '';
} else {
    $allSubCats = $objArticleType->getAllArticleType(0, null, 'ParentID=' . $catID, null);
    //print_r($allSubCats);
    if (count($allSubCats) <= 0) {
        $allCatIDs = $catID;
    } else {
        $allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID);
    }
}
//print_r($allCatIDs);
if ($expired) {
    $condidtion = ' And ' . global_mapping::EndDate . ' < \'' . global_common::nowDateSQL() . '\'';
} else {