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


PHP acymailing::table方法代码示例

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


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

示例1: getMails

 public static function getMails()
 {
     $db = JFactory::getDbo();
     $query = "SELECT * FROM " . acymailing::table('mail') . "  WHERE published = 1 AND visible = 1";
     $db->setQuery($query);
     return $db->loadObjectList();
 }
开发者ID:marsa1985,项目名称:kazabiz,代码行数:7,代码来源:EnmasseHelperACYIntegration.php

示例2: listing

 function listing()
 {
     $app =& JFactory::getApplication();
     $pageInfo = null;
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
     $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'a.listid', 'cmd');
     $pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
     $pageInfo->search = $app->getUserStateFromRequest($paramBase . ".search", 'search', '', 'string');
     $pageInfo->search = JString::strtolower($pageInfo->search);
     $selectedCreator = $app->getUserStateFromRequest($paramBase . "filter_creator", 'filter_creator', 0, 'int');
     $pageInfo->limit->value = $app->getUserStateFromRequest($paramBase . '.list_limit', 'limit', $app->getCfg('list_limit'), 'int');
     $pageInfo->limit->start = $app->getUserStateFromRequest($paramBase . '.limitstart', 'limitstart', 0, 'int');
     $database =& JFactory::getDBO();
     $filters = array();
     if (!empty($pageInfo->search)) {
         $searchVal = '\'%' . $database->getEscaped($pageInfo->search) . '%\'';
         $filters[] = "a.name LIKE {$searchVal} OR a.description LIKE {$searchVal} OR a.listid LIKE {$searchVal}";
     }
     $filters[] = 'a.type = \'campaign\'';
     if (!empty($selectedCreator)) {
         $filters[] = 'a.userid = ' . $selectedCreator;
     }
     $query = 'SELECT SQL_CALC_FOUND_ROWS a.*, d.name as creatorname, d.username, d.email';
     $query .= ' FROM ' . acymailing::table('list') . ' as a';
     $query .= ' LEFT JOIN ' . acymailing::table('users', false) . ' as d on a.userid = d.id';
     $query .= ' WHERE (' . implode(') AND (', $filters) . ') ';
     $query .= ' GROUP BY a.listid';
     if (!empty($pageInfo->filter->order->value)) {
         $query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
     }
     $database->setQuery($query, $pageInfo->limit->start, $pageInfo->limit->value);
     $rows = $database->loadObjectList();
     $database->setQuery('SELECT FOUND_ROWS()');
     $pageInfo->elements->total = $database->loadResult();
     if (!empty($pageInfo->search)) {
         $rows = acymailing::search($pageInfo->search, $rows);
     }
     $pageInfo->elements->page = count($rows);
     $followupClass = acymailing::get('class.listmail');
     if (!empty($rows)) {
         foreach ($rows as $id => $onerow) {
             $rows[$id]->followup = $followupClass->getFollowup($onerow->listid);
         }
     }
     jimport('joomla.html.pagination');
     $pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
     acymailing::setTitle(JText::_('CAMPAIGN'), 'campaign', 'campaign');
     JToolBarHelper::addNew();
     JToolBarHelper::editList();
     JToolBarHelper::deleteList(JText::_('VALIDDELETEITEMS', true));
     JToolBarHelper::divider();
     $bar =& JToolBar::getInstance('toolbar');
     $bar->appendButton('Pophelp', 'campaign-listing');
     $bar->appendButton('Link', 'acymailing', JText::_('JOOMEXT_CPANEL'), acymailing::completeLink('dashboard'));
     $this->assignRef('rows', $rows);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('toggleClass', acymailing::get('helper.toggle'));
     $this->assignRef('delay', acymailing::get('type.delaydisp'));
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:60,代码来源:view.html.php

示例3: 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 != 'varchar') {
             continue;
         }
         $type = '';
         if ($fieldname == 'created') {
             $type = '|type:time';
         }
         $text .= '<tr style="cursor:pointer" class="row' . $k . '" onclick="setTag(\'{subtag:' . $fieldname . $type . '}\');insertTag();" ><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>' . $tag['name'] . '</td><td>' . $tag['desc'] . '</td></tr>';
         $k = 1 - $k;
     }
     $text .= '</table>';
     echo $text;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:34,代码来源:tagsubscriber.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 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

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

示例6: get

 function get($urlid)
 {
     $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:rlee1962,项目名称:diylegalcenter,代码行数:7,代码来源:url.php

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

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

示例9: save

 function save($list)
 {
     if (empty($list->listid)) {
         if (empty($list->userid)) {
             $user =& JFactory::getUser();
             $list->userid = $user->id;
         }
         if (empty($list->alias)) {
             $list->alias = $list->name;
         }
     }
     if (isset($list->alias)) {
         if (empty($list->alias)) {
             $list->alias = $list->name;
         }
         $list->alias = JFilterOutput::stringURLSafe(trim($list->alias));
     }
     if (empty($list->listid)) {
         $status = $this->database->insertObject(acymailing::table('list'), $list);
     } else {
         $status = $this->database->updateObject(acymailing::table('list'), $list, 'listid');
     }
     if ($status) {
         return empty($list->listid) ? $this->database->insertid() : $list->listid;
     }
     return false;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:27,代码来源:list.php

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

示例11: listsType

 function listsType()
 {
     $query = 'SELECT name,listid,color,description FROM ' . acymailing::table('list') . ' WHERE type = \'list\' ORDER BY ordering ASC';
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->data = $db->loadObjectList('listid');
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('ALL_LISTS'));
     foreach ($this->data as $onelist) {
         $this->values[] = JHTML::_('select.option', $onelist->listid, $onelist->name);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:lists.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'));
     foreach ($messages as $oneMessage) {
         $this->values[] = JHTML::_('select.option', $oneMessage->mailid, '[' . $oneMessage->mailid . '] ' . $oneMessage->subject);
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:12,代码来源:welcome.php

示例13: save

 function save($configObject)
 {
     $query = 'REPLACE INTO ' . acymailing::table('config') . ' (namekey,value) VALUES ';
     $params = array();
     foreach ($configObject as $namekey => $value) {
         $this->values[$namekey]->value = $value;
         $params[] = '(' . $this->database->Quote(strip_tags($namekey)) . ',' . $this->database->Quote(strip_tags($value, '<br/>')) . ')';
     }
     $query .= implode(',', $params);
     $this->database->setQuery($query);
     return $this->database->query();
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:12,代码来源:config.php

示例14: 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:bizanto,项目名称:Hooked,代码行数:13,代码来源:queuemail.php

示例15: detailstatsmailType

 function detailstatsmailType()
 {
     $query = 'SELECT DISTINCT b.subject, a.mailid FROM ' . acymailing::table('userstats') . ' as a';
     $query .= ' LEFT JOIN ' . acymailing::table('mail') . ' as b on a.mailid = b.mailid ORDER BY a.senddate DESC';
     $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:bizanto,项目名称:Hooked,代码行数:13,代码来源:detailstatsmail.php


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