本文整理汇总了PHP中acymailing::config方法的典型用法代码示例。如果您正苦于以下问题:PHP acymailing::config方法的具体用法?PHP acymailing::config怎么用?PHP acymailing::config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acymailing
的用法示例。
在下文中一共展示了acymailing::config方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: queue
function queue($mailid, $time, $onlyNew = false)
{
$mailid = intval($mailid);
if (empty($mailid)) {
return false;
}
$classLists = acymailing::get('class.listmail');
$lists = $classLists->getReceivers($mailid, false);
if (empty($lists)) {
return 0;
}
$config = acymailing::config();
$querySelect = 'SELECT DISTINCT a.subid,' . $mailid . ',' . $time . ',' . (int) $config->get('priority_newsletter', 3);
$querySelect .= ' FROM ' . acymailing::table('listsub') . ' as a ';
$querySelect .= 'LEFT JOIN ' . acymailing::table('subscriber') . ' as b ON a.subid = b.subid ';
$querySelect .= 'WHERE b.enabled = 1 AND b.accept = 1 ';
$querySelect .= 'AND a.listid IN (' . implode(',', array_keys($lists)) . ') AND a.status = 1 ';
$config = acymailing::config();
if ($config->get('require_confirmation', '0')) {
$querySelect .= 'AND b.confirmed = 1 ';
}
$query = 'INSERT IGNORE INTO ' . acymailing::table('queue') . ' (subid,mailid,senddate,priority) ' . $querySelect;
$this->database->setQuery($query);
if (!$this->database->query()) {
acymailing::display($this->database->ErrorMsg(), 'error');
}
$totalinserted = $this->database->getAffectedRows();
if ($onlyNew) {
$this->database->setQuery('DELETE b.* FROM `#__acymailing_userstats` as a LEFT JOIN `#__acymailing_queue` as b on a.subid = b.subid WHERE a.mailid = ' . $mailid);
$this->database->query();
$totalinserted = $totalinserted - $this->database->getAffectedRows();
}
return $totalinserted;
}
示例2: continuesend
function continuesend()
{
$config = acymailing::config();
$newcrontime = time() + 120;
if ($config->get('cron_next') < $newcrontime) {
$newValue = null;
$newValue->cron_next = $newcrontime;
$config->save($newValue);
}
$mailid = acymailing::getCID('mailid');
$totalSend = JRequest::getVar('totalsend', 0, '', 'int');
$alreadySent = JRequest::getVar('alreadysent', 0, '', 'int');
$helperQueue = acymailing::get('helper.queue');
$helperQueue->mailid = $mailid;
$helperQueue->report = true;
$helperQueue->total = $totalSend;
$helperQueue->start = $alreadySent;
$helperQueue->pause = $config->get('queue_pause');
$helperQueue->process();
$alreadySent = $alreadySent + $helperQueue->nbprocess;
if (!$helperQueue->finish) {
$app =& JFactory::getApplication();
$app->redirect(acymailing::completeLink('send&task=continuesend&mailid=' . $mailid . '&alreadysent=' . $alreadySent . '&totalsend=' . $totalSend, true, true));
exit;
}
ob_start();
}
示例3: mailerHelper
function mailerHelper()
{
JPluginHelper::importPlugin('acymailing');
$this->dispatcher =& JDispatcher::getInstance();
$this->app =& JFactory::getApplication();
$this->subscriberClass = acymailing::get('class.subscriber');
$this->encodingHelper = acymailing::get('helper.encoding');
$this->config =& acymailing::config();
$this->setFrom($this->config->get('from_email'), $this->config->get('from_name'));
$this->Sender = $this->cleanText($this->config->get('bounce_email'));
if (empty($this->Sender)) {
$this->Sender = '';
}
switch ($this->config->get('mailer_method', 'phpmail')) {
case 'smtp':
$this->IsSMTP();
$this->Host = $this->config->get('smtp_host');
$port = $this->config->get('smtp_port');
if (empty($port) && $this->config->get('smtp_secured') == 'ssl') {
$port = 465;
}
if (!empty($port)) {
$this->Host .= ':' . $port;
}
$this->SMTPAuth = (bool) $this->config->get('smtp_auth', true);
$this->Username = trim($this->config->get('smtp_username'));
$this->Password = trim($this->config->get('smtp_password'));
$this->SMTPSecure = trim((string) $this->config->get('smtp_secured'));
if (empty($this->Sender)) {
$this->Sender = strpos($this->Username, '@') ? $this->Username : $this->config->get('from_email');
}
break;
case 'sendmail':
$this->IsSendmail();
$this->SendMail = trim($this->config->get('sendmail_path'));
if (empty($this->SendMail)) {
$this->SendMail = '/usr/sbin/sendmail';
}
break;
case 'qmail':
$this->IsQmail();
break;
default:
$this->IsMail();
break;
}
//endswitch
$this->PluginDir = dirname(__FILE__) . DS;
$this->CharSet = strtolower($this->config->get('charset'));
if (empty($this->CharSet)) {
$this->CharSet = 'utf-8';
}
$this->clearAll();
$this->Encoding = $this->config->get('encoding_format');
if (empty($this->Encoding)) {
$this->Encoding = '8bit';
}
$this->Hostname = $this->config->get('hostname', '');
$this->WordWrap = intval($this->config->get('word_wrapping', 0));
}
示例4: send
function send()
{
JRequest::checkToken() or die('Invalid Token');
$bodyEmail = JRequest::getString('mailbody');
$code = JRequest::getString('code');
JRequest::setVar('code', $code);
if (empty($code)) {
return;
}
$config = acymailing::config();
$mailer = acymailing::get('helper.mailer');
$mailer->Subject = '[ACYMAILING LANGUAGE FILE] ' . $code;
$mailer->Body = 'The website ' . ACYMAILING_LIVE . ' using AcyMailing ' . $config->get('level') . $config->get('version') . ' sent a language file : ' . $code;
$mailer->Body .= "\n" . "\n" . "\n" . $bodyEmail;
$user = JFactory::getUser();
$mailer->AddAddress($user->email, $user->name);
$mailer->AddAddress('translate@acyba.com', 'Acyba Translation Team');
$mailer->report = false;
jimport('joomla.filesystem.file');
$path = JPath::clean(JLanguage::getLanguagePath(JPATH_ROOT) . DS . $code . DS . $code . '.com_acymailing.ini');
$mailer->AddAttachment($path);
$result = $mailer->Send();
if ($result) {
acymailing::display(JText::_('THANK_YOU_SHARING'), 'success');
acymailing::display($mailer->reportMessage, 'success');
} else {
acymailing::display($mailer->reportMessage, 'error');
}
}
示例5: checkAccessNewsletter
function checkAccessNewsletter($edit = true)
{
$mailid = acymailing::getCID('mailid');
$listid = JRequest::getInt('listid');
if (empty($mailid)) {
return true;
}
$db =& JFactory::getDBO();
$db->setQuery('SELECT * FROM `#__acymailing_mail` WHERE mailid = ' . intval($mailid));
$mail = $db->loadObject();
if (empty($mail->mailid)) {
return false;
}
$config = acymailing::config();
$my =& JFactory::getUser();
if ($edit and !$config->get('frontend_modif', 1) and $my->id != $mail->userid) {
return false;
}
if ($edit and !$config->get('frontend_modif_sent', 1) and !empty($mail->senddate)) {
return false;
}
$db->setQuery('SELECT `mailid` FROM `#__acymailing_listmail` WHERE `mailid` = ' . intval($mailid) . ' AND `listid` = ' . intval($listid));
$result = $db->loadResult();
if (empty($result) && $my->id != $mail->userid) {
return false;
}
return true;
}
示例6: editorHelper
function editorHelper()
{
$config =& acymailing::config();
$this->editor = $config->get('editor', null);
if (empty($this->editor)) {
$this->editor = null;
}
$this->myEditor =& JFactory::getEditor($this->editor);
$this->myEditor->initialise();
}
示例7: bounceHelper
function bounceHelper()
{
$this->config = acymailing::config();
$this->mailer = acymailing::get('helper.mailer');
$this->mailer->report = false;
$this->subClass = acymailing::get('class.subscriber');
$this->listsubClass = acymailing::get('class.listsub');
$this->listsubClass->checkAccess = false;
$this->db =& JFactory::getDBO();
}
示例8: plgAcymailingTemplate
function plgAcymailingTemplate(&$subject, $config)
{
parent::__construct($subject, $config);
if (!isset($this->params)) {
$plugin =& JPluginHelper::getPlugin('acymailing', 'template');
$this->params = new JParameter($plugin->params);
}
$this->config = acymailing::config();
if (version_compare(PHP_VERSION, '5.0.0', '>=') && class_exists('DOMDocument') && function_exists('mb_convert_encoding')) {
require_once ACYMAILING_FRONT . 'inc' . DS . 'emogrifier' . DS . 'emogrifier.php';
}
}
示例9: fetchButton
function fetchButton($type = 'Pophelp', $namekey = '', $id = 'pophelp')
{
JHTML::_('behavior.mootools');
$doc =& JFactory::getDocument();
$config =& acymailing::config();
$level = $config->get('level');
$url = ACYMAILING_HELPURL . $namekey . '&level=' . $level;
$iFrame = "'<iframe src=\\'{$url}\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
$js = "var openHelp = true; function displayDoc(){var box=\$('iframedoc'); if(openHelp){box.innerHTML = " . $iFrame . ";box.style.display = 'block';box.style.height = '0';}";
$js .= "try{\r\n var fx = box.effects({duration: 1500, transition:\r\n\t\t\t\t\tFx.Transitions.Quart.easeOut});\r\n\t\t\t\t\tif(openHelp){\r\n\t\t\t\t\t\tfx.start({'height': 300});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfx.start({'height': 0}).chain(function() {\r\n\t\t\t\t\t\t\tbox.innerHTML='';\r\n\t\t\t\t\t\t\tbox.setStyle('display','none');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(err){\r\n\t\t\t\t\tbox.style.height = '300px';\r\n\t\t\t\t\tvar myVerticalSlide = new Fx.Slide('iframedoc');\r\n \t\t\t\t\tif(openHelp){\r\n\t\t\t\t\t\tmyVerticalSlide.slideIn();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tmyVerticalSlide.slideOut().chain(function() {\r\n\t\t\t\t\t\tbox.innerHTML='';\r\n\t\t\t\t\t\tbox.setStyle('display','none');\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} openHelp = !openHelp;}";
$doc->addScriptDeclaration($js);
return '<a href="' . $url . '" target="_blank" onclick="displayDoc();return false;" class="toolbar"><span class="icon-32-help" title="' . JText::_('ACY_HELP', true) . '"></span>' . JText::_('ACY_HELP') . '</a>';
}
示例10: emailactionType
function emailactionType()
{
$this->values = array();
$this->values[] = JHTML::_('select.option', 'noaction', JText::_('NO_ACTION'));
$this->values[] = JHTML::_('select.option', 'delete', JText::_('DELETE_EMAIL'));
$this->values[] = JHTML::_('select.option', 'forward', JText::_('FORWARD_EMAIL'));
$js = "function updateEmailAction(num){";
$js .= "forwardarea = window.document.getElementById('bounce_email_'+num).value;";
$js .= "if(forwardarea == 'forward') {window.document.getElementById('config_bounce_forward_'+num).style.display = 'block';}else{window.document.getElementById('config_bounce_forward_'+num).style.display = 'none';}";
$js .= '}';
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($js);
$this->config = acymailing::config();
}
示例11: fetchButton
function fetchButton($type = 'Pophelp', $namekey = '', $id = 'pophelp')
{
JHTML::_('behavior.mootools');
$doc =& JFactory::getDocument();
$config =& acymailing::config();
$level = $config->get('level');
$url = ACYMAILING_HELPURL . $namekey . '&level=' . $level;
$iFrame = "'<iframe src=\\'{$url}\\' width=\\'100%\\' height=\\'100%\\' scrolling=\\'auto\\'></iframe>'";
$js = "var openHelp = true; function displayDoc(){var box=\$('iframedoc'); if(openHelp){box.setHTML(" . $iFrame . ");box.setStyle('display','block');}";
$js .= "var fx = box.effects({duration: 1500, transition: Fx.Transitions.Quart.easeOut});";
$js .= "if(openHelp){fx.start({'height': 300});}else{fx.start({'height': 0}).chain(function() {box.setHTML('');box.setStyle('display','none');})}; openHelp = !openHelp;}";
$doc->addScriptDeclaration($js);
return '<a href="' . $url . '" target="_blank" onclick="displayDoc();return false;" class="toolbar"><span class="icon-32-help" title="' . JText::_('HELP', true) . '"></span>' . JText::_('HELP') . '</a>';
}
示例12: unsubscribe
function unsubscribe($subid, $listids)
{
$app =& JFactory::getApplication();
if (acymailing::level(3)) {
$campaignClass = acymailing::get('helper.campaign');
$campaignClass->stop($subid, $listids);
}
$config = acymailing::config();
static $alreadySent = false;
if ($this->sendNotif and !$alreadySent and $config->get('notification_unsub') and !$app->isAdmin()) {
$alreadySent = true;
$mailer = acymailing::get('helper.mailer');
$mailer->report = false;
$mailer->autoAddUser = true;
$mailer->checkConfirmField = false;
$userClass = acymailing::get('class.subscriber');
$subscriber = $userClass->get($subid);
$ipClass = acymailing::get('helper.user');
$mailer->addParam('survey', $this->survey);
$mailer->addParamInfo();
$subscriber->ip = $ipClass->getIP();
foreach ($subscriber as $fieldname => $value) {
$mailer->addParam('user:' . $fieldname, $value);
}
$allUsers = explode(',', $config->get('notification_unsub'));
foreach ($allUsers as $oneUser) {
$mailer->sendOne('notification_unsub', $oneUser);
}
}
$db =& JFactory::getDBO();
if ($this->sendConf and !$app->isAdmin()) {
$db->setQuery('SELECT DISTINCT `unsubmailid` FROM ' . acymailing::table('list') . ' WHERE `listid` IN (' . implode(',', $listids) . ') AND `published` = 1 AND `unsubmailid` > 0');
$messages = $db->loadResultArray();
if (!empty($messages)) {
$config = acymailing::config();
$mailHelper = acymailing::get('helper.mailer');
$mailHelper->report = $config->get('unsub_message', true);
$mailHelper->checkAccept = false;
foreach ($messages as $mailid) {
$mailHelper->sendOne($mailid, $subid);
}
}
}
//end only frontend
$db->setQuery('DELETE FROM ' . acymailing::table('queue') . ' WHERE `subid` = ' . (int) $subid . ' AND `mailid` IN (SELECT `mailid` FROM ' . acymailing::table('listmail') . ' WHERE `listid` IN (' . implode(',', $listids) . '))');
$db->query();
JPluginHelper::importPlugin('acymailing');
$dispatcher =& JDispatcher::getInstance();
$resultsTrigger = $dispatcher->trigger('onAcyUnsubscribe', array($subid, $listids));
}
示例13: getInput
function getInput()
{
JHTML::_('behavior.modal', 'a.modal');
if (!(include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'helpers' . DS . 'helper.php')) {
return 'This module can not work without the AcyMailing Component';
}
$lang =& JFactory::getLanguage();
$lang->load(ACYMAILING_COMPONENT, JPATH_SITE);
$config =& acymailing::config();
$level = $config->get('level');
$link = ACYMAILING_HELPURL . $this->value . '&level=' . $level;
$text = '<a class="modal" title="' . JText::_('ACY_HELP', true) . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('ACY_HELP') . '</button></a>';
return $text;
}
示例14: queueHelper
function queueHelper()
{
$this->config = acymailing::config();
$this->subClass = acymailing::get('class.subscriber');
$this->listsubClass = acymailing::get('class.listsub');
$this->listsubClass->checkAccess = false;
$this->send_limit = $this->config->get('queue_nbmail', 60);
acymailing::increasePerf();
@ini_set('default_socket_timeout', 10);
@ignore_user_abort(true);
$timelimit = ini_get('max_execution_time');
if (!empty($timelimit)) {
$this->stoptime = time() + $timelimit - 4;
}
$this->db =& JFactory::getDBO();
}
示例15: bounceactionType
function bounceactionType()
{
$this->values = array();
$this->values[] = JHTML::_('select.option', 'noaction', JText::_('NO_ACTION'));
$this->values[] = JHTML::_('select.option', 'unsub', JText::_('UNSUB_USER'));
$this->values[] = JHTML::_('select.option', 'sub', JText::_('SUBSCRIBE_USER'));
$this->values[] = JHTML::_('select.option', 'delete', JText::_('DELETE_USER'));
$this->config = acymailing::config();
$this->lists = acymailing::get('type.lists');
array_shift($this->lists->values);
$js = "function updateSubAction(num){";
$js .= "myAction = window.document.getElementById('bounce_action_'+num).value;";
$js .= "if(myAction == 'sub') {window.document.getElementById('config_bounce_action_lists_'+num).style.display = '';}else{window.document.getElementById('config_bounce_action_lists_'+num).style.display = 'none';}";
$js .= '}';
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($js);
}