25         $sDate = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime());
 
   28         $sQ = 
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' and oxactiveto>0 and oxactiveto < " . $oDb->quote($sDate) . 
" 
   30                order by oxactiveto desc, oxactivefrom desc limit " . (int) $iCount;
 
   32         $this->_aArray = array_reverse($this->_aArray, 
true);
 
   43         $sDateTo = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime());
 
   44         $sDateFrom = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime() - $iTimespan);
 
   46         $sQ = 
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' and oxactiveto < " . $oDb->quote($sDateTo) . 
" and oxactiveto > " . $oDb->quote($sDateFrom) . 
" 
   48                order by oxactiveto, oxactivefrom";
 
   58         $sDate = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime());
 
   60         $sQ = 
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' and (oxactiveto > " . $oDb->quote($sDate) . 
" or oxactiveto=0) and oxactivefrom != 0 and oxactivefrom < " . $oDb->quote($sDate) . 
" 
   62                order by oxactiveto, oxactivefrom";
 
   74         $sDate = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime());
 
   76         $sQ = 
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' and (oxactiveto > " . $oDb->quote($sDate) . 
" or oxactiveto=0) and oxactivefrom > " . $oDb->quote($sDate) . 
" 
   78                order by oxactiveto, oxactivefrom limit " . (int) $iCount;
 
   90         $sDate = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime());
 
   91         $sDateTo = date(
'Y-m-d H:i:s', 
oxRegistry::get(
"oxUtilsDate")->getTime() + $iTimespan);
 
   93         $sQ = 
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' and (oxactiveto > " . $oDb->quote($sDate) . 
" or oxactiveto=0) and oxactivefrom > " . $oDb->quote($sDate) . 
" and oxactivefrom < " . $oDb->quote($sDateTo) . 
" 
   95                order by oxactiveto, oxactivefrom";
 
  108         $oUser = ($oUser == null) ? $this->
getUser() : $oUser;
 
  109         $sTable = getViewName(
'oxactions');
 
  110         $sGroupTable = getViewName(
'oxgroups');
 
  114         if ($oUser && 
count($aGroupIds = $oUser->getUserGroups())) {
 
  115             foreach ($aGroupIds as $oGroup) {
 
  116                 $aIds[] = $oGroup->getId();
 
  120         $sGroupSql = 
count($aIds) ? 
"EXISTS(select oxobject2action.oxid from oxobject2action where oxobject2action.oxactionid=$sTable.OXID and oxobject2action.oxclass='oxgroups' and oxobject2action.OXOBJECTID in (" . implode(
', ', 
oxDb::getInstance()->quoteArray($aIds)) . 
") )" : 
'0';
 
  123                 if(EXISTS(select 1 from oxobject2action, $sGroupTable where $sGroupTable.oxid=oxobject2action.oxobjectid and oxobject2action.oxactionid=$sTable.OXID and oxobject2action.oxclass='oxgroups' LIMIT 1), 
  138         return (
bool) 
oxDb::getDb()->getOne(
"select 1 from " . getViewName(
'oxactions') . 
" where oxtype=2 and oxactive=1 and oxshopid='" . $this->
getConfig()->getShopId() . 
"' limit 1");
 
  148         $oViewName = $oBaseObject->getViewName();
 
  149         $sQ = 
"select * from {$oViewName} where oxtype=3 and " . $oBaseObject->getSqlActiveSnippet()
 
  151               . 
" order by oxsort";