Пример #1
0
    public static function lists($mailingEdit, $list, $show, $lType, $arId, $indicate = false, $isEdit = false)
    {
        $mainframe = JFactory::getApplication();
        if (!isset($mailingEdit)) {
            $mailingEdit = new stdClass();
        }
        $listType = JRequest::getVar('listype');
        if (!isset($mailingEdit->list_type)) {
            $mySess = JFactory::getSession();
            if (!empty($mySess)) {
                $mailingEdit->list_type = $mySess->get('listype', '', 'LType');
            }
        }
        $listType = !empty($listType) ? $listType : $mailingEdit->list_type;
        $typeList = !empty($listType) && $listType == 2 ? 2 : 1;
        ?>
	<div style="padding: 2px;"><span style="font-size: 12px;"><?php 
        if ($lType != 2) {
            //echo _JNEWS_SUBS_LIST;
            //}else{
            if ($typeList == 2) {
                echo _JNEWS_SUBS_LIST_CAMPAIGN;
            } else {
                echo _JNEWS_SUBS_LIST_LABEL;
            }
            //edif
        }
        ?>
</span></div>
	<table class="<?php 
        echo jnews::myTheme();
        ?>
">
		<thead>
				<tr>
					<th class="title">
						#
					</th>
					<th class="title">
						<?php 
        echo _JNEWS_LIST_NAME;
        ?>
					</th>
					<th class="title" style="min-width:200px;">
						<?php 
        echo _JNEWS_SUBS_LIST_RECEIVE;
        ?>
					</th>
				</tr>
		</thead>
		<tbody>

		<?php 
        $my = JFactory::getUser();
        $ownedlists = 0;
        if ($GLOBALS[JNEWS . 'enable_jsub']) {
            $ownedlists = jNews_Lists::getOwnedlists($my->id);
        }
        if (jnews::checkPermissions('admin')) {
            if ($lType == 2) {
                $lists = jNews_Lists::getLists('', 1, '', '', false, true, true, false, false);
            } else {
                $lists = jNews_Lists::getLists('', $typeList, '', '', false, true, true, false, false);
            }
        } else {
            if ($lType == 2) {
                $lists = jNews_Lists::getLists('', 1, '', '', false, true, true, false, false, '', '', $ownedlists, $my->id);
            } else {
                $lists = jNews_Lists::getLists('', $typeList, '', '', false, true, true, false, false, '', '', $ownedlists, $my->id);
            }
        }
        $k = 0;
        $i = 0;
        //$listId=JRequest::getVar('listId');
        if (empty($listId)) {
            $listId = JRequest::getVar('listid');
        }
        $ls = array();
        $myKey = null;
        foreach ($lists as $key => $list) {
            if ($list->id == $listId) {
                $myKey = $key;
                break;
            }
        }
        if (isset($myKey)) {
            $ls[] = $lists[$myKey];
            unset($lists[$myKey]);
            $lists = array_merge($ls, $lists);
        }
        $listsA = array();
        if (!$mainframe->isAdmin()) {
            foreach ($lists as $list) {
                if (empty($list->params)) {
                    $listsA[] = $list;
                }
            }
        } else {
            $listsA = $lists;
        }
        foreach ($listsA as $list) {
            ?>
				<tr class="<?php 
            echo "row{$k}";
            ?>
">
					<td width="5%">
						<center>
							<?php 
            echo $i + 1;
            ?>
					 	</center>
					</td>
					<td>
						<?php 
            $getMailingId = !empty($mailingEdit->id) ? $mailingEdit->id : JRequest::getVar('mailingid');
            $result = jNews_Mailing::mailingListFound($getMailingId, $list->id);
            $result = $result ? 1 : 0;
            if ($result == 0) {
                $lstID = JRequest::getVar('listid');
                $result = $lstID == $list->id ? 1 : 0;
            }
            //check if this view will be displayed upon the creation of new list
            if ($lType == 2) {
                $result = jNews_Lists::followupListFound($arId, $list->id);
            }
            //public static function booleanlist( $name, $attribs = null, $selected = null, $yes='yes', $no='no', $id=false )
            $text = '<b>List ID: </b>' . $list->id;
            $text .= '<br/>' . str_replace(array("'", '"'), array("&#039;", '&quot;'), $list->list_desc);
            $title = str_replace(array("'", '"'), array("&#039;", '&quot;'), $list->list_name);
            //echo jNews_Tools::toolTip( $tip, '', 280, 'tooltip.png',  $title, '', 0 );
            echo JHTML::_('tooltip', $text, $title, 'tooltip.png', $title);
            ?>
					</td>
					<td  width="100px" nowrap="nowrap">
						<center>
							<?php 
            //if the listid in the request is equal to this listid the default value of the radio button should be yes
            if ($listId == $list->id) {
                echo jnews::HTML_BooleanList("aca_mailing_addto[" . $list->id . "]", 'class="inputbox"', 1, 'Yes', 'No');
            } else {
                echo jnews::HTML_BooleanList("aca_mailing_addto[" . $list->id . "]", 'class="inputbox"', $result, 'Yes', 'No');
            }
            ?>
						</center>
					</td>
				</tr>
			<?php 
            $k = 1 - $k;
            $i++;
        }
        if (count($lists > 3)) {
            ?>
				<tr>
					<td colspan="3" align="center" nowrap="nowrap">
						<script language="javascript" type="text/javascript">
							function updateStatus(statusval){
								<?php 
            foreach ($lists as $row) {
                ?>
								window.document.getElementById('aca_mailing_addto[<?php 
                echo $row->id;
                ?>
]'+statusval).checked = true;
								<?php 
            }
            ?>
							}
						</script>
						<div style="float:right; font-size: 12px;"><a title="Click to select all list" href="#" onclick="updateStatus(1);"><?php 
            echo _JNEWS_SUBS_LIST_TOALL;
            ?>
</a> | <a href="#" onclick="updateStatus(0);"><?php 
            echo _JNEWS_SUBS_LIST_TONONE;
            ?>
</a></div>
					</td>
				</tr>
			<?php 
        }
        ?>
		</tbody>
	</table>
		<?php 
    }
Пример #2
0
 public static function prepList($listEdit, $listType)
 {
     $lists = array();
     $jour = array();
     $listEdit->unsubscribesend = isset($listEdit->unsubscribesend) ? $listEdit->unsubscribesend : '';
     $listEdit->unsubscribenotifyadmin = isset($listEdit->unsubscribenotifyadmin) ? $listEdit->unsubscribenotifyadmin : '';
     $mainframe = JFactory::getApplication();
     $my = JFactory::getUser();
     $acl = JFactory::getACL();
     $jour[] = jnews::HTML_SelectOption('1800', 'Every 30 minutes');
     $jour[] = jnews::HTML_SelectOption('3600', 'Every hour');
     $jour[] = jnews::HTML_SelectOption('43200', 'Every 12 hours');
     $jour[] = jnews::HTML_SelectOption('1', _JNEWS_AUTO_DAY_CH1);
     $jour[] = jnews::HTML_SelectOption('3', _JNEWS_AUTO_DAY_CH3);
     $jour[] = jnews::HTML_SelectOption('5', _JNEWS_AUTO_DAY_CH5);
     $jour[] = jnews::HTML_SelectOption('6', _JNEWS_AUTO_DAY_CH6);
     $jour[] = jnews::HTML_SelectOption('7', _JNEWS_AUTO_DAY_CH7);
     $jour[] = jnews::HTML_SelectOption('8', _JNEWS_AUTO_DAY_CH8);
     $jour[] = jnews::HTML_SelectOption('9', _JNEWS_AUTO_DAY_CH9);
     $auto_option[] = jnews::HTML_SelectOption('0', _JNEWS_AUTO_OPTION_NO_SYNC);
     $auto_option[] = jnews::HTML_SelectOption('1', _JNEWS_AUTO_OPTION_NEW);
     //we get all of the templates available and published
     $templates = jNews_Templates::getTemplatesForPicklist();
     $list_templates = array();
     foreach ($templates as $oneTemplate) {
         $list_templates[] = jnews::HTML_SelectOption($oneTemplate->template_id, $oneTemplate->name);
     }
     //enfor
     $templateID = !empty($listEdit->template) ? $listEdit->template : '';
     $lists['list_templates'] = jnews::HTML_GenericList($list_templates, 'templatelist', 'class="inputbox"', 'value', 'text', $templateID);
     if ($mainframe->isAdmin()) {
         if ($listEdit->new_letter == 1 && $listType != 2) {
             $auto_option[] = jnews::HTML_SelectOption('2', _JNEWS_AUTO_OPTION_ALL);
         }
     }
     $lists['delay_min'] = jnews::HTML_GenericList($jour, 'delay_min', 'class="inputbox" size="1"', 'value', 'text', $listEdit->delay_min);
     $lists['auto_add'] = jnews::HTML_GenericList($auto_option, 'auto_add', 'class="inputbox"', 'value', 'text', $listEdit->auto_add);
     $lists['published'] = jnews::HTML_BooleanList('published', 'class="inputbox"', $listEdit->published);
     $lists['hidden'] = jnews::HTML_BooleanList('hidden', 'class="inputbox"', $listEdit->hidden);
     $lists_option = jNews_ListType::getListOption(2);
     $lists['list_type'] = jNews_ListsHTML::aca_radioList($lists_option, 'list_type', 'class="inputbox"', $listEdit->list_type);
     $lists['html_mailings'] = jnews::HTML_BooleanList('html', 'class="inputbox"', $listEdit->html);
     $lists['unsubscribesend'] = jnews::HTML_BooleanList("unsubscribesend", 'class="inputbox"', $listEdit->unsubscribesend);
     $lists['subnotifysend'] = jnews::HTML_BooleanList("subnotifysend", 'class="inputbox"', $listEdit->subnotifysend);
     $lists['unsubscribenotifyadmin'] = jnews::HTML_BooleanList("unsubscribenotifyadmin", 'class="inputbox"', $listEdit->unsubscribenotifyadmin);
     $lists['footer'] = jnews::HTML_BooleanList("footer", 'class="inputbox"', $listEdit->footer);
     return $lists;
 }
Пример #3
0
    public static function createTemplate(&$template, $form)
    {
        if (!class_exists('JHtmlBehavior')) {
            jimport('joomla.html.html.behavior');
        }
        $tagjs = "function insertTag(tag){ try{if(jInsertEditorText(tag,'template_body')){ return true;}else{jInsertEditorText(tag,'alt_body'); return true}} catch(err){alert('Your editor does not enable jNews to automatically insert the tag, please copy/paste it manually in your Newsletter'); return false;}}";
        if (!isset($template)) {
            $template = new stdClass();
        }
        //we change the permission of the template
        //if we not change the permission to writable(755) the images won't show
        @($mediacomjNewsTemplatesdir = JNEWS_JPATH_ROOT_NO_ADMIN . DS . 'media' . DS . JNEWS_OPTION . DS . 'templates' . DS . $template->namekey);
        @chmod(JNEWS_JPATH_ROOT_NO_ADMIN . DS . 'media' . DS . JNEWS_OPTION . DS . 'templates' . DS . $template->namekey, 0755);
        $template->name = isset($template->name) ? $template->name : '';
        $template->namekey = isset($template->namekey) ? $template->namekey : '';
        $template->published = isset($template->published) ? $template->published : 0;
        $template->premium = isset($template->premium) ? $template->premium : 0;
        $template->thumbnail = isset($template->thumbnail) ? $template->thumbnail : '';
        $template->description = isset($template->description) ? $template->description : '';
        $template->availability = isset($template->availability) ? $template->availability : '1';
        $template->body = isset($template->body) ? $template->body : '';
        $template->altbody = isset($template->altbody) ? $template->altbody : '';
        $template->styles = isset($template->styles) ? $template->styles : '';
        $template->csstyle = isset($template->csstyle) ? $template->csstyle : '';
        $editor = JFactory::getEditor();
        //		if(!$GLOBALS[JNEWS.'disabletooltip']){
        if (version_compare(JVERSION, '3.0.0', '<')) {
            JHTML::_('behavior.tooltip');
        } else {
            JHtml::_('behavior.tooltip');
        }
        $text = str_replace('"', '&quot;', $template->name);
        $namekey = str_replace('"', '&quot;', $template->namekey);
        if (function_exists('htmlspecialchars_decode')) {
            $text = htmlspecialchars_decode($text, ENT_NOQUOTES);
            $namekey = htmlspecialchars_decode($namekey, ENT_NOQUOTES);
        } elseif (function_exists('html_entity_decode')) {
            $text = html_entity_decode($text, ENT_NOQUOTES);
            $namekey = html_entity_decode($namekey, ENT_NOQUOTES);
        }
        $readOnlyNamekey = !empty($namekey) ? 'READONLY' : '';
        $styles = $template->styles;
        $styles['color_bg'] = !empty($styles) && isset($styles['color_bg']) ? $styles['color_bg'] : '#FFFFFF';
        $styles['cssfile'] = !empty($styles) && isset($styles['cssfile']) ? $styles['cssfile'] : '';
        $templateHTML['name'] = '<input type="text" name="template_name" class="inputbox" size="40" maxlength="64" value="' . $text . '" />';
        $templateHTML['namekey'] = '<input type="text" name="template_namekey" class="inputbox" size="40" maxlength="64" value="' . $namekey . '" ' . $readOnlyNamekey . ' />';
        $templateHTML['publish'] = jnews::HTML_BooleanList('confirmed', 'class="inputbox"', $template->published);
        $templateHTML['premium'] = jnews::HTML_BooleanList('premium', 'class="inputbox"', $template->premium);
        $templateHTML['bgcolor'] = jnews::colorPicker('styles[color_bg]', 15, $styles['color_bg']);
        $templateHTML['thumbnail'] = jNews_TemplatesHTML::_attachment($template->thumbnail);
        $templateHTML['description'] = '<br/><textarea rows="5" cols="45" name="description">' . $template->description . '</textarea><br/>';
        unset($styles['cssfile']);
        $templateHTML['cssfile'] = '<div id="cssfile" style="display:none;"><input type="text" name="styles[cssfile]" style="margin: 2px 0 2px 2px;" class="inputbox" size="45" value="' . jNews_Templates::escapeVal(@$styles['cssfile']) . '" />';
        $templateHTML['cssfile'] .= '<input type="button" onclick="javascript:hideMainMenu(); submitbutton(\'apply\')" style="margin: 2px 0 2px 2px;" name="Process External CSS" class="button" value="' . _JNEWS_EXTERNALCSS_PROCESS . '"></div>';
        //		}
        //remove empty classname
        unset($styles['']);
        echo $form['main'];
        ?>
			<table cellpadding="1" cellspacing="0" border="0" width="99%">
				<tbody>
					<tr>
						<td width="20%" valign="top">
							<fieldset style="margin-top:7px;">
								<?php 
        echo jnews::beginingOfTable('jnewstable');
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_NAME, _JNEWS_TEMPLATE_NAME_T, $templateHTML['name']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_ALIAS, _JNEWS_TEMPLATE_NAMEKEY_T, $templateHTML['namekey']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_PUBLISH, _JNEWS_TEMPLATE_PUBLISH_T, $templateHTML['publish']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_DEFAULT, _JNEWS_TEMPLATE_DEFAULT_T, $templateHTML['premium']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_BG, _JNEWS_TEMPLATE_BG_T, $templateHTML['bgcolor']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_UPLOAD, _JNEWS_TEMPLATE_UPLOAD_T, $templateHTML['thumbnail']);
        echo jnews::miseEnHTML(_JNEWS_TEMPLATE_DESC, _JNEWS_TEMPLATE_DESC_T, $templateHTML['description']);
        echo jnews::endOfTable();
        ?>
							</fieldset>
						</td>
						<td width="49%" valign="top">
								<?php 
        $switchjs = 'function switchContent() {
										        	var option=[\'jNewsStyles\',\'jNewsCSSTextbox\'];
										        	for(var i=0; i<option.length; i++){
											        	obj=document.getElementById(option[i]);
											        	obj.className=(obj.className=="visible")? "hidden" : "visible";
											       	}
											       	var form = document.adminForm;
											       	if(form.stylechosen.value == \'0\'){form.stylechosen.value = 1}else{form.stylechosen.value = 0}
										       	 }
										        function showInput() {
													var el = document.getElementById(\'cssfile\');
													if ( el.style.display != \'none\' ) {
														el.style.display = \'none\';
													}
													else {
														el.style.display = \'\';
														el.focus();
													}
												}';
        $jnewscss = '.visible {display:block;}
											     .hidden {display:none;}';
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration($switchjs . $tagjs);
        $doc->addStyleDeclaration($jnewscss);
        //echo '<a name="cssfileindex">';
        jNews_TemplatesHTML::_styles($styles);
        //add the specific style
        //echo '</a>';
        echo '<div id="jNewsCSSTextbox" style="padding: 4px;" class="hidden">' . jNews_TemplatesHTML::_csstextbox($template->csstyle) . '</div>';
        echo '<div class="button2-left">';
        echo '<div class="blank"><a href="#" style="cursor: hand;" onclick="switchContent()" title="Toggle Template Styling" >' . _JNEWS_CSS_TOGGLESTYLE . '</a></div>';
        echo '</div>';
        //									echo '<div class="button2-left">';
        //									echo '<div class="blank"><a href="#cssfileindex" style="cursor: hand;" onclick="showInput()" title="Click to Input External CSS" >'._JNEWS_EXTERNALCSS_LINK.'</a></div>';
        //									echo '</div>';
        echo $templateHTML['cssfile'];
        ?>
						</td>
					</tr>
					<tr>
						<td colspan="2" width="100%">
							<fieldset class="jnewscss">
								<legend>
									<?php 
        echo _JNEWS_HTML_VERSION;
        ?>
								</legend>
								<?php 
        echo $editor->display('template_body', $template->body, '99%', '800', '75', '50', true);
        ?>
							</fieldset>
							<fieldset class="jnewscss">
								<legend><?php 
        echo _JNEWS_NONHTML_VERSION;
        ?>
</legend>
								<textarea name="alt_body" rows="20" cols="70" style="width: 100%; height: 400px;"><?php 
        echo $template->altbody;
        ?>
</textarea>
							</fieldset>
						</td>
					</tr>
				</tbody>
			</table>
		<?php 
        echo JHTML::_('behavior.keepalive');
    }
Пример #4
0
    public static function editSubscriber($subscriber, $listings, $queues, $forms, $access = false, $frontEnd = false, $cb = false)
    {
        $mainframe = JFactory::getApplication();
        $my = JFactory::getUser();
        if (!$GLOBALS[JNEWS . 'disabletooltip']) {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                JHTML::_('behavior.tooltip');
            } else {
                JHtml::_('behavior.tooltip');
            }
        }
        if (empty($subscriber->receive_html)) {
            $subscriber->receive_html = 0;
        }
        $lists['receive_html'] = jnews::HTML_BooleanList('receive_html', 'class="inputbox"', $subscriber->receive_html, JText::_(_CMN_YES), JText::_(_CMN_NO));
        //Fixed added by Lorenz Meyer for the Yes No Translation
        if (empty($subscriber->confirmed)) {
            $subscriber->confirmed = 0;
        }
        $lists['confirmed'] = jnews::HTML_BooleanList('confirmed', 'class="inputbox"', $subscriber->confirmed, JText::_(_CMN_YES), JText::_(_CMN_NO));
        if (empty($subscriber->blacklist)) {
            $subscriber->blacklist = 0;
        }
        $lists['blacklist'] = jnews::HTML_BooleanList('blacklist', 'class="inputbox"', $subscriber->blacklist, JText::_(_CMN_YES), JText::_(_CMN_NO));
        $br = "\n\r";
        $html = $forms['main'];
        $html .= '<div style="width:100%; align:left;">' . $br;
        $html .= '<fieldset class="jnewscss" style="padding: 10px; text-align: left">' . $br;
        $html .= '<legend><strong>' . _JNEWS_SUB_INFO . '</strong></legend>' . $br;
        $html .= '<table cellpadding="2" cellspacing="0" align="center"><tr><td>' . $br;
        if (empty($subscriber->name)) {
            $subscriber->name = '';
        }
        $text = str_replace('"', '&quot;', $subscriber->name);
        if (function_exists('htmlspecialchars_decode')) {
            $text = htmlspecialchars_decode($text, ENT_NOQUOTES);
        } elseif (function_exists('html_entity_decode')) {
            $text = html_entity_decode($text, ENT_NOQUOTES);
        }
        if (!$cb) {
            $html .= jnews::miseEnHTML(_JNEWS_INPUT_NAME, _JNEWS_INPUT_NAME_TIPS, '<input type="text" name="name" size="30" value="' . $text . '" class="inputbox" />');
            if (empty($subscriber->email) || !jNews_Subscribers::validEmail($subscriber->email)) {
                $subscriber->email = '';
            }
            $html .= jnews::miseEnHTML(_JNEWS_INPUT_EMAIL, _JNEWS_INPUT_EMAIL_TIPS, '<input type="text" name="email" size="30" class="inputbox" value="' . $subscriber->email . '"  />');
            //additional columns
            if ($GLOBALS[JNEWS . 'level'] > 2) {
                //check if the version of jnews is pro
                if (empty($subscriber->column1)) {
                    $subscriber->column1 = '';
                }
                if (empty($subscriber->column2)) {
                    $subscriber->column2 = '';
                }
                if (empty($subscriber->column3)) {
                    $subscriber->column3 = '';
                }
                if (empty($subscriber->column4)) {
                    $subscriber->column4 = '';
                }
                if (empty($subscriber->column5)) {
                    $subscriber->column5 = '';
                }
                if ($GLOBALS[JNEWS . 'show_column1']) {
                    //show column1
                    $html .= jnews::miseEnHTML($GLOBALS[JNEWS . 'column1_name'], _JNEWS_INPUT_COLUMN_TIPS . '1', '<input type="text" name="column1" size="30" class="inputbox" value="' . $subscriber->column1 . '"  />');
                }
                if ($GLOBALS[JNEWS . 'show_column2']) {
                    //show column2
                    $html .= jnews::miseEnHTML($GLOBALS[JNEWS . 'column2_name'], _JNEWS_INPUT_COLUMN_TIPS . '2', '<input type="text" name="column2" size="30" class="inputbox" value="' . $subscriber->column2 . '"  />');
                }
                if ($GLOBALS[JNEWS . 'show_column3']) {
                    //show column3
                    $html .= jnews::miseEnHTML($GLOBALS[JNEWS . 'column3_name'], _JNEWS_INPUT_COLUMN_TIPS . '3', '<input type="text" name="column3" size="30" class="inputbox" value="' . $subscriber->column3 . '"  />');
                }
                if ($GLOBALS[JNEWS . 'show_column4']) {
                    //show column4
                    $html .= jnews::miseEnHTML($GLOBALS[JNEWS . 'column4_name'], _JNEWS_INPUT_COLUMN_TIPS . '4', '<input type="text" name="column4" size="30" class="inputbox" value="' . $subscriber->column4 . '"  />');
                }
                if ($GLOBALS[JNEWS . 'show_column5']) {
                    //show column5
                    $html .= jnews::miseEnHTML($GLOBALS[JNEWS . 'column5_name'], _JNEWS_INPUT_COLUMN_TIPS . '5', '<input type="text" name="column5" size="30" class="inputbox" value="' . $subscriber->column5 . '"  />');
                }
            }
        } else {
            $html .= '<input type="hidden" name="cb_integration" value="1"  />';
        }
        if (empty($subscriber->ip)) {
            $subscriber->ip = '';
        }
        //$mainframe = JFactory::getApplication();
        if ($mainframe->isAdmin() or $GLOBALS[JNEWS . 'sub_info_fields']) {
            $html .= jnews::miseEnHTML(_JNEWS_IP, _JNEWS_IP_TIPS, $subscriber->ip);
        }
        $html .= jnews::miseEnHTML(_JNEWS_RECEIVE_HTML, _JNEWS_RECEIVE_HTML_TIPS, $lists['receive_html']);
        if ($GLOBALS[JNEWS . 'time_zone'] == 1) {
            $html .= jnews::miseEnHTML(_JNEWS_TIME_ZONE_ASK, _JNEWS_TIME_ZONE_ASK_TIPS, ' <input type="text" name="timezone" size="30" class="inputbox" value="' . $subscriber->timezone . '"  />');
        } else {
            if (empty($subscriber->timezone)) {
                $subscriber->timezone = '';
            }
            $html .= '<input type="hidden" name="timezone" value="' . $subscriber->timezone . '"  />';
        }
        if ($access) {
            if (empty($subscriber->user_id)) {
                $subscriber->user_id = 0;
            }
            if ($subscriber->user_id == 0) {
                if ($mainframe->isAdmin() or $GLOBALS[JNEWS . 'confirm_html']) {
                    $html .= jnews::miseEnHTML(_JNEWS_CONFIRMED, '', $lists['confirmed']);
                }
            } else {
                if (!$cb || !$mainframe->isAdmin()) {
                    $html .= '<input type="hidden" name="confirmed" value="' . $subscriber->confirmed . '" />';
                }
            }
            //improvement added; blacklist will only be shown in the backend
            if ($mainframe->isAdmin() || $GLOBALS[JNEWS . 'sub_info_fields']) {
                $html .= jnews::miseEnHTML(_JNEWS_BLACK_LIST, '', $lists['blacklist']);
            }
            if (empty($subscriber->subscribe_date)) {
                $subscriber->subscribe_date = 0;
            }
            if ($mainframe->isAdmin() or $GLOBALS[JNEWS . 'sub_info_fields']) {
                $html .= jnews::miseEnHTML(_JNEWS_REGISTRATION_DATE, '', date('Y-m-d h:i', jnews::getNow(0, true, $subscriber->subscribe_date)));
                $html .= jnews::miseEnHTML(_JNEWS_USER_ID, '', $subscriber->user_id);
            }
        } else {
            $html .= '<input type="hidden" name="confirmed" value="' . $subscriber->confirmed . '" />';
            $html .= '<input type="hidden" name="blacklist" value="' . $subscriber->blacklist . '" />';
        }
        //captcha FE
        if (empty($my->id) && !$cb && !$mainframe->isAdmin() && class_exists('jNews_Captcha') && $GLOBALS[JNEWS . 'level'] > 2) {
            if (extension_loaded('gd') && extension_loaded('mcrypt')) {
                $gdinfo = gd_info();
                //					$captchaHTML='';
                $moduleParams = self::getModuleParams();
                $captcha_width = $moduleParams->get('captcha_width');
                $captcha_height = $moduleParams->get('captcha_height');
                $captcha_bgcolor = urlencode($moduleParams->get('captcha_bgcolor'));
                $captcha_ftcolor = urlencode($moduleParams->get('captcha_ftcolor'));
                if ($gdinfo['FreeType Support']) {
                    if (isset($_SESSION) && !isset($_SESSION['captcha'])) {
                        $code = jNews_Captcha::generateCode('5');
                        $_SESSION['captcha'] = $code;
                    } else {
                        $code = $_SESSION['captcha'];
                    }
                    //						$captchaHTML .= '<div class="subscriptionCaptcha" style="float:left;">';
                    //						$escaptcha = jNews_Captcha::encryptData($code, crypt( $GLOBALS[JNEWS.'captcha_code'], $GLOBALS[JNEWS.'captcha_code'] ) );
                    //						$esc = $escaptcha;
                    //						$decrypt=jNews_Captcha::decryptData( $esc, crypt( $GLOBALS[JNEWS.'captcha_code'], $GLOBALS[JNEWS.'captcha_code'] ) );
                    //						$path= JNEWS_JPATH_LIVE_NO_HTTPS.'/index.php?option='.JNEWS_OPTION.'&act=captcha&tmpl=component&width='.$captcha_width.'&height='.$captcha_height.'&bgcolor='.$captcha_bgcolor.'&ftcolor='.$captcha_ftcolor.'&characters=5&esc='. $esc.'&encpwd='.crypt($GLOBALS[JNEWS.'captcha_code'],$GLOBALS[JNEWS.'captcha_code'] );
                    //						$captchaHTML .= '<img alt="catchme" style="border: 0px;" src="'. $path .'" id="captcha_image1" />';
                    //						$url = htmlentities( jNews_Tools::completeLink( 'option='.JNEWS_OPTION.'&act=mailing&task=refreshcaptcha&captchawidth='.$captcha_width.'&captchaheight='.$captcha_height .'&captchabgcolor='.$captcha_bgcolor.'&captchaftcolor='.$captcha_ftcolor, false, false, true ) );
                    //						$captchaHTML .= '&nbsp;<img alt="refresh" style="border: 0px;" src="'. JURI::base().'components/'.JNEWS_OPTION.'/images/refresh.png" onclick="refreshCaptcha1(\''.$url.'\');" id="refreshButton" title="Refresh Captcha" />';
                    //						$captchaHTML .= '</div>';
                    //						$captchaHTML .='<div class="entered_captcha"><input class="inputbox" title ="'._JNEWS_CAPTCHA_TIPS.'" name="security_code" size="7" type="text" class="entered_captcha"/></div>';
                    //						$captchaHTML .= '</div>';
                    $captchaHTML = self::_showCaptcha($code);
                    $html .= jnews::miseEnHTML(_JNEWS_CAPTCHA_CAPTION, '', $captchaHTML);
                    //						$escaptcha = jNews_Captcha::encryptData($code, crypt($GLOBALS[JNEWS.'captcha_code'],$GLOBALS[JNEWS.'captcha_code']));
                    //				       $esc = $escaptcha;
                    //				       $newdecrypt = jNews_Captcha::decryptData($esc, crypt($GLOBALS[JNEWS.'captcha_code'],$GLOBALS[JNEWS.'captcha_code']));
                    //				       $html .='<input type="hidden" id="security_captcha1" name="security_captcha" value="'.$esc.'" />';
                    //				       $html .='<input type="hidden" id="captcode1" name="captcode" value="'.$newdecrypt.'" />';
                    $html .= self::_showCaptchaHidden($code, "2");
                    //checking of captcha
                    $captcha_width = (int) $captcha_width;
                    $captcha_height = (int) $captcha_height;
                    $js = '
	function insertNewCaptcha1(html){
				var form = document.adminForm;
				if(!form){
					form = document.mosForm;
				}
				var window = document.getElementById("sbox-content");
				var root = document.getElementById("captcha1");

				if(form.security_code.value == "") {alert( "' . addslashes(_JNEWS_REGWARN_CAPTCHA) . '" ); return false;}
				if(form.captcode.value != "version2" && form.security_code.value != form.captcode.value){
					alert( "' . addslashes(_JNEWS_CAPTCHA_MSG) . '" );return false;
				}

				if(root == null){
				 	root = document.createElement(\'div\');
					root.setAttribute("style", "width:10px;heigth:10px;display:none;");
					root.setAttribute("id", "captcha1");
					var body = document.getElementsByTagName(\'body\')[0].appendChild(root);
				}
				root.innerHTML = html;

				var newcode = document.getElementById(\'newcode\');
				var newesc = document.getElementById(\'newesc\');
				var newdecrypt = document.getElementById(\'newdecrypt\');
				var newpath = document.getElementById(\'newpath\');
				var newsecuritycaptcha = document.getElementById(\'security_captcha1\');
				var newcaptcode = document.getElementById(\'captcode1\');
				var image =  document.getElementById(\'captcha_image1\');
				var path = newpath.innerHTML;
      			var intIndexOfMatch = path.indexOf( "&amp;" );

     			while (intIndexOfMatch != -1){
       				path= path.replace( "&amp;", "&" );
       				intIndexOfMatch = path.indexOf( "&amp;" );
      			}

				image.setAttribute("src", path);
				image.setAttribute("width", ' . $captcha_width . ');
				image.setAttribute("height", ' . $captcha_height . ');
				newsecuritycaptcha.value = newesc.innerHTML;
				newcaptcode.value = newcode.innerHTML;

				if(window != null){

				windowImages = window.getElementsByTagName("img");
				windowInput = window.getElementsByTagName("input");

				var captcha_image = windowImages.captcha_image1;
				var captcode = windowInput.captcode1;
				var security_captcha = windowInput.security_captcha1;

				security_captcha.value = newesc.innerHTML;
					captcode.value = newcode.innerHTML;
				captcha_image.setAttribute("src", path);
			}
				document.getElementById(\'entered_captcha\').value=\'\';
				document.getElementsByTagName(\'body\')[0].removeChild(root);
			}

	';
                    if (version_compare(JVERSION, '1.6.0', '<')) {
                        //1.5
                        $js .= "function refreshCaptcha1(url){\n\t      var form = document.adminForm;\n\t\t\t\tif(!form){\n\t\t\t\t\tform = document.mosForm;\n\t\t\t\t}\n\t\t\tvar ajax = new Ajax(url,{data: 'height=1',method: 'POST',onComplete : function(result){insertNewCaptcha1(result); }});ajax.request();}";
                    } else {
                        $js .= "function refreshCaptcha1(url){\n\t      var ajax = new Request({url : url,data: 'height=1',method: 'POST',onComplete : function(result){insertNewCaptcha1(result); }});ajax.send();}";
                    }
                    $document = JFactory::getDocument();
                    $document->addScriptDeclaration($js, 'text/javascript');
                } else {
                    echo 'Your Server does not support GD Library FreeType Support do the captcha cannot be shown!';
                    echo '<br />Please enable the GD Library FreeType Support to see the captcha.';
                }
            }
        }
        $html .= '</table>';
        $html .= '</fieldset></div>';
        if (!$cb) {
            $lists = $mainframe->isAdmin() ? jNews_Lists::getLists(0, 1, '', '', false, true, true, false, false) : jNews_Lists::getLists('', 1, '', '', false, true, false, false, true);
            $listsAr = $mainframe->isAdmin() ? jNews_Lists::getLists(0, 2, '', '', false, true, true, false, false) : jNews_Lists::getLists('', 2, '', '', false, true, false, false, true);
        } else {
            $lists = $listings;
            $listsAr = array();
        }
        if (empty($listsAr)) {
            $listwidth = '100%';
        } else {
            $listwidth = '50%';
        }
        if (empty($lists)) {
            $listarwidth = '100%';
        } else {
            $listarwidth = '50%';
        }
        $html .= '<table width="100%"><tr>';
        $html .= '<td width="' . $listwidth . '">';
        $html .= jNews_SubscribersHTML::showSubscriberLists($subscriber, $lists, $queues, $frontEnd, $access);
        $html .= '</td>';
        $html .= '<td width="' . $listarwidth . '" valign="top">';
        $html .= jNews_SubscribersHTML::showSubscriberLists($subscriber, $listsAr, $queues, $frontEnd, $access);
        $html .= '</td>';
        $html .= '</tr></table>';
        return $html;
    }
Пример #5
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 
    }