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


PHP acymailing::get方法代码示例

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


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

示例1: remove

 function remove()
 {
     if (!$this->isAllowed($this->aclCat, 'delete')) {
         return;
     }
     JRequest::checkToken() or die('Invalid Token');
     $mailid = JRequest::getVar('filter_mail', 0, 'post', 'int');
     $queueClass = acymailing::get('class.queue');
     $search = JRequest::getString('search');
     $filters = array();
     if (!empty($search)) {
         $db = JFactory::getDBO();
         $searchVal = '\'%' . $db->getEscaped($search, true) . '%\'';
         $searchFields = array('b.name', 'b.email', 'c.subject', 'a.mailid', 'a.subid');
         $filters[] = implode(" LIKE {$searchVal} OR ", $searchFields) . " LIKE {$searchVal}";
     }
     if (!empty($mailid)) {
         $filters[] = 'a.mailid = ' . intval($mailid);
     }
     $total = $queueClass->delete($filters);
     $app =& JFactory::getApplication();
     $app->enqueueMessage(JText::sprintf('SUCC_DELETE_ELEMENTS', $total), 'message');
     JRequest::setVar('filter_mail', 0, 'post');
     JRequest::setVar('search', '', 'post');
     return $this->listing();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:26,代码来源:queue.php

示例2: acymailingtagmodule_show

    function acymailingtagmodule_show()
    {
        ?>

<script language="javascript" type="text/javascript">
		<!--
			function insertModule(id){
				tagString = '{module:'+id;
				if(window.document.getElementById('jflang')  && window.document.getElementById('jflang').value != ''){
					tagString += '|lang:';
					tagString += window.document.getElementById('jflang').value;
				}
				tagString += '}';
				setTag(tagString);
				insertTag();
			}
		//-->
</script>
	<?php 
        $jflanguages = acymailing::get('type.jflanguages');
        echo $jflanguages->display('lang');
        $excludedModules = array('mod_poll', 'mod_login', 'mod_breadcrumbs', 'mod_acymailing', 'mod_wrapper');
        $text = '<table class="adminlist" cellpadding="1" width="100%">';
        $db =& JFactory::getDBO();
        $db->setQuery('SELECT id, title, position, module FROM #__modules WHERE `module` NOT IN (\'' . implode('\',\'', $excludedModules) . '\') ORDER BY `position`,`ordering`');
        $modules = $db->loadObjectList();
        $k = 0;
        foreach ($modules as $oneModule) {
            $text .= '<tr style="cursor:pointer" class="row' . $k . '" onclick="insertModule(\'' . $oneModule->id . '\');" ><td>' . $oneModule->title . '</td><td nowrap="nowrap" width="60px">' . $oneModule->module . '</td><td nowrap="nowrap" width="40px">' . $oneModule->position . '</td></tr>';
            $k = 1 - $k;
        }
        $text .= '</table>';
        echo $text;
    }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:34,代码来源:tagmodule.php

示例3: onNewsletterSubscribe

 /**
  * Event "onNewsletterSubscribe"
  * 
  * @access private
  * @param null
  * @return int
  */
 public function onNewsletterSubscribe($user, $state)
 {
     if ($this->isEnabled() == false) {
         return false;
     }
     $list_id = $this->getParams()->get('newsletter');
     if (empty($list_id)) {
         return true;
     }
     if (!(include_once rtrim(JPATH_ADMINISTRATOR, '/') . '/components/com_acymailing/helpers/helper.php')) {
         return false;
     }
     // See if the user exists in the database
     $acyUser = null;
     $acyUser->email = $user->email;
     $acyUser->name = $user->name;
     $acyUser->userid = $user->id;
     $subscriberClass = acymailing::get('class.subscriber');
     $subscriberClass->checkVisitor = false;
     $subid = $subscriberClass->save($acyUser);
     if (empty($subid)) {
         return false;
     }
     $newSubscription = array();
     $newList = array();
     $newList['status'] = $state == 0 ? 0 : 1;
     $newSubscription[intval($list_id)] = $newList;
     $subscriberClass->saveSubscription($subid, $newSubscription);
     return true;
 }
开发者ID:traveladviser,项目名称:magebridge-mirror,代码行数:37,代码来源:acymailing.php

示例4: saveStats

 function saveStats()
 {
     $subid = JRequest::getInt('subid');
     $mailid = JRequest::getInt('mailid');
     if (empty($subid) or empty($mailid)) {
         return false;
     }
     $db = JFactory::getDBO();
     $db->setQuery('SELECT open FROM ' . acymailing::table('userstats') . ' WHERE mailid = ' . $mailid . ' AND subid = ' . $subid . ' LIMIT 1');
     $actual = $db->loadObject();
     if (empty($actual)) {
         return false;
     }
     $open = 0;
     if (empty($actual->open)) {
         $open = 1;
         $unique = ',openunique = openunique +1';
     } elseif ($this->countReturn) {
         $open = $actual->open + 1;
         $unique = '';
     }
     if (empty($open)) {
         return true;
     }
     $db->setQuery('UPDATE ' . acymailing::table('userstats') . ' SET open = ' . $open . ', opendate = ' . time() . ' WHERE mailid = ' . $mailid . ' AND subid = ' . $subid . ' LIMIT 1');
     $db->query();
     $db->setQuery('UPDATE ' . acymailing::table('stats') . ' SET opentotal = opentotal +1 ' . $unique . ' WHERE mailid = ' . $mailid . ' LIMIT 1');
     $db->query();
     if (!empty($subid)) {
         $filterClass = acymailing::get('class.filter');
         $filterClass->subid = $subid;
         $filterClass->trigger('opennews');
     }
     return true;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:35,代码来源:stats.php

示例5: insert

 function insert($subid, $action, $data = array())
 {
     $user =& JFactory::getUser();
     if (!empty($user->id)) {
         $data[] = 'EXECUTED_BY::' . $user->id . ' ( ' . $user->username . ' )';
     }
     $history = null;
     $history->subid = intval($subid);
     $history->action = strip_tags($action);
     $history->data = implode("\n", $data);
     $history->date = time();
     $userHelper = acymailing::get('helper.user');
     $history->ip = $userHelper->getIP();
     if (!empty($_SERVER)) {
         $source = array();
         $vars = array('HTTP_REFERER', 'HTTP_USER_AGENT', 'HTTP_HOST', 'SERVER_ADDR', 'REMOTE_ADDR', 'REQUEST_URI', 'QUERY_STRING');
         foreach ($vars as $oneVar) {
             if (!empty($_SERVER[$oneVar])) {
                 $source[] = $oneVar . '::' . strip_tags($_SERVER[$oneVar]);
             }
         }
         $history->source = implode("\n", $source);
     }
     return $this->database->insertObject(acymailing::table('history'), $history);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:25,代码来源:acyhistory.php

示例6: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'helpers' . DS . 'helper.php';
     $listType = acymailing::get('type.lists');
     array_shift($listType->values);
     return $listType->display($control_name . '[listid]', (int) $value, false);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:7,代码来源:listid.php

示例7: listing

 function listing()
 {
     JRequest::setVar('tmpl', 'component');
     $statsClass = acymailing::get('class.stats');
     $statsClass->saveStats();
     header('Cache-Control: no-store, no-cache, must-revalidate');
     header('Cache-Control: post-check=0, pre-check=0', false);
     header('Pragma: no-cache');
     ob_end_clean();
     JPluginHelper::importPlugin('acymailing');
     $this->dispatcher =& JDispatcher::getInstance();
     $results = $this->dispatcher->trigger('acymailing_getstatpicture');
     $picture = reset($results);
     if (empty($picture)) {
         $picture = 'components/com_acymailing/images/statpicture.png';
     }
     $picture = ltrim(str_replace(array('\\', '/'), DS, $picture), DS);
     $imagename = ACYMAILING_ROOT . $picture;
     $handle = fopen($imagename, 'r');
     if (!$handle) {
         exit;
     }
     header("Content-type: image/png");
     $contents = fread($handle, filesize($imagename));
     fclose($handle);
     echo $contents;
     exit;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:28,代码来源:stats.php

示例8: addClick

 function addClick($urlid, $mailid, $subid)
 {
     $mailid = intval($mailid);
     $urlid = intval($urlid);
     $subid = intval($subid);
     if (empty($mailid) or empty($urlid) or empty($subid)) {
         return false;
     }
     $statsClass = acymailing::get('class.stats');
     $statsClass->countReturn = false;
     if (!$statsClass->saveStats()) {
         return false;
     }
     $date = time();
     $query = 'INSERT IGNORE INTO ' . acymailing::table('urlclick') . ' (urlid,mailid,subid,date,click) VALUES (' . $urlid . ',' . $mailid . ',' . $subid . ',' . $date . ',1)';
     $this->database->setQuery($query);
     $this->database->query();
     if (!$this->database->getAffectedRows()) {
         $query = 'UPDATE ' . acymailing::table('urlclick') . ' SET click = click +1,`date` = ' . $date . ' WHERE mailid = ' . $mailid . ' AND urlid = ' . $urlid . ' AND subid = ' . $subid . ' LIMIT 1';
         $this->database->setQuery($query);
         $this->database->query();
     }
     $query = 'SELECT SUM(click) FROM ' . acymailing::table('urlclick') . ' WHERE mailid = ' . $mailid . ' AND subid = ' . $subid;
     $this->database->setQuery($query);
     $totalUserClick = $this->database->loadResult();
     $query = 'UPDATE ' . acymailing::table('stats') . ' SET clicktotal = clicktotal + 1 ';
     if ($totalUserClick <= 1) {
         $query .= ' , clickunique = clickunique + 1';
     }
     $query .= ' WHERE mailid = ' . $mailid . ' LIMIT 1';
     $this->database->setQuery($query);
     $this->database->query();
     return true;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:34,代码来源:urlclick.php

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

示例10: generate

 function generate()
 {
     $app =& JFactory::getApplication();
     $autoNewsHelper = acymailing::get('helper.autonews');
     if (!$autoNewsHelper->generate()) {
         $app->enqueueMessage(JText::_('NO_AUTONEWS'), 'notice');
         $db =& JFactory::getDBO();
         $db->setQuery("SELECT * FROM " . acymailing::table('mail') . " WHERE `type` = 'autonews'");
         $allAutonews = $db->loadObjectList();
         if (!empty($allAutonews)) {
             $time = time();
             foreach ($allAutonews as $oneAutonews) {
                 if ($oneAutonews->published != 1) {
                     $app->enqueueMessage(JText::sprintf('AUTONEWS_NOT_PUBLISHED', $oneAutonews->subject), 'notice');
                 } elseif ($oneAutonews->senddate >= $time) {
                     $app->enqueueMessage(JText::sprintf('AUTONEWS_NOT_READY', $oneAutonews->subject), 'notice');
                 }
             }
         }
     } else {
         foreach ($autoNewsHelper->messages as $oneMessage) {
             $app->enqueueMessage($oneMessage);
         }
     }
     return $this->listing();
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:26,代码来源:autonews.php

示例11: getInput

 function getInput()
 {
     include_once rtrim(JPATH_ADMINISTRATOR, DS) . DS . 'components' . DS . 'com_acymailing' . DS . 'helpers' . DS . 'helper.php';
     $listType = acymailing::get('type.lists');
     array_shift($listType->values);
     return $listType->display($this->name, (int) $this->value, false);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:7,代码来源:listid.php

示例12: 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;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:34,代码来源:queue.php

示例13: test

 function test()
 {
     if (!$this->isAllowed('configuration', 'manage')) {
         return;
     }
     $app =& JFactory::getApplication();
     $this->store();
     $config = acymailing::config();
     $user =& JFactory::getUser();
     $mailClass = acymailing::get('helper.mailer');
     $addedName = $config->get('add_names', true) ? $mailClass->cleanText($user->name) : '';
     $mailClass->AddAddress($user->email, $addedName);
     $mailClass->Subject = 'Test e-mail from ' . ACYMAILING_LIVE;
     $mailClass->Body = JText::_('TEST_EMAIL');
     $mailClass->SMTPDebug = 1;
     $result = $mailClass->send();
     if (!$result) {
         $bounce = $config->get('bounce_email');
         if (!empty($bounce)) {
             $app->enqueueMessage(JText::sprintf('ADVICE_BOUNCE', $bounce), 'notice');
         } elseif ($config->get('mailer_method') == 'smtp' and !$config->get('smtp_auth') and strlen($config->get('smtp_password')) > 1) {
             $app->enqueueMessage(JText::_('ADVICE_SMTP_AUTH'), 'notice');
         } elseif ((strpos(ACYMAILING_LIVE, 'localhost') or strpos(ACYMAILING_LIVE, '127.0.0.1')) and $config->get('mailer_method') != 'smtp') {
             $app->enqueueMessage(JText::_('ADVICE_LOCALHOST'), 'notice');
         }
     }
     return $this->display();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:28,代码来源:config.php

示例14: export

 function export()
 {
     $listClass = acymailing::get('class.list');
     $db =& JFactory::getDBO();
     $fields = reset($db->getTableFields(acymailing::table('subscriber')));
     acymailing::setTitle(JText::_('ACY_EXPORT'), 'acyexport', 'data&task=export');
     $bar =& JToolBar::getInstance('toolbar');
     JToolBarHelper::custom('doexport', 'acyexport', '', JText::_('ACY_EXPORT'), false);
     $bar->appendButton('Link', 'cancel', JText::_('ACY_CANCEL'), acymailing::completeLink('subscriber'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'data-export');
     $this->assignRef('charset', $charsetType = acymailing::get('type.charset'));
     $this->assignRef('lists', $listClass->getLists());
     $this->assignRef('fields', $fields);
     if (JRequest::getInt('sessionvalues') and !empty($_SESSION['acymailing']['exportusers'])) {
         $i = 1;
         $subids = array();
         foreach ($_SESSION['acymailing']['exportusers'] as $subid) {
             $subids[] = (int) $subid;
             $i++;
             if ($i > 10) {
                 break;
             }
         }
         $db->setQuery('SELECT `name`,`email` FROM `#__acymailing_subscriber` WHERE `subid` IN (' . implode(',', $subids) . ')');
         $users = $db->loadObjectList();
         $this->assignRef('users', $users);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:29,代码来源:view.html.php

示例15: view

 function view()
 {
     $statsClass = acymailing::get('class.stats');
     $statsClass->countReturn = false;
     $statsClass->saveStats();
     JRequest::setVar('layout', 'view');
     return parent::display();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:8,代码来源:archive.php


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