Example #1
0
    public function acymailingtagcontent_show()
    {
        $app = JFactory::getApplication();
        $pageInfo = new stdClass();
        $pageInfo->filter = new stdClass();
        $pageInfo->filter->order = new stdClass();
        $pageInfo->limit = new stdClass();
        $pageInfo->elements = new stdClass();
        $my = JFactory::getUser();
        $lang = JFactory::getLanguage();
        $lang->load('com_content', JPATH_SITE);
        $paramBase = ACYMAILING_COMPONENT . '.tagcontent';
        $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'a.id', 'cmd');
        $pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
        if (strtolower($pageInfo->filter->order->dir) !== 'desc') {
            $pageInfo->filter->order->dir = 'asc';
        }
        $pageInfo->search = $app->getUserStateFromRequest($paramBase . ".search", 'search', '', 'string');
        $pageInfo->search = JString::strtolower(trim($pageInfo->search));
        $pageInfo->filter_cat = $app->getUserStateFromRequest($paramBase . ".filter_cat", 'filter_cat', '', 'int');
        $pageInfo->contenttype = $app->getUserStateFromRequest($paramBase . ".contenttype", 'contenttype', $this->params->get('default_type', 'intro'), 'string');
        $pageInfo->author = $app->getUserStateFromRequest($paramBase . ".author", 'author', $this->params->get('default_author', '0'), 'string');
        $pageInfo->titlelink = $app->getUserStateFromRequest($paramBase . ".titlelink", 'titlelink', $this->params->get('default_titlelink', 'link'), 'string');
        $pageInfo->lang = $app->getUserStateFromRequest($paramBase . ".lang", 'lang', '', 'string');
        $pageInfo->pict = $app->getUserStateFromRequest($paramBase . ".pict", 'pict', $this->params->get('default_pict', 1), 'string');
        $pageInfo->pictheight = $app->getUserStateFromRequest($paramBase . ".pictheight", 'pictheight', $this->params->get('maxheight', 150), 'string');
        $pageInfo->pictwidth = $app->getUserStateFromRequest($paramBase . ".pictwidth", 'pictwidth', $this->params->get('maxwidth', 150), 'string');
        $pageInfo->limit->value = $app->getUserStateFromRequest($paramBase . '.list_limit', 'limit', $app->getCfg('list_limit'), 'int');
        $pageInfo->limit->start = $app->getUserStateFromRequest($paramBase . '.limitstart', 'limitstart', 0, 'int');
        $picts = array();
        $picts[] = JHTML::_('select.option', "1", JText::_('JOOMEXT_YES'));
        $pictureHelper = acymailing_get('helper.acypict');
        if ($pictureHelper->available()) {
            $picts[] = JHTML::_('select.option', "resized", JText::_('RESIZED'));
        }
        $picts[] = JHTML::_('select.option', "0", JText::_('JOOMEXT_NO'));
        $contenttype = array();
        $contenttype[] = JHTML::_('select.option', "title", JText::_('TITLE_ONLY'));
        $contenttype[] = JHTML::_('select.option', "intro", JText::_('INTRO_ONLY'));
        $contenttype[] = JHTML::_('select.option', "text", JText::_('FIELD_TEXT'));
        $contenttype[] = JHTML::_('select.option', "full", JText::_('FULL_TEXT'));
        $titlelink = array();
        $titlelink[] = JHTML::_('select.option', "link", JText::_('JOOMEXT_YES'));
        $titlelink[] = JHTML::_('select.option', "0", JText::_('JOOMEXT_NO'));
        $authorname = array();
        $authorname[] = JHTML::_('select.option', "author", JText::_('JOOMEXT_YES'));
        $authorname[] = JHTML::_('select.option', "0", JText::_('JOOMEXT_NO'));
        $searchFields = array('a.id', 'a.title', 'a.alias', 'a.created_by', 'b.name', 'b.username');
        if (!empty($pageInfo->search)) {
            $searchVal = '\'%' . acymailing_getEscaped($pageInfo->search, true) . '%\'';
            $filters[] = implode(" LIKE {$searchVal} OR ", $searchFields) . " LIKE {$searchVal}";
        }
        if (!empty($pageInfo->filter_cat)) {
            $filters[] = "a.catid = " . $pageInfo->filter_cat;
        }
        if ($this->params->get('displayart', 'all') == 'onlypub') {
            $filters[] = "a.state = 1";
        } else {
            $filters[] = "a.state != -2";
        }
        if (!$app->isAdmin()) {
            if (!ACYMAILING_J16) {
                $filters[] = 'a.`access` <= ' . (int) $my->get('aid');
            } else {
                $groups = implode(',', $my->getAuthorisedViewLevels());
                $filters[] = 'a.`access` IN (' . $groups . ')';
            }
        }
        if ($this->params->get('frontendaccess') == 'author' && !$app->isAdmin()) {
            $filters[] = "a.created_by = " . intval($my->id);
        }
        $whereQuery = '';
        if (!empty($filters)) {
            $whereQuery = ' WHERE (' . implode(') AND (', $filters) . ')';
        }
        $query = 'SELECT SQL_CALC_FOUND_ROWS a.*,b.name,b.username,a.created_by FROM ' . acymailing_table('content', false) . ' as a';
        $query .= ' LEFT JOIN `#__users` AS b ON b.id = a.created_by';
        if (!empty($whereQuery)) {
            $query .= $whereQuery;
        }
        if (!empty($pageInfo->filter->order->value)) {
            $query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
        }
        $this->db->setQuery($query, $pageInfo->limit->start, $pageInfo->limit->value);
        $rows = $this->db->loadObjectList();
        if (!empty($pageInfo->search)) {
            $rows = acymailing_search($pageInfo->search, $rows);
        }
        $this->db->setQuery('SELECT FOUND_ROWS()');
        $pageInfo->elements->total = $this->db->loadResult();
        $pageInfo->elements->page = count($rows);
        if (!ACYMAILING_J16) {
            $query = 'SELECT a.id, a.id as catid, a.title as category, b.title as section, b.id as secid from #__categories as a ';
            $query .= 'INNER JOIN #__sections as b on a.section = b.id ORDER BY b.ordering,a.ordering';
            $this->db->setQuery($query);
            $categories = $this->db->loadObjectList('id');
            $categoriesValues = array();
            $categoriesValues[] = JHTML::_('select.option', '', JText::_('ACY_ALL'));
            $currentSec = '';
            foreach ($categories as $catid => $oneCategorie) {
                if ($currentSec != $oneCategorie->section) {
                    if (!empty($currentSec)) {
                        $this->values[] = JHTML::_('select.option', '</OPTGROUP>');
                    }
                    $categoriesValues[] = JHTML::_('select.option', '<OPTGROUP>', $oneCategorie->section);
                    $currentSec = $oneCategorie->section;
                }
                $categoriesValues[] = JHTML::_('select.option', $catid, $oneCategorie->category);
            }
        } else {
            $query = "SELECT * from #__categories WHERE `extension` = 'com_content' ORDER BY lft ASC";
            $this->db->setQuery($query);
            $categories = $this->db->loadObjectList('id');
            $categoriesValues = array();
            $categoriesValues[] = JHTML::_('select.option', '', JText::_('ACY_ALL'));
            foreach ($categories as $catid => $oneCategorie) {
                $categories[$catid]->title = str_repeat('- - ', $categories[$catid]->level) . $categories[$catid]->title;
                $categoriesValues[] = JHTML::_('select.option', $catid, $categories[$catid]->title);
            }
        }
        jimport('joomla.html.pagination');
        $pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
        $tabs = acymailing_get('helper.acytabs');
        echo $tabs->startPane('joomlacontent_tab');
        echo $tabs->startPanel(JText::_('JOOMLA_CONTENT'), 'joomlacontent_content');
        ?>
		<script language="javascript" type="text/javascript">
			<!--
			var selectedContents = new Array();
			function applyContent(contentid, rowClass){
				var tmp = selectedContents.indexOf(contentid)
				if(tmp != -1){
					window.document.getElementById('content' + contentid).className = rowClass;
					delete selectedContents[tmp];
				}else{
					window.document.getElementById('content' + contentid).className = 'selectedrow';
					selectedContents.push(contentid);
				}
				updateTag();
			}

			function updateTag(){
				var tag = '';
				var otherinfo = '';
				for(var i = 0; i < document.adminForm.contenttype.length; i++){
					if(document.adminForm.contenttype[i].checked){
						selectedtype = document.adminForm.contenttype[i].value;
						otherinfo += '| type:' + document.adminForm.contenttype[i].value;
					}
				}
				for(var i = 0; i < document.adminForm.titlelink.length; i++){
					if(document.adminForm.titlelink[i].checked && document.adminForm.titlelink[i].value.length > 1){
						otherinfo += '| ' + document.adminForm.titlelink[i].value;
					}
				}
				if(selectedtype != 'title'){
					for(var i = 0; i < document.adminForm.author.length; i++){
						if(document.adminForm.author[i].checked && document.adminForm.author[i].value.length > 1){
							otherinfo += '| ' + document.adminForm.author[i].value;
						}
					}
					for(var i = 0; i < document.adminForm.pict.length; i++){
						if(document.adminForm.pict[i].checked){
							otherinfo += '| pict:' + document.adminForm.pict[i].value;
							if(document.adminForm.pict[i].value == 'resized'){
								document.getElementById('pictsize').style.display = '';
								if(document.adminForm.pictwidth.value) otherinfo += '| maxwidth:' + document.adminForm.pictwidth.value;
								if(document.adminForm.pictheight.value) otherinfo += '| maxheight:' + document.adminForm.pictheight.value;
							}else{
								document.getElementById('pictsize').style.display = 'none';
							}
						}
					}
					document.getElementById('format').style.display = '';
				}else{
					document.getElementById('format').style.display = 'none';
				}

				if(document.adminForm.contentformat && document.adminForm.contentformat.value){
					otherinfo += '| format:' + document.adminForm.contentformat.value;
				}

				if(window.document.getElementById('jflang') && window.document.getElementById('jflang').value != ''){
					otherinfo += '|lang:';
					otherinfo += window.document.getElementById('jflang').value;
				}

				for(var i in selectedContents){
					if(selectedContents[i] && !isNaN(i)){
						tag = tag + '{joomlacontent:' + selectedContents[i] + otherinfo + '}<br />';
					}
				}
				setTag(tag);
			}
			//-->
		</script>
		<div class="onelineblockoptions">
			<table width="100%" class="acymailing_table">
				<tr>
					<td>
						<?php 
        echo JText::_('DISPLAY');
        ?>
					</td>
					<td colspan="2">
						<?php 
        echo JHTML::_('acyselect.radiolist', $contenttype, 'contenttype', 'size="1" onclick="updateTag();"', 'value', 'text', $pageInfo->contenttype);
        ?>
					</td>
					<td>
						<?php 
        $jflanguages = acymailing_get('type.jflanguages');
        $jflanguages->onclick = 'onchange="updateTag();"';
        echo $jflanguages->display('lang', $pageInfo->lang);
        ?>
					</td>
				</tr>
				<tr id="format" class="acyplugformat">
					<td valign="top">
						<?php 
        echo JText::_('FORMAT');
        ?>
					</td>
					<td valign="top">
						<?php 
        echo $this->acypluginsHelper->getFormatOption('tagcontent');
        ?>
					</td>
					<td valign="top"><?php 
        echo JText::_('DISPLAY_PICTURES');
        ?>
</td>
					<td valign="top"><?php 
        echo JHTML::_('acyselect.radiolist', $picts, 'pict', 'size="1" onclick="updateTag();"', 'value', 'text', $pageInfo->pict);
        ?>
						<span id="pictsize" <?php 
        if ($pageInfo->pict != 'resized') {
            echo 'style="display:none;"';
        }
        ?>
><br/><?php 
        echo JText::_('CAPTCHA_WIDTH');
        ?>
							<input name="pictwidth" type="text" onchange="updateTag();" value="<?php 
        echo $pageInfo->pictwidth;
        ?>
" style="width:30px;"/>
							x <?php 
        echo JText::_('CAPTCHA_HEIGHT');
        ?>
							<input name="pictheight" type="text" onchange="updateTag();" value="<?php 
        echo $pageInfo->pictheight;
        ?>
" style="width:30px;"/>
						</span>
					</td>
				</tr>
				<tr>
					<td>
						<?php 
        echo JText::_('CLICKABLE_TITLE');
        ?>
					</td>
					<td>
						<?php 
        echo JHTML::_('acyselect.radiolist', $titlelink, 'titlelink', 'size="1" onclick="updateTag();"', 'value', 'text', $pageInfo->titlelink);
        ?>
					</td>
					<td>
						<?php 
        echo JText::_('AUTHOR_NAME');
        ?>
					</td>
					<td>
						<?php 
        echo JHTML::_('acyselect.radiolist', $authorname, 'author', 'size="1" onclick="updateTag();"', 'value', 'text', (string) $pageInfo->author);
        ?>
					</td>
				</tr>
			</table>
		</div>
		<div class="onelineblockoptions">
			<table>
				<tr>
					<td width="100%">
						<?php 
        acymailing_listingsearch($pageInfo->search);
        ?>
					</td>
					<td nowrap="nowrap">
						<?php 
        echo JHTML::_('select.genericlist', $categoriesValues, 'filter_cat', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', (int) $pageInfo->filter_cat);
        ?>
					</td>
				</tr>
			</table>

			<table class="acymailing_table" cellpadding="1" width="100%">
				<thead>
				<tr>
					<th class="title">
					</th>
					<th class="title">
						<?php 
        echo JHTML::_('grid.sort', JText::_('FIELD_TITLE'), 'a.title', $pageInfo->filter->order->dir, $pageInfo->filter->order->value);
        ?>
					</th>
					<th class="title">
						<?php 
        echo JHTML::_('grid.sort', JText::_('ACY_AUTHOR'), 'b.name', $pageInfo->filter->order->dir, $pageInfo->filter->order->value);
        ?>
					</th>
					<th class="title">
						<?php 
        echo JHTML::_('grid.sort', JText::_(ACYMAILING_J16 ? 'COM_CONTENT_PUBLISHED_DATE' : 'START PUBLISHING'), 'a.publish_up', $pageInfo->filter->order->dir, $pageInfo->filter->order->value);
        ?>
					</th>
					<th class="title">
						<?php 
        echo JHTML::_('grid.sort', JText::_('ACY_CREATED'), 'a.created', $pageInfo->filter->order->dir, $pageInfo->filter->order->value);
        ?>
					</th>
					<th class="title titleid">
						<?php 
        echo JHTML::_('grid.sort', JText::_('ACY_ID'), 'a.id', $pageInfo->filter->order->dir, $pageInfo->filter->order->value);
        ?>
					</th>
				</tr>
				</thead>
				<tfoot>
				<tr>
					<td colspan="6">
						<?php 
        echo $pagination->getListFooter();
        ?>
						<?php 
        echo $pagination->getResultsCounter();
        ?>
					</td>
				</tr>
				</tfoot>
				<tbody>
				<?php 
        $k = 0;
        for ($i = 0, $a = count($rows); $i < $a; $i++) {
            $row =& $rows[$i];
            ?>
					<tr id="content<?php 
            echo $row->id;
            ?>
" class="<?php 
            echo "row{$k}";
            ?>
" onclick="applyContent(<?php 
            echo $row->id . ",'row{$k}'";
            ?>
);" style="cursor:pointer;">
						<td class="acytdcheckbox"></td>
						<td>
							<?php 
            $text = '<b>' . JText::_('JOOMEXT_ALIAS') . ': </b>' . $row->alias;
            echo acymailing_tooltip($text, $row->title, '', $row->title);
            ?>
						</td>
						<td>
							<?php 
            if (!empty($row->name)) {
                $text = '<b>' . JText::_('JOOMEXT_NAME') . ' : </b>' . $row->name;
                $text .= '<br /><b>' . JText::_('ACY_USERNAME') . ' : </b>' . $row->username;
                $text .= '<br /><b>' . JText::_('ACY_ID') . ' : </b>' . $row->created_by;
                echo acymailing_tooltip($text, $row->name, '', $row->name);
            }
            ?>
						</td>
						<td align="center">
							<?php 
            echo JHTML::_('date', strip_tags($row->publish_up), JText::_('DATE_FORMAT_LC4'));
            ?>
						</td>
						<td align="center">
							<?php 
            echo JHTML::_('date', strip_tags($row->created), JText::_('DATE_FORMAT_LC4'));
            ?>
						</td>
						<td align="center">
							<?php 
            echo $row->id;
            ?>
						</td>
					</tr>
					<?php 
            $k = 1 - $k;
        }
        ?>
				</tbody>
			</table>
		</div>
		<input type="hidden" name="boxchecked" value="0"/>
		<input type="hidden" name="filter_order" value="<?php 
        echo $pageInfo->filter->order->value;
        ?>
"/>
		<input type="hidden" name="filter_order_Dir" value="<?php 
        echo $pageInfo->filter->order->dir;
        ?>
"/>
		<?php 
        echo $tabs->endPanel();
        echo $tabs->startPanel(JText::_('TAG_CATEGORIES'), 'joomlacontent_auto');
        $type = JRequest::getString('type');
        ?>
		<script language="javascript" type="text/javascript">
			<!--
			window.onload = function(){
				if(window.document.getElementById('tagsauto')){
					window.document.getElementById('tagsauto').onchange = updateAutoTag;
				}
			}
			var selectedCategories = new Array();
			<?php 
        if (!ACYMAILING_J16) {
            ?>
			function applyAutoContent(secid, catid, rowClass){
				if(selectedCategories[secid] && selectedCategories[secid][catid]){
					window.document.getElementById('content_sec' + secid + '_cat' + catid).className = rowClass;
					delete selectedCategories[secid][catid];
				}else{
					if(!selectedCategories[secid]) selectedCategories[secid] = new Array();
					if(secid == 0){
						for(var isec in selectedCategories){
							for(var icat in selectedCategories[isec]){
								if(selectedCategories[isec][icat] == 'content'){
									window.document.getElementById('content_sec' + isec + '_cat' + icat).className = 'row0';
									delete selectedCategories[isec][icat];
								}
							}
						}
					}else{
						if(selectedCategories[0] && selectedCategories[0][0]){
							window.document.getElementById('content_sec0_cat0').className = 'row0';
							delete selectedCategories[0][0];
						}

						if(catid == 0){
							for(var icat in selectedCategories[secid]){
								if(selectedCategories[secid][icat] == 'content'){
									window.document.getElementById('content_sec' + secid + '_cat' + icat).className = 'row0';
									delete selectedCategories[secid][icat];
								}
							}
						}else{
							if(selectedCategories[secid][0]){
								window.document.getElementById('content_sec' + secid + '_cat0').className = 'row0';
								delete selectedCategories[secid][0];
							}
						}
					}

					window.document.getElementById('content_sec' + secid + '_cat' + catid).className = 'selectedrow';
					selectedCategories[secid][catid] = 'content';
				}

				updateAutoTag();
			}
			<?php 
        } else {
            ?>
			function applyAutoContent(catid, rowClass){
				if(selectedCategories[catid]){
					window.document.getElementById('content_cat' + catid).className = rowClass;
					delete selectedCategories[catid];
				}else{
					window.document.getElementById('content_cat' + catid).className = 'selectedrow';
					selectedCategories[catid] = 'content';
				}

				updateAutoTag();
			}
			<?php 
        }
        ?>

			function updateAutoTag(){
				tag = '{autocontent:';
				<?php 
        if (!ACYMAILING_J16) {
            ?>
				for(var isec in selectedCategories){
					for(var icat in selectedCategories[isec]){
						if(selectedCategories[isec][icat] == 'content'){
							if(icat != 0){
								tag += 'cat' + icat + '-';
							}else{
								tag += 'sec' + isec + '-';
							}
						}
					}
				}
				<?php 
        } else {
            ?>
				for(var icat in selectedCategories){
					if(selectedCategories[icat] == 'content'){
						tag += icat + '-';
					}
				}
				<?php 
        }
        ?>

				if(document.adminForm.min_article && document.adminForm.min_article.value && document.adminForm.min_article.value != 0){
					tag += '| min:' + document.adminForm.min_article.value;
				}
				if(document.adminForm.max_article.value && document.adminForm.max_article.value != 0){
					tag += '| max:' + document.adminForm.max_article.value;
				}
				if(document.adminForm.contentorder.value){
					tag += "| order:" + document.adminForm.contentorder.value + "," + document.adminForm.contentorderdir.value;
				}
				if(document.adminForm.contentfilter && document.adminForm.contentfilter.value){
					tag += document.adminForm.contentfilter.value;
				}
				if(document.adminForm.meta_article && document.adminForm.meta_article.value){
					tag += '| meta:' + document.adminForm.meta_article.value;
				}

				for(var i = 0; i < document.adminForm.contenttypeauto.length; i++){
					if(document.adminForm.contenttypeauto[i].checked){
						selectedtype = document.adminForm.contenttypeauto[i].value;
						tag += '| type:' + document.adminForm.contenttypeauto[i].value;
					}
				}

				for(var i = 0; i < document.adminForm.titlelinkauto.length; i++){
					if(document.adminForm.titlelinkauto[i].checked && document.adminForm.titlelinkauto[i].value.length > 1){
						tag += '|' + document.adminForm.titlelinkauto[i].value;
					}
				}
				if(selectedtype != 'title'){
					for(var i = 0; i < document.adminForm.authorauto.length; i++){
						if(document.adminForm.authorauto[i].checked && document.adminForm.authorauto[i].value.length > 1){
							tag += '|' + document.adminForm.authorauto[i].value;
						}
					}
					for(var i = 0; i < document.adminForm.pictauto.length; i++){
						if(document.adminForm.pictauto[i].checked){
							tag += '| pict:' + document.adminForm.pictauto[i].value;
							if(document.adminForm.pictauto[i].value == 'resized'){
								document.getElementById('pictsizeauto').style.display = '';
								if(document.adminForm.pictwidthauto.value) tag += '| maxwidth:' + document.adminForm.pictwidthauto.value;
								if(document.adminForm.pictheightauto.value) tag += '| maxheight:' + document.adminForm.pictheightauto.value;
							}else{
								document.getElementById('pictsizeauto').style.display = 'none';
							}
						}
					}
					document.getElementById('formatauto').style.display = '';
				}else{
					document.getElementById('formatauto').style.display = 'none';
				}

				if(document.getElementById('contentformatautoinvert').value == 1) tag += '| invert';
				if(document.adminForm.contentformatauto && document.adminForm.contentformatauto.value){
					tag += '| format:' + document.adminForm.contentformatauto.value;
				}

				if(document.adminForm.cols && document.adminForm.cols.value > 1){
					tag += '| cols:' + document.adminForm.cols.value;
				}
				if(window.document.getElementById('jflangauto') && window.document.getElementById('jflangauto').value != ''){
					tag += '| lang:' + window.document.getElementById('jflangauto').value;
				}
				if(window.document.getElementById('jlang') && window.document.getElementById('jlang').value != ''){
					tag += '| language:';
					tag += window.document.getElementById('jlang').value;
				}

				if(window.document.getElementById('tagsauto')){
					var tmp = 0;
					for(var i = 0; i < window.document.getElementById('tagsauto').length; i++){
						if(window.document.getElementById('tagsauto')[i].selected){
							if(tmp == 0){
								tag += '| tags:' + window.document.getElementById('tagsauto')[i].value;
								tmp = 1;
							}else{
								tag += ',' + window.document.getElementById('tagsauto')[i].value;
							}
						}
					}
				}

				tag += '}';

				setTag(tag);
			}
			//-->
		</script>
		<div class="onelineblockoptions">
			<table width="100%" class="acymailing_table">
				<tr>
					<td>
						<?php 
        echo JText::_('DISPLAY');
        ?>
					</td>
					<td colspan="2">
						<?php 
        echo JHTML::_('acyselect.radiolist', $contenttype, 'contenttypeauto', 'size="1" onclick="updateAutoTag();"', 'value', 'text', $this->params->get('default_type', 'intro'));
        ?>
					</td>
					<td id="languagesauto">
						<?php 
        $jflanguages = acymailing_get('type.jflanguages');
        $jflanguages->onclick = 'onchange="updateAutoTag();"';
        $jflanguages->id = 'jflangauto';
        echo $jflanguages->display('langauto');
        if (empty($jflanguages->found)) {
            echo $jflanguages->displayJLanguages('jlangauto');
        }
        ?>
					</td>
				</tr>
				<tr id="formatauto" class="acyplugformat">
					<td valign="top">
						<?php 
        echo JText::_('FORMAT');
        ?>
					</td>
					<td valign="top">
						<?php 
        echo $this->acypluginsHelper->getFormatOption('tagcontent', 'TOP_LEFT', false, 'updateAutoTag');
        ?>
					</td>
					<td valign="top"><?php 
        echo JText::_('DISPLAY_PICTURES');
        ?>
</td>
					<td valign="top"><?php 
        echo JHTML::_('acyselect.radiolist', $picts, 'pictauto', 'size="1" onclick="updateAutoTag();"', 'value', 'text', $this->params->get('default_pict', '1'));
        ?>
						<span id="pictsizeauto" <?php 
        if ($this->params->get('default_pict', '1') != 'resized') {
            echo 'style="display:none;"';
        }
        ?>
 ><br/><?php 
        echo JText::_('CAPTCHA_WIDTH');
        ?>
							<input name="pictwidthauto" type="text" onchange="updateAutoTag();" value="<?php 
        echo $this->params->get('maxwidth', '150');
        ?>
" style="width:30px;"/>
							x <?php 
        echo JText::_('CAPTCHA_HEIGHT');
        ?>
							<input name="pictheightauto" type="text" onchange="updateAutoTag();" value="<?php 
        echo $this->params->get('maxheight', '150');
        ?>
" style="width:30px;"/>
						</span>
					</td>
				</tr>
				<tr>
					<td>
						<?php 
        echo JText::_('CLICKABLE_TITLE');
        ?>
					</td>
					<td>
						<?php 
        echo JHTML::_('acyselect.radiolist', $titlelink, 'titlelinkauto', 'size="1" onclick="updateAutoTag();"', 'value', 'text', $this->params->get('default_titlelink', 'link'));
        ?>
					</td>
					<td>
						<?php 
        echo JText::_('AUTHOR_NAME');
        ?>
					</td>
					<td>
						<?php 
        echo JHTML::_('acyselect.radiolist', $authorname, 'authorauto', 'size="1" onclick="updateAutoTag();"', 'value', 'text', (string) $this->params->get('default_author', '0'));
        ?>
					</td>
				</tr>
				<tr>
					<?php 
        if (version_compare(JVERSION, '3.1.0', '>=')) {
            ?>
						<td valign="top">
							<?php 
            echo JText::_('TAGS');
            ?>
						</td>
						<td>
							<?php 
            $form = JForm::getInstance('acytagcontenttags', JPATH_SITE . DS . 'components' . DS . 'com_acymailing' . DS . 'params' . DS . 'tagcontenttags.xml');
            foreach ($form->getFieldset('tagcontenttagfield') as $field) {
                echo $field->input;
            }
            ?>
						</td>
					<?php 
        } else {
            ?>
						<td colspan="2"></td>
					<?php 
        }
        ?>
					<td valign="top"><?php 
        echo JText::_('FIELD_COLUMNS');
        ?>
</td>
					<td valign="top">
						<select name="cols" style="width:150px" onchange="updateAutoTag();" size="1">
							<?php 
        for ($o = 1; $o < 11; $o++) {
            echo '<option value="' . $o . '">' . $o . '</option>';
        }
        ?>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						<?php 
        echo JText::_('MAX_ARTICLE');
        ?>
					</td>
					<td>
						<input type="text" name="max_article" style="width:50px" value="20" onchange="updateAutoTag();"/>
					</td>
					<td>
						<?php 
        echo JText::_('ACY_ORDER');
        ?>
					</td>
					<td>
						<?php 
        $values = array('id' => 'ACY_ID', 'ordering' => 'ACY_ORDERING', 'created' => 'CREATED_DATE', 'modified' => 'MODIFIED_DATE', 'title' => 'FIELD_TITLE');
        echo $this->acypluginsHelper->getOrderingField($values, 'id', 'DESC', 'updateAutoTag');
        ?>
					</td>
				</tr>
				<?php 
        if ($this->params->get('metaselect')) {
            ?>
					<tr>
						<td>
							<?php 
            echo JText::_('META_KEYWORDS');
            ?>
						</td>
						<td colspan="3">
							<input type="text" name="meta_article" style="width:200px" value="" onchange="updateAutoTag();"/>
						</td>
					</tr>
				<?php 
        }
        ?>
				<?php 
        if ($type == 'autonews') {
            ?>
					<tr>
						<td>
							<?php 
            echo JText::_('MIN_ARTICLE');
            ?>
						</td>
						<td>
							<input type="text" name="min_article" style="width:50px" value="1" onchange="updateAutoTag();"/>
						</td>
						<td>
							<?php 
            echo JText::_('JOOMEXT_FILTER');
            ?>
						</td>
						<td>
							<?php 
            $filter = acymailing_get('type.contentfilter');
            $filter->onclick = "updateAutoTag();";
            echo $filter->display('contentfilter', '|filter:created');
            ?>
						</td>
					</tr>
				<?php 
        }
        ?>
			</table>
		</div>

		<div class="onelineblockoptions">
			<table class="acymailing_table" cellpadding="1" width="100%">
				<thead>
				<tr>
					<th class="title"></th>
					<?php 
        if (!ACYMAILING_J16) {
            ?>
						<th class="title">
							<?php 
            echo JText::_('SECTION');
            ?>
						</th>
					<?php 
        }
        ?>
					<th class="title">
						<?php 
        echo JText::_('TAG_CATEGORIES');
        ?>
					</th>
				</tr>
				</thead>
				<tbody>
				<?php 
        $k = 0;
        if (!ACYMAILING_J16) {
            ?>
					<tr id="content_sec0_cat0" class="<?php 
            echo "row{$k}";
            ?>
" onclick="applyAutoContent(0,0,'<?php 
            echo "row{$k}";
            ?>
');" style="cursor:pointer;">
						<td class="acytdcheckbox"></td>
						<td style="font-weight: bold;">
							<?php 
            echo JText::_('ACY_ALL');
            ?>
						</td>
						<td style="text-align:center;font-weight: bold;">
							<?php 
            echo JText::_('ACY_ALL');
            ?>
						</td>
					</tr>

				<?php 
        }
        $k = 1 - $k;
        $currentSection = '';
        foreach ($categories as $row) {
            if (!ACYMAILING_J16 && $currentSection != $row->section) {
                ?>
						<tr id="content_sec<?php 
                echo $row->secid;
                ?>
_cat0" class="<?php 
                echo "row{$k}";
                ?>
" onclick="applyAutoContent(<?php 
                echo $row->secid;
                ?>
,0,'<?php 
                echo "row{$k}";
                ?>
');" style="cursor:pointer;">
							<td class="acytdcheckbox"></td>
							<td style="font-weight: bold;">
								<?php 
                echo $row->section;
                ?>
							</td>
							<td style="text-align:center;font-weight: bold;">
								<?php 
                echo JText::_('ACY_ALL');
                ?>
							</td>
						</tr>
						<?php 
                $k = 1 - $k;
                $currentSection = $row->section;
            }
            if (!ACYMAILING_J16) {
                ?>
						<tr id="content_sec<?php 
                echo $row->secid;
                ?>
_cat<?php 
                echo $row->catid;
                ?>
" class="<?php 
                echo "row{$k}";
                ?>
" onclick="applyAutoContent(<?php 
                echo $row->secid;
                ?>
,<?php 
                echo $row->catid;
                ?>
,'<?php 
                echo "row{$k}";
                ?>
');" style="cursor:pointer;">
							<td class="acytdcheckbox"></td>
							<td>
							</td>
							<td>
								<?php 
                echo $row->category;
                ?>
							</td>
						</tr>
					<?php 
            } else {
                ?>
						<tr id="content_cat<?php 
                echo $row->id;
                ?>
" class="<?php 
                echo "row{$k}";
                ?>
" onclick="applyAutoContent(<?php 
                echo $row->id;
                ?>
,'<?php 
                echo "row{$k}";
                ?>
');" style="cursor:pointer;">
							<td class="acytdcheckbox"></td>
							<td>
								<?php 
                echo $row->title;
                ?>
							</td>
						</tr>
					<?php 
            }
            $k = 1 - $k;
        }
        ?>
				</tbody>
			</table>
		</div>
		<?php 
        echo $tabs->endPanel();
        echo $tabs->endPane();
    }
Example #2
0
 * @copyright	(C) 2009-2015 ACYBA S.A.R.L. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div id="acy_content" class="acynewsletterlisting">
	<div id="iframedoc"></div>
	<form action="<?php 
echo JRoute::_('index.php?option=com_acymailing&ctrl=' . JRequest::getCmd('ctrl'));
?>
" method="post" name="adminForm" id="adminForm">
		<table class="acymailing_table_options">
			<tr>
				<td width="100%">
					<?php 
acymailing_listingsearch($this->pageInfo->search);
?>
				</td>
				<td nowrap="nowrap">
					<?php 
echo $this->filters->list;
?>
					<?php 
if ($this->app->isAdmin()) {
    echo $this->filters->creator;
}
?>
					<?php 
echo $this->filters->date;
?>
				</td>
Example #3
0
 * @copyright	(C) 2009-2014 ACYBA S.A.R.L. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div id="acy_content">
<div id="iframedoc"></div>
<form action="<?php 
echo JRoute::_('index.php?option=com_acymailing&ctrl=' . JRequest::getCmd('ctrl'));
?>
" method="post" name="adminForm" id="adminForm" >
	<table>
		<tr>
			<td width="100%">
				<?php 
acymailing_listingsearch($this->escape($this->pageInfo->search));
?>
			</td>
			<td nowrap="nowrap">
				<?php 
echo $this->filters->list;
?>
				<?php 
if ($this->app->isAdmin()) {
    echo $this->filters->creator;
}
?>
			</td>
		</tr>
	</table>