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


PHP acymailing_setTitle函数代码示例

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


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

示例1: listing

 function listing()
 {
     $app = JFactory::getApplication();
     $config = acymailing_config();
     if (!class_exists('plgSystemAcymailingClassMail')) {
         $app->enqueueMessage('AcyMailing can customize some Joomla messages. If you want to do this, please first <a href="index.php?option=com_acymailing&ctrl=cpanel">enable the plugin acymailingclassmail</a>', 'notice');
     }
     $pageInfo = new stdClass();
     $pageInfo->filter = new stdClass();
     $pageInfo->filter->order = new stdClass();
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
     $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'mailid', 'cmd');
     $pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
     $db = JFactory::getDBO();
     $query = 'SELECT mailid, subject, alias, fromname, published, fromname, fromemail, replyname, replyemail FROM #__acymailing_mail WHERE `type` = ' . $db->Quote($this->type);
     if (!empty($pageInfo->filter->order->value)) {
         $query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
     }
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     acymailing_setTitle(JText::_($this->nameListing), $this->icon, $this->ctrl);
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::custom('preview', 'acypreview', '', JText::_('ACY_PREVIEW'), true);
     JToolBarHelper::editList();
     JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', $this->doc);
     $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     $toggleClass = acymailing_get('helper.toggle');
     $this->assignRef('toggleClass', $toggleClass);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assign('config', $config);
     $this->assign('rows', $rows);
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:34,代码来源:view.html.php

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

示例3: setTitle

 static function setTitle($name, $picture, $link)
 {
     return acymailing_setTitle($name, $picture, $link);
 }
开发者ID:ForAEdesWeb,项目名称:AEW1,代码行数:4,代码来源:helper.php

示例4: listing

 function listing()
 {
     $app = JFactory::getApplication();
     $pageInfo = new stdClass();
     $pageInfo->filter = new stdClass();
     $pageInfo->filter->order = new stdClass();
     $pageInfo->limit = new stdClass();
     $pageInfo->elements = new stdClass();
     $config = acymailing_config();
     JHTML::_('behavior.modal', 'a.modal');
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName() . $this->getLayout();
     $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'a.senddate', 'cmd');
     $pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
     if (strtolower($pageInfo->filter->order->dir) !== 'desc') {
         $pageInfo->filter->order->dir = 'asc';
     }
     $pageInfo->search = $app->getUserStateFromRequest($paramBase . ".search", 'search', '', 'string');
     $pageInfo->search = JString::strtolower(trim($pageInfo->search));
     $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 = '\'%' . acymailing_getEscaped($pageInfo->search, true) . '%\'';
         $filters[] = implode(" LIKE {$searchVal} OR ", $this->searchFields) . " LIKE {$searchVal}";
     }
     $query = 'SELECT ' . implode(' , ', $this->selectFields);
     $query .= ', CASE WHEN (a.senthtml+a.senttext-a.bounceunique) = 0 THEN 0 ELSE (a.openunique/(a.senthtml+a.senttext-a.bounceunique)) END AS openprct';
     $query .= ', CASE WHEN (a.senthtml+a.senttext-a.bounceunique) = 0 THEN 0 ELSE (a.clickunique/(a.senthtml+a.senttext-a.bounceunique)) END AS clickprct';
     $query .= ', CASE WHEN a.openunique = 0 THEN 0 ELSE (a.clickunique/a.openunique) END AS efficiencyprct';
     $query .= ', CASE WHEN (a.senthtml+a.senttext-a.bounceunique) = 0 THEN 0 ELSE (a.unsub/(a.senthtml+a.senttext-a.bounceunique)) END AS unsubprct';
     $query .= ', (a.senthtml+a.senttext) as totalsent';
     $query .= ', CASE WHEN (a.senthtml+a.senttext) = 0 THEN 0 ELSE (a.bounceunique/(a.senthtml+a.senttext)) END AS bounceprct';
     $query .= ' FROM ' . acymailing_table('stats') . ' as a';
     $query .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
     if (!empty($filters)) {
         $query .= ' WHERE (' . implode(') AND (', $filters) . ')';
     }
     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();
     if ($rows === null) {
         acymailing_display(substr(strip_tags($database->getErrorMsg()), 0, 200) . '...', 'error');
         if (file_exists(ACYMAILING_BACK . 'install.acymailing.php')) {
             include_once ACYMAILING_BACK . 'install.acymailing.php';
             $installClass = new acymailingInstall();
             $installClass->fromVersion = '3.6.0';
             $installClass->update = true;
             $installClass->updateSQL();
         }
     }
     $queryCount = 'SELECT COUNT(a.mailid) FROM ' . acymailing_table('stats') . ' as a';
     if (!empty($pageInfo->search)) {
         $queryCount .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
     }
     if (!empty($filters)) {
         $queryCount .= ' WHERE (' . implode(') AND (', $filters) . ')';
     }
     $database->setQuery($queryCount);
     $pageInfo->elements->total = $database->loadResult();
     $pageInfo->elements->page = count($rows);
     jimport('joomla.html.pagination');
     $pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
     acymailing_setTitle(JText::_('GLOBAL_STATISTICS'), 'stats', 'stats');
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::custom('exportglobal', 'acyexport', '', JText::_('ACY_EXPORT'), false);
     JToolBarHelper::spacer();
     if (acymailing_isAllowed($config->get('acl_statistics_delete', 'all'))) {
         JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
     }
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'statistics');
     if (acymailing_isAllowed($config->get('acl_cpanel_manage', 'all'))) {
         $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     }
     $this->assignRef('rows', $rows);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assignRef('pagination', $pagination);
 }
开发者ID:utopszkij,项目名称:lmp,代码行数:81,代码来源:orig_view.html.php

示例5: abtesting


//.........这里部分代码省略.........
                 sort($savedIds);
                 sort($mailsArray);
                 if (!empty($abTestDetail['status']) && in_array($abTestDetail['status'], array('inProgress', 'testSendOver', 'abTestFinalSend')) && $savedIds != $mailsArray) {
                     $warningMsg[] = JText::_('ABTESTING_TESTEXIST');
                     $mailsArray = $savedIds;
                     $mailids = implode(',', $mailsArray);
                 }
                 $this->assign('savedValues', true);
                 if ($abTestDetail['status'] == 'inProgress') {
                     $warningMsg[] = JText::_('ABTESTING_INPROGRESS');
                 }
             }
             if ($validationStatus == 'abTestAdd') {
                 $noMsg = true;
             }
             if (!empty($abTestDetail['status']) && $abTestDetail['status'] == 'abTestFinalSend' && !empty($abTestDetail['newMail'])) {
                 $mailInQueueErrorMsg = JText::_('ABTESTING_FINALMAILINQUEUE');
                 $mailTocheck = '=' . $abTestDetail['newMail'];
             } else {
                 $mailInQueueErrorMsg = JText::_('ABTESTING_TESTMAILINQUEUE');
                 $mailTocheck = ' IN (' . implode(',', $mailsArray) . ')';
             }
             $query = "SELECT COUNT(*) FROM #__acymailing_queue WHERE mailid" . $mailTocheck;
             $db->setQuery($query);
             $queueCheck = $db->loadResult();
             if (!empty($queueCheck) && $validationStatus != 'abTestAdd') {
                 acymailing_display($mailInQueueErrorMsg, 'error');
                 $noMsg = true;
             }
             if (!empty($resDetail) && empty($queueCheck) && in_array($abTestDetail['status'], array('inProgress', 'abTestFinalSend'))) {
                 if ($abTestDetail['status'] == 'inProgress') {
                     $abTestDetail['status'] = 'testSendOver';
                 } else {
                     $abTestDetail['status'] = 'completed';
                 }
                 $query = "UPDATE #__acymailing_mail SET abtesting=" . $db->quote(serialize($abTestDetail)) . " WHERE mailid IN (" . implode(',', $mailsArray) . ")";
                 $db->setQuery($query);
                 $db->query();
             }
             if (!empty($abTestDetail['status']) && $abTestDetail['status'] == 'testSendOver') {
                 acymailing_display(JText::_('ABTESTING_READYTOSEND'), 'info');
             }
             if (!empty($abTestDetail['status']) && $abTestDetail['status'] == 'completed') {
                 acymailing_display(JText::_('ABTESTING_COMPLETE'), 'info');
             }
             $this->assign('abTestDetail', $abTestDetail);
             $nbMails = count($mailsArray);
             $titleStr = "A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z";
             $titlePage = JText::sprintf('ABTESTING_TITLE', substr($titleStr, 0, min($nbMails, 26) * 2 - 1));
             $mailClass = acymailing_get('class.mail');
             $mailsDetails = array();
             foreach ($mailsArray as $mailid) {
                 $mailsDetails[] = $mailClass->get($mailid);
             }
             $this->assign('mailsdetails', $mailsDetails);
             $mailerHelper = acymailing_get('helper.mailer');
             $mailerHelper->loadedToSend = false;
             $mailReceiver = $mailerHelper->load($mailsArray[0]);
             $listmailClass = acymailing_get('class.listmail');
             $lists = $listmailClass->getReceivers($mailReceiver->mailid, true, false);
             $this->assign('lists', $lists);
             $this->assign('mailReceiver', $mailReceiver);
             $filterClass = acymailing_get('class.filter');
             $this->assign('filterClass', $filterClass);
             $listids = array();
             foreach ($lists as $oneList) {
                 $listids[] = $oneList->listid;
             }
             $nbTotalReceivers = $filterClass->countReceivers($listids, $this->mailReceiver->filter, $this->mailReceiver->mailid);
             if ($nbTotalReceivers < 50) {
                 $warningMsg[] = JText::sprintf('ABTESTING_NOTENOUGHUSER', $nbTotalReceivers);
                 $noBtn = true;
             }
             $this->assign('nbTotalReceivers', $nbTotalReceivers);
             $this->assign('nbTestReceivers', floor($nbTotalReceivers * $abTestDetail['prct'] / 100));
             if ($noMsg || $noBtn) {
                 $this->assign('noButton', true);
             }
             $queryStat = 'SELECT mailid, openunique, clickunique, senthtml, senttext, bounceunique FROM #__acymailing_stats WHERE mailid IN (' . $mailids . ')';
             $db->setQuery($queryStat);
             $resStat = $db->loadObjectList('mailid');
             if (!empty($resStat)) {
                 $this->assign('statMail', $resStat);
                 $warningMsg[] = JText::_('ABTESTING_STAT_WARNING');
             }
             if (!empty($warningMsg) && $noMsg == false) {
                 acymailing_display(implode('<br />', $warningMsg), 'warning');
             }
         }
     } else {
         $titlePage = JText::_('ABTESTING');
     }
     $this->assign('validationStatus', $validationStatus);
     $this->assign('titlePage', $titlePage);
     $this->assign('app', $app);
     if ($app->isAdmin()) {
         acymailing_setTitle(JText::_('ABTESTING'), $this->icon, $this->ctrl . '&task=abtesting');
         $bar = JToolBar::getInstance('toolbar');
     }
 }
开发者ID:educakanchay,项目名称:educared,代码行数:101,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     JHTML::_('behavior.modal', 'a.modal');
     $toggleClass = acymailing_get('helper.toggle');
     $config = acymailing_config();
     $db = JFactory::getDBO();
     $doc = JFactory::getDocument();
     $app = JFactory::getApplication();
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.file');
     $lg = JFactory::getLanguage();
     $language = $lg->getTag();
     $styleRemind = 'float:right;margin-right:30px;position:relative;';
     $loadLink = '<a onclick="window.document.getElementById(\'acymailing_messages_warning\').style.display = \'none\';return true;" class="modal" rel="{handler: \'iframe\', size:{x:800, y:500}}" href="index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=file&amp;task=latest&amp;code=' . $language . '">' . JText::_('LOAD_LATEST_LANGUAGE') . '</a>';
     if (!file_exists(ACYMAILING_ROOT . 'language' . DS . $language . DS . $language . '.com_acymailing.ini')) {
         if ($config->get('errorlanguagemissing', 1)) {
             $notremind = '<small style="' . $styleRemind . '">' . $toggleClass->delete('acymailing_messages_warning', 'errorlanguagemissing_0', 'config', false, JText::_('DONT_REMIND')) . '</small>';
             acymailing_display(JText::_('MISSING_LANGUAGE') . ' ' . $loadLink . ' ' . $notremind, 'warning');
         }
     } elseif (version_compare(JText::_('ACY_LANG_VERSION'), $config->get('version'), '<')) {
         if ($config->get('errorlanguageupdate', 1)) {
             $notremind = '<small style="' . $styleRemind . '">' . $toggleClass->delete('acymailing_messages_warning', 'errorlanguageupdate_0', 'config', false, JText::_('DONT_REMIND')) . '</small>';
             acymailing_display(JText::_('UPDATE_LANGUAGE') . ' ' . $loadLink . ' ' . $notremind, 'warning');
         }
     }
     if (ACYMAILING_J30 && $app->getTemplate() == 'hathor') {
         if ($config->get('errortemplatenotisis', 1)) {
             $message = ' You can change the default Back-end template <a href="index.php?option=com_templates&view=styles">Here</a> or change your personnal default Back-end template by editing your user profile <a href="index.php?option=com_users&view=users">Here</a>, tab "Basic Settings".';
             $personalTemplate = JFactory::getUser()->getParam('admin_style');
             if (!empty($personalTemplate)) {
                 $message = ' You can change your personnal default Back-end template by editing your user profile <a href="index.php?option=com_users&view=users">Here</a>, tab "Basic Settings".';
             }
             $notremind = '<small style="' . $styleRemind . '">' . $toggleClass->delete('acymailing_messages_warning', 'errortemplatenotisis_0', 'config', false, JText::_('DONT_REMIND')) . '</small>';
             acymailing_display('You should rather use the isis template in the Back-End which suits more AcyMailing.' . $message . $notremind, 'warning');
         }
     }
     $indexes = array('listsub', 'stats', 'list', 'mail', 'userstats', 'urlclick', 'history', 'template', 'queue', 'subscriber');
     $addIndexes = array('We recenty optimized our database...');
     foreach ($indexes as $oneTable) {
         if ($config->get('optimize_' . $oneTable, 1)) {
             continue;
         }
         $addIndexes[] = 'Please ' . $toggleClass->toggleText('addindex', $oneTable, 'config', 'click here') . ' to add indexes on the ' . $oneTable . ' table';
     }
     if (count($addIndexes) > 1) {
         acymailing_display($addIndexes, 'warning');
     }
     acymailing_setTitle(JText::_('CONFIGURATION'), 'acyconfig', 'cpanel');
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::custom('test', 'acysend', '', JText::_('SEND_TEST'), false);
     JToolBarHelper::divider();
     JToolBarHelper::save();
     JToolBarHelper::apply();
     JToolBarHelper::cancel('cancel', JText::_('ACY_CLOSE'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'config');
     if (acymailing_isAllowed($config->get('acl_cpanel_manage', 'all'))) {
         $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     }
     $elements = new stdClass();
     $elements->add_names = JHTML::_('acyselect.booleanlist', "config[add_names]", '', $config->get('add_names', true));
     $elements->embed_images = JHTML::_('acyselect.booleanlist', "config[embed_images]", '', $config->get('embed_images', 0));
     $elements->embed_files = JHTML::_('acyselect.booleanlist', "config[embed_files]", '', $config->get('embed_files', 1));
     $elements->multiple_part = JHTML::_('acyselect.booleanlist', "config[multiple_part]", '', $config->get('multiple_part', 0));
     $mailerMethods = array('elasticemail', 'smtp', 'sendmail');
     $js = "function updateMailer(mailermethod){" . "\n";
     foreach ($mailerMethods as $oneMethod) {
         $js .= " window.document.getElementById('" . $oneMethod . "_config').style.display = 'none'; " . "\n";
     }
     $js .= "if(window.document.getElementById(mailermethod+'_config')) {window.document.getElementById(mailermethod+'_config').style.display = 'block';} }";
     $js .= 'window.addEvent(\'domready\', function(){ updateMailer(\'' . $config->get('mailer_method', 'phpmail') . '\'); });';
     $doc->addScriptDeclaration($js);
     $encodingval = array();
     $encodingval[] = JHTML::_('select.option', 'binary', 'Binary');
     $encodingval[] = JHTML::_('select.option', 'quoted-printable', 'Quoted-printable');
     $encodingval[] = JHTML::_('select.option', '7bit', '7 Bit');
     $encodingval[] = JHTML::_('select.option', '8bit', '8 Bit');
     $encodingval[] = JHTML::_('select.option', 'base64', 'Base 64');
     $elements->encoding_format = JHTML::_('select.genericlist', $encodingval, "config[encoding_format]", 'size="1" style="width:150px;"', 'value', 'text', $config->get('encoding_format', 'base64'));
     $charset = acymailing_get('type.charset');
     $elements->charset = $charset->display("config[charset]", $config->get('charset', 'UTF-8'));
     $securedVals = array();
     $securedVals[] = JHTML::_('select.option', '', '- - -');
     $securedVals[] = JHTML::_('select.option', 'ssl', 'SSL');
     $securedVals[] = JHTML::_('select.option', 'tls', 'TLS');
     $elements->smtp_secured = JHTML::_('select.genericlist', $securedVals, "config[smtp_secured]", 'size="1" style="width:100px;"', 'value', 'text', $config->get('smtp_secured'));
     $elements->smtp_auth = JHTML::_('acyselect.booleanlist', "config[smtp_auth]", '', $config->get('smtp_auth', 0));
     $elements->smtp_keepalive = JHTML::_('acyselect.booleanlist', "config[smtp_keepalive]", '', $config->get('smtp_keepalive', 1));
     $elements->allow_visitor = JHTML::_('acyselect.booleanlist', "config[allow_visitor]", '', $config->get('allow_visitor', 1));
     $editorType = acymailing_get('type.editor');
     $elements->editor = $editorType->display('config[editor]', $config->get('editor'));
     $elements->subscription_message = JHTML::_('acyselect.booleanlist', "config[subscription_message]", '', $config->get('subscription_message', 1));
     $elements->confirmation_message = JHTML::_('acyselect.booleanlist', "config[confirmation_message]", '', $config->get('confirmation_message', 1));
     $elements->unsubscription_message = JHTML::_('acyselect.booleanlist', "config[unsubscription_message]", '', $config->get('unsubscription_message', 1));
     $elements->welcome_message = JHTML::_('acyselect.booleanlist', "config[welcome_message]", '', $config->get('welcome_message', 1));
     $elements->unsub_message = JHTML::_('acyselect.booleanlist', "config[unsub_message]", '', $config->get('unsub_message', 1));
     $elements->confirm_message = JHTML::_('acyselect.booleanlist', "config[confirm_message]", '', $config->get('confirm_message', 0));
     $elements->show_footer = JHTML::_('acyselect.booleanlist', "config[show_footer]", '', $config->get('show_footer', 1));
     if (acymailing_level(1)) {
         $forwardValues = array();
//.........这里部分代码省略.........
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:101,代码来源:view.html.php

示例7: form

 function form()
 {
     $subid = acymailing_getCID('subid');
     $db =& JFactory::getDBO();
     $app =& JFactory::getApplication();
     if (!empty($subid)) {
         $subscriberClass = acymailing_get('class.subscriber');
         $subscriber = $subscriberClass->getFull($subid);
         $subscription = $app->isAdmin() ? $subscriberClass->getSubscription($subid) : $subscriberClass->getFrontendSubscription($subid);
     } else {
         $listType = acymailing_get('class.list');
         $subscription = $app->isAdmin() ? $listType->getLists() : $listType->getFrontendLists();
         $subscriber = null;
         $subscriber->created = time();
         $subscriber->html = 1;
         $subscriber->confirmed = 1;
         $subscriber->blocked = 0;
         $subscriber->accept = 1;
         $subscriber->enabled = 1;
         $iphelper = acymailing_get('helper.user');
         $subscriber->ip = $iphelper->getIP();
     }
     if ($app->isAdmin()) {
         acymailing_setTitle(JText::_('ACY_USER'), 'acyusers', 'subscriber&task=edit&subid=' . $subid);
         $bar =& JToolBar::getInstance('toolbar');
     }
     if (!empty($subid)) {
         $query = 'SELECT a.`mailid`, a.`html`, a.`sent`, a.`senddate`,a.`open`, a.`opendate`, a.`bounce`, a.`fail`,b.`subject`,b.`alias`';
         $query .= ' FROM `#__acymailing_userstats` as a';
         $query .= ' LEFT JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
         $query .= ' WHERE a.subid = ' . intval($subid) . ' ORDER BY a.senddate DESC LIMIT 30';
         $db->setQuery($query);
         $open = $db->loadObjectList();
         $this->assignRef('open', $open);
         $query = 'SELECT a.*,b.`subject`,b.`alias`';
         $query .= ' FROM `#__acymailing_queue` as a';
         $query .= ' LEFT JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
         $query .= ' WHERE a.subid = ' . intval($subid) . ' ORDER BY a.senddate ASC LIMIT 60';
         $db->setQuery($query);
         $queue = $db->loadObjectList();
         $this->assignRef('queue', $queue);
         $query = 'SELECT h.*,m.subject FROM #__acymailing_history as h LEFT JOIN #__acymailing_mail as m ON h.mailid = m.mailid WHERE h.subid = ' . intval($subid) . ' ORDER BY h.`date` DESC LIMIT 30';
         $db->setQuery($query);
         $history = $db->loadObjectList();
         $this->assignRef('history', $history);
     }
     if ($app->isAdmin()) {
         if (!empty($subscriber->userid)) {
             if (file_exists(ACYMAILING_ROOT . 'components' . DS . 'com_comprofiler' . DS . 'comprofiler.php')) {
                 $editLink = 'index.php?option=com_comprofiler&task=edit&cid[]=';
             } elseif (version_compare(JVERSION, '1.6.0', '<')) {
                 $editLink = 'index.php?option=com_users&task=edit&cid[]=';
             } else {
                 $editLink = 'index.php?option=com_users&task=user.edit&id=';
             }
             $bar->appendButton('Link', 'edit', JText::_('EDIT_JOOMLA_USER'), $editLink . $subscriber->userid);
             JToolBarHelper::spacer();
         }
         JToolBarHelper::save();
         JToolBarHelper::apply();
         JToolBarHelper::cancel();
         JToolBarHelper::divider();
         $bar->appendButton('Pophelp', 'subscriber-form');
     }
     $filters = null;
     $quickstatusType = acymailing_get('type.statusquick');
     $filters->statusquick = $quickstatusType->display('statusquick');
     $this->assignRef('subscriber', $subscriber);
     $toggleClass = acymailing_get('helper.toggle');
     $this->assignRef('toggleClass', $toggleClass);
     $this->assignRef('subscription', $subscription);
     $this->assignRef('filters', $filters);
     $statusType = acymailing_get('type.status');
     $this->assignRef('statusType', $statusType);
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:75,代码来源:view.html.php

示例8: form

 function form()
 {
     $subid = acymailing_getCID('subid');
     $db = JFactory::getDBO();
     $app = JFactory::getApplication();
     $config = acymailing_config();
     if (!empty($subid)) {
         $subscriberClass = acymailing_get('class.subscriber');
         $subscriber = $subscriberClass->getFull($subid);
         $subscription = $app->isAdmin() ? $subscriberClass->getSubscription($subid) : $subscriberClass->getFrontendSubscription($subid);
         if (empty($subscriber->subid)) {
             acymailing_display('User ' . $subid . ' not found', 'error');
             $subid = 0;
         }
     }
     if (empty($subid)) {
         $listType = acymailing_get('class.list');
         $subscription = $app->isAdmin() ? $listType->getLists() : $listType->getFrontendLists();
         $subscriber = new stdClass();
         $subscriber->created = time();
         $subscriber->html = 1;
         $subscriber->confirmed = 1;
         $subscriber->blocked = 0;
         $subscriber->accept = 1;
         $subscriber->enabled = 1;
         $iphelper = acymailing_get('helper.user');
         $subscriber->ip = $iphelper->getIP();
     }
     if ($app->isAdmin()) {
         acymailing_setTitle(JText::_('ACY_USER'), 'acyusers', 'subscriber&task=edit&subid=' . $subid);
         $bar = JToolBar::getInstance('toolbar');
     }
     if (!empty($subid)) {
         $query = 'SELECT a.`mailid`, a.`html`, a.`sent`, a.`senddate`,a.`open`, a.`opendate`, a.`bounce`, a.`fail`,b.`subject`,b.`alias`';
         $query .= ' FROM `#__acymailing_userstats` as a';
         $query .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
         $query .= ' WHERE a.subid = ' . intval($subid) . ' ORDER BY a.senddate DESC LIMIT 30';
         $db->setQuery($query);
         $open = $db->loadObjectList();
         $this->assignRef('open', $open);
         if (acymailing_level(3)) {
             $db->setQuery('SELECT DISTINCT `mailid` FROM `#__acymailing_urlclick` WHERE `subid` = ' . intval($subid));
             $clickedNews = $db->loadObjectList('mailid');
             $this->assignRef('clickedNews', $clickedNews);
         }
         $query = 'SELECT a.*,b.`subject`,b.`alias`';
         $query .= ' FROM `#__acymailing_queue` as a';
         $query .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
         $query .= ' WHERE a.subid = ' . intval($subid) . ' ORDER BY a.senddate ASC LIMIT 60';
         $db->setQuery($query);
         $queue = $db->loadObjectList();
         $this->assignRef('queue', $queue);
         $query = 'SELECT h.*,m.subject FROM #__acymailing_history as h LEFT JOIN #__acymailing_mail as m ON h.mailid = m.mailid WHERE h.subid = ' . intval($subid) . ' ORDER BY h.`date` DESC LIMIT 30';
         $db->setQuery($query);
         $history = $db->loadObjectList();
         $this->assignRef('history', $history);
         $query = 'SELECT * FROM #__acymailing_geolocation WHERE geolocation_subid=' . intval($subid) . ' ORDER BY geolocation_created DESC LIMIT 100';
         $db->setQuery($query);
         $geoloc = $db->loadObjectList();
         if (!empty($geoloc)) {
             $markCities = array();
             $diffCountries = false;
             $dataDetails = array();
             foreach ($geoloc as $mark) {
                 $indexCity = array_search($mark->geolocation_city, $markCities);
                 if ($indexCity === false) {
                     array_push($markCities, $mark->geolocation_city);
                     array_push($dataDetails, array('nbInCity' => 1, 'actions' => $mark->geolocation_type));
                 } else {
                     $dataDetails[$indexCity]['nbInCity'] += 1;
                     $dataDetails[$indexCity]['actions'] .= ", " . $mark->geolocation_type;
                 }
                 if (!$diffCountries) {
                     if (!empty($region) && $region != $mark->geolocation_country_code) {
                         $region = 'world';
                         $diffCountries = true;
                     } else {
                         $region = $mark->geolocation_country_code;
                     }
                 }
             }
             $this->assignRef('geoloc_region', $region);
             $this->assignRef('geoloc_city', $markCities);
             $this->assignRef('geoloc', $geoloc);
             $this->assignRef('geoloc_details', $dataDetails);
         }
         if (!empty($subscriber->ip)) {
             $query = 'SELECT * FROM #__acymailing_subscriber WHERE ip=' . $db->Quote($subscriber->ip) . ' AND subid != ' . intval($subid) . ' LIMIT 30';
             $db->setQuery($query);
             $neighbours = $db->loadObjectList();
             if (!empty($neighbours)) {
                 $this->assignRef('neighbours', $neighbours);
             }
         }
     }
     if ($app->isAdmin()) {
         if (!empty($subscriber->userid)) {
             if (file_exists(ACYMAILING_ROOT . 'components' . DS . 'com_comprofiler' . DS . 'comprofiler.php')) {
                 $editLink = 'index.php?option=com_comprofiler&task=edit&cid[]=';
             } elseif (!ACYMAILING_J16) {
//.........这里部分代码省略.........
开发者ID:educakanchay,项目名称:educa,代码行数:101,代码来源:view.html.php

示例9: preview

 function preview()
 {
     $app = JFactory::getApplication();
     $mailid = acymailing_getCID('mailid');
     $config = acymailing_config();
     JHTML::_('behavior.modal', 'a.modal');
     $mailerHelper = acymailing_get('helper.mailer');
     $mailerHelper->loadedToSend = false;
     $mail = $mailerHelper->load($mailid);
     $user = JFactory::getUser();
     $userClass = acymailing_get('class.subscriber');
     $receiver = $userClass->get($user->email);
     $mail->sendHTML = true;
     $mailerHelper->dispatcher->trigger('acymailing_replaceusertags', array(&$mail, &$receiver, false));
     if (!empty($mail->altbody)) {
         $mail->altbody = $mailerHelper->textVersion($mail->altbody, false);
     }
     $listmailClass = acymailing_get('class.listmail');
     $lists = $listmailClass->getReceivers($mail->mailid, true, false);
     $receiversClass = acymailing_get('type.testreceiver');
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
     $infos = new stdClass();
     $infos->receiver_type = $app->getUserStateFromRequest($paramBase . ".receiver_type", 'receiver_type', '', 'string');
     $infos->test_html = $app->getUserStateFromRequest($paramBase . ".test_html", 'test_html', 1, 'int');
     $infos->test_email = $app->getUserStateFromRequest($paramBase . ".test_email", 'test_email', '', 'string');
     acymailing_setTitle(JText::_('ACY_PREVIEW') . ' : ' . $mail->subject, $this->icon, $this->ctrl . '&task=preview&mailid=' . $mailid);
     $bar = JToolBar::getInstance('toolbar');
     if ($this->type == 'news') {
         if (acymailing_level(1) && acymailing_isAllowed($config->get('acl_newsletters_schedule', 'all'))) {
             if ($mail->published == 2) {
                 JToolBarHelper::custom('unschedule', 'unschedule', '', JText::_('UNSCHEDULE'), false);
             } else {
                 $bar->appendButton('Acypopup', 'schedule', JText::_('SCHEDULE'), "index.php?option=com_acymailing&ctrl=send&task=scheduleready&tmpl=component&mailid=" . $mailid);
             }
         }
         if (acymailing_isAllowed($config->get('acl_newsletters_send', 'all'))) {
             $bar->appendButton('Acypopup', 'acysend', JText::_('SEND'), "index.php?option=com_acymailing&ctrl=send&task=sendready&tmpl=component&mailid=" . $mailid);
         }
         JToolBarHelper::divider();
     }
     JToolBarHelper::custom('edit', 'edit', '', JText::_('ACY_EDIT'), false);
     JToolBarHelper::cancel('cancel', JText::_('ACY_CLOSE'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', $this->doc);
     $this->assignRef('lists', $lists);
     $this->assignRef('infos', $infos);
     $this->assignRef('receiverClass', $receiversClass);
     $this->assignRef('mail', $mail);
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:49,代码来源:view.html.php

示例10: export

 function export()
 {
     $listClass = acymailing_get('class.list');
     $db = JFactory::getDBO();
     $fields = acymailing_getColumns('#__acymailing_subscriber');
     $config = acymailing_config();
     $selectedFields = explode(',', $config->get('export_fields', 'email,name'));
     $selectedLists = explode(',', $config->get('export_lists'));
     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');
     $charsetType = acymailing_get('type.charset');
     $this->assignRef('charset', $charsetType);
     $lists = $listClass->getLists();
     $this->assignRef('lists', $lists);
     $this->assignRef('fields', $fields);
     $this->assignRef('selectedfields', $selectedFields);
     $this->assignRef('selectedlists', $selectedLists);
     $this->assignRef('config', $config);
     $whereSubscribers = '';
     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;
             }
         }
         $whereSubscribers = implode(',', $subids);
     }
     if (JRequest::getInt('sessionquery')) {
         $currentSession = JFactory::getSession();
         $exportQuery = $currentSession->get('acyexportquery');
         if (!empty($exportQuery)) {
             $whereSubscribers = $exportQuery;
         }
     }
     if (!empty($whereSubscribers)) {
         $db->setQuery('SELECT `name`,`email` FROM `#__acymailing_subscriber` WHERE `subid` IN (' . $whereSubscribers . ') LIMIT 10');
         $users = $db->loadObjectList();
         $this->assignRef('users', $users);
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:48,代码来源:view.html.php

示例11: form


//.........这里部分代码省略.........
            }
            foreach ($filter->{$datatype}['type'] as $num => $oneType) {
                if (empty($oneType)) {
                    continue;
                }
                $js .= "while(!document.getElementById('" . $datatype . "type{$num}')){" . $jsFunction . "();}\r\n\t\t\t\t\t\tdocument.getElementById('" . $datatype . "type{$num}').value= '{$oneType}';\r\n\t\t\t\t\t\tupdate" . ucfirst($datatype) . "({$num});";
                if (empty($filter->{$datatype}[$num][$oneType])) {
                    continue;
                }
                foreach ($filter->{$datatype}[$num][$oneType] as $key => $value) {
                    if (is_array($value)) {
                        $js .= "try{";
                        foreach ($value as $subkey => $subval) {
                            $js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $subval)) . "';";
                            $js .= "if(document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].type && document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].type == 'checkbox'){ document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].checked = 'checked'; }";
                        }
                        $js .= "}catch(e){}";
                    }
                    $myVal = is_array($value) ? implode(',', $value) : $value;
                    $js .= "try{";
                    $js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $myVal)) . "';";
                    $js .= "if(document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].type && document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].type == 'checkbox'){ document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].checked = 'checked'; }";
                    $js .= "}catch(e){}";
                }
                $js .= "\n" . " if(typeof(onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . ") == 'function'){\r\n\t\t\t\t\ttry{ onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . "({$num}); }catch(e){alert('Error in the onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . " function : '+e); }\r\n\t\t\t\t}";
                if ($datatype == 'filter') {
                    $js .= " countresults({$num});";
                }
            }
        }
        $listid = JRequest::getInt('listid');
        if (!empty($listid)) {
            $js .= "document.getElementById('actiontype0').value = 'list'; updateAction(0); document.adminForm.elements['action[0][list][selectedlist]'].value = '" . $listid . "';";
        }
        $doc->addScriptDeclaration("window.addEvent('domready', function(){ {$js} });");
        $triggers = array();
        $triggers['daycron'] = JText::_('AUTO_CRON_FILTER');
        $nextDate = $config->get('cron_plugins_next');
        $listHours = array();
        $listMinutess = array();
        for ($i = 0; $i < 24; $i++) {
            $listHours[] = JHTML::_('select.option', $i, $i < 10 ? '0' . $i : $i);
        }
        $hours = JHTML::_('select.genericlist', $listHours, 'triggerhours', 'class="inputbox" size="1" style="width:50px;"', 'value', 'text', acymailing_getDate($nextDate, 'H'));
        for ($i = 0; $i < 60; $i += 5) {
            $listMinutess[] = JHTML::_('select.option', $i, $i < 10 ? '0' . $i : $i);
        }
        $defaultMin = floor(acymailing_getDate($nextDate, 'i') / 5) * 5;
        $minutes = JHTML::_('select.genericlist', $listMinutess, 'triggerminutes', 'class="inputbox" size="1" style="width:50px;"', 'value', 'text', $defaultMin);
        $this->assign('hours', $hours);
        $this->assign('minutes', $minutes);
        $this->assign('nextDate', !empty($nextDate) ? ' (' . JText::_('NEXT_RUN') . ' : ' . acymailing_getDate($nextDate, '%d %B %Y  %H:%M') . ')' : '');
        $triggers['allcron'] = JText::_('ACY_EACH_TIME');
        $triggers['subcreate'] = JText::_('ON_USER_CREATE');
        $triggers['subchange'] = JText::_('ON_USER_CHANGE');
        $this->dispatcher->trigger('onAcyDisplayTriggers', array(&$triggers));
        $name = empty($filter->name) ? '' : ' : ' . $filter->name;
        acymailing_setTitle(JText::_('ACY_FILTER') . $name, 'filter', 'filter&task=edit&filid=' . $filid);
        $bar = JToolBar::getInstance('toolbar');
        JToolBarHelper::custom('filterDisplayUsers', 'acyusers', '', JText::_('FILTER_VIEW_USERS'), false);
        JToolBarHelper::divider();
        $bar->appendButton('Confirm', JText::_('PROCESS_CONFIRMATION'), 'process', JText::_('PROCESS'), 'process', false, false);
        JToolBarHelper::divider();
        if (acymailing_level(3)) {
            JToolBarHelper::custom('save', 'save', '', JText::_('ACY_SAVE'), false);
            if (!empty($filter->filid)) {
                $bar->appendButton('Link', 'new', JText::_('ACY_NEW'), acymailing_completeLink('filter&task=edit&filid=0'));
            }
        }
        $bar->appendButton('Link', 'cancel', JText::_('ACY_CLOSE'), acymailing_completeLink('dashboard'));
        JToolBarHelper::divider();
        $bar->appendButton('Pophelp', 'filter');
        $subid = JRequest::getString('subid');
        if (!empty($subid)) {
            $subArray = explode(',', trim($subid, ','));
            JArrayHelper::toInteger($subArray);
            $db->setQuery('SELECT `name`,`email` FROM `#__acymailing_subscriber` WHERE `subid` IN (' . implode(',', $subArray) . ')');
            $users = $db->loadObjectList();
            if (!empty($users)) {
                $this->assignRef('users', $users);
                $this->assignRef('subid', $subid);
            }
        }
        $this->assignRef('typevaluesFilters', $typevaluesFilters);
        $this->assignRef('typevaluesActions', $typevaluesActions);
        $this->assignRef('outputFilters', $outputFilters);
        $this->assignRef('outputActions', $outputActions);
        $this->assignRef('filter', $filter);
        $this->assignRef('triggers', $triggers);
        if (JRequest::getCmd('tmpl') == 'component') {
            $doc->addStyleSheet(ACYMAILING_CSS . 'frontendedition.css?v=' . filemtime(ACYMAILING_MEDIA . 'css' . DS . 'frontendedition.css'));
        }
        if (acymailing_level(3) and JRequest::getCmd('tmpl') != 'component') {
            $db->setQuery('SELECT * FROM #__acymailing_filter ORDER BY `published` DESC, `filid` DESC');
            $filters = $db->loadObjectList();
            $toggleClass = acymailing_get('helper.toggle');
            $this->assignRef('toggleClass', $toggleClass);
            $this->assignRef('filters', $filters);
        }
    }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:101,代码来源:view.html.php

示例12: listing

 function listing()
 {
     $config =& acymailing_config();
     acymailing_setTitle(JText::_('CHARTS'), 'stats', 'diagram');
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Link', 'cancel', JText::_('GLOBAL_STATISTICS'), acymailing_completeLink('stats'));
     JToolBarHelper::divider();
     JToolBarHelper::custom('export', 'acyexport', '', JText::_('ACY_EXPORT'), false);
     $bar->appendButton('Directprint');
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'charts');
     if (acymailing_isAllowed($config->get('acl_cpanel_manage', 'all'))) {
         $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     }
     $db = JFactory::getDBO();
     $app = JFactory::getApplication();
     $where = array();
     $groupby = array();
     $groupingtype = array();
     $groupby[] = 'groupingdate';
     $groupby[] = 'groupingtype';
     $selectfield = 'sub.created';
     $listsneeded = false;
     $listClass = acymailing_get('class.list');
     $allLists = $listClass->getLists('listid');
     $this->assignRef('lists', $allLists);
     $display = JRequest::getVar('display', array());
     $this->assignRef('display', $display);
     foreach ($display as $var => $val) {
         $var = acymailing_securefield($var);
         $this->{$var} = acymailing_securefield($val);
     }
     if (empty($display)) {
         return;
     }
     $compares = JRequest::getVar('compares', array());
     $this->assignRef('compares', $compares);
     if (!empty($compares['lists'])) {
         $groupingtype[] = 'list.name';
         $listsneeded = true;
         $selectfield = 'listsub.subdate';
         $where[] = "list.type = 'list'";
         $filterLists = JRequest::getVar('filterlists', array());
         JArrayHelper::toInteger($filterLists);
         if (!empty($filterLists)) {
             $where[] = "listsub.listid IN (" . implode(',', $filterLists) . ")";
         }
         $this->assignRef('filterlists', $filterLists);
     }
     if ($this->interval == 'day') {
         $groupingdate = "DATE_FORMAT(FROM_UNIXTIME(" . $selectfield . "),'%Y-%m-%d')";
         $this->dateformat = '%d %B %Y';
     } elseif ($this->interval == 'month') {
         $groupingdate = "DATE_FORMAT(FROM_UNIXTIME(" . $selectfield . "),'%Y-%m-01')";
         $this->dateformat = '%B %Y';
     } elseif ($this->interval == 'year') {
         $groupingdate = "DATE_FORMAT(FROM_UNIXTIME(" . $selectfield . "),'%Y-01-01')";
         $this->dateformat = '%Y';
     } else {
         return;
     }
     if (!empty($compares['years'])) {
         $groupingtype[] = "DATE_FORMAT(FROM_UNIXTIME(" . $selectfield . "),'%Y')";
         $this->dateformat = str_replace('%Y', '', $this->dateformat);
         $groupingdate = str_replace('%Y', '2000', $groupingdate);
     }
     $fieldtotal = 'COUNT(sub.subid)';
     $fieldtype = empty($groupingtype) ? "'Total'" : "CONCAT('Total - '," . implode(", ' - ' ,", $groupingtype) . ")";
     if (!empty($this->sumup)) {
         $min = empty($this->datemin) ? 0 : acymailing_getTime($this->datemin);
         $max = empty($this->datemax) ? time() : acymailing_getTime($this->datemax);
         if (empty($min)) {
             $db->setQuery('SELECT min(created) FROM #__acymailing_subscriber WHERE created > 0 LIMIT 1');
             $min = $db->loadResult();
         }
         $this->results = array();
         $maxInter = $min;
         $nbqueries = 0;
         while ($maxInter < $max) {
             $nbqueries++;
             if ($nbqueries > 100) {
                 if ($nbqueries == 101) {
                     acymailing_display('There are too many requests, please reduce the date range or change the interval');
                 }
                 continue;
             }
             $previous = $maxInter;
             if ($this->interval == 'day') {
                 $maxInter = mktime(0, 0, 0, date("n", $maxInter), date("j", $maxInter) + 1, date("Y", $maxInter));
             } elseif ($this->interval == 'month') {
                 $maxInter = mktime(0, 0, 0, date("n", $maxInter) + 1, 1, date("Y", $maxInter));
             } elseif ($this->interval == 'year') {
                 $maxInter = mktime(0, 0, 0, 1, 1, date("Y", $maxInter) + 1);
             }
             $whereCond = array();
             if ($listsneeded) {
                 $whereCond[] = 'listsub.status != 2';
                 $whereCond[] = 'listsub.subdate > 0';
                 $whereCond[] = 'listsub.subdate < ' . $maxInter;
                 $whereCond[] = '(listsub.status = 1 OR listsub.unsubdate >' . $maxInter . ')';
//.........这里部分代码省略.........
开发者ID:utopszkij,项目名称:lmp,代码行数:101,代码来源:view.html.php

示例13: listing

 function listing()
 {
     $app =& JFactory::getApplication();
     $pageInfo = null;
     $config = acymailing_config();
     JHTML::_('behavior.modal', 'a.modal');
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName() . $this->getLayout();
     $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'a.senddate', '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);
     $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, true) . '%\'';
         $filters[] = implode(" LIKE {$searchVal} OR ", $this->searchFields) . " LIKE {$searchVal}";
     }
     $query = 'SELECT ' . implode(' , ', $this->selectFields);
     $query .= ' FROM ' . acymailing_table('stats') . ' as a';
     $query .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
     if (!empty($filters)) {
         $query .= ' WHERE (' . implode(') AND (', $filters) . ')';
     }
     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();
     $queryCount = 'SELECT COUNT(a.mailid) FROM ' . acymailing_table('stats') . ' as a';
     if (!empty($pageInfo->search)) {
         $queryCount .= ' JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid';
     }
     if (!empty($filters)) {
         $queryCount .= ' WHERE (' . implode(') AND (', $filters) . ')';
     }
     $database->setQuery($queryCount);
     $pageInfo->elements->total = $database->loadResult();
     if (!empty($pageInfo->search)) {
         $rows = acymailing_search($pageInfo->search, $rows);
     }
     $pageInfo->elements->page = count($rows);
     jimport('joomla.html.pagination');
     $pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
     acymailing_setTitle(JText::_('GLOBAL_STATISTICS'), 'stats', 'stats');
     $bar =& JToolBar::getInstance('toolbar');
     if (acymailing_level(1)) {
         $bar->appendButton('Link', 'stats', JText::_('CHARTS'), acymailing_completeLink('diagram'));
     }
     JToolBarHelper::spacer();
     JToolBarHelper::spacer();
     if (acymailing_isAllowed($config->get('acl_statistics_delete', 'all'))) {
         JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
     }
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'stats-listing');
     if (acymailing_isAllowed($config->get('acl_cpanel_manage', 'all'))) {
         $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     }
     $this->assignRef('rows', $rows);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assignRef('pagination', $pagination);
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:64,代码来源:view.html.php

示例14: display

 function display($tpl = null)
 {
     $doc =& JFactory::getDocument();
     $config = acymailing_config();
     $buttons = array();
     $desc = array();
     $desc['subscriber'] = '<ul><li>' . JText::_('USERS_DESC_CREATE') . '</li><li>' . JText::_('USERS_DESC_MANAGE') . '</li><li>' . JText::_('USERS_DESC_IMPORT') . '</li></ul>';
     $desc['list'] = '<ul><li>' . JText::_('LISTS_DESC_CREATE') . '</li><li>' . JText::_('LISTS_DESC_SUBSCRIPTION') . '</li></ul>';
     $desc['newsletter'] = '<ul><li>' . JText::_('NEWSLETTERS_DESC_CREATE') . '</li><li>' . JText::_('NEWSLETTERS_DESC_TEST') . '</li><li>' . JText::_('NEWSLETTERS_DESC_SEND') . '</li></ul>';
     $desc['template'] = '<ul><li>' . JText::_('TEMPLATES_DESC_CREATE') . '</li></ul>';
     $desc['queue'] = '<ul><li>' . JText::_('QUEUE_DESC_CONTROL') . '</li></ul>';
     $desc['cpanel'] = '<ul><li>' . JText::_('CONFIG_DESC_CONFIG') . '</li><li>' . JText::_('CONFIG_DESC_MODIFY') . '</li><li>' . JText::_('CONFIG_DESC_PLUGIN') . '</li><li>' . JText::_('QUEUE_DESC_BOUNCE');
     if (!acymailing_level(3)) {
         $desc['cpanel'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['cpanel'] .= '</li></ul>';
     $desc['stats'] = '<ul><li>' . JText::_('STATS_DESC_VIEW') . '</li><li>' . JText::_('STATS_DESC_CLICK');
     if (!acymailing_level(1)) {
         $desc['stats'] .= acymailing_getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li><li>' . JText::_('STATS_DESC_CHARTS');
     if (!acymailing_level(1)) {
         $desc['stats'] .= acymailing_getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li></ul>';
     $desc['autonews'] = '<ul><li>' . JText::_('AUTONEWS_DESC');
     if (!acymailing_level(2)) {
         $desc['autonews'] .= acymailing_getUpgradeLink('business');
     }
     $desc['autonews'] .= '</li></ul>';
     $desc['campaign'] = '<ul><li>' . JText::_('CAMPAIGN_DESC_CREATE');
     if (!acymailing_level(3)) {
         $desc['campaign'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li><li>' . JText::_('CAMPAIGN_DESC_AFFECT');
     if (!acymailing_level(3)) {
         $desc['campaign'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li></ul>';
     $desc['update'] = '<ul><li>' . JText::_('UPDATE_DESC') . '</li><li>' . JText::_('CHANGELOG_DESC') . '</li><li>' . JText::_('ABOUT_DESC') . '</li></ul>';
     $buttons[] = array('link' => 'subscriber', 'level' => 0, 'image' => 'acyusers', 'text' => JText::_('USERS'), 'acl' => 'acl_subscriber_manage');
     $buttons[] = array('link' => 'list', 'level' => 0, 'image' => 'acylist', 'text' => JText::_('LISTS'), 'acl' => 'acl_lists_manage');
     $buttons[] = array('link' => 'newsletter', 'level' => 0, 'image' => 'newsletter', 'text' => JText::_('NEWSLETTERS'), 'acl' => 'acl_newsletters_manage');
     $buttons[] = array('link' => 'autonews', 'level' => 2, 'image' => 'autonewsletter', 'text' => JText::_('AUTONEWSLETTERS'), 'acl' => 'acl_autonewsletters_manage');
     $buttons[] = array('link' => 'campaign', 'level' => 3, 'image' => 'campaign', 'text' => JText::_('CAMPAIGN'), 'acl' => 'acl_campaign_manage');
     $buttons[] = array('link' => 'template', 'level' => 0, 'image' => 'acytemplate', 'text' => JText::_('ACY_TEMPLATES'), 'acl' => 'acl_templates_manage');
     $buttons[] = array('link' => 'queue', 'level' => 0, 'image' => 'process', 'text' => JText::_('QUEUE'), 'acl' => 'acl_queue_manage');
     $buttons[] = array('link' => 'stats', 'level' => 0, 'image' => 'stats', 'text' => JText::_('STATISTICS'), 'acl' => 'acl_statistics_manage');
     $buttons[] = array('link' => 'cpanel', 'level' => 0, 'image' => 'acyconfig', 'text' => JText::_('CONFIGURATION'), 'acl' => 'acl_configuration_manage');
     $buttons[] = array('link' => 'update', 'level' => 0, 'image' => 'acyupdate', 'text' => JText::_('UPDATE_ABOUT'), 'acl' => 'acl_configuration_manage');
     $htmlbuttons = array();
     foreach ($buttons as $oneButton) {
         if (acymailing_isAllowed($config->get($oneButton['acl'], 'all'))) {
             $htmlbuttons[] = $this->_quickiconButton($oneButton['link'], $oneButton['image'], $oneButton['text'], $desc[$oneButton['link']], $oneButton['level']);
         }
     }
     acymailing_setTitle(ACYMAILING_NAME, 'acymailing', 'dashboard');
     $bar =& JToolBar::getInstance('toolbar');
     $bar->appendButton('Pophelp', 'dashboard');
     $this->assignRef('buttons', $htmlbuttons);
     $toggleClass = acymailing_get('helper.toggle');
     $this->assignRef('toggleClass', $toggleClass);
     $db = JFactory::getDBO();
     $db->setQuery('SELECT name,email,html,confirmed,subid,created FROM ' . acymailing_table('subscriber') . ' ORDER BY created DESC LIMIT 15');
     $users10 = $db->loadObjectList();
     $this->assignRef('users', $users10);
     $db->setQuery('SELECT a.*, b.subject FROM ' . acymailing_table('stats') . ' as a LEFT JOIN ' . acymailing_table('mail') . ' as b on a.mailid = b.mailid ORDER BY a.senddate DESC LIMIT 15');
     $newsletters10 = $db->loadObjectList();
     $this->assignRef('stats', $newsletters10);
     $doc->addScript(((empty($_SERVER['HTTPS']) or strtolower($_SERVER['HTTPS']) != "on") ? 'http://' : 'https://') . "www.google.com/jsapi");
     $today = acymailing_getTime(date('Y-m-d'));
     $joomConfig =& JFactory::getConfig();
     $diff = date('Z') + intval($joomConfig->getValue('config.offset') * 60 * 60);
     $db->setQuery("SELECT count(`subid`) as total, DATE_FORMAT(FROM_UNIXTIME(`created` - {$diff}),'%Y-%m-%d') as subday FROM " . acymailing_table('subscriber') . " GROUP BY subday ORDER BY subday DESC LIMIT 15");
     $statsusers = $db->loadObjectList();
     $this->assignRef('statsusers', $statsusers);
     jimport('joomla.html.pane');
     $tabs =& JPane::getInstance('tabs');
     $this->assignRef('tabs', $tabs);
     $this->assignRef('config', $config);
     parent::display($tpl);
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:82,代码来源:view.html.php

示例15: display

 function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $config = acymailing_config();
     $buttons = array();
     $desc = array();
     $desc['subscriber'] = '<ul><li>' . JText::_('USERS_DESC_CREATE') . '</li><li>' . JText::_('USERS_DESC_MANAGE') . '</li><li>' . JText::_('USERS_DESC_IMPORT') . '</li></ul>';
     $desc['list'] = '<ul><li>' . JText::_('LISTS_DESC_CREATE') . '</li><li>' . JText::_('LISTS_DESC_SUBSCRIPTION') . '</li></ul>';
     $desc['newsletter'] = '<ul><li>' . JText::_('NEWSLETTERS_DESC_CREATE') . '</li><li>' . JText::_('NEWSLETTERS_DESC_TEST') . '</li><li>' . JText::_('NEWSLETTERS_DESC_SEND') . '</li></ul>';
     $desc['template'] = '<ul><li>' . JText::_('TEMPLATES_DESC_CREATE') . '</li></ul>';
     $desc['queue'] = '<ul><li>' . JText::_('QUEUE_DESC_CONTROL') . '</li></ul>';
     $desc['cpanel'] = '<ul><li>' . JText::_('CONFIG_DESC_CONFIG') . '</li><li>' . JText::_('CONFIG_DESC_MODIFY') . '</li><li>' . JText::_('CONFIG_DESC_PLUGIN') . '</li><li>' . JText::_('QUEUE_DESC_BOUNCE');
     if (!acymailing_level(3)) {
         $desc['cpanel'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['cpanel'] .= '</li></ul>';
     $desc['stats'] = '<ul><li>' . JText::_('STATS_DESC_VIEW') . '</li><li>' . JText::_('STATS_DESC_CLICK');
     if (!acymailing_level(1)) {
         $desc['stats'] .= acymailing_getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li><li>' . JText::_('STATS_DESC_CHARTS');
     if (!acymailing_level(1)) {
         $desc['stats'] .= acymailing_getUpgradeLink('essential');
     }
     $desc['stats'] .= '</li></ul>';
     $desc['autonews'] = '<ul><li>' . JText::_('AUTONEWS_DESC');
     if (!acymailing_level(2)) {
         $desc['autonews'] .= acymailing_getUpgradeLink('business');
     }
     $desc['autonews'] .= '</li></ul>';
     $desc['campaign'] = '<ul><li>' . JText::_('CAMPAIGN_DESC_CREATE');
     if (!acymailing_level(3)) {
         $desc['campaign'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li><li>' . JText::_('CAMPAIGN_DESC_AFFECT');
     if (!acymailing_level(3)) {
         $desc['campaign'] .= acymailing_getUpgradeLink('enterprise');
     }
     $desc['campaign'] .= '</li></ul>';
     $desc['update'] = '<ul><li>' . JText::_('UPDATE_DESC') . '</li><li>' . JText::_('CHANGELOG_DESC') . '</li><li>' . JText::_('ABOUT_DESC') . '</li></ul>';
     $buttons[] = array('link' => 'subscriber', 'level' => 0, 'image' => 'acyusers', 'text' => JText::_('USERS'), 'acl' => 'acl_subscriber_manage');
     $buttons[] = array('link' => 'list', 'level' => 0, 'image' => 'acylist', 'text' => JText::_('LISTS'), 'acl' => 'acl_lists_manage');
     $buttons[] = array('link' => 'newsletter', 'level' => 0, 'image' => 'newsletter', 'text' => JText::_('NEWSLETTERS'), 'acl' => 'acl_newsletters_manage');
     $buttons[] = array('link' => 'autonews', 'level' => 2, 'image' => 'autonewsletter', 'text' => JText::_('AUTONEWSLETTERS'), 'acl' => 'acl_autonewsletters_manage');
     $buttons[] = array('link' => 'campaign', 'level' => 3, 'image' => 'campaign', 'text' => JText::_('CAMPAIGN'), 'acl' => 'acl_campaign_manage');
     $buttons[] = array('link' => 'template', 'level' => 0, 'image' => 'acytemplate', 'text' => JText::_('ACY_TEMPLATES'), 'acl' => 'acl_templates_manage');
     $buttons[] = array('link' => 'queue', 'level' => 0, 'image' => 'process', 'text' => JText::_('QUEUE'), 'acl' => 'acl_queue_manage');
     $buttons[] = array('link' => 'stats', 'level' => 0, 'image' => 'stats', 'text' => JText::_('STATISTICS'), 'acl' => 'acl_statistics_manage');
     if (!ACYMAILING_J16 || JFactory::getUser()->authorise('core.admin', 'com_acymailing')) {
         $buttons[] = array('link' => 'cpanel', 'level' => 0, 'image' => 'acyconfig', 'text' => JText::_('CONFIGURATION'), 'acl' => 'acl_configuration_manage');
     }
     $buttons[] = array('link' => 'update', 'level' => 0, 'image' => 'acyupdate', 'text' => JText::_('UPDATE_ABOUT'), 'acl' => 'acl_configuration_manage');
     $htmlbuttons = array();
     foreach ($buttons as $oneButton) {
         if (acymailing_isAllowed($config->get($oneButton['acl'], 'all'))) {
             $htmlbuttons[] = $this->_quickiconButton($oneButton['link'], $oneButton['image'], $oneButton['text'], $desc[$oneButton['link']], $oneButton['level']);
         }
     }
     $geolocParam = $config->get('geolocation');
     if (!empty($geolocParam) && $geolocParam != 1) {
         $condition = '';
         if (strpos($geolocParam, 'creation') !== false) {
             $condition = " WHERE geolocation_type='creation'";
         }
         $db = JFactory::getDBO();
         $query = 'SELECT geolocation_type, geolocation_subid, geolocation_country_code, geolocation_city';
         $query .= ' FROM #__acymailing_geolocation' . $condition . ' GROUP BY geolocation_subid ORDER BY geolocation_created DESC LIMIT 100';
         $db->setQuery($query);
         $geoloc = $db->loadObjectList();
         if (!empty($geoloc)) {
             $markCities = array();
             $diffCountries = false;
             $dataDetails = array();
             foreach ($geoloc as $mark) {
                 $indexCity = array_search($mark->geolocation_city, $markCities);
                 if ($indexCity === false) {
                     array_push($markCities, $mark->geolocation_city);
                     array_push($dataDetails, 1);
                 } else {
                     $dataDetails[$indexCity] += 1;
                 }
                 if (!$diffCountries) {
                     if (!empty($region) && $region != $mark->geolocation_country_code) {
                         $region = 'world';
                         $diffCountries = true;
                     } else {
                         $region = $mark->geolocation_country_code;
                     }
                 }
             }
             $this->assignRef('geoloc_city', $markCities);
             $this->assignRef('geoloc_details', $dataDetails);
             $this->assignRef('geoloc_region', $region);
         }
     }
     acymailing_setTitle(ACYMAILING_NAME, 'acymailing', 'dashboard');
     $bar = JToolBar::getInstance('toolbar');
     if (ACYMAILING_J16 && JFactory::getUser()->authorise('core.admin', 'com_acymailing')) {
         JToolBarHelper::preferences('com_acymailing');
     }
//.........这里部分代码省略.........
开发者ID:educakanchay,项目名称:educared,代码行数:101,代码来源:view.html.php


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