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


PHP acymailing::level方法代码示例

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


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

示例1: display

 function display()
 {
     static $i = 0;
     $i++;
     $this->filters['group'] = JHTML::_('select.genericlist', $this->groups, "filter[{$i}][group]", 'class="inputbox" size="1"', 'value', 'text');
     $this->filters['list'] = $this->status->display("filter[{$i}][list_status]", 1, false) . ' ' . JHTML::_('select.genericlist', $this->lists, "filter[{$i}][list]", 'class="inputbox" size="1"', 'value', 'text');
     $this->filters['acymailingfield'] = JHTML::_('select.genericlist', $this->acymailingfields, "filter[{$i}][acymailingfield]", 'class="inputbox" size="1"', 'value', 'text');
     $this->filters['acymailingfield'] .= ' ' . $this->operators->display("filter[{$i}][acymailingfield_operator]") . ' <input class="inputbox" type="text" name="filter[' . $i . '][acymailingfield_value]" size="50" value="">';
     $this->filters['joomlafield'] = JHTML::_('select.genericlist', $this->joomlafields, "filter[{$i}][joomlafield]", 'class="inputbox" size="1"', 'value', 'text');
     $this->filters['joomlafield'] .= ' ' . $this->operators->display("filter[{$i}][joomlafield_operator]") . ' <input class="inputbox" type="text" name="filter[' . $i . '][joomlafield_value]" size="50" value="">';
     if (!empty($this->cbfield)) {
         $this->filters['cbfield'] = JHTML::_('select.genericlist', $this->cbfield, "filter[{$i}][cbfield]", 'class="inputbox" size="1"', 'value', 'text');
         $this->filters['cbfield'] .= ' ' . $this->operators->display("filter[{$i}][cbfield_operator]") . ' <input class="inputbox" type="text" name="filter[' . $i . '][cbfield_value]" size="50" value="">';
     }
     if (acymailing::level(3)) {
         include dirname(__FILE__) . DS . 'filterenterprisedisplay.php';
     }
     $return = '<div id="filter_' . $i . '">';
     $return .= JHTML::_('select.genericlist', $this->type, "filter[type][{$i}]", 'class="inputbox" size="1" onchange="updateFilter(' . $i . ');"', 'value', 'text');
     foreach ($this->filters as $oneFilterName => $content) {
         $return .= '<div id="filter_' . $i . $oneFilterName . '" style="display:none;margin-left:150px">';
         $return .= $content;
         $return .= '</div>';
     }
     $return .= '</div>';
     return $return;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:27,代码来源:filter.php

示例2: trigger

 function trigger($triggerName)
 {
     if (!acymailing::level(3)) {
         return;
     }
     $config = acymailing::config();
     if (!$config->get('triggerfilter_' . $triggerName)) {
         return;
     }
     $this->database->setQuery("SELECT * FROM `#__acymailing_filter` WHERE `trigger` LIKE '%" . $this->database->getEscaped($triggerName, true) . "%'");
     $filters = $this->database->loadObjectList();
     if (empty($filters)) {
         $newconfig = null;
         $name = 'triggerfilter_' . $triggerName;
         $newconfig->{$name} = 0;
         $config->save($newconfig);
         return;
     }
     foreach ($filters as $oneFilter) {
         if (empty($oneFilter->published)) {
             continue;
         }
         if (!empty($oneFilter->filter)) {
             $oneFilter->filter = unserialize($oneFilter->filter);
         }
         if (!empty($oneFilter->action)) {
             $oneFilter->action = unserialize($oneFilter->action);
         }
         $this->execute($oneFilter->filter, $oneFilter->action);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:filter.php

示例3: deliverstatusType

 function deliverstatusType()
 {
     $this->values = array();
     $this->values[] = JHTML::_('select.option', '0', JText::_('ALL_STATUS'));
     $this->values[] = JHTML::_('select.option', 'open', JText::_('OPEN'));
     $this->values[] = JHTML::_('select.option', 'notopen', JText::_('NOT_OPEN'));
     $this->values[] = JHTML::_('select.option', 'failed', JText::_('FAILED'));
     if (acymailing::level(3)) {
         $this->values[] = JHTML::_('select.option', 'bounce', JText::_('BOUNCES'));
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:11,代码来源:deliverstatus.php

示例4: _quickiconButton

 function _quickiconButton($link, $image, $text, $description, $level)
 {
     $url = acymailing::level($level) ? 'onclick="document.location.href=\'' . acymailing::completeLink($link) . '\';"' : '';
     $html = '<div style="float:left;width: 100%;" ' . $url . ' class="icon"><a href="';
     $html .= acymailing::level($level) ? acymailing::completeLink($link) : '#';
     $html .= '"><table width="100%"><tr><td style="text-align: center;" width="120px">';
     $html .= '<span class="icon-48-' . $image . '" style="background-repeat:no-repeat;background-position:center;height:48px" title="' . $text . '"> </span>';
     $html .= '<span>' . $text . '</span></td><td>' . $description . '</td></tr></table></a>';
     $html .= '</div>';
     return $html;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:11,代码来源:view.html.php

示例5: unsubscribe

 function unsubscribe($subid, $listids)
 {
     $app =& JFactory::getApplication();
     if (acymailing::level(3)) {
         $campaignClass = acymailing::get('helper.campaign');
         $campaignClass->stop($subid, $listids);
     }
     $config = acymailing::config();
     static $alreadySent = false;
     if ($this->sendNotif and !$alreadySent and $config->get('notification_unsub') and !$app->isAdmin()) {
         $alreadySent = true;
         $mailer = acymailing::get('helper.mailer');
         $mailer->report = false;
         $mailer->autoAddUser = true;
         $mailer->checkConfirmField = false;
         $userClass = acymailing::get('class.subscriber');
         $subscriber = $userClass->get($subid);
         $ipClass = acymailing::get('helper.user');
         $mailer->addParam('survey', $this->survey);
         $mailer->addParamInfo();
         $subscriber->ip = $ipClass->getIP();
         foreach ($subscriber as $fieldname => $value) {
             $mailer->addParam('user:' . $fieldname, $value);
         }
         $allUsers = explode(',', $config->get('notification_unsub'));
         foreach ($allUsers as $oneUser) {
             $mailer->sendOne('notification_unsub', $oneUser);
         }
     }
     $db =& JFactory::getDBO();
     if ($this->sendConf and !$app->isAdmin()) {
         $db->setQuery('SELECT DISTINCT `unsubmailid` FROM ' . acymailing::table('list') . ' WHERE `listid` IN (' . implode(',', $listids) . ') AND `published` = 1  AND `unsubmailid` > 0');
         $messages = $db->loadResultArray();
         if (!empty($messages)) {
             $config = acymailing::config();
             $mailHelper = acymailing::get('helper.mailer');
             $mailHelper->report = $config->get('unsub_message', true);
             $mailHelper->checkAccept = false;
             foreach ($messages as $mailid) {
                 $mailHelper->sendOne($mailid, $subid);
             }
         }
     }
     //end only frontend
     $db->setQuery('DELETE  FROM ' . acymailing::table('queue') . ' WHERE `subid` = ' . (int) $subid . ' AND `mailid` IN (SELECT `mailid` FROM ' . acymailing::table('listmail') . ' WHERE `listid` IN (' . implode(',', $listids) . '))');
     $db->query();
     JPluginHelper::importPlugin('acymailing');
     $dispatcher =& JDispatcher::getInstance();
     $resultsTrigger = $dispatcher->trigger('onAcyUnsubscribe', array($subid, $listids));
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:50,代码来源:list.php

示例6: 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') {
                     $gid = (empty($my->id) or empty($my->gid)) ? $this->gid : $my->gid;
                     if ($allResults[$listid]->access_sub == 'none' or empty($gid)) {
                         continue;
                     }
                     if (!in_array($gid, explode(',', $allResults[$listid]->access_sub))) {
                         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:rlee1962,项目名称:diylegalcenter,代码行数:50,代码来源:listsub.php

示例7: listing

 function listing()
 {
     global $Itemid;
     $app =& JFactory::getApplication();
     $menus =& JSite::getMenu();
     $menu = $menus->getActive();
     if (empty($menu) and !empty($Itemid)) {
         $menus->setActive($Itemid);
         $menu = $menus->getItem($Itemid);
     }
     $pathway =& $app->getPathway();
     $pathway->addItem(JText::_('MAILING_LISTS'));
     $listsClass = acymailing::get('class.list');
     $allLists = $listsClass->getLists();
     if (acymailing::level(1)) {
         $allLists = $listsClass->onlyCurrentLanguage($allLists);
     }
     $this->assignRef('rows', $allLists);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:19,代码来源:view.html.php

示例8: onAcyDisplayActions

 function onAcyDisplayActions(&$type)
 {
     $type['list'] = JText::_('ACYMAILING_LIST');
     $status = array();
     $status[] = JHTML::_('select.option', 1, JText::_('SUBSCRIBE_TO'));
     $status[] = JHTML::_('select.option', 0, JText::_('REMOVE_FROM'));
     $lists = $this->_getLists();
     $otherlists = array();
     if (acymailing::level(3)) {
         $db =& JFactory::getDBO();
         $db->setQuery('SELECT b.listid, b.name FROM #__acymailing_listcampaign as a LEFT JOIN #__acymailing_list as b on a.listid = b.listid GROUP BY b.listid ORDER BY b.ordering ASC');
         $otherlists = $db->loadObjectList('listid');
     }
     $listsdrop = array();
     foreach ($lists as $oneList) {
         $listsdrop[] = JHTML::_('select.option', $oneList->listid, $oneList->name);
         if (!empty($otherlists[$oneList->listid])) {
             $listsdrop[] = JHTML::_('select.option', $oneList->listid . '_campaign', $otherlists[$oneList->listid]->name . ' + ' . JText::_('CAMPAIGN'));
         }
     }
     return '<div id="action__num__list">' . JHTML::_('select.genericlist', $status, "action[__num__][list][status]", 'class="inputbox" size="1"', 'value', 'text') . ' ' . JHTML::_('select.genericlist', $listsdrop, "action[__num__][list][selectedlist]", 'class="inputbox" size="1"', 'value', 'text') . '</div>';
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:22,代码来源:tagsubscription.php

示例9: onAcyDisplayFilters

 function onAcyDisplayFilters($type)
 {
     $type['deliverstat'] = JText::_('STATISTICS');
     $db =& JFactory::getDBO();
     $db->setQuery("SELECT `mailid`,CONCAT(`subject`,' ( ',`mailid`,' )') as 'value' FROM `#__acymailing_mail` WHERE `type` IN('news','autonews','followup') ORDER BY `subject` ASC ");
     $allemails = $db->loadObjectList();
     $element = null;
     $element->mailid = 0;
     $element->value = JText::_('EMAIL_NAME');
     array_unshift($allemails, $element);
     $actions = array();
     $actions[] = JHTML::_('select.option', 'open', JText::_('OPEN'));
     $actions[] = JHTML::_('select.option', 'notopen', JText::_('NOT_OPEN'));
     $actions[] = JHTML::_('select.option', 'failed', JText::_('FAILED'));
     if (acymailing::level(3)) {
         $actions[] = JHTML::_('select.option', 'bounce', JText::_('BOUNCES'));
     }
     $actions[] = JHTML::_('select.option', 'htmlsent', JText::_('SENT_HTML'));
     $actions[] = JHTML::_('select.option', 'textsent', JText::_('SENT_TEXT'));
     $return = '<div id="filter__num__deliverstat">' . JHTML::_('select.genericlist', $actions, "filter[__num__][deliverstat][action]", 'class="inputbox" size="1"', 'value', 'text');
     $return .= ' ' . JHTML::_('select.genericlist', $allemails, "filter[__num__][deliverstat][mailid]", 'class="inputbox" size="1"', 'mailid', 'value') . '</div>';
     return $return;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:23,代码来源:stats.php

示例10: 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->gid) and !empty($my->id)) {
                 if ($oneList->access_manage == 'all' or in_array($my->gid, explode(',', $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;
     if (acymailing::level(3)) {
         $listmail = acymailing::get('class.listmail');
         $allLists = $listmail->getLists($mailid);
         $access_sub = false;
         if (!empty($allLists)) {
             foreach ($allLists as $alist) {
                 if (empty($alist->mailid)) {
                     continue;
                 }
                 if (!$alist->published or !$alist->visible or $alist->access_sub == 'none') {
                     continue;
                 }
                 if ($alist->access_sub == 'all') {
                     $access_sub = true;
                     break;
                 }
                 if (empty($my->id) or empty($my->gid)) {
                     continue;
                 }
                 if (in_array($my->gid, explode(',', $alist->access_sub))) {
                     $access_sub = true;
                     break;
                 }
             }
         }
     }
     $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;
         }
     }
     if (!empty($my->email)) {
         $userClass = acymailing::get('class.subscriber');
         $receiver = $userClass->get($my->email);
     } else {
         $subkeys = 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)) {
             $receiver = null;
             $receiver->name = JText::_('VISITOR');
         }
     }
     $oneMail->sendHTML = true;
     $mailClass->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$oneMail, &$receiver));
     $pathway->addItem($oneMail->subject);
     $document =& JFactory::getDocument();
//.........这里部分代码省略.........
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:101,代码来源:view.html.php

示例11: view

 function view()
 {
     $mailid = acymailing::getCID('mailid');
     if (empty($mailid)) {
         $db =& JFactory::getDBO();
         $query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l LEFT JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid LEFT JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid';
         $query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1';
         if (!empty($listid)) {
             $query .= ' AND l.`listid` = ' . (int) $listid;
         }
         $query .= ' ORDER BY m.`mailid` DESC LIMIT 1';
         $db->setQuery($query);
         $mailid = $db->loadResult();
         if (empty($mailid)) {
             return JError::raiseError(404, 'Newsletter not found');
         }
     }
     $access_sub = true;
     if (acymailing::level(3)) {
         $listmail = acymailing::get('class.listmail');
         $allLists = $listmail->getLists($mailid);
         $access_sub = false;
         if (!empty($allLists)) {
             $my = JFactory::getUser();
             foreach ($allLists as $alist) {
                 if (empty($alist->mailid)) {
                     continue;
                 }
                 if (!$alist->published or !$alist->visible or $alist->access_sub == 'none') {
                     continue;
                 }
                 if ($alist->access_sub == 'all') {
                     $access_sub = true;
                     break;
                 }
                 if (empty($my->id) or empty($my->gid)) {
                     continue;
                 }
                 if (in_array($my->gid, explode(',', $alist->access_sub))) {
                     $access_sub = true;
                     break;
                 }
             }
         }
     }
     $mailClass = acymailing::get('helper.mailer');
     $oneMail = $mailClass->load($mailid);
     if (empty($oneMail->mailid)) {
         return JError::raiseError(404, 'Newsletter not found : ' . $mailid);
     }
     if (!$access_sub or !$oneMail->published or !$oneMail->visible) {
         $key = JRequest::getString('key');
         if (empty($key) or $key !== $oneMail->key) {
             $app =& JFactory::getApplication();
             $app->enqueueMessage('You can not have access to this e-mail', 'error');
             $app->redirect(acymailing::completeLink('lists', false, true));
             return false;
         }
     }
     $user =& JFactory::getUser();
     if (!empty($user->email)) {
         $userClass = acymailing::get('class.subscriber');
         $receiver = $userClass->get($user->email);
     } else {
         $receiver = null;
         $receiver->name = JText::_('VISITOR');
     }
     $oneMail->sendHTML = true;
     $mailClass->dispatcher->trigger('acymailing_replaceusertagspreview', array(&$oneMail, &$receiver));
     $document =& JFactory::getDocument();
     $document->setTitle($oneMail->subject);
     if (!empty($oneMail->text)) {
         echo nl2br($mailClass->textVersion($oneMail->text, false));
     } else {
         echo nl2br($mailClass->textVersion($oneMail->body, true));
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:77,代码来源:view.pdf.php

示例12: form

    function form()
    {
        $db =& JFactory::getDBO();
        $config = acymailing::config();
        $filid = acymailing::getCID('filid');
        $filterClass = acymailing::get('class.filter');
        if (!empty($filid)) {
            $filter = $filterClass->get($filid);
        } else {
            $filter = null;
            $filter->action = JRequest::getVar('action');
            $filter->filter = JRequest::getVar('filter');
            $filter->published = 1;
        }
        JPluginHelper::importPlugin('acymailing');
        $this->dispatcher =& JDispatcher::getInstance();
        $typesFilters = array();
        $typesActions = array();
        $outputFilters = implode('', $this->dispatcher->trigger('onAcyDisplayFilters', array(&$typesFilters)));
        $outputActions = implode('', $this->dispatcher->trigger('onAcyDisplayActions', array(&$typesActions)));
        $typevaluesFilters = array();
        $typevaluesActions = array();
        $typevaluesFilters[] = JHTML::_('select.option', '', JText::_('FILTER_SELECT'));
        $typevaluesActions[] = JHTML::_('select.option', '', JText::_('ACTION_SELECT'));
        $doc =& JFactory::getDocument();
        $js = "function updateFilter(filterNum){";
        foreach ($typesFilters as $oneType => $oneName) {
            $typevaluesFilters[] = JHTML::_('select.option', $oneType, $oneName);
            $js .= "filterArea = 'filter'+filterNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'none';}";
        }
        $js .= "filterArea = 'filter'+filterNum+window.document.getElementById('filtertype'+filterNum).value;\r\n\t\t\t\tif(window.document.getElementById(filterArea)){window.document.getElementById(filterArea).style.display = 'block';}\r\n\t\t\t}";
        $js .= "function updateAction(actionNum){";
        foreach ($typesActions as $oneType => $oneName) {
            $typevaluesActions[] = JHTML::_('select.option', $oneType, $oneName);
            $js .= "actionArea = 'action'+actionNum+'{$oneType}';\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'none';}";
        }
        $js .= "actionArea = 'action'+actionNum+window.document.getElementById('actiontype'+actionNum).value;\r\n\t\t\t\tif(window.document.getElementById(actionArea)){window.document.getElementById(actionArea).style.display = 'block';}\r\n\t\t\t}";
        $js .= "var numFilters = 0;\r\n\t\t\t\tvar numActions = 0;\r\n\t\t\t\tfunction addFilter(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'filter'+numFilters;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('filters_original').innerHTML.replace(/__num__/g, numFilters);\r\n\t\t\t\t\tdocument.getElementById('allfilters').appendChild(newdiv); updateFilter(numFilters); numFilters++; }\n\t\t\t\tfunction addAction(){\r\n\t\t\t\t\tvar newdiv = document.createElement('div');\r\n\t\t\t\t\tnewdiv.id = 'action'+numActions;\r\n\t\t\t\t\tnewdiv.className = 'plugarea';\r\n\t\t\t\t\tnewdiv.innerHTML = document.getElementById('actions_original').innerHTML.replace(/__num__/g, numActions);\r\n\t\t\t\t\tdocument.getElementById('allactions').appendChild(newdiv); updateAction(numActions); numActions++; }";
        $js .= "window.addEvent('domready', function(){ addFilter(); addAction(); });";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $js .= 'function submitbutton(pressbutton){
						if (pressbutton != \'save\') {
							submitform( pressbutton );
							return;
						}';
        } else {
            $js .= 'Joomla.submitbutton = function(pressbutton) {
						if (pressbutton != \'save\') {
							Joomla.submitform(pressbutton,document.adminForm);
							return;
						}';
        }
        $js .= "if(window.document.getElementById('filterinfo').style.display == 'none'){\r\n\t\t\t\t\t\twindow.document.getElementById('filterinfo').style.display = 'block';\r\n\t\t\t\t\t\ttry{allspans = window.document.getElementById('toolbar-save').getElementsByTagName(\"span\"); allspans[0].className = 'icon-32-apply';}catch(err){}\r\n\t\t\t\t\t\treturn false;}\r\n\t\t\t\t\tif(window.document.getElementById('title').value.length < 2){alert('" . JText::_('ENTER_TITLE', true) . "'); return false;}";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            $js .= "submitform( pressbutton );} ";
        } else {
            $js .= "Joomla.submitform(pressbutton,document.adminForm);}; ";
        }
        $doc->addScriptDeclaration($js);
        $js = '';
        $data = array('action', 'filter');
        foreach ($data as $datatype) {
            if (empty($filter->{$datatype})) {
                continue;
            }
            foreach ($filter->{$datatype}['type'] as $num => $oneType) {
                if (empty($oneType)) {
                    continue;
                }
                $js .= "while(!document.getElementById('" . $datatype . "type{$num}')){add" . ucfirst($datatype) . "();}\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) {
                    $js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $value)) . "';";
                }
            }
        }
        $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');
        if (!empty($nextDate)) {
            $triggers['daycron'] .= ' (' . JText::_('NEXT_RUN') . ' : ' . acymailing::getDate($nextDate, '%d %B %H:%M') . ')';
        }
        $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');
        $bar->appendButton('Confirm', JText::_('PROCESS_CONFIRMATION'), 'process', JText::_('PROCESS'), 'process', false, false);
        JToolBarHelper::divider();
        if (acymailing::level(3)) {
            JToolBarHelper::save();
            if (!empty($filter->filid)) {
//.........这里部分代码省略.........
开发者ID:bizanto,项目名称:Hooked,代码行数:101,代码来源:view.html.php

示例13: listing

 function listing()
 {
     $app =& JFactory::getApplication();
     $pageInfo = null;
     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 SQL_CALC_FOUND_ROWS ' . 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();
     $database->setQuery('SELECT FOUND_ROWS()');
     $pageInfo->elements->total = $database->loadResult();
     if (!empty($pageInfo->search)) {
         $rows = acymailing::search($pageInfo->search, $rows);
     }
     $pageInfo->elements->page = count($rows);
     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();
     JToolBarHelper::deleteList(JText::_('VALIDDELETEITEMS'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'stats-listing');
     $bar->appendButton('Link', 'acymailing', JText::_('JOOMEXT_CPANEL'), acymailing::completeLink('dashboard'));
     $this->assignRef('rows', $rows);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assignRef('pagination', $pagination);
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:52,代码来源:view.html.php

示例14: display

 function display($tpl = null)
 {
     JHTML::_('behavior.modal', 'a.modal');
     $config = acymailing::config();
     $db =& JFactory::getDBO();
     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::_('CLOSE'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', 'config');
     $bar->appendButton('Link', 'acymailing', JText::_('JOOMEXT_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 = acymailing::get('type.mailermethod');
     $elements->mailer_method = $mailerMethod->display("config[mailer_method]", $config->get('mailer_method', 'phpmail'));
     $encoding = acymailing::get('type.encoding');
     $elements->encoding_format = $encoding->display("config[encoding_format]", $config->get('encoding_format', 'base64'));
     $charset = acymailing::get('type.charset');
     $elements->charset = $charset->display("config[charset]", $config->get('charset', 'UTF-8'));
     $secured = acymailing::get('type.secured');
     $elements->smtp_secured = $secured->display("config[smtp_secured]", $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));
     $queueType = acymailing::get('type.queuetype');
     $elements->queue_type = $queueType->display("config[queue_type]", $config->get('queue_type', 'auto'));
     $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));
     if (acymailing::level(1)) {
         $elements->show_footer = JHTML::_('select.booleanlist', "config[show_footer]", '', $config->get('show_footer', 1));
         $elements->forward = JHTML::_('select.booleanlist', "config[forward]", '', $config->get('forward', false));
     } else {
         $elements->show_footer = '<small style="color:red">' . JText::_('ONLY_FROM_ESSENTIAL') . '</small>';
         $elements->forward = '<small style="color:red">' . JText::_('ONLY_FROM_ESSENTIAL') . '</small>';
     }
     $cssFiles = acymailing::get('type.css');
     $cssFiles->type = 'component';
     $elements->css_frontend = $cssFiles->display('config[css_frontend]', $config->get('css_frontend', 'default'));
     $cssFiles->type = 'module';
     $elements->css_module = $cssFiles->display('config[css_module]', $config->get('css_module', 'default'));
     $cssFiles->type = 'component';
     $elements->css_backend = $cssFiles->display('config[css_backend]', $config->get('css_backend', 'default'));
     $elements->colortype = acymailing::get('type.color');
     $elements->use_sef = JHTML::_('select.booleanlist', "config[use_sef]", '', $config->get('use_sef', 0));
     $query = 'SELECT a.name, a.id as itemid, b.title  FROM `#__menu` as a LEFT JOIN `#__menu_types` as b on a.menutype = b.menutype WHERE a.access = 0 ORDER BY b.title ASC,a.ordering ASC';
     $db->setQuery($query);
     $joomMenus = $db->loadObjectList();
     $menuvalues = array();
     $menuvalues[] = JHTML::_('select.option', '0', JText::_('NONE'));
     $lastGroup = '';
     foreach ($joomMenus as $oneMenu) {
         if ($oneMenu->title != $lastGroup) {
             if (!empty($lastGroup)) {
                 $menuvalues[] = JHTML::_('select.option', '</OPTGROUP>');
             }
             $menuvalues[] = JHTML::_('select.option', '<OPTGROUP>', $oneMenu->title);
             $lastGroup = $oneMenu->title;
         }
         $menuvalues[] = JHTML::_('select.option', $oneMenu->itemid, $oneMenu->name);
     }
     $elements->acymailing_menu = JHTML::_('select.genericlist', $menuvalues, 'config[itemid]', 'size="1"', 'value', 'text', $config->get('itemid'));
     if (acymailing::level(1)) {
         $cronTypeReport = acymailing::get('type.cronreport');
         $elements->cron_sendreport = $cronTypeReport->display('config[cron_sendreport]', $config->get('cron_sendreport', 2));
         $cronTypeReportSave = acymailing::get('type.cronreportsave');
         $elements->cron_savereport = $cronTypeReportSave->display('config[cron_savereport]', $config->get('cron_savereport', 0));
         $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=config&amp;task=cleanreport';
         $elements->deleteReport = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 400, y: 100}}"><button onclick="return false">' . JText::_('REPORT_DELETE') . '</button></a>';
         $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=config&amp;task=seereport';
         $elements->seeReport = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('REPORT_SEE') . '</button></a>';
         $link = 'index.php?option=com_acymailing&amp;tmpl=component&amp;ctrl=email&amp;task=edit&amp;mailid=report';
         $elements->editReportEmail = '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 500}}"><button onclick="return false">' . JText::_('REPORT_EDIT') . '</button></a>';
         $delayType = acymailing::get('type.delay');
         $elements->cron_frequency = $delayType->display('config[cron_frequency]', $config->get('cron_frequency', 0), 0);
         $elements->cron_url = ACYMAILING_LIVE . 'index.php?option=com_acymailing&ctrl=cron';
         $item = $config->get('itemid');
         if (!empty($item)) {
             $elements->cron_url .= '&Itemid=' . $item;
         }
         $informations = null;
         $informations->version = $config->get('version');
         $informations->level = $config->get('level');
         $informations->website = str_replace('~', 'tildsymb', ACYMAILING_LIVE);
//.........这里部分代码省略.........
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:101,代码来源:view.html.php

示例15: modify

 function modify()
 {
     $app =& JFactory::getApplication();
     $pathway =& $app->getPathway();
     $document =& JFactory::getDocument();
     $listsClass = acymailing::get('class.list');
     $subscriberClass = acymailing::get('class.subscriber');
     $subscriber = $subscriberClass->identify(true);
     if (empty($subscriber)) {
         $subscription = $listsClass->getLists();
         $subscriber = null;
         $subscriber->html = 1;
         $subscriber->subid = 0;
         $subscriber->key = 0;
         if (!empty($subscription)) {
             foreach ($subscription as $id => $onesub) {
                 $subscription[$id]->status = 1;
             }
         }
         $pathway->addItem(JText::_('SUBSCRIPTION'));
         $document->setTitle(JText::_('SUBSCRIPTION'));
     } else {
         $subscription = $subscriberClass->getSubscription($subscriber->subid);
         $pathway->addItem(JText::_('MODIFY_SUBSCRIPTION'));
         $document->setTitle(JText::_('MODIFY_SUBSCRIPTION'));
     }
     acymailing::initJSStrings();
     if (acymailing::level(1)) {
         $subscription = $listsClass->onlyCurrentLanguage($subscription);
     }
     if (acymailing::level(3)) {
         $fieldsClass = acymailing::get('class.fields');
         $this->assignRef('fieldsClass', $fieldsClass);
         $extraFields = $fieldsClass->getFields('frontcomp', $subscriber);
         $this->assignRef('extraFields', $extraFields);
         $requiredFields = array();
         $validMessages = array();
         foreach ($extraFields as $oneField) {
             if (in_array($oneField->namekey, array('name', 'email'))) {
                 continue;
             }
             if (!empty($oneField->required)) {
                 $requiredFields[] = $oneField->namekey;
                 if (!empty($oneField->options['errormessage'])) {
                     $validMessages[] = addslashes($fieldsClass->trans($oneField->options['errormessage']));
                 } else {
                     $validMessages[] = addslashes(JText::sprintf('FIELD_VALID', $fieldsClass->trans($oneField->fieldname)));
                 }
             }
         }
         if (!empty($requiredFields)) {
             $js = "<!--\r\r\n\t\t\t\tacymailing['reqFieldsComp'] = Array('" . implode("','", $requiredFields) . "');\r\r\n\t\t\t\tacymailing['validFieldsComp'] = Array('" . implode("','", $validMessages) . "');\r\r\n\t\t\t\t//-->";
             $doc =& JFactory::getDocument();
             $doc->addScriptDeclaration($js);
         }
         $my = JFactory::getUser();
         foreach ($subscription as $listid => $oneList) {
             if (!$subscription[$listid]->published) {
                 continue;
             }
             if ($oneList->access_sub == 'all') {
                 continue;
             }
             if ($oneList->access_sub == 'none' or empty($my->id) or empty($my->gid)) {
                 $subscription[$listid]->published = false;
                 continue;
             }
             if (!in_array($my->gid, explode(',', $oneList->access_sub))) {
                 $subscription[$listid]->published = false;
                 continue;
             }
         }
     }
     $displayLists = false;
     for ($i = 0, $a = count($subscription); $i < $a; $i++) {
         if (!empty($subscription[$i]->published) and $subscription[$i]->visible) {
             $displayLists = true;
             break;
         }
     }
     $this->assignRef('status', acymailing::get('type.festatus'));
     $this->assignRef('subscription', $subscription);
     $this->assignRef('subscriber', $subscriber);
     $this->assignRef('displayLists', $displayLists);
     $this->assignRef('config', acymailing::config());
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:86,代码来源:view.html.php


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