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


PHP acymailing_table函数代码示例

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


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

示例1: save

 function save($configObject)
 {
     $query = 'REPLACE INTO ' . acymailing_table('config') . ' (namekey,value) VALUES ';
     $params = array();
     $i = 0;
     foreach ($configObject as $namekey => $value) {
         $i++;
         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);
     return $this->database->query();
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:30,代码来源:cpanel.php

示例2: get

 function get($urlid, $default = null)
 {
     $column = is_numeric($urlid) ? 'urlid' : 'url';
     $query = 'SELECT * FROM ' . acymailing_table('url') . ' WHERE ' . $column . ' = ' . $this->database->Quote($urlid) . ' LIMIT 1';
     $this->database->setQuery($query);
     return $this->database->loadObject();
 }
开发者ID:utopszkij,项目名称:lmp,代码行数:7,代码来源:url.php

示例3: 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:andreassetiawanhartanto,项目名称:PDKKI,代码行数:35,代码来源:stats.php

示例4: acymailingtagsubscriber_show

 function acymailingtagsubscriber_show()
 {
     $descriptions['subid'] = JText::_('SUBSCRIBER_ID');
     $descriptions['email'] = JText::_('SUBSCRIBER_EMAIL');
     $descriptions['name'] = JText::_('SUBSCRIBER_NAME');
     $descriptions['userid'] = JText::_('SUBSCRIBER_USERID');
     $descriptions['ip'] = JText::_('SUBSCRIBER_IP');
     $descriptions['created'] = JText::_('SUBSCRIBER_CREATED');
     $text = '<table class="adminlist" cellpadding="1">';
     $db =& JFactory::getDBO();
     $tableInfos = $db->getTableFields(acymailing_table('subscriber'));
     $others = array();
     $others['{subtag:name|part:first|ucfirst}'] = array('name' => JText::_('SUBSCRIBER_FIRSTPART'), 'desc' => JText::_('SUBSCRIBER_FIRSTPART') . ' ' . JText::_('SUBSCRIBER_FIRSTPART_DESC'));
     $others['{subtag:name|part:last|ucfirst}'] = array('name' => JText::_('SUBSCRIBER_LASTPART'), 'desc' => JText::_('SUBSCRIBER_LASTPART') . ' ' . JText::_('SUBSCRIBER_LASTPART_DESC'));
     $k = 0;
     $fields = reset($tableInfos);
     foreach ($fields as $fieldname => $oneField) {
         if (!isset($descriptions[$fieldname]) and $oneField == 'tinyint') {
             continue;
         }
         $type = '';
         if ($fieldname == 'created') {
             $type = '|type:time';
         }
         $text .= '<tr style="cursor:pointer" class="row' . $k . '" onclick="setTag(\'{subtag:' . $fieldname . $type . '}\');insertTag();" ><td class="acytdcheckbox"></td><td>' . $fieldname . '</td><td>' . @$descriptions[$fieldname] . '</td></tr>';
         $k = 1 - $k;
     }
     foreach ($others as $tagname => $tag) {
         $text .= '<tr style="cursor:pointer" class="row' . $k . '" onclick="setTag(\'' . $tagname . '\');insertTag();" ><td class="acytdcheckbox"></td><td>' . $tag['name'] . '</td><td>' . $tag['desc'] . '</td></tr>';
         $k = 1 - $k;
     }
     $text .= '</table>';
     echo $text;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:34,代码来源:tagsubscriber.php

示例5: insert

 function insert($subid, $action, $data = array(), $mailid = 0)
 {
     $user =& JFactory::getUser();
     if (!empty($user->id)) {
         $data[] = 'EXECUTED_BY::' . $user->id . ' ( ' . $user->username . ' )';
     }
     $history = new stdClass();
     $history->subid = intval($subid);
     $history->action = strip_tags($action);
     $history->data = implode("\n", $data);
     if (strlen($history->data) > 100000) {
         $history->data = substr($history->data, 0, 10000);
     }
     $history->date = time();
     $history->mailid = $mailid;
     $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:andreassetiawanhartanto,项目名称:PDKKI,代码行数:29,代码来源:acyhistory.php

示例6: get

 function get($ruleid, $default = null)
 {
     $query = 'SELECT * FROM ' . acymailing_table('rules') . ' WHERE `ruleid` = ' . intval($ruleid) . ' LIMIT 1';
     $this->database->setQuery($query);
     $rule = $this->database->loadObject();
     return $this->_prepareRule($rule);
 }
开发者ID:sumithMadhushan,项目名称:joomla-project,代码行数:7,代码来源:rules.php

示例7: 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

示例8: 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);
         $listSubClass = acymailing_get('class.listsub');
         $mailer->addParam('user:subscription', $listSubClass->getSubscriptionString($subscriber->subid));
         $mailer->addParam('user:subscriptiondates', $listSubClass->getSubscriptionString($subscriber->subid, true));
         $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->forceConf || ($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 = acymailing_loadResultArray($db);
         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->trackEmail = true;
                 $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));
 }
开发者ID:Roma48,项目名称:abazherka,代码行数:54,代码来源:list.php

示例9: detailstatsbounceType

 function detailstatsbounceType()
 {
     $query = 'SELECT DISTINCT bouncerule FROM ' . acymailing_table('userstats') . ' WHERE bouncerule IS NOT NULL';
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $bouncerules = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', 0, JText::_('ALL_RULES'));
     foreach ($bouncerules as $oneRule) {
         $this->values[] = JHTML::_('select.option', $oneRule->bouncerule, $oneRule->bouncerule);
     }
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:12,代码来源:detailstatsbounce.php

示例10: queuemailType

 function queuemailType()
 {
     $query = 'SELECT count(distinct a.subid) as totalsub, b.subject, a.mailid FROM ' . acymailing_table('queue') . ' as a';
     $query .= ' LEFT JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid GROUP BY a.mailid ORDER BY b.subject ASC';
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $emails = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('ALL_EMAILS'));
     foreach ($emails as $oneMail) {
         $this->values[] = JHTML::_('select.option', $oneMail->mailid, $oneMail->subject . ' ( ' . $oneMail->totalsub . ' )');
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:13,代码来源:queuemail.php

示例11: detailstatsmailType

 function detailstatsmailType()
 {
     $query = 'SELECT b.subject, a.mailid FROM ' . acymailing_table('stats') . ' as a';
     $query .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid ORDER BY a.senddate DESC LIMIT 200';
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $emails = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('ALL_EMAILS'));
     foreach ($emails as $oneMail) {
         $this->values[] = JHTML::_('select.option', $oneMail->mailid, $oneMail->subject);
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:13,代码来源:detailstatsmail.php

示例12: welcomeType

 function welcomeType()
 {
     $query = 'SELECT `subject`, `mailid` FROM ' . acymailing_table('mail') . ' WHERE `type`= \'welcome\'';
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $messages = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('NO_WELCOME_MESSAGE'));
     $this->values[] = JHTML::_('select.option', '-1', JText::_('LATEST_NEWSLETTER'));
     foreach ($messages as $oneMessage) {
         $this->values[] = JHTML::_('select.option', $oneMessage->mailid, '[' . JText::_('ACY_ID') . ' ' . $oneMessage->mailid . '] ' . $oneMessage->subject);
     }
 }
开发者ID:utopszkij,项目名称:lmp,代码行数:13,代码来源:welcome.php

示例13: urlmailType

	function urlmailType(){
		$query = 'SELECT b.subject,b.mailid,count(distinct a.urlid) as totalmail FROM '.acymailing_table('urlclick').' as a';
		$query .= ' JOIN '.acymailing_table('mail').' as b ON a.mailid = b.mailid';
		$query .= ' GROUP BY a.mailid ORDER BY a.mailid DESC';
		$db = JFactory::getDBO();
		$db->setQuery($query);
		$mails = $db->loadObjectList();

		$this->values = array();
		$this->values[] = JHTML::_('select.option', '0', JText::_('ALL_EMAILS') );
		foreach($mails as $oneMail){
			$this->values[] = JHTML::_('select.option', $oneMail->mailid, $oneMail->subject.' ( '.$oneMail->totalmail.' )' );
		}
	}
开发者ID:utopszkij,项目名称:lmp,代码行数:14,代码来源:urlmail.php

示例14: listcreatorType

 function listcreatorType()
 {
     $query = 'SELECT b.name,a.userid,count(distinct a.listid) as total FROM ' . acymailing_table('list') . ' as a ';
     $query .= ' LEFT JOIN ' . acymailing_table('users', false) . ' as b on a.userid = b.id WHERE a.type = \'list\' GROUP BY a.userid ORDER BY b.name ASC';
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $creators = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('ALL_CREATORS'));
     foreach ($creators as $oneCreator) {
         if (!empty($oneCreator->userid)) {
             $this->values[] = JHTML::_('select.option', $oneCreator->userid, $oneCreator->name . ' ( ' . $oneCreator->total . ' )');
         }
     }
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:15,代码来源:listcreator.php

示例15: unsubType

 function unsubType()
 {
     $query = 'SELECT `subject`, `mailid` FROM ' . acymailing_table('mail') . ' WHERE `type`= \'unsub\'';
     $db = JFactory::getDBO();
     $db->setQuery($query);
     $messages = $db->loadObjectList();
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('NO_UNSUB_MESSAGE'));
     foreach ($messages as $oneMessage) {
         $this->values[] = JHTML::_('select.option', $oneMessage->mailid, '[' . JText::_('ACY_ID') . ' ' . $oneMessage->mailid . '] ' . $oneMessage->subject);
     }
     $js = "function changeMessage(idField,value){\r\n\t\t\tlinkEdit = idField+'_edit';\r\n\t\t\tif(value>0){\r\n\t\t\t\twindow.document.getElementById(linkEdit).href = 'index.php?option=com_acymailing&tmpl=component&ctrl=email&task=edit&mailid='+value;\r\n\t\t\t\twindow.document.getElementById(linkEdit).style.display = 'inline';\r\n\t\t\t}else{\r\n\t\t\t\twindow.document.getElementById(linkEdit).style.display = 'none';\r\n\t\t\t}\r\n\t\t}";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
 }
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:15,代码来源:unsub.php


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