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


PHP acymailing::isAllowed方法代码示例

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


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

示例1: 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');
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:update.php

示例2: 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) {
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:51,代码来源:view.feed.php

示例3: addSubscription

 function addSubscription($subid, $lists)
 {
     $app =& JFactory::getApplication();
     $my = JFactory::getUser();
     $result = true;
     $time = time();
     $subid = intval($subid);
     $listHelper = acymailing::get('helper.list');
     foreach ($lists as $status => $listids) {
         $status = intval($status);
         JArrayHelper::toInteger($listids);
         $this->database->setQuery('SELECT `listid`,`access_sub` FROM ' . acymailing::table('list') . ' WHERE `listid` IN (' . implode(',', $listids) . ') AND `type` = \'list\'');
         $allResults = $this->database->loadObjectList('listid');
         $listids = array_keys($allResults);
         //-1 is unsubscribe
         if ($status == '-1') {
             $column = 'unsubdate';
         } else {
             $column = 'subdate';
         }
         $values = array();
         foreach ($listids as $listid) {
             if (empty($listid)) {
                 continue;
             }
             if ($status > 0 && acymailing::level(3)) {
                 if (!$app->isAdmin() && $this->checkAccess && $allResults[$listid]->access_sub != 'all') {
                     if (!acymailing::isAllowed($allResults[$listid]->access_sub, $this->gid)) {
                         continue;
                     }
                 }
             }
             $values[] = intval($listid) . ',' . $subid . ',' . $status . ',' . $time;
         }
         if (empty($values)) {
             continue;
         }
         $query = 'INSERT INTO ' . acymailing::table('listsub') . ' (listid,subid,`status`,' . $column . ') VALUES (' . implode('),(', $values) . ')';
         $this->database->setQuery($query);
         $result = $this->database->query() && $result;
         if ($status == 1) {
             $listHelper->subscribe($subid, $listids);
         }
     }
     return $result;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:46,代码来源:listsub.php

示例4: store

 function store()
 {
     if (!$this->isAllowed('configuration', 'manage')) {
         return;
     }
     $app =& JFactory::getApplication();
     JRequest::checkToken() or die('Invalid Token');
     $formData = JRequest::getVar('config', array(), '', 'array');
     $aclcats = JRequest::getVar('aclcat', array(), '', 'array');
     if (!empty($aclcats)) {
         if (JRequest::getString('acl_configuration', 'all') != 'all' && !acymailing::isAllowed($formData['acl_configuration_manage'])) {
             $app->enqueueMessage(JText::_('ACL_WRONG_CONFIG'), 'notice');
             unset($formData['acl_configuration_manage']);
         }
         $deleteAclCats = array();
         $unsetVars = array('save', 'create', 'modify', 'delete', 'fields', 'export', 'import', 'view', 'send', 'schedule', 'bounce', 'test');
         foreach ($aclcats as $oneCat) {
             if (JRequest::getString('acl_' . $oneCat) == 'all') {
                 foreach ($unsetVars as $oneVar) {
                     unset($formData['acl_' . $oneCat . '_' . $oneVar]);
                 }
                 $deleteAclCats[] = $oneCat;
             }
         }
     }
     $config =& acymailing::config();
     $status = $config->save($formData);
     if (!empty($deleteAclCats)) {
         $db =& JFactory::getDBO();
         $db->setQuery("DELETE FROM `#__acymailing_config` WHERE `namekey` LIKE 'acl_" . implode("%' OR `namekey` LIKE 'acl_", $deleteAclCats) . "%'");
         $db->query();
     }
     if ($status) {
         $app->enqueueMessage(JText::_('JOOMEXT_SUCC_SAVED'), 'message');
     } else {
         $app->enqueueMessage(JText::_('ERROR_SAVING'), 'error');
     }
     $config->load();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:39,代码来源:config.php

示例5: form

    function form()
    {
        $tempid = acymailing::getCID('tempid');
        $app =& JFactory::getApplication();
        $config = acymailing::config();
        if (!empty($tempid)) {
            $templateClass = acymailing::get('class.template');
            $template = $templateClass->get($tempid);
            if (!empty($template->body)) {
                $template->body = acymailing::absoluteURL($template->body);
            }
        } else {
            $template->body = '';
            $template->tempid = 0;
            $template->published = 1;
        }
        $editor = acymailing::get('helper.editor');
        $editor->setTemplate($template->tempid);
        $editor->name = 'editor_body';
        $editor->content = $template->body;
        $editor->prepareDisplay();
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $script = 'function submitbutton(pressbutton){
						if (pressbutton == \'cancel\') {
							submitform( pressbutton );
							return;
						}';
        } else {
            $script = 'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton == \'cancel\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
        }
        $script .= 'if(window.document.getElementById("name").value.length < 2){alert(\'' . JText::_('ENTER_TITLE', true) . '\'); return false;}';
        $script .= "if(pressbutton == 'test' && window.document.getElementById('sendtest') && window.document.getElementById('sendtest').style.display == 'none'){ window.document.getElementById('sendtest').style.display = 'block'; return false;}";
        $script .= $editor->jsCode();
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $script .= 'submitform( pressbutton );} ';
        } else {
            $script .= 'Joomla.submitform(pressbutton,document.adminForm);}; ';
        }
        $script .= "function insertTag(tag){ try{jInsertEditorText(tag,'editor_body'); return true;} catch(err){alert('Your editor does not enable AcyMailing to automatically insert the tag, please copy/paste it manually in your Newsletter'); return false;}}";
        $script .= 'function addStyle(){
		var myTable=window.document.getElementById("classtable");
		var newline = document.createElement(\'tr\');
		var column = document.createElement(\'td\');
		var column2 = document.createElement(\'td\');
		var input = document.createElement(\'input\');
		var input2 = document.createElement(\'input\');
		input.type = \'text\';
		input2.type = \'text\';
		input.size = \'30\';
		input2.size = \'50\';
		input.name = \'otherstyles[classname][]\';
		input2.name = \'otherstyles[style][]\';
		input.value = "' . JText::_('CLASS_NAME', true) . '";
		input2.value = "' . JText::_('CSS_STYLE', true) . '";
		column.appendChild(input);
		column2.appendChild(input2);
		newline.appendChild(column);
		newline.appendChild(column2);
		myTable.appendChild(newline);
		}';
        $doc =& JFactory::getDocument();
        $doc->addScriptDeclaration($script);
        $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
        $infos = null;
        $infos->receiver_type = $app->getUserStateFromRequest($paramBase . ".receiver_type", 'receiver_type', '', 'string');
        $infos->test_email = $app->getUserStateFromRequest($paramBase . ".test_email", 'test_email', '', 'string');
        acymailing::setTitle(JText::_('ACY_TEMPLATE'), 'acytemplate', 'template&task=edit&tempid=' . $tempid);
        $bar =& JToolBar::getInstance('toolbar');
        if (acymailing::isAllowed($config->get('acl_tags_view', 'all'))) {
            $bar->appendButton('Acytags');
        }
        JToolBarHelper::divider();
        JToolBarHelper::custom('test', 'send', '', JText::_('SEND_TEST'), false);
        JToolBarHelper::spacer();
        JToolBarHelper::save();
        JToolBarHelper::apply();
        JToolBarHelper::cancel();
        JToolBarHelper::divider();
        $bar->appendButton('Pophelp', 'template-form');
        $this->assignRef('editor', $editor);
        $this->assignRef('receiverClass', acymailing::get('type.testreceiver'));
        $this->assignRef('template', $template);
        $this->assignRef('colorBox', acymailing::get('type.color'));
        $this->assignRef('infos', $infos);
        jimport('joomla.html.pane');
        $tabs =& JPane::getInstance('tabs');
        $this->assignRef('tabs', $tabs);
    }
开发者ID:bizanto,项目名称:Hooked,代码行数:92,代码来源:view.html.php

示例6:

							<span class="acyeditbutton"><a href="<?php 
            echo acymailing::completeLink('newsletter&task=edit&mailid=' . $row->mailid . '&listid=' . $this->list->listid);
            ?>
" title="<?php 
            echo JText::_('ACY_EDIT', true);
            ?>
" ><img class="icon16" src="<?php 
            echo ACYMAILING_IMAGES;
            ?>
icons/icon-16-edit.png" alt="<?php 
            echo JText::_('ACY_EDIT', true);
            ?>
" /></a></span>
							<?php 
        }
        if (!empty($row->senddate) && acymailing::isAllowed($this->config->get('acl_statistics_manage', 'all'))) {
            ?>
							<span class="acystatsbutton"><a class="modal" rel="{handler: 'iframe', size: {x: 800, y: 590}}" href="<?php 
            echo acymailing::completeLink('newsletter&task=stats&mailid=' . $row->mailid . '&listid=' . $this->list->listid, true);
            ?>
"><img src="<?php 
            echo ACYMAILING_IMAGES;
            ?>
icons/icon-16-stats.png" alt="<?php 
            echo JText::_('STATISTICS', true);
            ?>
" /></a></span>
							<?php 
        }
        ?>
						<?php 
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:listing_newsletters.php

示例7:

        JSubMenuHelper::addEntry(JText::_('USERS'), 'index.php?option=com_acymailing&ctrl=subscriber', $taskGroup == 'subscriber');
    }
    if (acymailing::isAllowed($config->get('acl_lists_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('LISTS'), 'index.php?option=com_acymailing&ctrl=list', $taskGroup == 'list');
    }
    if (acymailing::isAllowed($config->get('acl_newsletters_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('NEWSLETTERS'), 'index.php?option=com_acymailing&ctrl=newsletter', $taskGroup == 'newsletter');
    }
    if (acymailing::level(2)) {
        if (acymailing::isAllowed($config->get('acl_autonewsletters_manage', 'all'))) {
            JSubMenuHelper::addEntry(JText::_('AUTONEWSLETTERS'), 'index.php?option=com_acymailing&ctrl=autonews', $taskGroup == 'autonews');
        }
    }
    if (acymailing::level(3)) {
        if (acymailing::isAllowed($config->get('acl_campaign_manage', 'all'))) {
            JSubMenuHelper::addEntry(JText::_('CAMPAIGN'), 'index.php?option=com_acymailing&ctrl=campaign', $taskGroup == 'campaign');
        }
    }
    if (acymailing::isAllowed($config->get('acl_templates_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('ACY_TEMPLATES'), 'index.php?option=com_acymailing&ctrl=template', $taskGroup == 'template');
    }
    if (acymailing::isAllowed($config->get('acl_queue_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('QUEUE'), 'index.php?option=com_acymailing&ctrl=queue', $taskGroup == 'queue');
    }
    if (acymailing::isAllowed($config->get('acl_statistics_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('STATISTICS'), 'index.php?option=com_acymailing&ctrl=stats', $taskGroup == 'stats');
    }
    if (acymailing::isAllowed($config->get('acl_configuration_manage', 'all'))) {
        JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), 'index.php?option=com_acymailing&ctrl=config', $taskGroup == 'config');
    }
}
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:admin.acymailing.php

示例8: foreach

$listsClass = acymailing::get('class.list');
if (empty($identifiedUser->subid)) {
    $allLists = $listsClass->getLists('listid');
} else {
    $allLists = $userClass->getSubscription($identifiedUser->subid, 'listid');
}
if (acymailing::level(1)) {
    $allLists = $listsClass->onlyCurrentLanguage($allLists);
}
if (acymailing::level(3)) {
    $my = JFactory::getUser();
    foreach ($allLists as $listid => $oneList) {
        if (!$allLists[$listid]->published) {
            continue;
        }
        if (!acymailing::isAllowed($oneList->access_sub)) {
            $allLists[$listid]->published = false;
        }
    }
}
if (strpos($visibleLists, ',') or is_numeric($visibleLists)) {
    $allvisiblelists = explode(',', $visibleLists);
    foreach ($allLists as $oneList) {
        if ($oneList->published and in_array($oneList->listid, $allvisiblelists)) {
            $visibleListsArray[] = $oneList->listid;
        }
    }
} elseif (strtolower($visibleLists) == 'all') {
    foreach ($allLists as $oneList) {
        if ($oneList->published) {
            $visibleListsArray[] = $oneList->listid;
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:mod_acymailing.php

示例9: view

 function view()
 {
     $app =& JFactory::getApplication();
     $pathway =& $app->getPathway();
     $my = JFactory::getUser();
     $frontEndManagement = false;
     $listid = acymailing::getCID('listid');
     if (!empty($listid)) {
         $listClass = acymailing::get('class.list');
         $oneList = $listClass->get($listid);
         if (!empty($oneList->visible) and $oneList->published) {
             $pathway->addItem($oneList->name, acymailing::completeLink('archive&listid=' . $oneList->listid . ':' . $oneList->alias));
         }
         if (!empty($oneList->listid) and acymailing::level(3)) {
             if (!empty($my->id) and (int) $my->id == (int) $oneList->userid) {
                 $frontEndManagement = true;
             }
             if (!empty($my->id)) {
                 if ($oneList->access_manage == 'all' or acymailing::isAllowed($oneList->access_manage)) {
                     $frontEndManagement = true;
                 }
             }
         }
     }
     $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 (!$frontEndManagement and (!$access_sub or !$oneMail->published or !$oneMail->visible)) {
         $key = JRequest::getString('key');
         if (empty($key) or $key !== $oneMail->key) {
             $app->enqueueMessage('You can not have access to this e-mail', 'error');
             $app->redirect(acymailing::completeLink('lists', false, true));
             return false;
         }
     }
     $subkeys = JRequest::getString('subid', JRequest::getString('sub'));
     if (!empty($subkeys)) {
         $db =& JFactory::getDBO();
         $subid = intval(substr($subkeys, 0, strpos($subkeys, '-')));
         $subkey = substr($subkeys, strpos($subkeys, '-') + 1);
         $db->setQuery('SELECT * FROM ' . acymailing::table('subscriber') . ' WHERE `subid` = ' . $db->Quote($subid) . ' AND `key` = ' . $db->Quote($subkey) . ' LIMIT 1');
         $receiver = $db->loadObject();
     }
     if (empty($receiver) and !empty($my->email)) {
         $userClass = acymailing::get('class.subscriber');
         $receiver = $userClass->get($my->email);
     }
     if (empty($receiver)) {
         $receiver = null;
         $receiver->name = JText::_('VISITOR');
     }
     $oneMail->sendHTML = true;
     $mailClass->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$oneMail, &$receiver));
     $pathway->addItem($oneMail->subject);
     $document =& JFactory::getDocument();
     $document->setTitle($oneMail->subject);
     if (!empty($oneMail->metadesc)) {
         $document->setDescription($oneMail->metadesc);
     }
     if (!empty($oneMail->metakey)) {
         $document->setMetadata('keywords', $oneMail->metakey);
     }
     $this->assignRef('mail', $oneMail);
     $this->assignRef('frontEndManagement', $frontEndManagement);
     $this->assignRef('list', $oneList);
     $this->assignRef('config', acymailing::config());
     $this->assignRef('my', $my);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:86,代码来源:view.html.php

示例10: isAllowed

 function isAllowed($cat, $action)
 {
     if (acymailing::level(3)) {
         $config = acymailing::config();
         if (!acymailing::isAllowed($config->get('acl_' . $cat . '_' . $action, 'all'))) {
             acymailing::display(JText::_('ACY_NOTALLOWED'), 'error');
             return false;
         }
     }
     return true;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:11,代码来源:helper.php

示例11: 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 .= ' LEFT 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 .= ' LEFT 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:bizanto,项目名称:Hooked,代码行数:64,代码来源:view.html.php

示例12: foreach

	<tr>
		<td width="45%" valign="top">
			<div id="acymailingcpanel">
				<?php 
foreach ($this->buttons as $oneButton) {
    echo $oneButton;
}
?>
			</div>
		</td>
		<td valign="top">
			<?php 
if (acymailing::isAllowed($this->config->get('acl_subscriber_manage', 'all')) || acymailing::isAllowed($this->config->get('acl_statistics_manage', 'all'))) {
    echo $this->tabs->startPane('dash_tab');
    if (acymailing::isAllowed($this->config->get('acl_subscriber_manage', 'all'))) {
        echo $this->tabs->startPanel(JText::_('USERS'), 'dash_users');
        include dirname(__FILE__) . DS . 'users.php';
        echo $this->tabs->endPanel();
    }
    if (acymailing::isAllowed($this->config->get('acl_statistics_manage', 'all'))) {
        echo $this->tabs->startPanel(JText::_('STATISTICS'), 'dash_stats');
        include dirname(__FILE__) . DS . 'stats.php';
        echo $this->tabs->endPanel();
    }
    echo $this->tabs->endPane();
}
?>
		</td>
	</tr>
</table>
</div>
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:default.php

示例13: 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');
         }
     }
     acymailing::setTitle(JText::_('CONFIGURATION'), 'config', 'config');
     $bar =& JToolBar::getInstance('toolbar');
     if (acymailing::level(3)) {
         $bar->appendButton('Link', 'fields', JText::_('EXTRA_FIELDS'), acymailing::completeLink('fields'));
         JToolBarHelper::custom('bounce', 'process', '', JText::_('BOUNCE_PROCESS'), false);
     }
     JToolBarHelper::custom('test', 'send', '', 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 = null;
     $elements->add_names = JHTML::_('select.booleanlist', "config[add_names]", '', $config->get('add_names', true));
     $elements->embed_images = JHTML::_('select.booleanlist', "config[embed_images]", '', $config->get('embed_images', 0));
     $elements->embed_files = JHTML::_('select.booleanlist', "config[embed_files]", '', $config->get('embed_files', 1));
     $elements->multiple_part = JHTML::_('select.booleanlist', "config[multiple_part]", '', $config->get('multiple_part', 0));
     $mailermethod = array();
     $mailermethod[] = JHTML::_('select.option', 'phpmail', 'PHP Mail Function');
     $mailermethod[] = JHTML::_('select.option', 'sendmail', 'SendMail');
     $mailermethod[] = JHTML::_('select.option', 'qmail', 'QMail');
     $mailermethod[] = JHTML::_('select.option', 'smtp', 'SMTP Server');
     $js = "function updateMailer(){";
     $js .= "mailermethod = window.document.getElementById('mailer_method').value;";
     $js .= "if(mailermethod == 'phpmail') {window.document.getElementById('smtp_config').style.display = 'none'; window.document.getElementById('sendmail_config').style.display = 'none';}";
     $js .= "if(mailermethod == 'smtp') {window.document.getElementById('smtp_config').style.display = 'block'; window.document.getElementById('sendmail_config').style.display = 'none';}";
     $js .= "if(mailermethod == 'qmail') {window.document.getElementById('smtp_config').style.display = 'none'; window.document.getElementById('sendmail_config').style.display = 'none';}";
     $js .= "if(mailermethod == 'sendmail') {window.document.getElementById('smtp_config').style.display = 'none'; window.document.getElementById('sendmail_config').style.display = 'block';}";
     $js .= '}';
     $js .= 'window.addEvent(\'domready\', function(){ updateMailer(); });';
     $doc->addScriptDeclaration($js);
     $elements->mailer_method = JHTML::_('select.genericlist', $mailermethod, "config[mailer_method]", 'size="1" onchange="updateMailer()"', 'value', 'text', $config->get('mailer_method', 'phpmail'), 'mailer_method');
     $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"', '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"', 'value', 'text', $config->get('smtp_secured'));
     $elements->smtp_auth = JHTML::_('select.booleanlist', "config[smtp_auth]", '', $config->get('smtp_auth', 0));
     $elements->smtp_keepalive = JHTML::_('select.booleanlist', "config[smtp_keepalive]", '', $config->get('smtp_keepalive', 1));
     $elements->allow_visitor = JHTML::_('select.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::_('select.booleanlist', "config[subscription_message]", '', $config->get('subscription_message', 1));
     $elements->confirmation_message = JHTML::_('select.booleanlist', "config[confirmation_message]", '', $config->get('confirmation_message', 1));
     $elements->unsubscription_message = JHTML::_('select.booleanlist', "config[unsubscription_message]", '', $config->get('unsubscription_message', 1));
     $elements->welcome_message = JHTML::_('select.booleanlist', "config[welcome_message]", '', $config->get('welcome_message', 1));
     $elements->unsub_message = JHTML::_('select.booleanlist', "config[unsub_message]", '', $config->get('unsub_message', 1));
     $elements->confirm_message = JHTML::_('select.booleanlist', "config[confirm_message]", '', $config->get('confirm_message', 0));
     $elements->show_footer = JHTML::_('select.booleanlist', "config[show_footer]", '', $config->get('show_footer', 1));
     if (acymailing::level(1)) {
         $elements->forward = JHTML::_('select.booleanlist', "config[forward]", '', $config->get('forward', false));
     } 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')) {
             $elements->dkim = JHTML::_('select.booleanlist', "config[dkim]", 'onclick="updateDKIM(this.value)"', $config->get('dkim', 0));
         } else {
             $elements->dkim = '<input type="hidden" name="config[dkim]" value="0" />PHP Extension openssl not enabled';
         }
//.........这里部分代码省略.........
开发者ID:bizanto,项目名称:Hooked,代码行数:101,代码来源:view.html.php

示例14: preview

 function preview()
 {
     $app =& JFactory::getApplication();
     $mailid = acymailing::getCID('mailid');
     $config = acymailing::config();
     JHTML::_('behavior.modal', 'a.modal');
     $mailerHelper = acymailing::get('helper.mailer');
     $mail = $mailerHelper->load($mailid);
     $user =& JFactory::getUser();
     $userClass = acymailing::get('class.subscriber');
     $receiver = $userClass->get($user->email);
     $mail->sendHTML = true;
     $mailerHelper->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$mail, &$receiver));
     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 = null;
     $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('Popsched', "index.php?option=com_acymailing&ctrl=send&task=scheduleready&tmpl=component&mailid=" . $mailid);
             }
         }
         if (acymailing::isAllowed($config->get('acl_newsletters_send', 'all'))) {
             $bar->appendButton('Popup', 'send', 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->ctrl . '-preview');
     $this->assignRef('lists', $lists);
     $this->assignRef('infos', $infos);
     $this->assignRef('receiverClass', $receiversClass);
     $this->assignRef('mail', $mail);
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:48,代码来源:view.html.php


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