Changeset 10956 for trunk/categories.php
- Timestamp:
- 06/22/09 03:19:27 (3 years ago)
- File:
-
- 1 edited
-
trunk/categories.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/categories.php
r10781 r10956 16 16 $bAjaxMode = isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ? true : false; 17 17 18 function showCategories($aParam = array(), $iBoxId = 1, $sAction = '', $isBox = false, $ sTitle)18 function showCategories($aParam = array(), $iBoxId = 1, $sAction = '', $isBox = false, $bOrderPanel = false, $sTitle) 19 19 { 20 20 $oCateg = new BxTemplCategories(); … … 24 24 $aParam['type'] = isset($_REQUEST['tags_mode']) ? $_REQUEST['tags_mode'] : $oCateg->getFirstObject(); 25 25 26 $sCode = $oCateg->display($aParam, $iBoxId, $sAction );26 $sCode = $oCateg->display($aParam, $iBoxId, $sAction, $bOrderPanel, getParam('categ_show_columns')); 27 27 28 28 if ($isBox) … … 38 38 $oCateg->getCategTopMenu($aParam, $sAction), 39 39 array(), 40 ($sDate ? _t('_ tags_by_day') . $sDate : '')40 ($sDate ? _t('_categ_by_day') . $sDate : '') 41 41 ); 42 42 } … … 74 74 return $oDb->getAll("SELECT *, DAYOFMONTH(`Date`) AS `Day` 75 75 FROM `sys_categories` 76 WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1') AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1')"); 76 WHERE `Date` >= TIMESTAMP('{$this->iYear}-{$this->iMonth}-1') 77 AND `Date` < TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1') 78 AND `Owner` <> 0"); 77 79 } 78 80 … … 89 91 function getEntriesNames () 90 92 { 91 return array(_t('_cat _single'), _t('_cat_plural'));93 return array(_t('_categ_single'), _t('_categ_plural')); 92 94 } 93 95 … … 155 157 function CategoriesCalendarPage() 156 158 { 157 $this->sPage = 'cat _calendar';159 $this->sPage = 'categ_calendar'; 158 160 parent::BxDolPageView($this->sPage); 159 161 } … … 173 175 { 174 176 $aParam = array( 175 'pagination' => getParam('cat _perpage_browse'),177 'pagination' => getParam('categ_perpage_browse'), 176 178 'date' => array( 177 179 'year' => $_REQUEST['year'], … … 181 183 ); 182 184 183 return showCategories($aParam, $iBlockId, BX_CATEG_ACTION_CALENDAR, false, _t('_cat_caption_calendar'));185 return showCategories($aParam, $iBlockId, BX_CATEG_ACTION_CALENDAR, false, false, _t('_categ_caption_calendar')); 184 186 } 185 187 else … … 196 198 function CategoriesSearchPage() 197 199 { 198 $this->sPage = 'cat _search';200 $this->sPage = 'categ_search'; 199 201 parent::BxDolPageView($this->sPage); 200 202 … … 202 204 $this->aSearchForm = array( 203 205 'form_attrs' => array( 204 'name' => 'form_search_ tags',206 'name' => 'form_search_categories', 205 207 'action' => '', 206 208 'method' => 'post', … … 217 219 'type' => 'text', 218 220 'name' => 'Keyword', 219 'caption' => _t('_ tags_caption_keyword'),221 'caption' => _t('_categ_caption_keyword'), 220 222 'required' => true, 221 223 'checker' => array ( 222 224 'func' => 'length', 223 225 'params' => array(1, 100), 224 'error' => _t ('_ tags_err_keyword'),226 'error' => _t ('_categ_err_keyword'), 225 227 ), 226 228 'db' => array ( … … 249 251 { 250 252 $aParam = array( 251 'pagination' => getParam('cat _perpage_browse')253 'pagination' => getParam('categ_perpage_browse') 252 254 ); 253 255 … … 258 260 259 261 if (isset($aParam['filter'])) 260 return showCategories($aParam, $iBlockId, BX_CATEG_ACTION_SEARCH, false, _t('_cat_caption_founded_tags'));262 return showCategories($aParam, $iBlockId, BX_CATEG_ACTION_SEARCH, false, false, _t('_categ_caption_founded_categ')); 261 263 else 262 264 return MsgBox(_t('_Empty')); … … 267 269 { 268 270 $aParam = array( 269 'pagination' => getParam('cat _perpage_browse')271 'pagination' => getParam('categ_perpage_browse') 270 272 ); 271 273 272 if (isset($_REQUEST['orderby']) && $_REQUEST['orderby']) 273 $aParam['orderby'] = $_REQUEST['orderby']; 274 275 return showCategories($aParam, 1, BX_CATEG_ACTION_ALL, true, _t('_cat_caption_all')); 274 return showCategories($aParam, 1, BX_CATEG_ACTION_ALL, true, true, _t('_categ_caption_all')); 276 275 } 277 276 … … 279 278 { 280 279 $aParam = array( 281 'pagination' => getParam('cat _perpage_browse'),280 'pagination' => getParam('categ_perpage_browse'), 282 281 'admin' => true, 283 282 ); 284 283 285 return showCategories($aParam, 1, BX_CATEG_ACTION_ADMIN, true, _t('_cat_caption_admin'));284 return showCategories($aParam, 1, BX_CATEG_ACTION_ADMIN, true, false, _t('_categ_caption_admin')); 286 285 } 287 286 … … 289 288 { 290 289 $aParam = array( 291 'pagination' => getParam('cat _perpage_browse'),290 'pagination' => getParam('categ_perpage_browse'), 292 291 'admin' => false 293 292 ); 294 293 295 return showCategories($aParam, 1, BX_CATEG_ACTION_USERS, true, _t('_cat_caption_users'));294 return showCategories($aParam, 1, BX_CATEG_ACTION_USERS, true, false, _t('_categ_caption_users')); 296 295 } 297 296 … … 310 309 } 311 310 312 $sContent = DesignBoxContent(_t('_Categories'), MsgBox('Under development'), 1);313 314 /*315 311 switch ($_REQUEST['action']) 316 312 { … … 334 330 $sContent = getPage_All(); 335 331 } 336 */ 332 337 333 if (!$bAjaxMode) 338 334 {
Note: See TracChangeset
for help on using the changeset viewer.