Go to the documentation of this file.00001 <?php
00002
00009 class Actions_List extends oxAdminList
00010 {
00011
00017 protected $_sThisTemplate = 'actions_list.tpl';
00018
00024 protected $_sListClass = 'oxactions';
00025
00031 protected $_sDefSortField = 'oxtitle';
00032
00038 public function render()
00039 {
00040 parent::render();
00041
00042
00043 $this->_aViewData["displaytype"] = oxRegistry::getConfig()->getRequestParameter("displaytype");
00044
00045 return $this->_sThisTemplate;
00046 }
00047
00056 protected function _prepareWhereQuery($aWhere, $sqlFull)
00057 {
00058 $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull);
00059 $sDisplayType = (int) oxRegistry::getConfig()->getRequestParameter('displaytype');
00060 $sTable = getViewName("oxactions");
00061
00062
00063 if ($sDisplayType) {
00064
00065 $sNow = date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime());
00066
00067 switch ($sDisplayType) {
00068 case 1:
00069 $sQ .= " and {$sTable}.oxactivefrom < '{$sNow}' and {$sTable}.oxactiveto > '{$sNow}' ";
00070 break;
00071 case 2:
00072 $sQ .= " and {$sTable}.oxactivefrom > '{$sNow}' ";
00073 break;
00074 case 3:
00075 $sQ .= " and {$sTable}.oxactiveto < '{$sNow}' and {$sTable}.oxactiveto != '0000-00-00 00:00:00' ";
00076 break;
00077 }
00078 }
00079
00080
00081 return $sQ;
00082 }
00083 }