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


PHP acymailing::getTime方法代码示例

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


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

示例1: save

 function save($mail)
 {
     if (isset($mail->alias) or empty($mail->mailid)) {
         if (empty($mail->alias)) {
             $mail->alias = $mail->subject;
         }
         $mail->alias = JFilterOutput::stringURLSafe(trim($mail->alias));
     }
     if (empty($mail->mailid)) {
         if (empty($mail->created)) {
             $mail->created = time();
         }
         if (empty($mail->userid)) {
             $user =& JFactory::getUser();
             $mail->userid = $user->id;
         }
         if (empty($mail->key)) {
             $mail->key = md5($mail->alias . time());
         }
     } else {
         if (!empty($mail->attach)) {
             $oldMailObject = $this->get($mail->mailid);
             if (!empty($oldMailObject)) {
                 $mail->attach = array_merge($oldMailObject->attach, $mail->attach);
             }
         }
     }
     if (!empty($mail->attach) and !is_string($mail->attach)) {
         $mail->attach = serialize($mail->attach);
     }
     if (!empty($mail->params)) {
         if (!empty($mail->params['lastgenerateddate']) && !is_numeric($mail->params['lastgenerateddate'])) {
             $mail->params['lastgenerateddate'] = acymailing::getTime($mail->params['lastgenerateddate']);
         }
         $mail->params = serialize($mail->params);
     }
     if (!empty($mail->senddate) && !is_numeric($mail->senddate)) {
         $mail->senddate = acymailing::getTime($mail->senddate);
     }
     if (empty($mail->mailid)) {
         $status = $this->database->insertObject(acymailing::table('mail'), $mail);
     } else {
         $status = $this->database->updateObject(acymailing::table('mail'), $mail, 'mailid');
     }
     if (!empty($mail->params) and is_string($mail->params)) {
         $mail->params = unserialize($mail->params);
     }
     if (!empty($mail->attach) and is_string($mail->attach)) {
         $mail->attach = unserialize($mail->attach);
     }
     if ($status) {
         return empty($mail->mailid) ? $this->database->insertid() : $mail->mailid;
     }
     return false;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:55,代码来源:mail.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: statsusers

<script language="JavaScript" type="text/javascript">
     function statsusers(){
		var dataTable = new google.visualization.DataTable();
		dataTable.addRows(<?php 
echo count($this->statsusers);
?>
);
		dataTable.addColumn('string');
		dataTable.addColumn('number','<?php 
echo JText::_('USERS', true);
?>
');
		<?php 
$i = count($this->statsusers) - 1;
foreach ($this->statsusers as $oneResult) {
    echo "dataTable.setValue({$i}, 0, '" . addslashes(acymailing::getDate(acymailing::getTime($oneResult->subday), JText::_('DATE_FORMAT_LC3'))) . "'); ";
    echo "dataTable.setValue({$i}, 1, " . intval(@$oneResult->total) . "); ";
    if ($i-- == 0) {
        break;
    }
}
?>
        var vis = new google.visualization.ColumnChart(document.getElementById('statsusers'));
        var options = {
        	width:document.documentElement.clientWidth/2,
          height: 300,
          legend:'none'
        };
        vis.draw(dataTable, options);
	}
	google.load("visualization", "1", {packages:["corechart"]});
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:users.php

示例4: display

 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     $config = acymailing::config();
     $buttons = array();
     $desc = array();
     $desc['subscriber'] = '<ul><li>' . JText::_('USERS_DESC_CREATE') . '</li><li>' . JText::_('USERS_DESC_MANAGE') . '</li><li>' . JText::_('USERS_DESC_IMPORT') . '</li></ul>';
     $desc['list'] = '<ul><li>' . JText::_('LISTS_DESC_CREATE') . '</li><li>' . JText::_('LISTS_DESC_SUBSCRIPTION') . '</li></ul>';
     $desc['newsletter'] = '<ul><li>' . JText::_('NEWSLETTERS_DESC_CREATE') . '</li><li>' . JText::_('NEWSLETTERS_DESC_TEST') . '</li><li>' . JText::_('NEWSLETTERS_DESC_SEND') . '</li></ul>';
     $desc['template'] = '<ul><li>' . JText::_('TEMPLATES_DESC_CREATE') . '</li></ul>';
     $desc['queue'] = '<ul><li>' . JText::_('QUEUE_DESC_CONTROL') . '</li></ul>';
     $desc['config'] = '<ul><li>' . JText::_('CONFIG_DESC_CONFIG') . '</li><li>' . JText::_('CONFIG_DESC_MODIFY') . '</li><li>' . JText::_('CONFIG_DESC_PLUGIN') . '</li><li>' . JText::_('QUEUE_DESC_BOUNCE');
     if (!acymailing::level(3)) {
         $desc['config'] .= acymailing::getUpgradeLink('enterprise');
     }
     $desc['config'] .= '</li></ul>';
     $desc['stats'] = '<ul><li>' . JText::_('STATS_DESC_VIEW') . '</li><li>' . JText::_('STATS_DESC_CLICK');
     if (!acymailing::level(1)) {
         $desc['stats'] .= acymailing::getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li><li>' . JText::_('STATS_DESC_CHARTS');
     if (!acymailing::level(1)) {
         $desc['stats'] .= acymailing::getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li></ul>';
     $desc['autonews'] = '<ul><li>' . JText::_('AUTONEWS_DESC');
     if (!acymailing::level(2)) {
         $desc['autonews'] .= acymailing::getUpgradeLink('business');
     }
     $desc['autonews'] .= '</li></ul>';
     $desc['campaign'] = '<ul><li>' . JText::_('CAMPAIGN_DESC_CREATE');
     if (!acymailing::level(3)) {
         $desc['campaign'] .= acymailing::getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li><li>' . JText::_('CAMPAIGN_DESC_AFFECT');
     if (!acymailing::level(3)) {
         $desc['campaign'] .= acymailing::getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li></ul>';
     $desc['update'] = '<ul><li>' . JText::_('UPDATE_DESC') . '</li><li>' . JText::_('CHANGELOG_DESC') . '</li><li>' . JText::_('ABOUT_DESC') . '</li></ul>';
     $buttons[] = array('link' => 'subscriber', 'level' => 0, 'image' => 'user', 'text' => JText::_('USERS'), 'acl' => 'acl_subscriber_manage');
     $buttons[] = array('link' => 'list', 'level' => 0, 'image' => 'acylist', 'text' => JText::_('LISTS'), 'acl' => 'acl_lists_manage');
     $buttons[] = array('link' => 'newsletter', 'level' => 0, 'image' => 'newsletter', 'text' => JText::_('NEWSLETTERS'), 'acl' => 'acl_newsletters_manage');
     $buttons[] = array('link' => 'autonews', 'level' => 2, 'image' => 'autonewsletter', 'text' => JText::_('AUTONEWSLETTERS'), 'acl' => 'acl_autonewsletters_manage');
     $buttons[] = array('link' => 'campaign', 'level' => 3, 'image' => 'campaign', 'text' => JText::_('CAMPAIGN'), 'acl' => 'acl_campaign_manage');
     $buttons[] = array('link' => 'template', 'level' => 0, 'image' => 'acytemplate', 'text' => JText::_('ACY_TEMPLATES'), 'acl' => 'acl_templates_manage');
     $buttons[] = array('link' => 'queue', 'level' => 0, 'image' => 'process', 'text' => JText::_('QUEUE'), 'acl' => 'acl_queue_manage');
     $buttons[] = array('link' => 'stats', 'level' => 0, 'image' => 'stats', 'text' => JText::_('STATISTICS'), 'acl' => 'acl_statistics_manage');
     $buttons[] = array('link' => 'config', 'level' => 0, 'image' => 'config', 'text' => JText::_('CONFIGURATION'), 'acl' => 'acl_configuration_manage');
     $buttons[] = array('link' => 'update', 'level' => 0, 'image' => 'install', 'text' => JText::_('UPDATE_ABOUT'), 'acl' => 'acl_configuration_manage');
     $htmlbuttons = array();
     foreach ($buttons as $oneButton) {
         if (acymailing::isAllowed($config->get($oneButton['acl'], 'all'))) {
             $htmlbuttons[] = $this->_quickiconButton($oneButton['link'], $oneButton['image'], $oneButton['text'], $desc[$oneButton['link']], $oneButton['level']);
         }
     }
     acymailing::setTitle(ACYMAILING_NAME, 'acymailing', 'dashboard');
     $bar =& JToolBar::getInstance('toolbar');
     $bar->appendButton('Pophelp', 'dashboard');
     $this->assignRef('buttons', $htmlbuttons);
     $this->assignRef('toggleClass', acymailing::get('helper.toggle'));
     $db = JFactory::getDBO();
     $db->setQuery('SELECT name,email,html,confirmed,subid,created FROM ' . acymailing::table('subscriber') . ' ORDER BY created DESC LIMIT 15');
     $this->assignRef('users', $db->loadObjectList());
     $db->setQuery('SELECT a.*, b.subject FROM ' . acymailing::table('stats') . ' as a LEFT JOIN ' . acymailing::table('mail') . ' as b on a.mailid = b.mailid ORDER BY a.senddate DESC LIMIT 15');
     $this->assignRef('stats', $db->loadObjectList());
     $doc->addScript(((empty($_SERVER['HTTPS']) or strtolower($_SERVER['HTTPS']) != "on") ? 'http://' : 'https://') . "www.google.com/jsapi");
     $today = acymailing::getTime(date('Y-m-d'));
     $joomConfig =& JFactory::getConfig();
     $diff = date('Z') + intval($joomConfig->getValue('config.offset') * 60 * 60);
     $db->setQuery("SELECT count(`subid`) as total, DATE_FORMAT(FROM_UNIXTIME(`created` - {$diff}),'%Y-%m-%d') as subday FROM " . acymailing::table('subscriber') . " GROUP BY subday ORDER BY subday DESC LIMIT 15");
     $statsusers = $db->loadObjectList();
     $this->assignRef('statsusers', $statsusers);
     jimport('joomla.html.pane');
     $tabs =& JPane::getInstance('tabs');
     $this->assignRef('tabs', $tabs);
     $this->assignRef('config', $config);
     parent::display($tpl);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:79,代码来源:view.html.php

示例5: 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');
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:24,代码来源:send.php


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