当前位置: 首页>>代码示例>>PHP>>正文


PHP CCatalogDiscountSave::__GetUserInfoByDiscount方法代码示例

本文整理汇总了PHP中CCatalogDiscountSave::__GetUserInfoByDiscount方法的典型用法代码示例。如果您正苦于以下问题:PHP CCatalogDiscountSave::__GetUserInfoByDiscount方法的具体用法?PHP CCatalogDiscountSave::__GetUserInfoByDiscount怎么用?PHP CCatalogDiscountSave::__GetUserInfoByDiscount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCatalogDiscountSave的用法示例。


在下文中一共展示了CCatalogDiscountSave::__GetUserInfoByDiscount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetDiscount


//.........这里部分代码省略.........
                     $arDiscSave['COUNT_FROM_UT'] = MakeTimeStamp($arDiscSave['COUNT_FROM']);
                 }
                 if (!empty($arDiscSave['COUNT_TO'])) {
                     $arDiscSave['COUNT_TO_UT'] = MakeTimeStamp($arDiscSave['COUNT_TO']);
                     if ($arDiscSave['COUNT_TO_UT'] > $intCountTime) {
                         $arDiscSave['COUNT_TO_UT'] = $intCountTime;
                         $arDiscSave['COUNT_TO'] = ConvertTimeStamp($intCountTime, 'FULL');
                     }
                 }
             } elseif ($arDiscSave['COUNT_SIZE'] > 0 && in_array($arDiscSave['COUNT_TYPE'], array('D', 'M', 'Y'))) {
                 $strCountPeriod = self::COUNT_TIME_PERIOD;
                 $arCountPeriodBack = CCatalogDiscountSave::__GetTimeStampArray($arDiscSave['COUNT_SIZE'], $arDiscSave['COUNT_TYPE']);
             }
             if ($strCountPeriod == self::COUNT_TIME_INTERVAL) {
                 if (false !== $arDiscSave['COUNT_FROM_UT']) {
                     if ($arDiscSave['COUNT_FROM_UT'] > $intCountTime) {
                         continue;
                     }
                     if (false !== $arDiscSave['COUNT_TO_UT'] && $arDiscSave['COUNT_TO_UT'] <= $arDiscSave['COUNT_FROM_UT']) {
                         continue;
                     }
                     if (false !== $arDiscSave['ACTIVE_TO_UT'] && $arDiscSave['COUNT_FROM_UT'] >= $arDiscSave['ACTIVE_TO_UT']) {
                         continue;
                     }
                 }
                 if (false !== $arDiscSave['COUNT_TO_UT']) {
                     if ($strActionPeriod == self::ACTION_TIME_PERIOD && $arDiscSave['COUNT_TO_UT'] < AddToTimeStamp($arActionPeriodBack, $intCountTime)) {
                         continue;
                     }
                 }
             }
             if ($strActionPeriod == self::ACTION_TIME_PERIOD) {
                 if ($strCountPeriod == self::COUNT_TIME_PERIOD) {
                     $arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID, 'ACTIVE_FROM' => date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arActionPeriodBack, $intCountTime))));
                     if (is_array($arStartDate) && !empty($arStartDate)) {
                         $arOldOrderFilter['<DATE_INSERT'] = $arStartDate['ACTIVE_FROM_FORMAT'];
                         $arOldOrderFilter['>=DATE_INSERT'] = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT'])));
                         $arOldOrderSumm = CCatalogDiscountSave::__SaleOrderSumm($arOldOrderFilter, $arDiscSave['CURRENCY']);
                     }
                 } else {
                     $arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID), array('ACTIVE_FROM' => false, 'DELETE' => false));
                     if (is_array($arStartDate) && !empty($arStartDate)) {
                         $intTimeStart = MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT']);
                         $intTimeFinish = MakeTimeStamp($arStartDate['ACTIVE_TO_FORMAT']);
                         if (!($intTimeStart <= $intCountTime && $intTimeFinish >= $intCountTime)) {
                             continue;
                         } else {
                             $boolPeriodInsert = false;
                         }
                     }
                 }
             }
             $intTimeStart = false;
             $intTimeFinish = false;
             if ($strCountPeriod == self::COUNT_TIME_INTERVAL) {
                 $intTimeStart = !empty($arDiscSave['COUNT_FROM']) ? $arDiscSave['COUNT_FROM'] : false;
                 $intTimeFinish = !empty($arDiscSave['COUNT_TO']) ? $arDiscSave['COUNT_TO'] : false;
             } elseif ($strCountPeriod == self::COUNT_TIME_PERIOD) {
                 $intTimeStart = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, $intCountTime));
             }
             if ($intTimeStart) {
                 $arOrderFilter['>=DATE_INSERT'] = $intTimeStart;
             }
             if ($intTimeFinish) {
                 $arOrderFilter['<DATE_INSERT'] = $intTimeFinish;
             }
开发者ID:Satariall,项目名称:izurit,代码行数:67,代码来源:discount_save.php

示例2: GetDiscount


//.........这里部分代码省略.........
                     $arDiscSave['COUNT_FROM_UT'] = MakeTimeStamp($arDiscSave['COUNT_FROM']);
                 }
                 if (!empty($arDiscSave['COUNT_TO'])) {
                     $arDiscSave['COUNT_TO_UT'] = MakeTimeStamp($arDiscSave['COUNT_TO']);
                     if ($arDiscSave['COUNT_TO_UT'] > $intCountTime) {
                         $arDiscSave['COUNT_TO_UT'] = $intCountTime;
                         $arDiscSave['COUNT_TO'] = ConvertTimeStamp($intCountTime, 'FULL');
                     }
                 }
             } elseif (0 < $arDiscSave['COUNT_SIZE'] && in_array($arDiscSave['COUNT_TYPE'], array('D', 'M', 'Y'))) {
                 $strCountPeriod = 'P';
                 $arCountPeriodBack = CCatalogDiscountSave::__GetTimeStampArray($arDiscSave['COUNT_SIZE'], $arDiscSave['COUNT_TYPE']);
             }
             if ('D' == $strCountPeriod) {
                 if (false !== $arDiscSave['COUNT_FROM_UT']) {
                     if ($arDiscSave['COUNT_FROM_UT'] > $intCountTime) {
                         continue;
                     }
                     if (false !== $arDiscSave['COUNT_TO_UT'] && $arDiscSave['COUNT_TO_UT'] <= $arDiscSave['COUNT_FROM_UT']) {
                         continue;
                     }
                     if (false !== $arDiscSave['ACTIVE_TO_UT'] && $arDiscSave['COUNT_FROM_UT'] >= $arDiscSave['ACTIVE_TO_UT']) {
                         continue;
                     }
                 }
                 if (false !== $arDiscSave['COUNT_TO_UT']) {
                     if ('P' == $strActionPeriod && $arDiscSave['COUNT_TO_UT'] < AddToTimeStamp($arActionPeriodBack, $intCountTime)) {
                         continue;
                     }
                 }
             }
             if ('P' == $strActionPeriod) {
                 if ('P' == $strCountPeriod) {
                     $arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID, 'ACTIVE_FROM' => date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arActionPeriodBack, $intCountTime))));
                     if (is_array($arStartDate) && !empty($arStartDate)) {
                         $arOldOrderFilter['<DATE_INSERT'] = $arStartDate['ACTIVE_FROM_FORMAT'];
                         $arOldOrderFilter['>=DATE_INSERT'] = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT'])));
                         $arOldOrderSumm = CCatalogDiscountSave::__SaleOrderSumm($arOldOrderFilter, $arDiscSave['CURRENCY']);
                     }
                 } else {
                     $arStartDate = CCatalogDiscountSave::__GetUserInfoByDiscount(array('DISCOUNT_ID' => $arDiscSave['ID'], 'USER_ID' => $intUserID), array('ACTIVE_FROM' => false, 'DELETE' => false));
                     if (is_array($arStartDate) && !empty($arStartDate)) {
                         $intTimeStart = MakeTimeStamp($arStartDate['ACTIVE_FROM_FORMAT']);
                         $intTimeFinish = MakeTimeStamp($arStartDate['ACTIVE_TO_FORMAT']);
                         if (!($intTimeStart <= $intCountTime && $intTimeFinish >= $intCountTime)) {
                             continue;
                         } else {
                             $boolPeriodInsert = false;
                         }
                     }
                 }
             }
             $intTimeStart = false;
             $intTimeFinish = false;
             if ('D' == $strCountPeriod) {
                 $intTimeStart = !empty($arDiscSave['COUNT_FROM']) ? $arDiscSave['COUNT_FROM'] : false;
                 $intTimeFinish = !empty($arDiscSave['COUNT_TO']) ? $arDiscSave['COUNT_TO'] : false;
             } elseif ('P' == $strCountPeriod) {
                 $intTimeStart = date($DB->DateFormatToPHP(CSite::GetDateFormat("FULL")), AddToTimeStamp($arCountPeriodBack, $intCountTime));
             }
             if ($intTimeStart) {
                 $arOrderFilter['>=DATE_INSERT'] = $intTimeStart;
             }
             if ($intTimeFinish) {
                 $arOrderFilter['<DATE_INSERT'] = $intTimeFinish;
             }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:67,代码来源:discount_save.php


注:本文中的CCatalogDiscountSave::__GetUserInfoByDiscount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。