Ejemplo n.º 1
0
 function saveConfig($config)
 {
     if (!is_array($config)) {
         return true;
     }
     $configKeys = array_keys($config);
     $size = sizeof($configKeys);
     for ($index = 0; $index < $size; $index++) {
         if (get_magic_quotes_gpc()) {
             $key = stripslashes($configKeys[$index]);
             $text = stripslashes($config[$configKeys[$index]]);
         } else {
             $key = $configKeys[$index];
             $text = $config[$configKeys[$index]];
         }
         $key = stripslashes($key);
         $key = str_replace("'", "", $key);
         if ($key == 'token_new' && !empty($text)) {
             $key = 'token';
             $this->update('license', '');
         }
         if ($key == 'license1') {
             $text = trim($text);
             $key = 'license';
         }
         if (isset($GLOBALS[JNEWS . $key]) && $GLOBALS[JNEWS . $key] != $text) {
             $this->update($key, $text);
         }
     }
     if (class_exists('jNews_Auto')) {
         jNews_Auto::good();
     }
     return true;
 }
Ejemplo n.º 2
0
 public static function showPanel($pageUsed = 'main')
 {
     $Itemid = JRequest::getInt('Itemid');
     if (empty($Itemid)) {
         $Itemid = $GLOBALS[JNEWS . 'itemidAca'];
     }
     $database = JFactory::getDBO();
     $acl = JFactory::getACL();
     $my = JFactory::getUser();
     $ex_groups = array();
     $gid = @$GLOBALS[JNEWS . 'list_creatorfe'];
     if (!empty($my->id)) {
         if (!empty($my->username)) {
             $greeting_message = _HI . ' ' . $my->username;
         } else {
             $greeting_message = '';
         }
         $doc6 = JFactory::getDocument();
         $doc6->addStyleSheet(JNEWS_JPATH_LIVE . '/components/' . JNEWS_OPTION . '/css/menu.css');
         $gid = !empty($GLOBALS[JNEWS . 'list_creatorfe']) ? $GLOBALS[JNEWS . 'list_creatorfe'] : 0;
         frontHTML::FEmenu();
         backHTML::controlPanelBottonStart(_JNEWS_UCP_USER_MENU, 'usermenu.png');
         switch ($pageUsed) {
             case 'list':
                 $listId = JRequest::getVar('listid');
                 // newsletter button
                 //			    	$link = 'option='.JNEWS_OPTION.'&act=mailing&listid='. $listId .'&listype=1&Itemid='.$Itemid;
                 //alex pagination
                 $link = 'option=' . JNEWS_OPTION . '&act=mailing&listid=' . $listId . '&listype=1';
                 $link = jNews_Tools::completeLink($link, false);
                 backHTML::quickiconButton($link, 'newsletterFE.png', _JNEWS_NEWSLETTER, false, 'all', false);
                 // smart newsletter button
                 //			    	$link = 'option='.JNEWS_OPTION.'&act=mailing&listid='. $listId .'&listype=7&Itemid='.$Itemid;
                 //alex pagination
                 $link = 'option=' . JNEWS_OPTION . '&act=mailing&listid=' . $listId . '&listype=7';
                 $link = jNews_Tools::completeLink($link, false);
                 backHTML::quickiconButton($link, 'smartnewsletterFE.png', _JNEWS_AUTONEWS, false, 'all', false);
                 break;
             default:
                 //					$link = 'option='.JNEWS_OPTION.'&act=show&Itemid='.$Itemid;
                 //alex pagination
                 $link = 'option=' . JNEWS_OPTION . '&act=show';
                 $link = jNews_Tools::completeLink($link, false);
                 backHTML::quickiconButton($link, 'my_subscriptions48.png', _JNEWS_UCP_USER_CONTACT, false, 'all', false);
                 //come back here
                 //$proceedToCheck = true;
                 break;
         }
         if (class_exists('jNews_Pro')) {
             $my = JFactory::getUser();
             $ownedlists = jNews_Lists::getOwnedlists($my->id);
             if (version_compare(JVERSION, '1.6.0', '<')) {
                 //j15
                 $usergid = $my->gid;
             } else {
                 //j16
                 $usergid = JAccess::getGroupsByUser($my->id, false);
             }
             $ex_groups = explode(',', $gid);
             if (is_array($usergid)) {
                 $canAccess = array_intersect($usergid, $ex_groups);
             }
             if (in_array($usergid, $ex_groups) || !empty($canAccess)) {
                 if ($GLOBALS[JNEWS . 'level'] > 2 && version_compare(JVERSION, '1.6.0', '>')) {
                     //					    $link = 'option='.JNEWS_OPTION.'&act=list&mid=1&listype=1&Itemid='.$Itemid;
                     //alex pagination
                     $link = 'option=' . JNEWS_OPTION . '&act=list&mid=1&listype=1';
                     $link = jNews_Tools::completeLink($link, false);
                     backHTML::quickiconButton($link, 'addedit.png', _JNEWS_MENU_LIST, false, 'all', false);
                 }
                 $listId = JRequest::getVar('listid');
                 $act = JRequest::getVar('act', '', '', 'WORD');
                 $task = JRequest::getVar('task');
                 if (empty($listId) || $act == 'mailing' && $task == 'save') {
                     // list button
                     $link = 'option=' . JNEWS_OPTION . '&act=list&listype=1&mid=1&Itemid=' . $Itemid;
                     $link = jNews_Tools::completeLink($link, false);
                     backHTML::quickiconButton($link, 'addedit.png', _JNEWS_MENU_LIST, false, $usergid, false);
                     if (empty($listId)) {
                         if ($GLOBALS[JNEWS . 'enable_jsub']) {
                             if (!empty($my->id)) {
                                 $ownedlists = jNews_Lists::getOwnedlists($my->id);
                             }
                             if (!empty($ownedlists)) {
                                 $listId = $ownedlists[0];
                             } else {
                                 $listId = jNews_Lists::getIDacclevel(18, $my->id);
                             }
                         } else {
                             $listId = jNews_Lists::getIDacclevel(18, $my->id);
                         }
                         frontHTML::cpanelHTML($listId, $Itemid);
                     }
                 }
             } else {
                 $lists = jNews_Lists::getLists(0, 0, true);
                 $access = false;
                 $id = 0;
                 if ($GLOBALS[JNEWS . 'enable_jsub']) {
                     if (!empty($my->id)) {
                         $ownedlists = jNews_Lists::getOwnedlists($my->id);
                     }
                     if (!empty($ownedlists)) {
                         $id = $my->id;
                     }
                 }
                 foreach ($lists as $list) {
                     $bit = jnews::checkPermissions($list->acc_level);
                     if ($bit) {
                         $access = true;
                         break;
                     }
                 }
                 $link = 'option=' . JNEWS_OPTION . '&act=list&mid=1&listype=1&Itemid=' . $Itemid;
                 $link = jNews_Tools::completeLink($link, false);
                 if (!empty($my->id)) {
                     $ownedlists = jNews_Lists::getOwnedlists($my->id);
                 }
                 if (empty($listId)) {
                     if ($GLOBALS[JNEWS . 'enable_jsub']) {
                         if (!empty($my->id)) {
                             $ownedlists = jNews_Lists::getOwnedlists($my->id);
                         }
                         if (!empty($ownedlists)) {
                             $listId = $ownedlists[0];
                         } else {
                             $listId = jNews_Lists::getIDacclevel(18, $my->id);
                         }
                     } else {
                         $listId = jNews_Lists::getIDacclevel(18, $my->id);
                     }
                 }
                 if ($GLOBALS[JNEWS . 'enable_jsub']) {
                     if ($access && !empty($ownedlists)) {
                         backHTML::quickiconButton($link, 'addedit.png', _JNEWS_MENU_LIST, false, 'all', false);
                         frontHTML::cpanelHTML($listId, $Itemid);
                     }
                 } else {
                     $creatorFe = jnews::checkPermissions($gid);
                     //traces
                     if ($access || $creatorFe) {
                         backHTML::quickiconButton($link, 'addedit.png', _JNEWS_MENU_LIST, false, 'all');
                         frontHTML::cpanelHTML($listId, $Itemid);
                     }
                 }
             }
         } else {
             if ($GLOBALS[JNEWS . 'level'] > 2) {
                 $link = 'option=' . JNEWS_OPTION . '&act=list&mid=1&listype=1&Itemid=' . $Itemid;
                 $link = jNews_Tools::completeLink($link, false);
                 backHTML::quickiconButton($link, 'addedit.png', _JNEWS_MENU_LIST, false, 'all', false);
             }
         }
         backHTML::controlPanelBottomEnd();
         if (class_exists('jNews_Auto')) {
             jNews_Auto::otherPanel();
         }
     } elseif ($GLOBALS[JNEWS . 'show_lists']) {
         $subscriberId = JRequest::getInt('subscriber');
         $subscriber = jNews_Subscribers::getSubscribersFromId(array($subscriberId), false);
         frontEnd::changeSubscriptions($subscriberId, md5($subscriber->email), '', 'save');
     }
 }
Ejemplo n.º 3
0
    static function edit($listEdit, $lists, $show, $html)
    {
        ?>
	<fieldset class="jnewscss">
	<legend><?php 
        echo _JNEWS_AUTO_RESP_OPTION;
        ?>
</legend>
	<table class="jnewstable" cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
        $tip = _JNEWS_INFO_LIST_FOLLOW_UP;
        $title = _JNEWS_FOLLOW_UP;
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
				</span>
			</td>
			<td>
				<input type="text" name="follow_up" class="inputbox" size="6" maxlength="10" value="<?php 
        if (isset($listEdit->follow_up)) {
            echo $listEdit->follow_up;
        } else {
            echo '';
        }
        ?>
" />
			<?php 
        if (!jNews_Auto::good()) {
            echo jnews::printM('no', _JNEWS_NOTSO_GOOD_LIC);
            echo _JNEWS_PLEASE_LIC;
        }
        ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
	<?php 
    }
Ejemplo n.º 4
0
 //No Cron
 $password = JRequest::getVar('password', '', '', 'string');
 if (!empty($password)) {
     $decodepass = base64_decode($password);
     if ($decodepass == $GLOBALS[JNEWS . 'cron_pass']) {
         echo "<br/>jNews Cron launched";
         $status = jNews_Auto::execute(false);
         if ($status) {
             echo "<br/>Successfully processed queue!";
         }
     } else {
         return false;
     }
 } else {
     echo "<br/>jNews Cron launched";
     $status = jNews_Auto::execute(false);
     if ($status) {
         echo "<br/>Successfully processed queue!";
     }
 }
 //check if we have caching in Joomla
 $conf = JFactory::getConfig();
 $cacheTime = $conf->get('cachetime');
 if (!empty($cacheTime) && $cacheTime > $GLOBALS[JNEWS . 'cron_max_freq'] * 0.8) {
     //check if the cache plugin is published
     $db = JFactory::getDBO();
     if (version_compare(JVERSION, '1.6.0', '<')) {
         //j15
         $db->setQuery("SELECT `published` FROM `#__plugins` WHERE `element`='cache'  AND `folder`='system' ");
     } else {
         //j16
Ejemplo n.º 5
0
function mailing($action, $task, $listId, $listType, $mailingId, $message)
{
    $showMailings = false;
    $db = JFactory::getDBO();
    switch ($task) {
        case 'edit':
            $issue_nb = JRequest::getInt('issue_nb', 1);
            $mailingType = JRequest::getVar('listype');
            $isEdit = JRequest::getVar('isEdit', true);
            $mySess = JFactory::getSession();
            $mySess->set('listype', $mailingType, 'LType');
            if (!empty($listId)) {
                $list = jNews_Lists::getOneList($listId);
            } else {
                $list = jNews_Lists::getListFirstEntry();
            }
            $new = empty($mailingId) || $mailingId == 0 ? true : false;
            $mailing = jNews_Mailing::getOneMailing($list, $mailingId, $issue_nb, $new, false, true);
            $mailing->mailing_type = $mailingType;
            //			if(empty($isEdit)) $isEdit = true;
            // set default mailing parameters
            $my = JFactory::getUser();
            $subscribers = jNews_Subscribers::getSubscriberInfoFromUserId($my->id);
            if (!isset($subscribers)) {
                $subscribers = new stdClass();
            }
            $subscribers->name = isset($subscribers->name) ? $subscribers->name : '';
            $subscribers->email = isset($subscribers->email) ? $subscribers->email : '';
            //			$mailing->fromname = ( !isset( $mailing->fromname ) || empty( $mailing->fromname ) ) ? $subscribers->name : $mailing->fromname;
            //			$mailing->fromemail = ( !isset( $mailing->fromemail ) || empty( $mailing->fromemail ) ) ? $subscribers->email : $mailing->fromemail;
            //			$mailing->frombounce = ( !isset( $mailing->frombounce ) || empty( $mailing->frombounce ) ) ? $GLOBALS[JNEWS.'sendmail_from'] : $mailing->frombounce;
            $show = jNews_ListType::showType($mailing->mailing_type, 'editmailing');
            if ($mailing->published != 1 or $mailing->mailing_type != 1 or isset($show['admin']) and $show['admin']) {
                $forms['main'] = " <form action='index.php' method='post' enctype='multipart/form-data' name='adminForm' id=\"adminForm\">";
                jNews_Mailing::_header($task, $action, $mailing->mailing_type, $message, 'edit');
                jNews_MailingsHTML::editMailing($mailing, $new, $listId, $forms, $show, $isEdit);
                $go[] = jnews::makeObj('act', $action);
                backHTML::formEnd($go);
            } else {
                $forms['main'] = " <form action='index.php' method='post' name='adminForm' id=\"adminForm\">";
                jNews_Mailing::_header($task, $action, $mailing->mailing_type, $message);
                //backHTML::formStart();
                jNews_MailingsHTML::viewMailing($mailing, $forms);
                $go[] = jnews::makeObj('act', 'mailing');
                $go[] = jnews::makeObj('task', 'viewmailing');
                $go[] = jnews::makeObj('mailingid', $mailing->id);
                backHTML::formEnd($go);
            }
            break;
        case 'new':
        case 'add':
            // check if atleast one list exist and published
            // if false then restrict entry
            $mailingType = JRequest::getVar('listype');
            $type = $mailingType == 2 ? 2 : 1;
            $result = jNews_Lists::checkListNotEmpty($type);
            if (!$result) {
                if ($type == 2) {
                    $disp = addslashes(_JNEWS_CHECKCAMPAIGNFOUND);
                } else {
                    $disp = addslashes(_JNEWS_CHECKLISTFOUND);
                }
                echo "<script> alert('" . $disp . "'); window.history.go(-1);</script>\n";
                break;
            }
            $mailingType = JRequest::getVar('listype');
            if (empty($listId)) {
                $listId = JRequest::getVar('listid');
            }
            if (!empty($listId)) {
                $mailingType = jNews_Lists::getListType($listId) == 2 ? 2 : 1;
            }
            JRequest::setVar('listype', $mailingType);
            $total = jNews_Mailing::countMailings($listId, $mailingType);
            $total++;
            jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&task=edit&mailingid=0&issue_nb=' . $total . '&listype=' . $mailingType . '&listid=' . $listId . '&isEdit=0');
            //mariap
            break;
        case 'saveSend':
            JRequest::checkToken() or die('Invalid Token');
            $mySess = JFactory::getSession();
            $mailingType = $mySess->get('listype', '', 'LType');
            $status = checkMailingSave($mailingType);
            if (!$status) {
                return false;
            }
            jNews_Mailing::saveMailing($mailingId, $listId);
        case 'sendready':
            //we update the senddate of the newsletter
            jNews_Mailing::updatesenddate($mailingId);
            jNews_MailingsHTML::sendReady($mailingId, $listId, $listType);
            break;
        case 'generate':
            if (class_exists('jNews_Auto')) {
                $still = false;
                $message = jnews::printYN(jNews_Auto::processQueue(true, true, $still, true), 'Queue processed', _JNEWS_ERROR);
                jNews_Auto::displayStatus();
            }
            return;
            break;
        case 'send':
            $queueC = new jNews_Queue();
            $queueC->checkForNewsletters($mailingId);
            $queueCount = jNews_Queue::getQueueCount($mailingId);
            $totalSub = JRequest::setVar('totalsend', $queueCount);
            $linkURL = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=continuesend&mailingid=' . $mailingId . '&totalsend=' . $totalSub, true, false, true);
            jNews_Tools::redirect($linkURL);
            break;
        case 'continuesend':
            $queueC = new jNews_Queue();
            //we update the senddate of the mailing to be now to be able to continue the sending and send it after we click continue
            //			$queueC->updateSenddateToNow($mailingId);
            $totalSend = JRequest::getVar('totalsend', 0, '', 'int');
            $alreadySent = JRequest::getVar('alreadysent', 0, '', 'int');
            $queueC->start = $alreadySent;
            $queueC->total = $totalSend;
            $queueC->pause = $GLOBALS[JNEWS . 'pause_time'];
            $queueC->sendQueue(false, $mailingId, false, true);
            ob_start();
            exit;
            break;
        case 'testspam':
            if (empty($message)) {
                $message = _JNEWS_MESSAGE_NOT;
            }
            $mailingId = $mailingId == 0 ? jNews_Mailing::getLastMailingId() : $mailingId;
            $my = JFactory::getUser();
            if ($listId > 0) {
                $archivemailing = jNews_Mailing::getMailingView($mailingId, $listId);
            } else {
                $archivemailing = jNews_Mailing::getMailingView($mailingId);
            }
            $mailing = new stdClass();
            $receivers = new stdClass();
            $receivers->email = '*****@*****.**';
            $receivers->name = $archivemailing->fromname;
            $receivers->receive_html = 1;
            $receivers->id = jNews_Subscribers::getSubscriberIdFromUserId($my->id);
            //if email are different we dont replace because we want to make sure the spam cehck count the fact that
            //sender and bounce back are different
            if ($archivemailing->fromemail == $archivemailing->frombounce) {
                $archivemailing->frombounce = $my->email;
            }
            $archivemailing->fromemail = $my->email;
            $mailerC = new jNews_ProcessMail();
            $status = $mailerC->send($archivemailing, $receivers);
            $message = jnews::printYN($status, _JNEWS_SPAMTEXT_MESSAGE_SENT_SUCCESSFULLY, $message);
            $link = 'http://www.joobi.co/index.php?option=com_jlinks&controller=redirect&link=SpamCheck&alt=jnewsdoc_glossary';
            $iFrame = '<iframe src="' . $link . '" width="100%" height="680px" scrolling="auto"></iframe>';
            echo $iFrame;
            break;
        case 'savePreview':
            JRequest::checkToken() or die('Invalid Token');
            $status = checkMailingSave($mailingType);
            if (!$status) {
                return false;
            }
            if ($mailingType == 7) {
                $mailing = JRequest::getVar('mailing', '');
                $ContentStatus = checkTag();
                if (!$ContentStatus) {
                    return false;
                }
            }
            jNews_Mailing::saveMailing($mailingId, $listId);
        case 'preview':
            $emailaddress = JRequest::getVar('emailaddress', '');
            $mailingId = $mailingId == 0 ? jNews_Mailing::getLastMailingId() : $mailingId;
            if (!empty($emailaddress)) {
                $status = jNews_Mailing::sendTestEmail($mailingId, $listId);
                if (empty($message)) {
                    $message = _JNEWS_MESSAGE_NOT;
                }
                $message = jnews::printYN($status, _JNEWS_MESSAGE_SENT_SUCCESSFULLY, $message);
            }
            if ($listId > 0) {
                $archivemailing = jNews_Mailing::getMailingView($mailingId, $listId);
            } else {
                $archivemailing = jNews_Mailing::getMailingView($mailingId);
            }
            $doc = JFactory::getDocument();
            $css = '.icon-48-preview{ background-image:url(' . JNEWS_PATH_ADMIN_IMAGES2 . 'header/preview.png)}';
            $doc->addStyleDeclaration($css, $type = 'text/css');
            $title = _JNEWS_PREVIEW_TITLE . ': ' . $archivemailing->subject;
            backHTML::_header(_JNEWS_PREVIEW_TITLE, 'preview.png', $message, $task, $action);
            //new view for the preview mailing
            echo '<table cellpadding="0" cellspacing="2" border="0" width="100%"><tr><td width="40%">';
            jNews_MailingsHTML::previewMailingHTML($mailingId, $listId, $listType, $archivemailing->html);
            echo '</td><td width="60%">';
            $forms['main'] = '';
            $list = jNews_Lists::getOneList($archivemailing->list_id);
            $textonly = '';
            $mailerC = new jNews_ProcessMail();
            $queueInfo = new stdClass();
            $queueInfo->mailingid = $mailingId;
            $queueInfo->listid = @$listId;
            $mailerC->getContent($archivemailing->images, $archivemailing->html, $archivemailing->textonly, $archivemailing->subject, false, true, $queueInfo);
            //new $archivemailing->subject
            if ($archivemailing->html == 1) {
                if (empty($template_id)) {
                    $template_id = $archivemailing->template_id;
                }
                if (!empty($template_id)) {
                    jNews_Templates::includeStyles($archivemailing->htmlcontent, $template_id);
                }
            } else {
                $archivemailing->textonly = jNews_ProcessMail::htmlToText($archivemailing->textonly);
            }
            //new view for the preview mailing
            jNews_MailingsHTML::viewHeading($archivemailing);
            echo '</td></tr><tr><td colspan="2">';
            jNews_MailingsHTML::viewMailing($archivemailing, $forms);
            echo '</td></tr></tbody></table>';
            if ($mailingId == 0) {
                JRequest::setVar('mailingid', $mailingId);
            }
            break;
        case 'view':
            $mailingType = JRequest::getVar('listype');
            if (!empty($mailingType)) {
                $mySess = JFactory::getSession();
                $mySess->set('listype', $mailingType, 'LType');
            }
            if ($mailingId != 0) {
                if ($listId > 0) {
                    $archivemailing = jNews_Mailing::getMailingView($mailingId, $listId);
                } else {
                    $archivemailing = jNews_Mailing::getMailingView($mailingId);
                }
                if (empty($template_id)) {
                    $template_id = $archivemailing->template_id;
                }
                if (!empty($template_id)) {
                    jNews_Templates::includeStyles($archivemailing->htmlcontent, $template_id);
                }
                $forms['main'] = "<form action='index.php?option=" . JNEWS_OPTION . "&act=mailing&listype=" . $listType . "&listid=" . $listId . "' method='post' name='adminForm' id=\"adminForm\">";
                jNews_Mailing::_header($task, $action, $listType, $message);
                backHTML::formStart('show_mailing', 0, '');
                jNews_MailingsHTML::viewMailing($archivemailing, $forms);
                $go[] = jnews::makeObj('act', 'mailing');
                $go[] = jnews::makeObj('task', 'viewmailing');
                $go[] = jnews::makeObj('listId', $archivemailing->list_id);
                //listid to listId--original
                backHTML::formEnd($go);
            }
            break;
        case 'deletequeue':
            //implement here what are we going to do with the delete queueu column on the mailing
            $mailingID = JRequest::getVar('mailingid');
            $mailingType = JRequest::getVar('listype');
            if (!empty($mailingID)) {
                $db = JFactory::getDBO();
                $db->setQuery('DELETE FROM `#__jnews_queue` WHERE `mailing_id` = ' . $mailingID);
                $db->query();
                $message = jnews::printYN(true, _JNEWS_MAILING_QUEUE_DELETED, _JNEWS_ERROR);
            } else {
                $message = jnews::printYN(false, _JNEWS_MAILING_QUEUE_DELETED, _JNEWS_ERROR);
            }
            jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType, $message);
            break;
        case 'deleteMailing':
            JRequest::checkToken() or die('Invalid Token');
            $d['mailing'] = jNews_Mailing::getOneMailing('', $mailingId, '', $new);
            $message = jnews::printYN(jNews_Mailing::delete($d), @constant($GLOBALS[JNEWS . 'listname' . $d['mailing']->list_type]) . '"' . $d['mailing']->subject . '"' . _JNEWS_SUCCESS_DELETED, _JNEWS_ERROR);
            $showMailings = true;
            break;
        case 'cancel':
            $url = 'index.php?option=' . JNEWS_OPTION . '&act=mailing&mailingid=' . $mailingId;
            $url .= (!empty($listId) ? '&listid=' . $listId : '') . '&listype=' . $mailingType;
            jNews_Tools::redirect($url);
            break;
        case 'copy':
            JRequest::checkToken() or die('Invalid Token');
            $message = jnews::printYN(jNews_Mailing::copyMailing($mailingId), _JNEWS_MAILING_COPY, _JNEWS_ERROR);
            $showMailings = true;
            break;
        case 'cancelMailing':
            $showMailings = true;
            break;
        case 'publishMailing':
            JRequest::checkToken() or die('Invalid Token');
            $mailing = jNews_Mailing::getOneMailing('', $mailingId, '', $new);
            $message = jnews::printYN(jNews_Mailing::publishMailing($mailingId), @constant($GLOBALS[JNEWS . 'listname' . $mailing->mailing_type]) . ' ' . _JNEWS_PUBLISHED, _JNEWS_ERROR);
            $mailingType = jNews_Mailing::getMailingInfoz($mailingId);
            jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType);
            break;
        case 'unpublishMailing':
            JRequest::checkToken() or die('Invalid Token');
            $mailing = jNews_Mailing::getOneMailing('', $mailingId, '', $new);
            $message = jnews::printYN(jNews_Mailing::unpublishMailing($mailingId), @constant($GLOBALS[JNEWS . 'listname' . $mailing->mailing_type]) . ' ' . _JNEWS_UNPUBLISHED, _JNEWS_ERROR);
            $mailingType = jNews_Mailing::getMailingInfoz($mailingId);
            jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType . '&listid=' . $listId);
            break;
        case 'cpanel':
            backHTML::controlPanel();
            break;
        case 'save':
            JRequest::checkToken() or die('Invalid Token');
            $subject = JRequest::getVar('subject', '');
            if (empty($subject)) {
                echo "<script> alert('subject needs to be not empty'); window.history.go(-1);</script>\n";
                return false;
            }
            if (!isset($mailingType)) {
                $mySess = JFactory::getSession();
                $mailingType = $mySess->get('listype', '', 'LType');
            }
            $status = checkMailingSave($mailingType);
            if ($mailingType == 7) {
                $mailing = JRequest::getVar('mailing', '');
                $ContentStatus = checkTag();
                if (!$ContentStatus) {
                    return false;
                }
            }
            if (!$status) {
                return false;
            }
            $message = jnews::printYN(jNews_Mailing::saveMailing($mailingId, $listId), _JNEWS_MAILING_SAVED, _JNEWS_ERROR);
            if (!empty($mailingtype)) {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType . '&listid=' . $listId);
            } else {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType . '&listid=' . $listId);
                $showMailings = true;
                unset($GLOBALS["task"]);
                unset($_REQUEST["task"]);
            }
            break;
        case 'apply':
            JRequest::checkToken() or die('Invalid Token');
            $mailingid = JRequest::getVar('mailingid', '0');
            if (!isset($mailingType)) {
                $mySess = JFactory::getSession();
                $mailingType = $mySess->get('listype', '', 'LType');
            }
            $status = checkMailingSave($mailingType);
            if ($mailingType == 7) {
                $mailing = JRequest::getVar('mailing', '');
                $ContentStatus = checkTag();
                if (!$ContentStatus) {
                    return false;
                }
            }
            if (!$status) {
                return false;
            }
            $message = jnews::printYN(jNews_Mailing::saveMailing($mailingId, $listId), _JNEWS_MAILING_SAVED, _JNEWS_ERROR);
            $mailingid = $mailingid == 0 ? jNews_Mailing::getLastMailingId() : $mailingid;
            if (!empty($mailingtype)) {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&task=edit&listype=' . $mailingType . '&mailingid=' . $mailingid . '&listid=' . $listId);
            } else {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&task=edit&listype=' . $mailingType . '&mailingid=' . $mailingid . '&listid=' . $listId);
                $showMailings = true;
                unset($GLOBALS["task"]);
                unset($_REQUEST["task"]);
            }
            break;
        case 'show':
            $id = JRequest::getVar('mailingid');
            $mySess = JFactory::getSession();
            $mailingType = JRequest::getVar('listype', 0);
            $listId = JRequest::getVar('listid', 0);
            $link = 'index.php?option=' . JNEWS_OPTION . '&act=mailing&listype=' . $mailingType . '&listid=' . $listId;
            jNews_Tools::redirect($link);
            $showMailings = true;
            break;
        case 'toggle':
            $listid = JRequest::getVar('listid');
            $column = JRequest::getVar('col');
            $mailingid = JRequest::getVar('mailingid');
            if (!empty($mailingid) && !empty($column)) {
                $passObj = new stdClass();
                $passObj->tableName = '#__jnews_mailings';
                $passObj->columnName = $column;
                $passObj->whereColumn = 'id';
                $passObj->whereColumnValue = $mailingid;
                jnews::toggle($passObj);
            }
            if ($listType == 1) {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listid=' . $listid . '&listype=1');
            } else {
                jNews_Tools::redirect('index.php?option=' . JNEWS_OPTION . '&act=mailing&listid=' . $listid . '&listype=2');
            }
            break;
        default:
            $showMailings = true;
            break;
    }
    if ($showMailings) {
        if (empty($listType)) {
            $listType = JRequest::getVar('listype', 0);
        }
        if (empty($listId)) {
            $listId = JRequest::getVar('listid', 0);
        }
        $paginationStart = JRequest::getVar('pg');
        if (!empty($paginationStart)) {
            $limitstart = 0;
            $limitend = $paginationStart;
        } else {
            $app = JFactory::getApplication();
            $limitstart = $app->getUserStateFromRequest('limitstart', 'limitstart', 0, 'int');
            $limitend = $app->getUserStateFromRequest('limit', 'limit', 0, 'int');
        }
        $limittotal = jNews_Mailing::countMailings(0, $listType);
        $setLimit = new stdClass();
        $setLimit->total = !empty($limittotal) ? $limittotal : 0;
        $setLimit->start = !empty($limitstart) ? $limitstart : 0;
        $setLimit->end = !empty($limitend) ? $limitend : $limittotal;
        if ($setLimit->total == $setLimit->end) {
            $setLimit->start = 0;
        }
        jNews_Mailing::showMailings($task, $action, $listId, $listType, $message, true, _JNEWS_MENU_MAILING, $setLimit);
    }
    return true;
}
Ejemplo n.º 6
0
 /** Function for transferring the acajoom license to jnews
 */
 function acaTojnewsLicenseUpd()
 {
     // get acajoom license key
     $query = " SELECT `text` FROM `#__acajoom_xonfig` WHERE `akey` = 'license'";
     $license = jNews_TableUpdate::_getTableQuery($query, $loadAction = 'loadResult');
     if (!empty($license)) {
         // update license
         jNews_Config::insert('license', $license, 0, true);
         // validate
         if (class_exists('jNews_Auto')) {
             jNews_Auto::good();
         }
     } else {
         // no need to update if there are no license to be updated
         return false;
     }
     return true;
 }
Ejemplo n.º 7
0
 public static function updateList($listId, $listUpdated, $status, $new)
 {
     $total = 0;
     @set_time_limit(0);
     //If memory_limit less than 128M
     $limit = jnews::convertToBytes(@ini_get('memory_limit'));
     if ($limit < jnews::convertToBytes('128M')) {
         @ini_set('memory_limit', '128M');
     }
     if ($listUpdated->list_type != '7' and $listUpdated->delay_min > $listUpdated->delay_max) {
         $listUpdated->delay_min = $listUpdated->delay_max;
     }
     if (!jNews_Lists::updateListData($listUpdated)) {
         return false;
     } else {
         if ($listUpdated->auto_add == 2) {
             $subscribers = jNews_Subscribers::getSubscribers(-1, -1, '', $total, 0, '', 1, 1, '', '');
             //added one parameter for mailid
             $subId = jnews::convertObjectToIdList($subscribers, 'id');
             if (!empty($subId)) {
                 jNews_Queue::insertQueuesForNews($subId, $listId, $listUpdated->acc_id);
             }
         } elseif ($status == '' and $listUpdated->list_type == 2) {
             $queues = jNews_Queue::getAllOneList($listId);
             $qid = jnews::convertObjectToIdList($queues, 'qid');
             if (!jNews_Queue::updatePublished($qid, $status)) {
                 return false;
             }
         } else {
             if (class_exists('jNews_Auto')) {
                 jNews_Auto::updateListNb($listUpdated->list_type, $listUpdated->id);
             }
         }
     }
     if ($listUpdated->published == 0) {
         jnews::printM('blue', _JNEWS_LIST_UNPUBMSG);
     }
     if ($listUpdated->hidden == 0) {
         jnews::printM('blue', _JNEWS_LIST_INVIMSG);
     }
     return true;
 }
Ejemplo n.º 8
0
 public static function replaceTags($content, $subscriber, $oneQueue, $html, $tags = null, $showSign = true)
 {
     $mailingId = $oneQueue->id;
     $Itemid = $GLOBALS[JNEWS . 'itemidAca'];
     $listId = '0';
     //can be empty
     $subscriptionslink = 'option=' . JNEWS_OPTION . '&Itemid=' . $Itemid . '&act=change&subscriber=' . $subscriber->id . '&cle=' . md5($subscriber->email);
     $unsubscribelink = 'option=' . JNEWS_OPTION . '&Itemid=' . $Itemid . '&act=unsubscribe&subscriber=' . $subscriber->id . '&mailingid=' . $mailingId . '&cle=' . md5($subscriber->email);
     $subscriptiontext = '';
     $subscriptionslink = jNews_Tools::completeLink($subscriptionslink, false, $GLOBALS[JNEWS . 'use_sef']);
     $unsubscribelink = jNews_Tools::completeLink($unsubscribelink, false, $GLOBALS[JNEWS . 'use_sef']);
     if ($html) {
         $subscriptionslink = '<a href="' . $subscriptionslink . '" target="_blank"><span class="aca_subscribe">' . _JNEWS_CHANGE_EMAIL_SUBSCRIPTION . '</span></a>';
         $unsubscribelink = '<a href="' . $unsubscribelink . '" target="_blank"><span class="aca_unsubscribe">' . _JNEWS_SAFEUNSUBSCRIBE . '</span></a>';
         $subscriptionstext = '<p>' . $subscriptionslink . '<br />' . $unsubscribelink . '</p>';
     } else {
         $subscriptionslink = _JNEWS_CHANGE_EMAIL_SUBSCRIPTION . ' ( ' . $subscriptionslink . ' )';
         $unsubscribelink = _JNEWS_SAFEUNSUBSCRIBE . ' ( ' . $unsubscribelink . ' )';
         $subscriptionstext = "\r\n" . $subscriptionslink . "\r\n" . $unsubscribelink;
     }
     $subscriptionstext = '';
     if ($showSign && $GLOBALS[JNEWS . 'show_signature']) {
         if ($html) {
             $signatureText = '<a href="http://www.joobi.co" target="_blank">';
             $signatureText .= '<br /><center><div style="width: 99%; color:#000; font-size: 0.8em; text-align: center; ">Powered by Joobi</div></center>';
             $signatureText .= '</a>';
         } else {
             $signatureText = '<br />Powered by Joobi ( http://www.joobi.co )';
         }
         $subscriptionstext .= "\r\n\r\n" . $signatureText;
     }
     $confirmlink = 'option=' . JNEWS_OPTION . '&act=confirm&listid=' . $listId . '&cle=' . md5($subscriber->email) . '&subscriber=' . $subscriber->id . '&Itemid=' . $Itemid;
     $confirmlink = jNews_Tools::completeLink($confirmlink, false, $GLOBALS[JNEWS . 'use_sef']);
     //for rpelacement of the {tag:title}
     $mailSubject = '';
     //		$mailingid = empty($oneQueue->mailing_id) OR !isset($oneQueue->mailing_id) ? jNews_Queue::getQueueMailingId($oneQueue->id) : $oneQueue->mailing_id;
     $mailSubject = jNews_Mailing::getMailingsSubject($oneQueue->id);
     if ($html) {
         $confirmlink = '<a href="' . $confirmlink . '" target="_blank">' . _JNEWS_CONFIRM_LINK . '</a>';
     } else {
         $confirmlink = _JNEWS_CONFIRM_LINK . "\n" . $confirmlink;
     }
     $tname = explode(" ", $subscriber->name);
     $firstname = $tname[0];
     $username = empty($subscriber->username) ? $firstname : $subscriber->username;
     $archiveLink = 'option=' . JNEWS_OPTION . '&act=mailing&task=view&mailingid=' . $mailingId . '&Itemid=' . $Itemid;
     $archiveLink = jNews_Tools::completeLink($archiveLink, false, $GLOBALS[JNEWS . 'use_sef']);
     $archiveAll = '<a href="' . $archiveLink . '">' . _JNEWS_VIEWARCHIVE . '</a>';
     //		$replaceWhat = array('[CONFIRM]','[NAME]','[FIRSTNAME]','[EMAIL]','[DATE]','[USERNAME]','[LINK]','[ARCHIVE]', '[SUBSCRIPTIONS]', '[UNSUBSCRIBE]');
     //		$replaceWhat = array('{tag:confirm}','{tag:name}','{tag:firstname}','{tag:email}','{tag:date}','{tag:username}','{tag:link}','{tag:archive}', '{tag:subscriptions}', '{tag:unsubscribe}', '{tag:title}');
     $replaceTagsA = array();
     $replaceTagsA['{tag:confirm}'] = $confirmlink;
     $replaceTagsA['{tag:name}'] = $subscriber->name;
     $replaceTagsA['{tag:firstname}'] = $firstname;
     $replaceTagsA['{tag:email}'] = $subscriber->email;
     if (version_compare(JVERSION, '3.0.0', '<')) {
         $replaceTagsA['{tag:date}'] = JHTML::_('date', jnews::getNow(), JText::_('DATE_FORMAT_LC1'));
         // , JNEWS_TIME_OFFSET
     } else {
         $replaceTagsA['{tag:date}'] = JHtml::_('date', jnews::getNow(), JText::_('DATE_FORMAT_LC1'));
         // , JNEWS_TIME_OFFSET
     }
     $replaceTagsA['{tag:username}'] = $username;
     $replaceTagsA['{tag:link}'] = $archiveLink;
     $replaceTagsA['{tag:archive}'] = $archiveAll;
     $mainframe = JFactory::getApplication();
     if (!$mainframe->isAdmin() && JRequest::getVar('act', '', '', 'WORD') == 'mailing' && JRequest::getVar('task') == 'view') {
         $replaceTagsA['{tag:subscriptions}'] = '';
         $replaceTagsA['{tag:unsubscribe}'] = '';
     } else {
         $replaceTagsA['{tag:subscriptions}'] = $subscriptionslink;
         $replaceTagsA['{tag:unsubscribe}'] = $unsubscribelink;
     }
     $replaceTagsA['{tag:title}'] = $mailSubject;
     if ($GLOBALS[JNEWS . 'level'] > 2) {
         //check if the version of jnews is pro
         $replaceTagsA['{tag:profile nb=1}'] = empty($subscriber->column1) ? '' : $subscriber->column1;
         $replaceTagsA['{tag:profile nb=2}'] = empty($subscriber->column2) ? '' : $subscriber->column2;
         $replaceTagsA['{tag:profile nb=3}'] = empty($subscriber->column3) ? '' : $subscriber->column3;
         $replaceTagsA['{tag:profile nb=4}'] = empty($subscriber->column4) ? '' : $subscriber->column4;
         $replaceTagsA['{tag:profile nb=5}'] = empty($subscriber->column5) ? '' : $subscriber->column5;
     }
     $replaceTagsKeysA = array_keys($replaceTagsA);
     $content = str_replace($replaceTagsKeysA, $replaceTagsA, $content);
     if (class_exists('jNews_Auto')) {
         jNews_Auto::tags($content, $tags);
     }
     $content = stristr($content, 'Powered by Joobi') !== false ? $content : $content . $subscriptionstext;
     if (class_exists('jNews_Tags')) {
         jNews_Tags::replace($content, $tags);
     }
     $mainframe = JFactory::getApplication();
     JPluginHelper::importPlugin('jnews');
     $plugin = JPluginHelper::getPlugin('jnews', 'forwardtofriend');
     if (!empty($plugin)) {
         jimport('joomla.html.parameter');
         $fwdObj = new stdClass();
         $fwdObj->subscriber = $subscriber;
         $fwdObj->mailingid = $mailingId;
         $fwdObj->listid = $listId;
         $bot_results = $mainframe->triggerEvent('jnewsbot_fwdtofriendTransform', array(&$content, $fwdObj));
     }
     if (!defined('JOOBI_SECURE')) {
         define('JOOBI_SECURE', true);
     }
     //check if we have Joobi install if so check for tags
     $joobiEntryPoint = '';
     if (defined('JPATH_ROOT')) {
         $path = JPATH_ROOT;
     } elseif (isset($mosConfig_absolute_path)) {
         $path = $mosConfig_absolute_path;
     }
     $status = @(include_once $path . DIRECTORY_SEPARATOR . 'joobi' . DIRECTORY_SEPARATOR . 'entry.php');
     if ($status) {
         //process joobi tag
         $tagProcessC = WClass::get('output.process', null, 'class', false);
         if (!empty($tagProcessC)) {
             $tagProcessC->replaceTags($content);
         }
     }
     if (!empty($mailingId) and $GLOBALS[JNEWS . 'enable_statistics'] == 1) {
         if ($GLOBALS[JNEWS . 'statistics_per_subscriber'] == 1) {
             if ($html) {
                 $content .= '<img src="' . JNEWS_JPATH_LIVE_NO_HTTPS . '/index.php?option=' . JNEWS_OPTION . '&Itemid=' . $Itemid . '&act=log' . '&mailingid=' . $mailingId . '&subscriber=' . $subscriber->id . '" border="0" width="1" height="1" />';
             }
         } else {
             if ($html) {
                 $content .= '<img src="' . JNEWS_JPATH_LIVE_NO_HTTPS . '/index.php?option=' . JNEWS_OPTION . '&Itemid=' . $Itemid . '&act=log' . '&mailingid=' . $mailingId . '" border="0" width="1" height="1" />';
             }
         }
     }
     // replace for images
     //  put the good mailto tag back (replaced before the content mambot)
     $replaceTag = array('href="mailto:', '@', 'href="#');
     $replaceBy = array('9aca7aca5', '9aca4aca1', '9aca12aca3');
     $content = str_replace($replaceTag, $replaceBy, $content);
     $content = preg_replace('#src[ ]*=[ ]*\\"(?!https?://)(?:\\.\\./|\\./|/)?#', 'src="' . JNEWS_JPATH_LIVE_NO_HTTPS . '/', $content);
     $content = preg_replace('#href[ ]*=[ ]*\\"(?!https?://)(?:\\.\\./|\\./|/)?#', 'href="' . JNEWS_JPATH_LIVE_NO_HTTPS . '/', $content);
     $content = str_replace($replaceBy, $replaceTag, $content);
     $content = preg_replace('#\\.(jpg|gif|jpeg|png)(?:(?!").)?"#', '.\\1"', $content);
     if (!$html) {
         $content = str_replace('&amp;', '&', $content);
     }
     return $content;
 }
Ejemplo n.º 9
0
    public static function controlPanel()
    {
        unset($GLOBALS["task"]);
        unset($_REQUEST["task"]);
        $doc = JFactory::getDocument();
        $doc->addStyleSheet(JNEWS_URL_ADMIN . 'cssadmin/jnews.css');
        ?>
<div align="center" class="centermain">
<div id="jnews">
		<table class="">
            <tr>
         	<td width="58%" valign="top">
				<?php 
        echo backHTML::iconsPanel();
        ?>
			</td>
			<td width="42%" valign="top">

			<div style="width=100%;">

			<script type="text/javascript">
				function checkcid(myField) {
					myField.checked = true;
					isChecked(true);
				}
			</script>

			<form action="index.php" method="post" name="adminForm" id="adminForm">
				<input type="hidden" name="option" value="<?php 
        echo JNEWS_OPTION;
        ?>
" />
				<input type="hidden" name="act" value="jnews" />
				<input type="hidden" name="task" value="" />
				<input type="hidden" name="userid" value="" />
		    	<input type="hidden" name="boxchecked" value="0" />

			<?php 
        $tabs = new MosTabsjNews(1);
        $tabs->startPane('acaControlPanel');
        $tabs->startTab(_JNEWS_MENU_TAB_SUM, "acaControlPanel.Summary");
        ?>
			<table class="<?php 
        echo jnews::myTheme();
        ?>
">
			<tbody>
				<thead>
					<tr>
					 <th class="title" style="text-align: center;"><?php 
        echo '#';
        ?>
</th>
					 <th class="title" style="text-align: center;"><?php 
        echo _JNEWS_MENU_TAB_LIST;
        ?>
</th>
					 <th class="title" style="text-align: center;"><?php 
        echo _JNEWS_MENU_MAILING_TITLE;
        ?>
</th>
					</tr>
				</thead>
			 <?php 
        $html = '';
        $totalist = 0;
        $totalmail = 0;
        $totalsub = $GLOBALS[JNEWS . 'act_totalsubcribers0'];
        $totalsent = 0;
        $nb = explode(',', $GLOBALS[JNEWS . 'activelist']);
        $size = sizeof($nb);
        $countOfLists[1] = jNews_Lists::countLists(1);
        $countOfLists[2] = jNews_Lists::countLists(2);
        $countOfLists[7] = jNews_Mailing::countMails(7, true);
        $countOfMailings[1] = jNews_Mailing::countMails(1);
        $countOfMailings[2] = jNews_Mailing::countMails(2);
        $countOfMailings[7] = jNews_Mailing::countMails(7);
        for ($i = 0; $i < $size; $i++) {
            $index = $nb[$i];
            if ($GLOBALS[JNEWS . 'listshow' . $index] > 0 and $GLOBALS[JNEWS . 'listype' . $index] == 1) {
                $row = ($i + 1) % 2;
                $html .= '<tr class="row' . $row . '">';
                $html .= '<td><b>' . @constant($GLOBALS[JNEWS . 'listnames' . $index]) . '</b></td>';
                //					$html .= '<td style="text-align: center; ">' .$GLOBALS[JNEWS.'act_totallist'.$index].'1 </td>';
                $html .= '<td style="text-align: center; ">' . $countOfLists[$index] . ' </td>';
                //if the value to be is less than 0 we will display 0
                if ($GLOBALS[JNEWS . 'act_totalmailing' . $index] > 0) {
                    //						$html .= '<td style="text-align: center; ">' .$GLOBALS[JNEWS.'act_totalmailing'.$index].' </td>';
                    $html .= '<td style="text-align: center; ">' . $countOfMailings[$index] . ' </td>';
                } else {
                    $html .= '<td style="text-align: center; ">0</td>';
                }
                //					$html .= '<td style="text-align: center; ">' .$GLOBALS[JNEWS.'totalmailingsent'.$index].' </td>';
                $html .= '</tr>';
                //					$totalist = $totalist + $GLOBALS[JNEWS.'act_totallist'.$index];
                $totalist = array_sum($countOfLists);
                //					$totalmail = $totalmail + $GLOBALS[JNEWS.'act_totalmailing'.$index];
                $totalmail = array_sum($countOfMailings);
                $totalsent = $totalsent + $GLOBALS[JNEWS . 'totalmailingsent' . $index];
                if ($GLOBALS[JNEWS . 'act_totalsubcribers' . $index] > $totalsub) {
                    $totalsub = $GLOBALS[JNEWS . 'act_totalsubcribers' . $index];
                }
            }
        }
        $html .= '<tr>';
        $html .= '<td style="background-color: #CCFFFF;"><b>' . _JNEWS_CP_TOTAL . '</b></td>';
        $html .= '<td style="text-align: center; text-decoration: bold; background-color: #CCFFFF; border-top: 1px solid #000; ">' . $totalist . ' </td>';
        $html .= '<td style="text-align: center; text-decoration: bold; background-color: #CCFFFF; border-top: 1px solid #000; ">' . $totalmail . ' </td>';
        //			$html .= '<td style="text-align: center; text-decoration: bold; background-color: #CCFFFF; border-top: 1px solid #000; ">' .$totalsent.' </td>';
        //$html .= '<td style="text-align: center; ">' .$totalsub.' </td>';
        $html .= '</tr>';
        echo $html;
        ?>
			 </tbody></table>
			 <br />
			<?php 
        if (class_exists('jNews_Auto')) {
            echo jNews_Auto::showQueue();
        }
        $tabs->endTab();
        $tabs->startTab(_JNEWS_MENU_SUBSCRIBERS, "acaControlPanel.Subscribers");
        $emailsearch = '';
        $listId = 0;
        $limittotal = jNews_Subscribers::getSubscribersCount($listId);
        $setLimitSubs = jnews::setLimitPagination($limittotal);
        ?>
			<input type="hidden" name="listid" value="<?php 
        echo $listId;
        ?>
" />
			<input type="hidden" name="start" value="<?php 
        echo $setLimitSubs->start;
        ?>
" />
			<input type="hidden" name="limit" value="<?php 
        echo $setLimitSubs->end;
        ?>
" />
			<input type="hidden" name="listsearch" value="<?php 
        echo $emailsearch;
        ?>
" />

			<div style="margin-top: 10px;"><?php 
        echo jnews::setTop('', '', $setLimitSubs);
        ?>
</div>

			<table class="<?php 
        echo jnews::myTheme();
        ?>
">
				<thead>
					<tr>
						<th class="title">#</th>
						<th class="title" style="text-align: left;"><?php 
        echo _JNEWS_INPUT_NAME;
        ?>
</th>
						<th class="title" style="text-align: left;"><?php 
        echo _JNEWS_INPUT_EMAIL;
        ?>
</th>
						<th class="title" style="text-align: center;"><?php 
        echo _JNEWS_SIGNUP_DATE;
        ?>
</th>
					</tr>
				</thead>
				<?php 
        $subscribers = jNews_Subscribers::getSubscribers($setLimitSubs->start, $setLimitSubs->end, $emailsearch, $setLimitSubs->total, $listId, '', 0, 0, 'sub_dateD', 0, 0, null, 0);
        $i = 0;
        foreach ($subscribers as $subscriber) {
            $i++;
            if (!jNews_Subscribers::validEmail($subscriber->email)) {
                continue;
            }
            ?>
				<tr class="row<?php 
            echo ($i + 2) % 2;
            ?>
">
				<td><center><?php 
            echo $i + $setLimitSubs->start;
            ?>
</center></td>
				<td style="text-align: left;">
				<a href="index.php?option=<?php 
            echo JNEWS_OPTION;
            ?>
&act=subscribers&task=show&userid=<?php 
            echo $subscriber->id;
            ?>
" >
				<?php 
            echo $subscriber->name;
            ?>
</a></td>
				<td style="text-align: left;"><?php 
            echo $subscriber->email;
            ?>
</td>
				<td style="text-align: center;">
				<?php 
            echo date('l, jS F Y h:i:s A', jnews::getNow(0, true, $subscriber->subscribe_date));
            ?>
				</td>
				</tr>
				<?php 
        }
        ?>
			</table>

			<?php 
        $tabs->endTab();
        $tabs->startTab(_JNEWS_MENU_TAB_LIST, "acaControlPanel.Lists");
        $listsearch = '';
        $lists = jNews_Lists::getLists(0, 0, 1, '', false, false, false);
        $limittotal = count($lists);
        $setLimitLists = jnews::setLimitPagination($limittotal);
        ?>

			<input type="hidden" name="listid" value="<?php 
        echo $listId;
        ?>
" />
			<input type="hidden" name="start" value="<?php 
        echo $setLimitLists->start;
        ?>
" />
			<input type="hidden" name="limit" value="<?php 
        echo $setLimitLists->end;
        ?>
" />
			<input type="hidden" name="listsearch" value="<?php 
        echo $listsearch;
        ?>
" />

			<div style="margin-top: 10px;"><?php 
        echo jnews::setTop('', '', $setLimitLists);
        ?>
</div>

			<table class="<?php 
        echo jnews::myTheme();
        ?>
">
				<thead>
				<tr>
					<th class="title">#</th>
					<th class="title" width="65%"  style="text-align: left;"><?php 
        echo _JNEWS_LIST_NAME;
        ?>
</th>
					<th class="title" width="25%"  style="text-align: left;"><?php 
        echo _JNEWS_LIST_TYPE;
        ?>
</th>
					<th class="title"  style="text-align: center;">ID</th>
				</tr>
				</thead>
			<?php 
        $lists = jNews_Lists::getLists(0, 0, 1, 'listtypeA', false, false, false, false, false, $listsearch, $setLimitLists, 0, 0);
        $i = 0;
        foreach ($lists as $list) {
            $i++;
            $link = 'index.php?option=' . JNEWS_OPTION . '&act=mailing&task=show&listid=' . $list->id;
            ?>
				<tr class="row<?php 
            echo ($i + 2) % 2;
            ?>
">
					<td><?php 
            echo $i + $setLimitLists->start;
            ?>
</td>
					<td  style="text-align: left;">
						<a href="<?php 
            echo $link;
            ?>
">
							<?php 
            echo $list->list_name;
            ?>
</a>
					</td>
					<td  style="text-align: left;"><?php 
            if ($list->list_type == 1) {
                echo _JNEWS_LIST;
            } else {
                echo _JNEWS_AR;
            }
            ?>
</td>
					<td  style="text-align: center;"><?php 
            echo $list->id;
            ?>
</td>
					</tr>
			<?php 
        }
        ?>
			<tr>
				<th colspan="4">
				</th>
			</tr>
			</table>
			<?php 
        $tabs->endTab();
        ?>
			<?php 
        $tabs->endPane();
        ?>
			</form>
		</div>
		<div style="clear:both; float:left; margin-top: 10px;">
		<?php 
        echo jnews::printM('ok', _JNEWS_SERVER_LOCAL_TIME . ' : ' . date('l, j F Y H:i:s', jnews::getNow(0, true)));
        // - date('Z')
        ?>
		</div>
   <td>
   </tr>
   </table>
   </div>
</div>
<?php 
    }
Ejemplo n.º 10
0
    public static function showConfigEdit()
    {
        $mailOpt = array();
        $mailOpt[] = jnews::HTML_SelectOption('mail', 'PHP mail function');
        $mailOpt[] = jnews::HTML_SelectOption('sendmail', 'Sendmail');
        $mailOpt[] = jnews::HTML_SelectOption('smtp', 'SMTP Server');
        $logFormat = array();
        $logFormat[] = jnews::HTML_SelectOption('0', _JNEWS_DETAILED);
        $logFormat[] = jnews::HTML_SelectOption('1', _JNEWS_SIMPLE);
        $themeOption = array();
        $themeOption[] = jnews::HTML_SelectOption('joobilist', 'jNews Look');
        $themeOption[] = jnews::HTML_SelectOption('adminlist', 'Joomla look');
        $lists = array();
        $lists['component_theme'] = jnews::HTML_GenericList($themeOption, "config['component_theme']", 'class="inputbox" size="1"', 'value', 'text', jnews::myTheme());
        $lists['mailermethod'] = jnews::HTML_GenericList($mailOpt, "config['emailmethod']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'emailmethod']);
        $lists['send_log_simple'] = jnews::HTML_GenericList($logFormat, "config['send_log_simple']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'send_log_simple']);
        $lists['save_log_simple'] = jnews::HTML_GenericList($logFormat, "config['save_log_simple']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'save_log_simple']);
        $mailSecure[] = jnews::HTML_SelectOption('', '---');
        $mailSecure[] = jnews::HTML_SelectOption('ssl', 'SSL');
        $mailSecure[] = jnews::HTML_SelectOption('tls', 'TLS');
        $lists['smtp_secure'] = jnews::HTML_GenericList($mailSecure, "config['smtp_secure']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'smtp_secure']);
        $lists['auth_required'] = jnews::HTML_BooleanList("config['smtp_auth_required']", 'class="inputbox"', $GLOBALS[JNEWS . 'smtp_auth_required']);
        $lists['allow_unregistered'] = jnews::HTML_BooleanList("config['allow_unregistered']", 'class="inputbox"', $GLOBALS[JNEWS . 'allow_unregistered']);
        $lists['require_confirmation'] = jnews::HTML_BooleanList("config['require_confirmation']", 'class="inputbox"', $GLOBALS[JNEWS . 'require_confirmation']);
        // DKIM code addition by Amod begins
        $GLOBALS[JNEWS . 'dkim_activated'] = !empty($GLOBALS[JNEWS . 'dkim_activated']) ? $GLOBALS[JNEWS . 'dkim_activated'] : null;
        $lists['dkim_activated'] = jnews::HTML_BooleanList("config['dkim_activated']", 'class="inputbox"', $GLOBALS[JNEWS . 'dkim_activated']);
        // DKIM code addition by Amod ends
        //These options are transfered from lists to configuration
        $lists['show_unsubscribelink'] = jnews::HTML_BooleanList("config['show_unsubscribelink']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_unsubscribelink']);
        $lists['show_subscriptionlink'] = jnews::HTML_BooleanList("config['show_subscriptionlink']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_subscriptionlink']);
        //Queue Settings for queue status
        $queuestatus = array();
        $queuestatus[] = jnews::HTML_SelectOption('1', _JNEWS_QUEUESTATS_ON);
        $queuestatus[] = jnews::HTML_SelectOption('0', _JNEWS_QUEUESTATS_OF);
        $lists['queue_status'] = jnews::HTML_RadioList($queuestatus, "config['queue_status']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'queue_status']);
        $archiveLink = array();
        $archiveLink[] = jnews::HTML_SelectOption('standard', _JNEWS_ARCHIVELINK_STANDARD);
        $archiveLink[] = jnews::HTML_SelectOption('popup', _JNEWS_ARCHIVELINK_POPUP);
        $archiveLink[] = jnews::HTML_SelectOption('newpage', _JNEWS_ARCHIVELINK_PAGE);
        $lists['archive_link'] = jnews::HTML_RadioList($archiveLink, "config['archive_link']", 'class="inputbox" size="1"', 'value', 'text', @$GLOBALS[JNEWS . 'archive_link']);
        $joobicron = array();
        $joobicron[] = jnews::HTML_SelectOption('1', _JNEWS_JOOBICRON_NO);
        $joobicron[] = jnews::HTML_SelectOption('2', _JNEWS_JOOBICRON_YES);
        if ($GLOBALS[JNEWS . 'j_cron'] != 2) {
            $GLOBALS[JNEWS . 'j_cron'] = 1;
        }
        //set to no
        $lists['j_cron'] = jnews::HTML_RadioList($joobicron, "config['j_cron']", 'class="inputbox" size="1"', 'value', 'text', @$GLOBALS[JNEWS . 'j_cron']);
        //Queue Settings for Queue Process
        //$queueprocess=array();
        //$queueprocess[]=jnews::HTML_SelectOption('1', _JNEWS_QUEUESTATS_ON);
        //$queueprocess[]=jnews::HTML_SelectOption('0', _JNEWS_QUEUESTATS_OF);
        //$lists['queue_process'] = jnews::HTML_RadioList( $queueprocess, "config['queue_process']" , 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS.'queue_process'] );
        //Queue Settings for Smart Queue
        $smartqueue = array();
        $smartqueue[] = jnews::HTML_SelectOption('1', _JNEWS_SMARTQ_ON);
        $smartqueue[] = jnews::HTML_SelectOption('0', _JNEWS_SMARTQ_OF);
        $lists['smart_queue'] = jnews::HTML_RadioList($smartqueue, "config['smart_queue']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'smart_queue']);
        $lists['show_login'] = jnews::HTML_BooleanList("config['show_login']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_login']);
        $lists['show_logout'] = jnews::HTML_BooleanList("config['show_logout']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_logout']);
        $lists['confirm_html'] = jnews::HTML_BooleanList("config['confirm_html']", 'class="inputbox"', $GLOBALS[JNEWS . 'confirm_html']);
        $lists['time_zone'] = jnews::HTML_BooleanList("config['time_zone']", 'class="inputbox"', $GLOBALS[JNEWS . 'time_zone']);
        $lists['sub_info_fields'] = jnews::HTML_BooleanList("config['sub_info_fields']", 'class="inputbox"', $GLOBALS[JNEWS . 'sub_info_fields']);
        $lists['show_archive'] = jnews::HTML_BooleanList("config['show_archive']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_archive']);
        $lists['enable_statistics'] = jnews::HTML_BooleanList("config['enable_statistics']", 'class="inputbox"', $GLOBALS[JNEWS . 'enable_statistics']);
        $lists['statistics_per_subscriber'] = jnews::HTML_BooleanList("config['statistics_per_subscriber']", 'class="inputbox"', $GLOBALS[JNEWS . 'statistics_per_subscriber']);
        //Send only HTML Mailin
        $lists['forced_html'] = jnews::HTML_BooleanList("config['forced_html']", 'class="inputbox"', $GLOBALS[JNEWS . 'forced_html']);
        $lists['wait_for_user'] = jnews::HTML_BooleanList("config['wait_for_user']", 'class="inputbox"', $GLOBALS[JNEWS . 'wait_for_user']);
        $lists['display_trace'] = jnews::HTML_BooleanList("config['display_trace']", 'class="inputbox"', $GLOBALS[JNEWS . 'display_trace']);
        $lists['send_data'] = jnews::HTML_BooleanList("config['send_data']", 'class="inputbox"', $GLOBALS[JNEWS . 'send_data']);
        $lists['send_auto_log'] = jnews::HTML_BooleanList("config['send_auto_log']", 'class="inputbox"', $GLOBALS[JNEWS . 'send_auto_log']);
        $lists['send_log'] = jnews::HTML_BooleanList("config['send_log']", 'class="inputbox"', $GLOBALS[JNEWS . 'send_log']);
        $lists['save_log'] = jnews::HTML_BooleanList("config['save_log']", 'class="inputbox"', $GLOBALS[JNEWS . 'save_log']);
        $lists['send_log_closed'] = jnews::HTML_BooleanList("config['send_log_closed']", 'class="inputbox"', $GLOBALS[JNEWS . 'send_log_closed']);
        $lists['clear_log'] = jnews::HTML_BooleanList("clear_log", 'class="inputbox"', 0);
        $lists['show_footer'] = jnews::HTML_BooleanList("config['show_footer']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_footer']);
        $lists['show_jcalpro'] = jnews::HTML_BooleanList("config['show_jcalpro']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_jcalpro']);
        $lists['show_jlinks'] = jnews::HTML_BooleanList("config['show_jlinks']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_jlinks']);
        // $lists['enable_jsub'] = jnews::HTML_BooleanList( "config['enable_jsub']" , 'class="inputbox"', $GLOBALS[JNEWS.'enable_jsub'] );
        $lists['allow_sn'] = jnews::HTML_BooleanList("config['allow_sn']", 'class="inputbox"', $GLOBALS[JNEWS . 'allow_sn']);
        $lists['sntag_norequired'] = jnews::HTML_BooleanList("config['sntag_norequired']", 'class="inputbox"', $GLOBALS[JNEWS . 'sntag_norequired']);
        $lists['show_unsubscribe_all'] = jnews::HTML_BooleanList("config['show_unsubscribe_all']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_unsubscribe_all']);
        $lists['show_terms'] = jnews::HTML_BooleanList("config['show_terms']", 'class="inputbox"', @$GLOBALS[JNEWS . 'show_terms']);
        $lists['check_terms'] = jnews::HTML_BooleanList("config['check_terms']", 'class="inputbox"', @$GLOBALS[JNEWS . 'check_terms']);
        //column1
        $lists['show_column1'] = jnews::HTML_BooleanList("config['show_column1']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_column1']);
        $lists['show_column2'] = jnews::HTML_BooleanList("config['show_column2']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_column2']);
        $lists['show_column3'] = jnews::HTML_BooleanList("config['show_column3']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_column3']);
        $lists['show_column4'] = jnews::HTML_BooleanList("config['show_column4']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_column4']);
        $lists['show_column5'] = jnews::HTML_BooleanList("config['show_column5']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_column5']);
        //end of columns
        //captcha
        //			 $lists['enable_captcha'] = jnews::HTML_BooleanList( "config['enable_captcha']" , 'class="inputbox"', $GLOBALS[JNEWS.'enable_captcha'] );
        //$lists['use_cron_pass'] = jnews::HTML_BooleanList( "config['use_cron_pass']" , 'class="inputbox"', $GLOBALS[JNEWS.'use_cron_pass'] );
        $lists['show_signature'] = jnews::HTML_BooleanList("config['show_signature']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_signature']);
        $lists['show_lists'] = jnews::HTML_BooleanList("config['show_lists']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_lists']);
        $lists['embed_images'] = jnews::HTML_BooleanList("config['embed_images']", 'class="inputbox"', $GLOBALS[JNEWS . 'embed_images']);
        $lists['use_tags'] = jnews::HTML_BooleanList("config['use_tags']", 'class="inputbox"', $GLOBALS[JNEWS . 'use_tags']);
        $lists['show_guide'] = jnews::HTML_BooleanList("config['show_guide']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_guide']);
        $lists['show_author'] = jnews::HTML_BooleanList("config['show_author']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_author']);
        $lists['show_tips'] = jnews::HTML_BooleanList("config['show_tips']", 'class="inputbox"', $GLOBALS[JNEWS . 'show_tips']);
        //$lists['update_notification'] = jnews::HTML_BooleanList( "config['update_notification']" , 'class="inputbox"', $GLOBALS[JNEWS.'update_notification'] );
        $lists['use_sef'] = jnews::HTML_BooleanList("config['use_sef']", 'class="inputbox"', $GLOBALS[JNEWS . 'use_sef']);
        $lists['listype1'] = jnews::HTML_BooleanList("config['listype1']", 'class="inputbox"', $GLOBALS[JNEWS . 'listype1']);
        $lists['listype2'] = jnews::HTML_BooleanList("config['listype2']", 'class="inputbox"', $GLOBALS[JNEWS . 'listype2']);
        $lists['listHTMLeditor'] = jnews::HTML_BooleanList("config['listHTMLeditor']", 'class="inputbox"', $GLOBALS[JNEWS . 'listHTMLeditor']);
        //for social version
        if ($GLOBALS[JNEWS . 'level'] > 2) {
            if (@(include_once JNEWSPATH_ADMIN . 'social' . DS . 'class.social.php')) {
                if (class_exists('jNews_Social')) {
                    $lists['use_masterlists'] = jnews::HTML_BooleanList("config['use_masterlists']", 'class="inputbox"', $GLOBALS[JNEWS . 'use_masterlists']);
                    $lists['allow_fe_autoresponder'] = jnews::HTML_BooleanList("config['allow_fe_autoresponder']", 'class="inputbox"', $GLOBALS[JNEWS . 'allow_fe_autoresponder']);
                }
            }
        }
        if (empty($lists['allow_fe_autoresponder'])) {
            $lists['allow_fe_autoresponder'] = 'jNews Social Only';
        }
        $lists['send_error'] = jnews::HTML_BooleanList("config['send_error']", 'class="inputbox"', $GLOBALS[JNEWS . 'send_error']);
        $lists['report_error'] = jnews::HTML_BooleanList("config['report_error']", 'class="inputbox"', $GLOBALS[JNEWS . 'report_error']);
        $lists['fullcheck'] = jnews::HTML_BooleanList("config['fullcheck']", 'class="inputbox"', $GLOBALS[JNEWS . 'fullcheck']);
        $lists['addEmailRedLink'] = jnews::HTML_BooleanList("config['addEmailRedLink']", 'class="inputbox"', $GLOBALS[JNEWS . 'addEmailRedLink']);
        $lists['disabletooltip'] = jnews::HTML_BooleanList("config['disabletooltip']", 'class="inputbox"', $GLOBALS[JNEWS . 'disabletooltip']);
        $lists['minisendmail'] = jnews::HTML_BooleanList("config['minisendmail']", 'class="inputbox"', $GLOBALS[JNEWS . 'minisendmail']);
        //<!-- content ordering -->
        $sortContent[] = jnews::HTML_SelectOption('0', _JNEWS_SORT_DATE);
        $sortContent[] = jnews::HTML_SelectOption('1', _JNEWS_SORT_SECTION);
        $sortContent[] = jnews::HTML_SelectOption('2', _JNEWS_SORT_CATEGORY);
        //$lists['content_order'] = jnews::HTML_GenericList( $sortContent, "config['content_order']" , 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS.'content_order'] );
        $schedPrior = array();
        $schedPrior[] = jnews::HTML_SelectOption('1', '1');
        $schedPrior[] = jnews::HTML_SelectOption('2', '2');
        $schedPrior[] = jnews::HTML_SelectOption('3', '3');
        $enable_jsub = array();
        $enable_jsub[] = jnews::HTML_SelectOption('0', _JNEWS_LIST_ACESS);
        $enable_jsub[] = jnews::HTML_SelectOption('1', _JNEWS_BYOWNER);
        $lists['enable_jsub'] = jnews::HTML_RadioList($enable_jsub, "config['enable_jsub']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'enable_jsub']);
        $GLOBALS[JNEWS . 'sched_prior'] = isset($GLOBALS[JNEWS . 'sched_prior']) ? $GLOBALS[JNEWS . 'sched_prior'] : 3;
        $lists['sched_prior'] = jnews::HTML_RadioList($schedPrior, "config['sched_prior']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'sched_prior']);
        $arPrior = array();
        $arPrior[] = jnews::HTML_SelectOption('1', '1');
        $arPrior[] = jnews::HTML_SelectOption('2', '2');
        $arPrior[] = jnews::HTML_SelectOption('3', '3');
        $GLOBALS[JNEWS . 'ar_prior'] = isset($GLOBALS[JNEWS . 'ar_prior']) ? $GLOBALS[JNEWS . 'ar_prior'] : '';
        $lists['ar_prior'] = jnews::HTML_RadioList($arPrior, "config['ar_prior']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'ar_prior']);
        $smPrior = array();
        $smPrior[] = jnews::HTML_SelectOption('1', '1');
        $smPrior[] = jnews::HTML_SelectOption('2', '2');
        $smPrior[] = jnews::HTML_SelectOption('3', '3');
        $GLOBALS[JNEWS . 'sm_prior'] = isset($GLOBALS[JNEWS . 'sm_prior']) ? $GLOBALS[JNEWS . 'sm_prior'] : '';
        $lists['sm_prior'] = jnews::HTML_RadioList($arPrior, "config['sm_prior']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'sm_prior']);
        $priord_list = array();
        $priord_list[] = jnews::HTML_SelectOption('0', _JNEWS_AUTORESP);
        $priord_list[] = jnews::HTML_SelectOption('1', _JNEWS_LIST);
        $GLOBALS[JNEWS . 'priord_list'] = isset($GLOBALS[JNEWS . 'priord_list']) ? $GLOBALS[JNEWS . 'priord_list'] : '';
        $lists['priord_list'] = jnews::HTML_RadioList($priord_list, "config['priord_list']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'priord_list']);
        $priord_subs = array();
        $priord_subs[] = jnews::HTML_SelectOption('0', _JNEWS_REMAIN_SUBS);
        $priord_subs[] = jnews::HTML_SelectOption('1', _JNEWS_LIST_T_SUBSCRIPTION);
        $priord_subs[] = jnews::HTML_SelectOption('2', _JNEWS_UNSUBS);
        $GLOBALS[JNEWS . 'priord_subs'] = isset($GLOBALS[JNEWS . 'priord_subs']) ? $GLOBALS[JNEWS . 'priord_subs'] : '';
        $lists['priord_subs'] = jnews::HTML_RadioList($priord_subs, "config['priord_subs']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'priord_subs']);
        if (class_exists('jNews_Social')) {
            $lists['list_creatorfe'] = jnews::displayAccessRoles('list_creatorfe', $GLOBALS[JNEWS . 'list_creatorfe']);
            //since 6.1.0
            $lists['use_backendview'] = jnews::HTML_BooleanList("config['use_backendview']", 'class="inputbox"', $GLOBALS[JNEWS . 'use_backendview']);
        }
        if (class_exists('aca_archive')) {
            $jour = array();
            $jour[] = jnews::HTML_SelectOption('0', _JNEWS_FREQ_OPT_0);
            $jour[] = jnews::HTML_SelectOption('1', _JNEWS_FREQ_OPT_1);
            $jour[] = jnews::HTML_SelectOption('2', _JNEWS_FREQ_OPT_2);
            $jour[] = jnews::HTML_SelectOption('3', _JNEWS_FREQ_OPT_3);
            $jour[] = jnews::HTML_SelectOption('4', _JNEWS_FREQ_OPT_4);
            $jour[] = jnews::HTML_SelectOption('5', _JNEWS_FREQ_OPT_5);
            $jour[] = jnews::HTML_SelectOption('6', _JNEWS_FREQ_OPT_6);
            $dateType = array();
            $dateType[] = jnews::HTML_SelectOption('1', _JNEWS_DATE_OPT_1);
            $dateType[] = jnews::HTML_SelectOption('2', _JNEWS_DATE_OPT_2);
            $lists['frequency'] = jnews::HTML_GenericList($jour, "config['frequency']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'frequency']);
            $lists['date_type'] = jnews::HTML_GenericList($dateType, "config['date_type']", 'class="inputbox" size="1"', 'value', 'text', $GLOBALS[JNEWS . 'date_type']);
        }
        //encoding format
        $mail_format[] = jnews::HTML_SelectOption('0', 'Text (8bit)');
        $mail_format[] = jnews::HTML_SelectOption('1', 'MIME (base64)');
        $lists['mail_format'] = jnews::HTML_RadioList($mail_format, "config['mail_format']", 'class="inputbox"', 'value', 'text', $GLOBALS[JNEWS . 'mail_format']);
        //encoding formart
        $mail_encoding[] = jnews::HTML_SelectOption('0', 'UTF-8');
        $mail_encoding[] = jnews::HTML_SelectOption('1', 'ISO-8859-2');
        $lists['mail_encoding'] = jnews::HTML_RadioList($mail_encoding, "config['mail_encoding']", 'class="inputbox"', 'value', 'text', $GLOBALS[JNEWS . 'mail_encoding']);
        backHTML::formStart('configpanel', 0, '');
        ?>
	<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
	<form action="index.php" method="post" name="adminForm" id="adminForm">
	<?php 
        $config_tabs = new MosTabsjNews(1);
        $config_tabs->startPane('acaConfig');
        $config_tabs->startTab(_JNEWS_MAIL_CONFIG, 'mail');
        jNews_ConfigHTML::mailSettings($lists);
        $config_tabs->endTab();
        $config_tabs->startTab(_JNEWS_SUBSCRIBER_CONFIG, 'subscribers');
        jNews_ConfigHTML::subcriberSettings($lists);
        $config_tabs->endTab();
        if (class_exists('jNews_Auto')) {
            $config_tabs->startTab(_JNEWS_SCHEDULER, 'scheduler');
            jNews_ConfigHTML::cronSettings($lists);
            $config_tabs->endTab();
        }
        $config_tabs->startTab(_JNEWS_LOGGING_CONFIG, 'logging');
        jNews_ConfigHTML::logsSettings($lists);
        $config_tabs->endTab();
        if ($GLOBALS[JNEWS . 'integration'] and ($GLOBALS[JNEWS . 'cb_integration'] or class_exists('aca_virtuemart') && $GLOBALS[JNEWS . 'virtuemart'])) {
            $config_tabs->startTab(_JNEWS_CONFIG_INTEGRATION, 'integration');
            if ($GLOBALS[JNEWS . 'cb_integration']) {
                jNews_ConfigHTML::cbSettings();
            }
            if (class_exists('aca_virtuemart') && isset($GLOBALS[JNEWS . 'virtuemart']) && $GLOBALS[JNEWS . 'virtuemart']) {
                aca_virtuemart::tab();
            }
            $config_tabs->endTab();
        }
        $config_tabs->startTab(_JNEWS_MISC_CONFIG, 'misc');
        jNews_ConfigHTML::miscSettings($lists);
        $config_tabs->endTab();
        if (class_exists('jNews_Auto')) {
            $config_tabs->startTab(_JNEWS_LICENSE_CONFIG, 'licence');
            jNews_Auto::licenseSettings($lists);
            $config_tabs->endTab();
        }
        $config_tabs->endPane();
        if (version_compare(JVERSION, '3.0.0', '<')) {
            echo JHTML::_('form.token');
        } else {
            echo JHtml::_('form.token');
        }
        ?>
		<input type="hidden" name="option" value="<?php 
        echo JNEWS_OPTION;
        ?>
" />
		<input type="hidden" name="act" value="configuration" />
    	<input type="hidden" name="boxchecked" value="0" />
    	<input type="hidden" name="task" value="" />
	</form>
	</td></tr></tbody></table>
	<?php 
    }