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