本文整理汇总了PHP中acymailing::completeLink方法的典型用法代码示例。如果您正苦于以下问题:PHP acymailing::completeLink方法的具体用法?PHP acymailing::completeLink怎么用?PHP acymailing::completeLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acymailing
的用法示例。
在下文中一共展示了acymailing::completeLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export
function export()
{
$selectedMail = JRequest::getInt('filter_mail', 0);
$selectedStatus = JRequest::getString('filter_status', '');
$filters = array();
if (!empty($selectedMail)) {
$filters[] = 'a.mailid = ' . $selectedMail;
}
if (!empty($selectedStatus)) {
if ($selectedStatus == 'bounce') {
$filters[] = 'a.bounce > 0';
} elseif ($selectedStatus == 'open') {
$filters[] = 'a.open > 0';
} elseif ($selectedStatus == 'notopen') {
$filters[] = 'a.open < 1';
} elseif ($selectedStatus == 'failed') {
$filters[] = 'a.fail > 0';
}
}
$query = 'SELECT `subid` FROM `#__acymailing_userstats` as a ';
if (!empty($filters)) {
$query .= ' WHERE (' . implode(') AND (', $filters) . ')';
}
$db =& JFactory::getDBO();
$db->setQuery($query);
$_SESSION['acymailing']['exportusers'] = $db->loadResultArray();
$this->setRedirect(acymailing::completeLink('data&task=export&sessionvalues=1', false, true));
}
示例2: 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);
}
}
示例3: 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();
}
示例4: 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'));
}
示例5: massremove
function massremove()
{
JRequest::checkToken() or die('Invalid Token');
$importHelper = acymailing::get('helper.import');
if (!$importHelper->mass(false)) {
return $this->addusers();
}
$this->setRedirect(acymailing::completeLink('list', false, true));
}
示例6: doimport
function doimport()
{
JRequest::checkToken() or die('Invalid Token');
$function = JRequest::getCmd('importfrom');
$importHelper = acymailing::get('helper.import');
if (!$importHelper->{$function}()) {
return $this->import();
}
$this->setRedirect(acymailing::completeLink('subscriber', false, true));
}
示例7: _quickiconButton
function _quickiconButton($link, $image, $text, $description, $level)
{
$url = acymailing::level($level) ? 'onclick="document.location.href=\'' . acymailing::completeLink($link) . '\';"' : '';
$html = '<div style="float:left;width: 100%;" ' . $url . ' class="icon"><a href="';
$html .= acymailing::level($level) ? acymailing::completeLink($link) : '#';
$html .= '"><table width="100%"><tr><td style="text-align: center;" width="120px">';
$html .= '<span class="icon-48-' . $image . '" style="background-repeat:no-repeat;background-position:center;height:48px" title="' . $text . '"> </span>';
$html .= '<span>' . $text . '</span></td><td>' . $description . '</td></tr></table></a>';
$html .= '</div>';
return $html;
}
示例8: 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'), 'install', 'update');
$bar =& JToolBar::getInstance('toolbar');
$bar->appendButton('Link', 'back', JText::_('ACY_CLOSE'), acymailing::completeLink('dashboard'));
return $this->_iframe(ACYMAILING_UPDATEURL . 'update');
}
示例9: export
function export()
{
if (!$this->isAllowed('subscriber', 'export')) {
return;
}
$cids = JRequest::getVar('cid');
if (!empty($cids)) {
$_SESSION['acymailing']['exportusers'] = $cids;
$this->setRedirect(acymailing::completeLink('data&task=export&sessionvalues=1', false, true));
} else {
$this->setRedirect(acymailing::completeLink('data&task=export', false, true));
}
}
示例10: display
function display($tpl = null)
{
global $Itemid;
$db =& JFactory::getDBO();
$app =& JFactory::getApplication();
$document =& JFactory::getDocument();
$params =& $app->getParams();
$feedEmail = @$app->getCfg('feed_email') ? $app->getCfg('feed_email') : 'author';
$siteEmail = $app->getCfg('mailfrom');
$menus =& JSite::getMenu();
$menu = $menus->getActive();
if (empty($menu) and !empty($Itemid)) {
$menus->setActive($Itemid);
$menu = $menus->getItem($Itemid);
}
$myItem = empty($Itemid) ? '' : '&Itemid=' . $Itemid;
if (is_object($menu)) {
jimport('joomla.html.parameter');
$menuparams = new JParameter($menu->params);
}
$listid = acymailing::getCID('listid');
if (empty($listid) and !empty($menuparams)) {
$listid = $menuparams->get('listid');
}
$document->link = acymailing::completeLink('archive&listid=' . intval($listid));
$listClass = acymailing::get('class.list');
if (empty($listid)) {
return JError::raiseError(404, 'Mailing List not found');
}
$oneList = $listClass->get($listid);
if (empty($oneList->listid)) {
return JError::raiseError(404, 'Mailing List not found : ' . $listid);
}
if (!acymailing::isAllowed($oneList->access_sub) || !$oneList->published || !$oneList->visible) {
return JError::raiseError(404, JText::_('ACY_NOTALLOWED'));
}
$filters = array();
$filters[] = 'a.type = \'news\'';
$filters[] = 'a.published = 1';
$filters[] = 'a.visible = 1';
$filters[] = 'c.listid = ' . $oneList->listid;
$query = 'SELECT a.*';
$query .= ' FROM ' . acymailing::table('listmail') . ' as c';
$query .= ' LEFT JOIN ' . acymailing::table('mail') . ' as a on a.mailid = c.mailid ';
$query .= ' WHERE (' . implode(') AND (', $filters) . ')';
$query .= ' ORDER BY a.senddate DESC, c.mailid DESC';
$db->setQuery($query, 0, $app->getCfg('feed_limit'));
$rows = $db->loadObjectList();
foreach ($rows as $row) {
}
}
示例11: view
function view()
{
$mailid = acymailing::getCID('mailid');
if (empty($mailid)) {
$db =& JFactory::getDBO();
$query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l LEFT JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid LEFT JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid';
$query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1';
if (!empty($listid)) {
$query .= ' AND l.`listid` = ' . (int) $listid;
}
$query .= ' ORDER BY m.`mailid` DESC LIMIT 1';
$db->setQuery($query);
$mailid = $db->loadResult();
if (empty($mailid)) {
return JError::raiseError(404, 'Newsletter not found');
}
}
$access_sub = true;
$mailClass = acymailing::get('helper.mailer');
$oneMail = $mailClass->load($mailid);
if (empty($oneMail->mailid)) {
return JError::raiseError(404, 'Newsletter not found : ' . $mailid);
}
if (!$access_sub or !$oneMail->published or !$oneMail->visible) {
$key = JRequest::getString('key');
if (empty($key) or $key !== $oneMail->key) {
$app =& JFactory::getApplication();
$app->enqueueMessage('You can not have access to this e-mail', 'error');
$app->redirect(acymailing::completeLink('lists', false, true));
return false;
}
}
$user =& JFactory::getUser();
if (!empty($user->email)) {
$userClass = acymailing::get('class.subscriber');
$receiver = $userClass->get($user->email);
} else {
$receiver = null;
$receiver->name = JText::_('VISITOR');
}
$oneMail->sendHTML = true;
$mailClass->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$oneMail, &$receiver));
$document =& JFactory::getDocument();
$document->setTitle($oneMail->subject);
if (!empty($oneMail->text)) {
echo nl2br($mailClass->textVersion($oneMail->text, false));
} else {
echo nl2br($mailClass->textVersion($oneMail->body, true));
}
}
示例12: subscribe
function subscribe()
{
$user = JFactory::getUser();
$userClass = acymailing::get('class.subscriber');
if (!empty($user->id) and $userClass->identify(true)) {
return $this->modify();
}
$config = acymailing::config();
$allowvisitor = $config->get('allow_visitor', 1);
if (empty($allowvisitor)) {
$app =& JFactory::getApplication();
$app->enqueueMessage(JText::_('ONLY_LOGGED'), 'notice');
$app->redirect(acymailing::completeLink('lists', false, true));
return;
}
JRequest::setVar('layout', 'modify');
return parent::display();
}
示例13: display
function display($tpl = null)
{
include ACYMAILING_FRONT . 'inc' . DS . 'openflash' . DS . 'php-ofc-library' . DS . 'open-flash-chart.php';
$function = $this->getLayout();
$this->setLayout('diagram');
if (method_exists($this, $function)) {
$this->{$function}();
}
$filters = null;
$diagramType = acymailing::get('type.diagram');
$filters->task = $diagramType->display('task', JRequest::getCmd('task'));
$this->assignRef('filters', $filters);
$bar =& JToolBar::getInstance('toolbar');
$bar->appendButton('Link', 'back', JText::_('GLOBAL_STATISTICS'), acymailing::completeLink('stats'));
JToolBarHelper::divider();
$bar->appendButton('Pophelp', 'diagram-' . JRequest::getCmd('task', 'lists'));
parent::display($tpl);
}
示例14: export
function export()
{
$selectedMail = JRequest::getInt('filter_mail', 0);
$selectedUrl = JRequest::getInt('filter_url', 0);
$filters = array();
if (!empty($selectedMail)) {
$filters[] = 'a.mailid = ' . $selectedMail;
}
if (!empty($selectedMail)) {
$filters[] = 'a.urlid = ' . $selectedUrl;
}
$query = 'SELECT `subid` FROM `#__acymailing_urlclick` as a ';
if (!empty($filters)) {
$query .= ' WHERE (' . implode(') AND (', $filters) . ')';
}
$db =& JFactory::getDBO();
$db->setQuery($query);
$_SESSION['acymailing']['exportusers'] = $db->loadResultArray();
$this->setRedirect(acymailing::completeLink('data&task=export&sessionvalues=1', true, true));
}
示例15: send
function send()
{
if (!$this->isAllowed('newsletters', 'send')) {
return;
}
JRequest::checkToken() or die('Invalid Token');
$mailid = acymailing::getCID('mailid');
if (empty($mailid)) {
exit;
}
$user =& JFactory::getUser();
$time = time();
$queueClass = acymailing::get('class.queue');
$onlyNew = JRequest::getInt('onlynew');
$totalSub = $queueClass->queue($mailid, $time, $onlyNew);
if (empty($totalSub)) {
acymailing::display(JText::_('NO_RECEIVER'), 'warning');
return;
}
$mailObject = null;
$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;
}
}