26 $sDate = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime() );
29 $sQ =
"select * from {$sViewName} where oxtype=2 and oxactive=1 and oxshopid='".$this->getConfig()->getShopId().
"' and oxactiveto>0 and oxactiveto < ".$oDb->quote($sDate).
"
31 order by oxactiveto desc, oxactivefrom desc limit ".(int)$iCount;
33 $this->_aArray = array_reverse( $this->_aArray,
true );
46 $sDateTo = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime() );
47 $sDateFrom = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime()-$iTimespan );
49 $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).
"
51 order by oxactiveto, oxactivefrom";
63 $sDate = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime() );
65 $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).
"
67 order by oxactiveto, oxactivefrom";
81 $sDate = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime() );
83 $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).
"
85 order by oxactiveto, oxactivefrom limit ".(int)$iCount;
99 $sDate = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime() );
100 $sDateTo = date(
'Y-m-d H:i:s',
oxRegistry::get(
"oxUtilsDate")->getTime()+$iTimespan );
102 $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).
"
104 order by oxactiveto, oxactivefrom";
117 $oUser = ( $oUser == null ) ? $this->
getUser() : $oUser;
118 $sTable = getViewName(
'oxactions' );
119 $sGroupTable = getViewName(
'oxgroups' );
123 if ( $oUser &&
count( $aGroupIds = $oUser->getUserGroups() ) ) {
124 foreach ( $aGroupIds as $oGroup ) {
125 $aIds[] = $oGroup->getId();
129 $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';
132 if(EXISTS(select 1 from oxobject2action, $sGroupTable where $sGroupTable.oxid=oxobject2action.oxobjectid and oxobject2action.oxactionid=$sTable.OXID and oxobject2action.oxclass='oxgroups' LIMIT 1),
147 return (
bool)
oxDb::getDb()->getOne(
"select 1 from ".getViewName(
'oxactions' ).
" where oxtype=2 and oxactive=1 and oxshopid='".$this->
getConfig()->getShopId().
"' limit 1");
161 $oViewName = $oBaseObject->getViewName();
162 $sQ =
"select * from {$oViewName} where oxtype=3 and " . $oBaseObject->getSqlActiveSnippet()
164 .
" order by oxsort";