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


PHP acymailing::replaceDate方法代码示例

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


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

示例1: onAcyProcessFilter_list

 function onAcyProcessFilter_list(&$query, $filter, $num)
 {
     $otherconditions = '';
     if (!empty($filter['subdateinf'])) {
         $filter['subdateinf'] = acymailing::replaceDate($filter['subdateinf']);
         if (!is_numeric($filter['subdateinf'])) {
             $filter['subdateinf'] = strtotime($filter['subdateinf']);
         }
         if (!empty($filter['subdateinf'])) {
             $otherconditions .= ' AND list' . $num . '.subdate > ' . $filter['subdateinf'];
         }
     }
     if (!empty($filter['subdatesup'])) {
         $filter['subdatesup'] = acymailing::replaceDate($filter['subdatesup']);
         if (!is_numeric($filter['subdatesup'])) {
             $filter['subdatesup'] = strtotime($filter['subdatesup']);
         }
         if (!empty($filter['subdatesup'])) {
             $otherconditions .= ' AND list' . $num . '.subdate < ' . $filter['subdatesup'];
         }
     }
     $query->leftjoin['list' . $num] = '#__acymailing_listsub AS list' . $num . ' ON sub.subid = list' . $num . '.subid AND list' . $num . '.listid = ' . intval($filter['selectedlist']) . $otherconditions;
     if ($filter['status'] == -2) {
         $query->where[] = 'list' . $num . '.listid IS NULL';
     } else {
         $query->where[] = 'list' . $num . '.status = ' . intval($filter['status']);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:28,代码来源:tagsubscription.php

示例2: onAcyProcessAction_addqueue

 function onAcyProcessAction_addqueue($cquery, $action, $num)
 {
     $action['mailid'] = intval($action['mailid']);
     if (empty($action['mailid'])) {
         return 'mailid not valid';
     }
     $action['senddate'] = acymailing::replaceDate($action['senddate']);
     if (!is_numeric($action['senddate'])) {
         $action['senddate'] = acymailing::getTime($action['senddate']);
     }
     if (empty($action['senddate'])) {
         return 'send date not valid';
     }
     $query = 'INSERT IGNORE INTO `#__acymailing_queue` (`mailid`,`subid`,`senddate`,`priority`) ' . $cquery->getQuery(array($action['mailid'], 'sub.`subid`', $action['senddate'], '3'));
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $db->query();
     return JText::sprintf('ADDED_QUEUE', $db->getAffectedRows());
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:19,代码来源:managetext.php

示例3: convertQuery

 function convertQuery($as, $column, $operator, $value)
 {
     if ($operator == 'CONTAINS') {
         $operator = 'LIKE';
         $value = '%' . $value . '%';
     } elseif ($operator == 'BEGINS') {
         $operator = 'LIKE';
         $value = $value . '%';
     } elseif ($operator == 'END') {
         $operator = 'LIKE';
         $value = '%' . $value;
     } elseif (!in_array($operator, array('IS NULL', 'IS NOT NULL', 'NOT LIKE', 'LIKE', '=', '!=', '>', '<', '>=', '<='))) {
         die('Operator not safe : ' . $operator);
     }
     if (strpos($value, '{time}') !== false) {
         $value = acymailing::replaceDate($value);
         $value = strftime('%Y-%m-%d %H:%M:%S', $value);
     }
     $value = $this->db->Quote($value);
     if (in_array($operator, array('IS NULL', 'IS NOT NULL'))) {
         $value = '';
     }
     return $as . '.`' . acymailing::secureField($column) . '` ' . $operator . ' ' . $value;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:24,代码来源:filter.php

示例4: onAcyProcessFilter_acymailingfield

 function onAcyProcessFilter_acymailingfield(&$query, $filter, $num)
 {
     if ($filter['map'] == 'created' and !is_numeric($filter['value'])) {
         $filter['value'] = acymailing::replaceDate($filter['value']);
         if (!is_numeric($filter['value'])) {
             $filter['value'] = strtotime($filter['value']);
         }
     }
     $query->where[] = $query->convertQuery('sub', $filter['map'], $filter['operator'], $filter['value']);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:10,代码来源:tagsubscriber.php

示例5: onAcyProcessFilter_joomlafield

 function onAcyProcessFilter_joomlafield(&$query, $filter, $num)
 {
     $query->leftjoin['joomlauser'] = '#__users AS joomlauser ON joomlauser.id = sub.userid';
     if (in_array($filter['map'], array('registerDate', 'lastvisitDate'))) {
         $filter['value'] = acymailing::replaceDate($filter['value']);
         if (!is_numeric($filter['value'])) {
             $filter['value'] = strtotime($filter['value']);
         }
         $filter['value'] = strftime('%Y-%m-%d %H:%M:%S', $filter['value']);
     }
     $query->where[] = $query->convertQuery('joomlauser', $filter['map'], $filter['operator'], $filter['value']);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:taguser.php


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