本文整理汇总了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']);
}
}
示例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());
}
示例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;
}
示例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']);
}
示例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']);
}