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


PHP acymailing_display函数代码示例

本文整理汇总了PHP中acymailing_display函数的典型用法代码示例。如果您正苦于以下问题:PHP acymailing_display函数的具体用法?PHP acymailing_display怎么用?PHP acymailing_display使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: process

 function process()
 {
     if (!$this->isAllowed('lists', 'filter')) {
         return;
     }
     JRequest::checkToken() or die('Invalid Token');
     $filid = JRequest::getInt('filid');
     if (!empty($filid)) {
         $this->store();
     }
     $filterClass = acymailing_get('class.filter');
     $filterClass->subid = JRequest::getString('subid');
     $filterClass->execute(JRequest::getVar('filter'), JRequest::getVar('action'));
     if (!empty($filterClass->report)) {
         if (JRequest::getCmd('tmpl') == 'component') {
             echo acymailing_display($filterClass->report, 'info');
             $js = "setTimeout('redirect()',2000); function redirect(){window.top.location.href = 'index.php?option=com_acymailing&ctrl=subscriber'; }";
             $doc = JFactory::getDocument();
             $doc->addScriptDeclaration($js);
             return;
         } else {
             $app = JFactory::getApplication();
             foreach ($filterClass->report as $oneReport) {
                 $app->enqueueMessage($oneReport);
             }
         }
     }
     return $this->edit();
 }
开发者ID:unrealprojects,项目名称:journal,代码行数:29,代码来源:filter.php

示例2: store

 function store()
 {
     JRequest::checkToken() or die('Invalid Token');
     $plugin = JRequest::getString('plugin');
     $plugin = preg_replace('#[^a-zA-Z0-9]#Uis', '', $plugin);
     $body = JRequest::getVar('templatebody', '', '', 'string', JREQUEST_ALLOWRAW);
     if (empty($body)) {
         acymailing_display(JText::_('FILL_ALL'), 'error');
         return;
     }
     $pluginsFolder = ACYMAILING_MEDIA . 'plugins';
     if (!file_exists($pluginsFolder)) {
         acymailing_createDir($pluginsFolder);
     }
     try {
         jimport('joomla.filesystem.file');
         $status = JFile::write($pluginsFolder . DS . $plugin . '.php', $body);
     } catch (Exception $e) {
         $status = false;
     }
     if ($status) {
         acymailing_display(JText::_('JOOMEXT_SUCC_SAVED'), 'success');
     } else {
         acymailing_display(JText::sprintf('FAIL_SAVE', $pluginsFolder . DS . $plugin . '.php'), 'error');
     }
 }
开发者ID:Roma48,项目名称:abazherka,代码行数:26,代码来源:tag.php

示例3: continuesend

 function continuesend()
 {
     $config = acymailing_config();
     if (acymailing_level(1) && $config->get('queue_type') == 'onlyauto') {
         JRequest::setVar('tmpl', 'component');
         acymailing_display(JText::_('ACY_ONLYAUTOPROCESS'), 'warning');
         return;
     }
     $newcrontime = time() + 120;
     if ($config->get('cron_next') < $newcrontime) {
         $newValue = new stdClass();
         $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();
     JRequest::setVar('tmpl', 'component');
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:26,代码来源:send.php

示例4: 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 true;

		$statsClass = acymailing_get('class.stats');
		$statsClass->countReturn = false;
		$statsClass->mailid = $mailid;
		$statsClass->subid = $subid;
		if(!$statsClass->saveStats()) return true;

		$date = time();
		$ipClass = acymailing_get('helper.user');
		$ip = $ipClass->getIP();

		$query = 'INSERT IGNORE INTO '.acymailing_table('urlclick').' (urlid,mailid,subid,date,click,ip) VALUES ('.$urlid.','.$mailid.','.$subid.','.$date.',1,'.$this->database->Quote($ip).')';
		$this->database->setQuery($query);
		if(!$this->database->query()){
			acymailing_display($this->database->getErrorMsg(),'error');
			exit;
		}

		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();

		$this->database->setQuery('UPDATE #__acymailing_subscriber SET lastclick_date = '.time().' WHERE subid = '.$subid);
		$this->database->query();

		$filterClass = acymailing_get('class.filter');
		$filterClass->subid = $subid;
		$filterClass->trigger('clickurl');

		$classGeoloc = acymailing_get('class.geolocation');
		$classGeoloc->saveGeolocation('clic', $subid);

		JPluginHelper::importPlugin('acymailing');
		$dispatcher = JDispatcher::getInstance();
		$dispatcher->trigger('onAcyClickLink',array($subid,$mailid,$urlid));

		return true;
	}
开发者ID:utopszkij,项目名称:lmp,代码行数:57,代码来源:urlclick.php

示例5: listing

 function listing()
 {
     if (!acymailing_level(3)) {
         $acyToolbar = acymailing::get('helper.toolbar');
         $acyToolbar->setTitle(JText::_('EXTRA_FIELDS'), 'fields');
         $acyToolbar->display();
         acymailing_display(JText::_('ACY_CUSTOMFIELDS_UPGRADE') . '<br /><br /><a target="_blank" href="' . ACYMAILING_REDIRECT . 'acymailing-features">' . JText::_('ACY_FEATURES') . '</a>', 'info');
         return;
     }
     return parent::listing();
 }
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:11,代码来源:fields.php

示例6: update

 function update()
 {
     $config = acymailing_config();
     if (!acymailing_isAllowed($config->get('acl_config_manage', 'all'))) {
         acymailing_display(JText::_('ACY_NOTALLOWED'), 'error');
         return false;
     }
     acymailing_setTitle(JText::_('UPDATE_ABOUT'), 'acyupdate', 'update');
     $bar =& JToolBar::getInstance('toolbar');
     $bar->appendButton('Link', 'back', JText::_('ACY_CLOSE'), acymailing_completeLink('dashboard'));
     return $this->_iframe(ACYMAILING_UPDATEURL . 'update');
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:12,代码来源:update.php

示例7: update

 function update()
 {
     $config = acymailing_config();
     if (!acymailing_isAllowed($config->get('acl_config_manage', 'all'))) {
         acymailing_display(JText::_('ACY_NOTALLOWED'), 'error');
         return false;
     }
     $acyToolbar = acymailing::get('helper.toolbar');
     $acyToolbar->setTitle(JText::_('UPDATE_ABOUT'), 'update');
     $acyToolbar->link(acymailing_completeLink('dashboard'), JText::_('ACY_CLOSE'), 'cancel');
     $acyToolbar->display();
     return $this->_iframe(ACYMAILING_UPDATEURL . 'update');
 }
开发者ID:Roma48,项目名称:abazherka,代码行数:13,代码来源:update.php

示例8: setTemplate

    function setTemplate($id)
    {
        if (empty($id)) {
            return;
        }
        $app = JFactory::getApplication();
        $cssurl = rtrim(JURI::root(), '/') . '/' . ($app->isAdmin() ? 'administrator/index.php?option=com_acymailing&ctrl=template' : 'index.php?option=com_acymailing&ctrl=fronttemplate') . '&task=load&tempid=' . $id . '&time=' . time();
        $name = $this->myEditor->get('_name');
        $classTemplate = acymailing_get('class.template');
        $filepath = $classTemplate->createTemplateFile($id);
        if ($name == 'tinymce') {
            $this->editorConfig['content_css_custom'] = $cssurl;
            $this->editorConfig['content_css'] = '0';
        } elseif ($name == 'jckeditor' || $name == 'fckeditor') {
            $this->editorConfig['content_css_custom'] = $filepath;
            $this->editorConfig['content_css'] = '0';
            $this->editorConfig['editor_css'] = '0';
        } else {
            $fileurl = 'media/com_acymailing/templates/css/template_' . $id . '.css?time=' . time();
            $this->editorConfig['custom_css_url'] = $cssurl;
            $this->editorConfig['custom_css_file'] = $fileurl;
            $this->editorConfig['custom_css_path'] = $filepath;
            JRequest::setVar('acycssfile', $fileurl);
            if ($name == 'jce') {
                $jcepath = ACYMAILING_ROOT . 'administrator' . DS . 'components' . DS . 'com_jce' . DS . 'models' . DS;
                if (file_exists($jcepath . 'editor.php')) {
                    jimport('joomla.filesystem.file');
                    $content = JFile::read($jcepath . 'editor.php');
                    if (!strpos($content, 'acycssfile')) {
                        $acycode = '
			if(JRequest::getCmd(\'option\') == \'com_acymailing\'){
				$acycssfile = JRequest::getString(\'acycssfile\');
				if(!empty($acycssfile)) $settings[\'content_css\'] = $acycssfile;
			}
			';
                        $content = preg_replace('#(\\$settings\\[\'content_css\'\\][^=]*= *[^;]*;)#', '$1' . $acycode, $content);
                        if (strpos($content, 'acycssfile')) {
                            if (!file_exists($jcepath . 'editor_backup.php')) {
                                if (JFile::copy($jcepath . 'editor.php', $jcepath . 'editor_backup.php') !== true) {
                                    acymailing_display('Could not copy the file from ' . $jcepath . 'editor.php to ' . $jcepath . 'editor_backup.php', 'error');
                                }
                            }
                            if (JFile::write($jcepath . 'editor.php', $content) !== true) {
                                acymailing_display('Could not write in ' . $jcepath . 'editor.php <br /> Please make sure this folder is writable', 'error');
                            }
                        }
                    }
                }
            }
        }
    }
开发者ID:utopszkij,项目名称:lmp,代码行数:51,代码来源:editor.php

示例9: language

 function language()
 {
     $this->setLayout('default');
     $code = JRequest::getCmd('code');
     if (empty($code)) {
         acymailing_display('Code not specified', 'error');
         return;
     }
     $file = new stdClass();
     $file->name = $code;
     $path = JLanguage::getLanguagePath(JPATH_ROOT) . DS . $code . DS . $code . '.com_acymailing.ini';
     $file->path = $path;
     jimport('joomla.filesystem.file');
     $showLatest = true;
     $loadLatest = false;
     if (JFile::exists($path)) {
         $file->content = JFile::read($path);
         if (empty($file->content)) {
             acymailing_display('File not found : ' . $path, 'error');
         }
     } else {
         $loadLatest = true;
         acymailing_enqueueMessage(JText::_('LOAD_ENGLISH_1') . '<br />' . JText::_('LOAD_ENGLISH_2') . '<br />' . JText::_('LOAD_ENGLISH_3'), 'info');
         $file->content = JFile::read(JLanguage::getLanguagePath(JPATH_ROOT) . DS . 'en-GB' . DS . 'en-GB.com_acymailing.ini');
     }
     $custompath = JLanguage::getLanguagePath(JPATH_ROOT) . DS . $code . DS . $code . '.com_acymailing_custom.ini';
     if (JFile::exists($custompath)) {
         $file->customcontent = JFile::read($custompath);
     }
     if ($loadLatest or JRequest::getCmd('task') == 'latest') {
         if (file_exists(JPATH_ROOT . DS . 'language' . DS . $code)) {
             $doc = JFactory::getDocument();
             $doc->addScript(ACYMAILING_UPDATEURL . 'languageload&code=' . JRequest::getCmd('code'));
         } else {
             acymailing_enqueueMessage('The specified language "' . htmlspecialchars($code, ENT_COMPAT, 'UTF-8') . '" is not installed on your site', 'warning');
         }
         $showLatest = false;
     } elseif (JRequest::getCmd('task') == 'save') {
         $showLatest = false;
     }
     if (JRequest::getString('tmpl') == 'component') {
         $acyToolbar = acymailing::get('helper.toolbar');
         $acyToolbar->save();
         $acyToolbar->custom('share', JText::_('SHARE'), 'share', false);
         $acyToolbar->setTitle(JText::_('ACY_FILE') . ' : ' . $this->escape($file->name));
         $acyToolbar->topfixed = false;
         $acyToolbar->display();
     }
     $this->assignRef('showLatest', $showLatest);
     $this->assignRef('file', $file);
 }
开发者ID:Roma48,项目名称:abazherka,代码行数:51,代码来源:view.html.php

示例10: unsubchart

 function unsubchart()
 {
     $mailid = JRequest::getInt('mailid');
     if (empty($mailid)) {
         return;
     }
     $db = JFactory::getDBO();
     $db->setQuery('SELECT * FROM #__acymailing_history WHERE mailid = ' . intval($mailid) . ' AND action="unsubscribed" LIMIT 10000');
     $entries = $db->loadObjectList();
     if (empty($entries)) {
         acymailing_display("No data recorded for that Newsletter", 'warning');
         return;
     }
     $unsubreasons = array();
     $unsubreasons['NO_REASON'] = 0;
     foreach ($entries as $oneEntry) {
         if (empty($oneEntry->data)) {
             $unsubreasons['NO_REASON']++;
             continue;
         }
         $allReasons = explode("\n", $oneEntry->data);
         $added = false;
         foreach ($allReasons as $oneReason) {
             list($reason, $value) = explode('::', $oneReason);
             if (empty($value)) {
                 continue;
             }
             $unsubreasons[$value] = @$unsubreasons[$value] + 1;
             $added = true;
         }
         if (!$added) {
             $unsubreasons['NO_REASON']++;
         }
     }
     $finalReasons = array();
     foreach ($unsubreasons as $oneReason => $total) {
         $name = $oneReason;
         if (preg_match('#^[A-Z_]*$#', $name)) {
             $name = JText::_($name);
         }
         $finalReasons[$name] = $total;
     }
     arsort($finalReasons);
     $doc = JFactory::getDocument();
     $doc->addScript(((empty($_SERVER['HTTPS']) or strtolower($_SERVER['HTTPS']) != "on") ? 'http://' : 'https://') . "www.google.com/jsapi");
     $this->assignRef('unsubreasons', $finalReasons);
     if (JRequest::getCmd('export')) {
         $exportHelper = acymailing_get('helper.export');
         $exportHelper->exportOneData($finalReasons, 'unsub_' . JRequest::getInt('mailid'));
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:51,代码来源:view.html.php

示例11: cancelNewsletter

 function cancelNewsletter()
 {
     if (!$this->isAllowed($this->aclCat, 'delete')) {
         return;
     }
     JRequest::checkToken() || JRequest::checkToken('get') || die('Invalid token');
     $mailid = JRequest::getInt('mailid', 0);
     if (empty($mailid)) {
         acymailing_display('Mail id not found', 'error');
         return;
     }
     $queueClass = acymailing_get('class.queue');
     acymailing_display(JText::sprintf('SUCC_DELETE_ELEMENTS', $queueClass->delete(array('a.mailid = ' . $mailid))), 'info');
 }
开发者ID:utopszkij,项目名称:lmp,代码行数:14,代码来源:queue.php

示例12: save

	function save(){
		if(!$this->isAllowed($this->aclCat,'manage')) return;
		JRequest::checkToken() or die( 'Invalid Token' );

		$class = acymailing_get('class.url');
		$status = $class->saveForm();
		if($status){
			acymailing_display(JText::_( 'JOOMEXT_SUCC_SAVED'),'success');
			return true;
		}else{
			acymailing_display(JText::_( 'ERROR_SAVING'),'success');
		}

		return $this->edit();
	}
开发者ID:utopszkij,项目名称:lmp,代码行数:15,代码来源:statsurl.php

示例13: saveStats

 function saveStats()
 {
     $subid = empty($this->subid) ? JRequest::getInt('subid') : $this->subid;
     $mailid = empty($this->mailid) ? JRequest::getInt('mailid') : $this->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` = ' . intval($subid) . ' LIMIT 1');
     $actual = $db->loadObject();
     if (empty($actual)) {
         return false;
     }
     $userHelper = acymailing_get('helper.user');
     $this->database->setQuery('UPDATE #__acymailing_subscriber SET `lastopen_date` = ' . time() . ', `lastopen_ip` = ' . $this->database->Quote($userHelper->getIP()) . ' WHERE `subid` = ' . intval($subid));
     $this->database->query();
     $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;
     }
     $ipClass = acymailing_get('helper.user');
     $ip = $ipClass->getIP();
     $db->setQuery('UPDATE ' . acymailing_table('userstats') . ' SET open = ' . $open . ', opendate = ' . time() . ', `ip`= ' . $db->Quote($ip) . ' WHERE mailid = ' . $mailid . ' AND subid = ' . $subid . ' LIMIT 1');
     if (!$db->query()) {
         acymailing_display($db->getErrorMsg(), 'error');
         exit;
     }
     $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');
     }
     $classGeoloc = acymailing_get('class.geolocation');
     $classGeoloc->saveGeolocation('open', $subid);
     JPluginHelper::importPlugin('acymailing');
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onAcyOpenMail', array($subid, $mailid));
     return true;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:48,代码来源:stats.php

示例14: save

 function save($configObject)
 {
     $query = 'REPLACE INTO ' . acymailing_table('config') . ' (namekey,value) VALUES ';
     $params = array();
     $i = 0;
     foreach ($configObject as $namekey => $value) {
         if (strpos($namekey, 'password') !== false && !empty($value) && trim($value, '*') == '') {
             continue;
         }
         $i++;
         if (is_array($value)) {
             $value = implode(',', $value);
         }
         if ($i > 100) {
             $query .= implode(',', $params);
             $this->database->setQuery($query);
             if (!$this->database->query()) {
                 return false;
             }
             $i = 0;
             $query = 'REPLACE INTO ' . acymailing_table('config') . ' (namekey,value) VALUES ';
             $params = array();
         }
         if (empty($this->values[$namekey])) {
             $this->values[$namekey] = new stdClass();
         }
         $this->values[$namekey]->value = $value;
         $params[] = '(' . $this->database->Quote(strip_tags($namekey)) . ',' . $this->database->Quote(strip_tags($value)) . ')';
     }
     if (empty($params)) {
         return true;
     }
     $query .= implode(',', $params);
     $this->database->setQuery($query);
     try {
         $status = $this->database->query();
     } catch (Exception $e) {
         $status = false;
     }
     if (!$status) {
         acymailing_display(isset($e) ? $e->getMessage() : substr(strip_tags($this->database->getErrorMsg()), 0, 200) . '...', 'error');
     }
     return $status;
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:44,代码来源:cpanel.php

示例15: send

 function send()
 {
     if (!$this->isAllowed('newsletters', 'send')) {
         return;
     }
     JRequest::checkToken() or die('Invalid Token');
     JRequest::setVar('tmpl', 'component');
     $mailid = acymailing_getCID('mailid');
     if (empty($mailid)) {
         exit;
     }
     $user = JFactory::getUser();
     $time = time();
     $queueClass = acymailing_get('class.queue');
     $queueClass->onlynew = JRequest::getInt('onlynew');
     $queueClass->mindelay = JRequest::getInt('mindelay');
     $totalSub = $queueClass->queue($mailid, $time);
     if (empty($totalSub)) {
         acymailing_display(JText::_('NO_RECEIVER'), 'warning');
         return;
     }
     $mailObject = new stdClass();
     $mailObject->senddate = $time;
     $mailObject->published = 1;
     $mailObject->mailid = $mailid;
     $mailObject->sentby = $user->id;
     $db = JFactory::getDBO();
     $db->updateObject(acymailing_table('mail'), $mailObject, 'mailid');
     $config =& acymailing_config();
     $queueType = $config->get('queue_type');
     if ($queueType == 'onlyauto') {
         $messages = array();
         $messages[] = JText::sprintf('ADDED_QUEUE', $totalSub);
         $messages[] = JText::_('AUTOSEND_CONFIRMATION');
         acymailing_display($messages, 'success');
         return;
     } else {
         JRequest::setVar('totalsend', $totalSub);
         $app = JFactory::getApplication();
         $app->redirect(acymailing_completeLink('send&task=continuesend&mailid=' . $mailid . '&totalsend=' . $totalSub, true, true));
         exit;
     }
 }
开发者ID:unrealprojects,项目名称:journal,代码行数:43,代码来源:send.php


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