本文整理汇总了PHP中acymailingView::display方法的典型用法代码示例。如果您正苦于以下问题:PHP acymailingView::display方法的具体用法?PHP acymailingView::display怎么用?PHP acymailingView::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acymailingView
的用法示例。
在下文中一共展示了acymailingView::display方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
$function = $this->getLayout();
if(method_exists($this,$function)) $this->$function();
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
$doc = JFactory::getDocument();
$doc->addScript("https://www.google.com/jsapi");
$function = $this->getLayout();
if (method_exists($this, $function)) {
$this->{$function}();
}
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
$doc = JFactory::getDocument();
$doc->addStyleSheet(ACYMAILING_CSS . 'frontendedition.css?v=' . filemtime(ACYMAILING_MEDIA . 'css' . DS . 'frontendedition.css'));
JRequest::setVar('tmpl', 'component');
$function = $this->getLayout();
if (method_exists($this, $function)) {
$this->{$function}();
}
parent::display($tpl);
}
示例4: display
function display($tpl = null)
{
$config = acymailing_config();
$doc = JFactory::getDocument();
$acyToolbar = acymailing::get('helper.toolbar');
$acyToolbar->help('dashboard');
$acyToolbar->setTitle(JText::_('ACY_CPANEL'), 'dashboard');
$acyToolbar->display();
$db = JFactory::getDBO();
$userQuery = 'SELECT (confirmed + enabled) AS addition, COUNT(subid) AS total FROM #__acymailing_subscriber GROUP BY addition';
$db->setQuery($userQuery);
$userResult = $db->loadObjectList('addition');
$userStats = new stdClass();
$userStats->nbUnconfirmedAndDisabled = empty($userResult[0]->total) ? 0 : $userResult[0]->total;
$userStats->nbConfirmed = empty($userResult[1]->total) ? 0 : $userResult[1]->total;
$userStats->nbConfirmed += empty($userResult[2]->total) ? 0 : $userResult[2]->total;
$userStats->total = $userStats->nbConfirmed + $userStats->nbUnconfirmedAndDisabled;
$userStats->confirmedPercent = empty($userStats->total) ? 0 : round($userStats->nbConfirmed * 100 / $userStats->total, 0);
$listsQuery = "SELECT COUNT(DISTINCT(l.listid)) FROM #__acymailing_list as l LEFT JOIN #__acymailing_listsub as ls ON l.listid=ls.listid WHERE l.type='list' AND ls.status=1 AND ls.subid IS NOT NULL";
$db->setQuery($listsQuery);
$atLeastOneSub = $db->loadResult();
$db->setQuery('SELECT COUNT(listid) FROM #__acymailing_list WHERE type = "list"');
$nbLists = $db->loadResult();
$listStats = new stdClass();
$listStats->atLeastOneSub = $atLeastOneSub;
$listStats->noSub = $nbLists - $atLeastOneSub;
$listStats->total = $nbLists;
$listStats->subscribedPercent = empty($nbLists) ? 0 : round($atLeastOneSub * 100 / $nbLists, 0);
$nlQuery = 'SELECT count(mailid) AS total, published FROM #__acymailing_mail WHERE type = "news" GROUP BY published';
$db->setQuery($nlQuery);
$nlResult = $db->loadObjectList('published');
$nlStats = new stdClass();
$nlStats->nbUnpublished = empty($nlResult[0]->total) ? 0 : $nlResult[0]->total;
$nlStats->nbpublished = empty($nlResult[1]->total) ? 0 : $nlResult[1]->total;
$nlStats->total = $nlStats->nbpublished + $nlStats->nbUnpublished;
$nlStats->publishedPercent = empty($nlStats->total) ? 0 : round($nlStats->nbpublished * 100 / $nlStats->total, 0);
$this->assignRef('nlStats', $nlStats);
$this->assignRef('userStats', $userStats);
$this->assignRef('listStats', $listStats);
$this->assignRef('config', $config);
$geolocParam = $config->get('geolocation');
if (!empty($geolocParam) && $geolocParam != 1) {
$condition = '';
if (strpos($geolocParam, 'creation') !== false) {
$condition = " WHERE geolocation_type='creation'";
}
$db = JFactory::getDBO();
$nbUsersToGet = 100;
$query = 'SELECT geolocation_type, geolocation_subid, geolocation_country_code, geolocation_city, geolocation_country, geolocation_state';
$query .= ' FROM #__acymailing_geolocation' . $condition . ' GROUP BY geolocation_subid ORDER BY geolocation_created DESC LIMIT ' . $nbUsersToGet;
$db->setQuery($query);
$geoloc = $db->loadObjectList();
if (!empty($geoloc)) {
$markCities = array();
$diffCountries = false;
$dataDetails = array();
$addresses = 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);
$addresses[] = $mark->geolocation_city . ' ' . $mark->geolocation_state . ' ' . $mark->geolocation_country;
} 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);
$this->assignRef('geoloc_addresses', $addresses);
$this->assign('nbUsersToGet', $nbUsersToGet);
}
}
$doc->addScript("https://www.google.com/jsapi");
$db->setQuery("SELECT count(`subid`) as total, DATE_FORMAT(FROM_UNIXTIME(`created`),'%Y-%m-%d') as subday FROM " . acymailing_table('subscriber') . " WHERE `created` > 100000 GROUP BY subday ORDER BY subday DESC LIMIT 15");
$statsusers = $db->loadObjectList();
$this->assignRef('statsusers', $statsusers);
$db = JFactory::getDBO();
$db->setQuery('SELECT name,email,html,confirmed,subid,created FROM ' . acymailing_table('subscriber') . ' ORDER BY subid DESC LIMIT 10');
$users10 = $db->loadObjectList();
$this->assignRef('users', $users10);
$toggleClass = acymailing_get('helper.toggle');
$this->assignRef('toggleClass', $toggleClass);
$listStatusQuery = 'SELECT count(subid) AS total, list.name AS listname, list.listid, listsub.status FROM #__acymailing_list AS list JOIN #__acymailing_listsub AS listsub ON list.listid = listsub.listid GROUP BY listsub.listid, listsub.status';
$db->setQuery($listStatusQuery);
$listStatusResult = $db->loadObjectList();
$listStatusData = array();
foreach ($listStatusResult as $oneResult) {
$listStatusData[$oneResult->listname][$oneResult->status] = $oneResult->total;
}
$this->assignRef('listStatusData', $listStatusData);
//.........这里部分代码省略.........
示例5: 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&tmpl=component&ctrl=file&task=latest&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_enqueueMessage(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_enqueueMessage(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_enqueueMessage('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_enqueueMessage($addIndexes, 'warning');
}
$acyToolbar = acymailing::get('helper.toolbar');
$acyToolbar->custom('test', JText::_('SEND_TEST'), 'send', false);
$acyToolbar->divider();
$acyToolbar->addButtonOption('apply', JText::_('ACY_APPLY'), 'apply', false);
$acyToolbar->save();
$acyToolbar->cancel();
$acyToolbar->divider();
$acyToolbar->help('config');
$acyToolbar->setTitle(JText::_('ACY_CONFIGURATION'), 'cpanel');
$acyToolbar->display();
$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));
if (acymailing_level(1)) {
$forwardValues = array();
$forwardValues[] = JHTML::_('select.option', 0, JTEXT::_('JOOMEXT_NO'));
$forwardValues[] = JHTML::_('select.option', 1, JTEXT::_('JOOMEXT_YES'));
$forwardValues[] = JHTML::_('select.option', 2, JTEXT::_('JOOMEXT_YES_FORWARD'));
//.........这里部分代码省略.........
示例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&tmpl=component&ctrl=file&task=latest&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');
}
}
$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('smtp_com', '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();
$forwardValues[] = JHTML::_('select.option', 0, JTEXT::_('JOOMEXT_NO'));
$forwardValues[] = JHTML::_('select.option', 1, JTEXT::_('JOOMEXT_YES'));
$forwardValues[] = JHTML::_('select.option', 2, JTEXT::_('JOOMEXT_YES_FORWARD'));
$elements->forward = JHTML::_('acyselect.radiolist', $forwardValues, "config[forward]", '', 'value', 'text', $config->get('forward', 0));
} else {
$elements->forward = acymailing_getUpgradeLink('essential');
}
if (acymailing_level(1)) {
$js = "function updateDKIM(dkimval){if(dkimval == 1){document.getElementById('dkim_config').style.display = 'block';}else{document.getElementById('dkim_config').style.display = 'none';}}\r\n\t\t\t\t\twindow.addEvent('load', function(){ updateDKIM(" . $config->get('dkim', 0) . ");});";
$doc->addScriptDeclaration($js);
if (function_exists('openssl_sign')) {
//.........这里部分代码省略.........
示例7: 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']);
}
}
acymailing_setTitle(ACYMAILING_NAME, 'acymailing', 'dashboard');
$bar = JToolBar::getInstance('toolbar');
if (ACYMAILING_J16 && JFactory::getUser()->authorise('core.admin', 'com_acymailing')) {
JToolBarHelper::preferences('com_acymailing');
}
$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 subid DESC LIMIT 15');
$users10 = $db->loadObjectList();
$this->assignRef('users', $users10);
$db->setQuery('SELECT a.*, b.subject FROM ' . acymailing_table('stats') . ' as a 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();
$offset = ACYMAILING_J30 ? $joomConfig->get('offset') : $joomConfig->getValue('config.offset');
$diff = date('Z') + intval($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);
$tabs = acymailing_get('helper.acytabs');
$tabs->setOptions(array('useCookie' => true));
$this->assignRef('tabs', $tabs);
$this->assignRef('config', $config);
parent::display($tpl);
}