Пример #1
0
 function _header($task, $action, $listType, $message, $screen = '')
 {
     if ($screen == 'edit') {
         lisType::chooseType($task, $action, $listType, 'mailing_edit_header', $message, '');
     } else {
         lisType::chooseType($task, $action, $listType, 'mailing_header', $message, '');
     }
 }
Пример #2
0
 function showMailingsFront($task, $action, $subscriberId, $listId, $listType, $viewArchive, $pageTile)
 {
     global $Itemid;
     if (ACA_CMSTYPE) {
         // joomla 15
         $start = JRequest::getVar('start', '0');
         $emailsearch = JRequest::getVar('emailsearch', '');
         $order = JRequest::getVar('order', 'idD');
         $dropList = JRequest::getVar('droplist', 'ZZZZ');
     } else {
         //joomla 1x
         $start = intval(mosGetParam($_REQUEST, 'start', 0));
         $emailsearch = mosGetParam($_REQUEST, 'emailsearch', '');
         $order = mosGetParam($_REQUEST, 'order', 'idD');
         $dropList = mosGetParam($_REQUEST, 'droplist', 'ZZZZ');
     }
     //endif
     //ADRIEN
     //$limit = intval(mosGetParam($_REQUEST, 'limit', $GLOBALS['mosConfig_list_limit']));
     $limit = -1;
     $total = 0;
     if ($dropList == 'ZZZZ') {
         $dropList = $listType . '-' . $listId;
     }
     $total = 0;
     $dropListValues = explode('-', $dropList);
     $listType = $dropListValues[0];
     $listId = $dropListValues[1];
     if (class_exists('pro') && $listId > 0) {
         $list = lists::getOneList($listId);
         $accessGrant = acajoom::checkPermissions('hello', 0, $list->acc_level);
     } else {
         $accessGrant = acajoom::checkPermissions('admin');
     }
     if ($accessGrant) {
         if ($listId > 0) {
             $mailings = xmailing::getMailings($listId, 0, $start, $limit, $emailsearch, $total, $order, false, $viewArchive);
         } else {
             $mailings = xmailing::getMailings($listId, $listType, $start, $limit, $emailsearch, $total, $order, false, $viewArchive);
         }
     } else {
         if ($listType == 1 or $listType == 2 or $listType == 7) {
             $mailings = xmailing::getMailings($listId, 0, $start, $limit, $emailsearch, $total, $order, true, $viewArchive);
         } elseif ($listType == 0) {
             $mailings1 = xmailing::getMailings($listId, 1, $start, $limit, $emailsearch, $total, $order, true, $viewArchive);
             $mailings2 = xmailing::getMailings($listId, 2, $start, $limit, $emailsearch, $total, $order, true, $viewArchive);
             $mailings7 = xmailing::getMailings($listId, 7, $start, $limit, $emailsearch, $total, $order, true, $viewArchive);
             $mailings = array_merge($mailings1, $mailings2, $mailings7);
         } else {
             $mailings = '';
         }
     }
     if ($listId == 0) {
         $lists['title'] = lisType::chooseType($task, $action, $listType, 'titles', '', _ACA_MENU_MAILING);
     } else {
         $listing = lists::getLists($listId, 0, $subscriberId, '', false, false, true);
         $listType = $listType > 0 ? $listType : '0';
         $lists['title'] = $pageTile . @constant($GLOBALS[ACA . 'listname' . $listType]);
     }
     $dropDownList = lisType::getMailingDropList($listId, $listType, $order);
     if (ACA_CMSTYPE) {
         // joomla 15
         $lists['droplist'] = JHTML::_('select.genericlist', $dropDownList, 'droplist', 'class="inputbox" size="1" onchange="document.AcajoomFilterForm.submit();"', 'id', 'name', $dropList);
     } else {
         //joomla 1x
         $lists['droplist'] = mosHTML::selectList($dropDownList, 'droplist', 'class="inputbox" size="1" onchange="document.AcajoomFilterForm.submit();"', 'id', 'name', $dropList);
     }
     //endif
     $linkMain = '.php?option=com_acajoom&act=' . $action;
     compa::completeLink($linkMain, false);
     $forms['main'] = '<form method="post" action="' . $linkMain . '" onsubmit="submitbutton();return false;" name="mosForm" >' . "\n\r";
     $forms['select'] = '<form method="post" action="' . $linkMain . '"  name="AcajoomFilterForm">' . "\n\r";
     $forms['main'] .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
     $forms['select'] .= '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
     $show = lisType::showType($listType, 'showMailings');
     $show['index'] = 'index';
     $show['select'] = false;
     $show['buttons'] = true;
     if (class_exists('pro') && !$viewArchive) {
         $show['admin'] = true;
         $show['status'] = true;
     }
     frontHTML::formStart($lists['title'], 0, 'show_mailing');
     mailingsHTML::showMailingList($mailings, $lists, $start, $limit, $total, $emailsearch, $listId, $listType, $forms, $show, $action);
     frontHTML::formEnd();
     return true;
 }