if ($catID) { $condition .= global_mapping::ArticleTypeID . '=' . $catID . ''; } 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
$allCatIDs = $catID; } else { $allCatIDs = global_common::getArrayColumn($allSubCats, global_mapping::ArticleTypeID); } } if ($allCatIDs) { $search = '`' . global_mapping::ArticleTypeID . '` IN ( ' . global_common::convertToQueryIN($allCatIDs) . ' )'; } 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) . '%\')'; } } $allAds = $objAdvertising->getAllAdvertising($page, null, $search, null, $total); $allAdType = $objAdType->getAllAdType(0, null, null, 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" class="admin-page"> <div class="row-fluid"> <div class="span12"> <!-- BEGIN PAGE TITLE & BREADCRUMB--> <h3 class="page-title"> Manage Advertising </h3>