本文整理汇总了PHP中acymailing::getDate方法的典型用法代码示例。如果您正苦于以下问题:PHP acymailing::getDate方法的具体用法?PHP acymailing::getDate怎么用?PHP acymailing::getDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acymailing
的用法示例。
在下文中一共展示了acymailing::getDate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acymailing_replacetags
function acymailing_replacetags(&$email)
{
$match = '#{date:?([^:]*)}#Ui';
$variables = array('subject', 'body', 'altbody');
foreach ($variables as $var) {
$email->{$var} = str_replace(array('{mailid}'), array($email->mailid), $email->{$var});
}
$found = false;
foreach ($variables as $var) {
if (empty($email->{$var})) {
continue;
}
$found = preg_match_all($match, $email->{$var}, $results[$var]) || $found;
if (empty($results[$var][0])) {
unset($results[$var]);
}
}
if (!$found) {
return;
}
$tags = array();
foreach ($results as $var => $allresults) {
foreach ($allresults[0] as $i => $oneTag) {
if (isset($tags[$oneTag])) {
continue;
}
if (empty($allresults[1][$i]) or is_numeric($allresults[1][$i])) {
$tags[$oneTag] = acymailing::getDate(time(), JText::_('DATE_FORMAT_LC' . $allresults[1][$i]));
} else {
$tags[$oneTag] = acymailing::getDate(time(), $allresults[1][$i]);
}
}
}
foreach (array_keys($results) as $var) {
$email->{$var} = str_replace(array_keys($tags), $tags, $email->{$var});
}
}
示例2: form
function form()
{
$db =& JFactory::getDBO();
$config = acymailing::config();
$filid = acymailing::getCID('filid');
$filterClass = acymailing::get('class.filter');
if (!empty($filid)) {
$filter = $filterClass->get($filid);
} else {
$filter = null;
$filter->action = JRequest::getVar('action');
$filter->filter = JRequest::getVar('filter');
$filter->published = 1;
}
JPluginHelper::importPlugin('acymailing');
$this->dispatcher =& JDispatcher::getInstance();
$typesFilters = array();
$typesActions = array();
$outputFilters = implode('', $this->dispatcher->trigger('onAcyDisplayFilters', array(&$typesFilters)));
$outputActions = implode('', $this->dispatcher->trigger('onAcyDisplayActions', array(&$typesActions)));
$typevaluesFilters = array();
$typevaluesActions = array();
$typevaluesFilters[] = JHTML::_('select.option', '', JText::_('FILTER_SELECT'));
$typevaluesActions[] = JHTML::_('select.option', '', JText::_('ACTION_SELECT'));
$doc =& JFactory::getDocument();
$js = "function updateFilter(filterNum){";
foreach ($typesFilters as $oneType => $oneName) {
$typevaluesFilters[] = JHTML::_('select.option', $oneType, $oneName);
$js .= "filterArea = 'filter'+filterNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'none';}";
}
$js .= "filterArea = 'filter'+filterNum+window.document.getElementById('filtertype'+filterNum).value;\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'block';}\r\n\t\t\t}";
$js .= "function updateAction(actionNum){";
foreach ($typesActions as $oneType => $oneName) {
$typevaluesActions[] = JHTML::_('select.option', $oneType, $oneName);
$js .= "actionArea = 'action'+actionNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'none';}";
}
$js .= "actionArea = 'action'+actionNum+window.document.getElementById('actiontype'+actionNum).value;\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'block';}\r\n\t\t\t}";
$js .= "var numFilters = 0;\r\n\t\t\t\tvar numActions = 0;\r\n\t\t\t\tfunction addFilter(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'filter'+numFilters;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('filters_original').innerHTML.replace(/__num__/g, numFilters);\r\n\t\t\t\t\tdocument.getElementById('allfilters').appendChild(newdiv); updateFilter(numFilters); numFilters++; }\n\t\t\t\tfunction addAction(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'action'+numActions;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('actions_original').innerHTML.replace(/__num__/g, numActions);\r\n\t\t\t\t\tdocument.getElementById('allactions').appendChild(newdiv); updateAction(numActions); numActions++; }";
$js .= "window.addEvent('domready', function(){ addFilter(); addAction(); });";
if (version_compare(JVERSION, '1.6.0', '<')) {
$js .= 'function submitbutton(pressbutton){
if (pressbutton != \'save\') {
submitform( pressbutton );
return;
}';
} else {
$js .= 'Joomla.submitbutton = function(pressbutton) {
if (pressbutton != \'save\') {
Joomla.submitform(pressbutton,document.adminForm);
return;
}';
}
$js .= "if(window.document.getElementById('filterinfo').style.display == 'none'){\r\n\t\t\t\t\t\twindow.document.getElementById('filterinfo').style.display = 'block';\r\n\t\t\t\t\t\ttry{allspans = window.document.getElementById('toolbar-save').getElementsByTagName(\"span\"); allspans[0].className = 'icon-32-apply';}catch(err){}\r\n\t\t\t\t\t\treturn false;}\r\n\t\t\t\t\tif(window.document.getElementById('title').value.length < 2){alert('" . JText::_('ENTER_TITLE', true) . "'); return false;}";
if (version_compare(JVERSION, '1.6.0', '<')) {
$js .= "submitform( pressbutton );} ";
} else {
$js .= "Joomla.submitform(pressbutton,document.adminForm);}; ";
}
$doc->addScriptDeclaration($js);
$js = '';
$data = array('action', 'filter');
foreach ($data as $datatype) {
if (empty($filter->{$datatype})) {
continue;
}
foreach ($filter->{$datatype}['type'] as $num => $oneType) {
if (empty($oneType)) {
continue;
}
$js .= "while(!document.getElementById('" . $datatype . "type{$num}')){add" . ucfirst($datatype) . "();}\r\n\t\t\t\t\t\tdocument.getElementById('" . $datatype . "type{$num}').value= '{$oneType}';\r\n\t\t\t\t\t\tupdate" . ucfirst($datatype) . "({$num});";
if (empty($filter->{$datatype}[$num][$oneType])) {
continue;
}
foreach ($filter->{$datatype}[$num][$oneType] as $key => $value) {
$js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $value)) . "';";
}
}
}
$listid = JRequest::getInt('listid');
if (!empty($listid)) {
$js .= "document.getElementById('actiontype0').value = 'list'; updateAction(0); document.adminForm.elements['action[0][list][selectedlist]'].value = '" . $listid . "';";
}
$doc->addScriptDeclaration("window.addEvent('domready', function(){ {$js} });");
$triggers = array();
$triggers['daycron'] = JText::_('AUTO_CRON_FILTER');
$nextDate = $config->get('cron_plugins_next');
if (!empty($nextDate)) {
$triggers['daycron'] .= ' (' . JText::_('NEXT_RUN') . ' : ' . acymailing::getDate($nextDate, '%d %B %H:%M') . ')';
}
$triggers['subcreate'] = JText::_('ON_USER_CREATE');
$triggers['subchange'] = JText::_('ON_USER_CHANGE');
$this->dispatcher->trigger('onAcyDisplayTriggers', array(&$triggers));
$name = empty($filter->name) ? '' : ' : ' . $filter->name;
acymailing::setTitle(JText::_('ACY_FILTER') . $name, 'filter', 'filter&task=edit&filid=' . $filid);
$bar =& JToolBar::getInstance('toolbar');
$bar->appendButton('Confirm', JText::_('PROCESS_CONFIRMATION'), 'process', JText::_('PROCESS'), 'process', false, false);
JToolBarHelper::divider();
if (acymailing::level(3)) {
JToolBarHelper::save();
if (!empty($filter->filid)) {
//.........这里部分代码省略.........
示例3: foreach
</legend>
<table class="adminlist" cellspacing="1" align="center">
<tbody>
<?php
$k = 0;
foreach ($this->nextqueue as $mailid => $row) {
?>
<tr class="<?php
echo "row{$k}";
?>
">
<td>
<?php
echo JText::sprintf('EMAIL_READY', $row->mailid, $row->subject, $row->nbsub);
echo '<br/>' . JText::sprintf('QUEUE_NEXT_SCHEDULE', acymailing::getDate($row->senddate));
?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
</fieldset>
<?php
}
?>
示例4:
echo ACYMAILING_IMAGES;
?>
icons/icon-16-stats.png" alt="<?php
echo JText::_('STATISTICS', true);
?>
" /></a></span>
<?php
}
?>
<?php
}
?>
</td>
<?php
if ($this->values->show_senddate) {
?>
<td align="center" nowrap="nowrap">
<?php
echo acymailing::getDate($row->senddate, JText::_('DATE_FORMAT_LC3'));
?>
</td>
<?php
}
?>
</tr>
<?php
$k = 3 - $k;
}
?>
</tbody>
</table>
示例5:
</tr>
<tr><td class="key"><?php
echo JText::_('LAST_RUN');
?>
</td>
<td><?php
echo acymailing::getDate($this->config->get('auto_bounce_last'));
?>
</td>
</tr>
<tr><td class="key"><?php
echo JText::_('NEXT_RUN');
?>
</td>
<td><?php
echo acymailing::getDate($this->config->get('auto_bounce_next'));
?>
</td>
</tr>
<tr><td class="key"><?php
echo JText::_('REPORT');
?>
</td>
<td><?php
echo $this->config->get('auto_bounce_report');
?>
</td>
</tr>
</table>
</td>
</tr></table>
示例6:
</td>
</tr>
<?php
if (!empty($this->mail->senddate)) {
?>
<tr>
<td class="key" id="senddatekey">
<?php
echo JText::_('SEND_DATE');
?>
</td>
<td id="senddateinput">
<?php
echo acymailing::getDate(@$this->mail->senddate);
?>
</td>
<td class="key" id="sentbykey">
<?php
if (!empty($this->mail->sentby)) {
echo JText::_('SENT_BY');
}
?>
</td>
<td id="sentbyinput">
<?php
echo @$this->sentbyname;
?>
示例7: dirname
if ($map == 'email') {
echo '</a>';
}
?>
</td>
<?php
}
if (acymailing::level(2)) {
include dirname(__FILE__) . DS . 'level2.' . basename(__FILE__);
}
?>
<td align="center">
<?php
echo acymailing::getDate($row->created);
?>
</td>
<td align="center">
<?php
if (empty($row->username)) {
echo $this->joomGroups[(int) $row->gid]->name;
} else {
$text = '<b>' . JText::_('USERNAME') . ' : </b>' . $row->username;
$text .= '<br/><b>' . JText::_('USER_ID') . ' : </b>' . $row->userid;
echo acymailing::tooltip($text, '', '', $this->joomGroups[(int) $row->gid]->name);
}
?>
</td>
示例8:
</td>
<td>
<?php
echo $this->emaildrop;
?>
</td>
</tr>
<tr>
<td class="key">
<?php
echo JText::_('SEND_DATE');
?>
</td>
<td>
<?php
echo JHTML::_('calendar', acymailing::getDate(time(), '%Y-%m-%d %H:%M'), 'senddate', 'senddate', '%Y-%m-%d %H:%M', 'size="50"');
?>
</td>
</tr>
<tr>
<td>
</td>
<td>
<button type="submit"><?php
echo JText::_('SCHEDULE');
?>
</button>
</td>
</tr>
</table>
<input type="hidden" name="subid" value="<?php
示例9:
?>
</td>
<td align="center">
<?php
echo $row->html ? JText::_('HTML') : JText::_('JOOMEXT_TEXT');
?>
</td>
<td align="center">
<?php
echo $row->open;
?>
</td>
<td align="center">
<?php
if (!empty($row->opendate)) {
echo acymailing::getDate($row->opendate);
}
?>
</td>
<?php
if (acymailing::level(3)) {
?>
<td align="center">
<?php
echo $row->bounce;
?>
</td>
<?php
}
?>
<td align="center">
示例10: scheduleone
function scheduleone()
{
$mailid = JRequest::getInt('mailid');
$subid = JRequest::getInt('subid');
$senddate = JRequest::getString('senddate', '');
JRequest::checkToken() && !empty($mailid) && !empty($subid) or die('Invalid Token');
$realSendDate = acymailing::getTime($senddate);
if ($realSendDate < time()) {
acymailing::display(JText::_('DATE_FUTURE'), 'warning');
return $this->addqueue();
}
$mailClass = acymailing::get('class.mail');
$myNewsletter = $mailClass->get($mailid);
$queueEntry = null;
$queueEntry->mailid = $myNewsletter->mailid;
$queueEntry->subid = $subid;
$queueEntry->senddate = $realSendDate;
$queueEntry->priority = 1;
$db =& JFactory::getDBO();
$status = $db->insertObject('#__acymailing_queue', $queueEntry);
if ($status) {
acymailing::display(JText::sprintf('AUTOSEND_DATE', $myNewsletter->subject, acymailing::getDate($realSendDate)), 'success');
}
}
示例11:
<fieldset>
<legend><?php
echo JText::_('LAST_CRON');
?>
</legend>
<table class="admintable" cellspacing="1">
<tr>
<td class="key" >
<?php
echo acymailing::tooltip(JText::_('LAST_RUN_DESC'), JText::_('LAST_RUN'), '', JText::_('LAST_RUN'));
?>
</td>
<td>
<?php
echo acymailing::getDate($this->config->get('cron_last'));
?>
</td>
</tr>
<tr>
<td class="key" >
<?php
echo acymailing::tooltip(JText::_('CRON_TRIGGERED_IP_DESC'), JText::_('CRON_TRIGGERED_IP'), '', JText::_('CRON_TRIGGERED_IP'));
?>
</td>
<td>
<?php
echo $this->config->get('cron_fromip');
?>
示例12: acymailing_replaceusertags
function acymailing_replaceusertags(&$email, &$user)
{
$match = '#(?:{|%7B)usertag:(.*)(?:}|%7D)#Ui';
$variables = array('subject', 'body', 'altbody');
$found = false;
foreach ($variables as $var) {
if (empty($email->{$var})) {
continue;
}
$found = preg_match_all($match, $email->{$var}, $results[$var]) || $found;
if (empty($results[$var][0])) {
unset($results[$var]);
}
}
if (!$found) {
return;
}
$values = null;
if (!empty($user->userid)) {
$db = JFactory::getDBO();
$db->setQuery('SELECT * FROM ' . acymailing::table('users', false) . ' WHERE id = ' . $user->userid . ' LIMIT 1');
$values = $db->loadObject();
}
$tags = array();
foreach ($results as $var => $allresults) {
foreach ($allresults[0] as $i => $oneTag) {
if (isset($tags[$oneTag])) {
continue;
}
$arguments = explode('|', $allresults[1][$i]);
$field = $arguments[0];
unset($arguments[0]);
$mytag = null;
$mytag->default = $this->params->get('default_' . $field, '');
if (!empty($arguments)) {
foreach ($arguments as $onearg) {
$args = explode(':', $onearg);
if (isset($args[1])) {
$mytag->{$args}[0] = $args[1];
} else {
$mytag->{$args}[0] = 1;
}
}
}
$replaceme = isset($values->{$field}) ? $values->{$field} : $mytag->default;
if (!empty($mytag->type)) {
if ($mytag->type == 'date') {
$replaceme = acymailing::getDate(strtotime($replaceme));
}
}
if (!empty($mytag->lower)) {
$replaceme = strtolower($replaceme);
}
if (!empty($mytag->ucwords)) {
$replaceme = ucwords($replaceme);
}
if (!empty($mytag->ucfirst)) {
$replaceme = ucfirst($replaceme);
}
if (!empty($mytag->urlencode)) {
$replaceme = urlencode($replaceme);
}
$tags[$oneTag] = $replaceme;
}
}
foreach ($results as $var => $allresults) {
$email->{$var} = str_replace(array_keys($tags), $tags, $email->{$var});
}
}
示例13: subscription
function subscription()
{
acymailing::setTitle(JText::_('CHARTS'), 'stats', 'diagram&task=subscription');
$listsClass = acymailing::get('class.list');
$lists = $listsClass->getLists('listid');
$db =& JFactory::getDBO();
$db->setQuery('SELECT min(subdate) as minsubdate, min(unsubdate) as minunsubdate FROM ' . acymailing::table('listsub'));
$dates = $db->loadObject();
$spaces = array();
$intervals = 10;
$dates->maxsubdate = time();
$delay = ($dates->maxsubdate - $dates->minsubdate) / $intervals;
for ($i = 0; $i < $intervals; $i++) {
$spaces[$i] = (int) ($dates->minsubdate + $delay * $i);
}
$spaces[$intervals] = $dates->maxsubdate;
$results = array();
$legendX = array();
for ($i = 0; $i <= $intervals; $i++) {
$legendX[] = acymailing::getDate($spaces[$i]);
$db->setQuery('SELECT count(subid) as total, listid FROM ' . acymailing::table('listsub') . ' WHERE `status` != 2 AND `subdate` < ' . $spaces[$i] . ' AND (`status` = 1 OR `unsubdate`>' . $spaces[$i] . ') GROUP BY listid');
$results[$i] = $db->loadObjectList('listid');
}
$title = new title(JText::_('SUB_HISTORY'));
$title->set_style('font-size:20px; color: #FF8040');
$lines = array();
$maxSub = 0;
foreach ($lists as $listid => $oneList) {
$lines[$listid] = new line_base();
$values = array();
for ($i = 0; $i <= $intervals; $i++) {
$values[] = empty($results[$i][$listid]->total) ? 0 : (int) $results[$i][$listid]->total;
}
$lines[$listid]->set_values($values);
$lines[$listid]->set_text($oneList->name);
$lines[$listid]->set_colour($oneList->color);
$maxSub = max($maxSub, max($values));
}
$x_axis = new x_axis();
$xlabelobject = new x_axis_labels();
$xlabelobject->rotate(-20);
$xlabelobject->set_labels($legendX);
$x_axis->set_labels($xlabelobject);
$y_axis = new y_axis();
$y_axis->range(0, $maxSub, intval($maxSub / 10));
$chart = new open_flash_chart();
$chart->set_x_axis($x_axis);
$chart->set_y_axis($y_axis);
$chart->set_title($title);
foreach ($lines as $oneLine) {
$chart->add_element($oneLine);
}
$this->assignRef('chart', $chart);
}
示例14: strtoupper
for ($i = 0, $a = count($this->history); $i < $a; $i++) {
$row =& $this->history[$i];
$id = 'history' . $i;
?>
<tr class="<?php
echo "row{$k}";
?>
" >
<td align="center">
<?php
echo $i + 1;
?>
</td>
<td align="center">
<?php
echo acymailing::getDate($row->date);
?>
</td>
<td align="center">
<?php
echo JText::_('ACTION_' . strtoupper($row->action));
?>
</td>
<td>
<?php
$data = explode("\n", $row->data);
foreach ($data as $value) {
if (!strpos($value, '::')) {
continue;
}
list($part1, $part2) = explode("::", $value);
示例15: replaceSubTag
function replaceSubTag(&$allresults, $i, &$user)
{
$arguments = explode('|', strip_tags($allresults[1][$i]));
$field = $arguments[0];
unset($arguments[0]);
$mytag = null;
$mytag->default = $this->params->get('default_' . $field, '');
if (!empty($arguments)) {
foreach ($arguments as $onearg) {
$args = explode(':', $onearg);
if (isset($args[1])) {
$mytag->{$args}[0] = $args[1];
} else {
$mytag->{$args}[0] = 1;
}
}
}
$replaceme = isset($user->{$field}) ? $user->{$field} : $mytag->default;
if (!empty($mytag->part)) {
$parts = explode(' ', $replaceme);
if ($mytag->part == 'last') {
$replaceme = count($parts) > 1 ? end($parts) : '';
} else {
$replaceme = reset($parts);
}
}
if (!empty($mytag->type)) {
if ($mytag->type == 'date') {
$replaceme = acymailing::getDate(strtotime($replaceme));
} elseif ($mytag->type == 'time') {
$replaceme = acymailing::getDate($replaceme);
}
}
if (!empty($mytag->lower)) {
$replaceme = strtolower($replaceme);
}
if (!empty($mytag->ucwords)) {
$replaceme = ucwords($replaceme);
}
if (!empty($mytag->ucfirst)) {
$replaceme = ucfirst($replaceme);
}
return $replaceme;
}