Your IP : 216.73.217.68


Current Path : /home/w/u/e/wuectly/www/03cbe/
Upload File :
Current File : /home/w/u/e/wuectly/www/03cbe/list.tar

params/list.xml000060400000002043152455613110007522 0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="options"
				type="subform"
				label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL"
				description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC"
				layout="joomla.form.field.subform.repeatable-table"
				icon="list"
				multiple="true"
				>
				<form hidden="true" name="list_templates_modal" repeat="true">
					<field
						name="name"
						type="text"
						label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL"
						size="30"
					/>

					<field
						name="value"
						type="text"
						label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL"
						size="30"
					/>
				</form>
			</field>
		</fieldset>
	</fields>
</form>
tmpl/list.php000060400000001130152455613110007176 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

$fieldValue = $field->value;

if ($fieldValue == '')
{
	return;
}

$fieldValue = (array) $fieldValue;
$texts      = array();
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name)
{
	if (in_array((string) $value, $fieldValue))
	{
		$texts[] = JText::_($name);
	}
}


echo htmlentities(implode(', ', $texts));
list.xml000060400000003426152455613110006245 0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
	<name>plg_fields_list</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_LIST_XML_DESCRIPTION</description>
	<files>
		<filename plugin="list">list.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_fields_list.ini</language>
		<language tag="en-GB">en-GB.plg_fields_list.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_LIST_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="options"
					type="subform"
					label="PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL"
					description="PLG_FIELDS_LIST_PARAMS_OPTIONS_DESC"
					layout="joomla.form.field.subform.repeatable-table"
					icon="list"
					multiple="true"
					>
					<form hidden="true" name="list_templates_modal" repeat="true">
						<field
							name="name"
							type="text"
							label="PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL"
							size="30"
						/>

						<field
							name="value"
							type="text"
							label="PLG_FIELDS_LIST_PARAMS_OPTIONS_VALUE_LABEL"
							size="30"
						/>
					</form>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
list.php000060400000002040152455613110006223 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.List
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR);

/**
 * Fields list Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsList extends FieldsListPlugin
{
	/**
	 * Prepares the field
	 *
	 * @param   string    $context  The context.
	 * @param   stdclass  $item     The item.
	 * @param   stdclass  $field    The field.
	 *
	 * @return  object
	 *
	 * @since   3.9.2
	 */
	public function onCustomFieldsPrepareField($context, $item, $field)
	{
		// Check if the field should be processed
		if (!$this->isTypeSupported($field->type))
		{
			return;
		}

		// The field's rawvalue should be an array
		if (!is_array($field->rawvalue))
		{
			$field->rawvalue = (array) $field->rawvalue;
		}

		return parent::onCustomFieldsPrepareField($context, $item, $field);
	}
}
index.html000060400000000054152456636750006557 0ustar00<html><body bgcolor="#FFFFFF"></body></html>tmpl/listing.php000060400000016431152456636750007726 0ustar00<?php
/**
 * @package	AcyMailing for Joomla!
 * @version	5.9.6
 * @author	acyba.com
 * @copyright	(C) 2009-2018 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="acylistlisting">
	<div id="iframedoc"></div>
	<?php $saveOrder = $this->pageInfo->filter->order->value == 'a.ordering' && strtolower($this->pageInfo->filter->order->dir) == 'asc'; ?>
	<form action="<?php echo acymailing_completeLink(acymailing_getVar('cmd', 'ctrl')); ?>" method="post" name="adminForm" id="adminForm">
		<table class="acymailing_table_options">
			<?php if(acymailing_isAdmin()){ ?>
				<tr>
					<td width="100%">
						<?php acymailing_listingsearch($this->pageInfo->search); ?>
					</td>
					<td nowrap="nowrap">
						<?php echo $this->filters->category; ?>
						<?php echo $this->filters->creator; ?>
					</td>
				</tr>
			<?php }else{ ?>
				<tr>
					<td nowrap="nowrap" width="100%">
						<?php acymailing_listingsearch($this->pageInfo->search); ?>
					</td>
					<td>
						<?php echo $this->filters->category; ?>
					</td>
				</tr>
				<tr>
					<td></td>
					<td>
						<?php echo $this->filters->creator; ?>
					</td>
				</tr>
			<?php } ?>
		</table>

		<table class="acymailing_table" cellpadding="1" id="listListing">
			<thead>
				<tr>
					<th class="title titlenum">
						<?php echo acymailing_translation('ACY_NUM'); ?>
					</th>
					<?php if(acymailing_isAdmin()){ ?>
						<th class="title titleorder" style="width:32px !important; padding-left:1px; padding-right:1px;">
							<?php echo acymailing_gridSort('<i class="icon-menu-2"></i>', 'a.ordering', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
						</th>
					<?php } ?>
					<th class="title titlebox">
						<input type="checkbox" name="toggle" value="" onclick="acymailing.checkAll(this);"/>
					</th>
					<th class="title titlecolor">

					</th>
					<th class="title">
						<?php echo acymailing_gridSort(acymailing_translation('LIST_NAME'), 'a.name', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value); ?>
					</th>
					<th class="title titlelink">
						<?php echo acymailing_translation('SUBSCRIBERS'); ?>
					</th>
					<th class="title titlelink">
						<?php echo acymailing_translation('UNSUBSCRIBERS'); ?>
					</th>
					<th class="title titlesender">
						<?php echo acymailing_gridSort(acymailing_translation('CREATOR'), 'd.name', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value); ?>
					</th>
					<?php if(acymailing_isAdmin()){ ?>
					<th class="title titletoggle">
						<?php echo acymailing_gridSort(acymailing_translation('JOOMEXT_VISIBLE'), 'a.visible', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value); ?>
					</th>
					<th class="title titletoggle">
						<?php echo acymailing_gridSort(acymailing_translation('ENABLED'), 'a.published', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value); ?>
					</th>
					<?php } ?>
					<th class="title titleid">
						<?php echo acymailing_gridSort(acymailing_translation('ACY_ID'), 'a.listid', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
			<tr>
				<td colspan="12">
					<?php echo $this->pagination->getListFooter();
					echo $this->pagination->getResultsCounter(); ?>
				</td>
			</tr>
			</tfoot>
			<tbody id="acymailing_sortable_listing">
				<?php
				$k = 0;
				$ordering = '';
				for($i = 0 ; $i < count($this->rows); $i++){
					$row =& $this->rows[$i];
					$ordering .= ',"order['.$i.']='.$row->ordering.'"';

					$publishedid = 'published_'.$row->listid;
					$visibleid = 'visible_'.$row->listid;
					?>
					<tr class="<?php echo "row$k"; ?>" acyorderid="<?php echo $row->listid; ?>">
						<td align="center" style="text-align:center">
							<?php echo $this->pagination->getRowOffset($i); ?>
						</td>
						<?php if(acymailing_isAdmin()){ ?>
							<?php $iconClass = 'acyicon-draghandle';
							if(!$saveOrder) $iconClass .= ' acyinactive-handler" title="Sort the listing by ordering first'; ?>
							<td class="<?php echo $iconClass; ?>"><img alt="" src="<?php echo ACYMAILING_IMAGES; ?>icons/drag.png" /></td>
						<?php } ?>
						<td align="center" style="text-align:center">
							<?php echo acymailing_gridID($i, $row->listid); ?>
						</td>
						<td width="12">
							<?php echo '<div class="roundsubscrib rounddisp" style="background-color:'.$this->escape($row->color).'"></div>'; ?>
						</td>
						<td>
							<?php
							echo acymailing_tooltip($row->description, $row->name, 'tooltip.png', $row->name, acymailing_completeLink((acymailing_isAdmin() ? '' : 'front').'list&task=edit&listid='.$row->listid));
							?>
						</td>
						<td align="center" style="text-align:center">
							<a href="<?php echo acymailing_completeLink((acymailing_isAdmin() ? '' : 'front').'subscriber&filter_status=0&filter_statuslist=1&filter_lists='.$row->listid); ?>">
								<?php echo $row->nbsub; ?>
							</a>
							<?php if(!empty($row->nbwait)){
								echo '&nbsp;&nbsp;'; ?>
								<?php $title = '(+'.$row->nbwait.')';
								echo acymailing_tooltip(acymailing_translation('NB_PENDING'), ' ', 'tooltip.png', $title, acymailing_completeLink((acymailing_isAdmin() ? '' : 'front').'subscriber&filter_status=0&filter_statuslist=2&filter_lists='.$row->listid)); ?>
							<?php } ?>
						</td>
						<td align="center" style="text-align:center">
							<a href="<?php echo acymailing_completeLink((acymailing_isAdmin() ? '' : 'front').'subscriber&filter_status=0&filter_statuslist=-1&filter_lists='.$row->listid); ?>">
								<?php echo $row->nbunsub; ?>
							</a>
						</td>
						<td align="center" style="text-align:center">
							<?php
							if(!empty($row->userid)){
								$text = '<b>'.acymailing_translation('JOOMEXT_NAME').' : </b>'.$row->creatorname;
								$text .= '<br /><b>'.acymailing_translation('ACY_USERNAME').' : </b>'.$row->username;
								$text .= '<br /><b>'.acymailing_translation('JOOMEXT_EMAIL').' : </b>'.$row->email;
								$text .= '<br /><b>'.acymailing_translation('ACY_ID').' : </b>'.$row->userid;
								echo acymailing_tooltip($text, $row->creatorname, 'tooltip.png', $row->creatorname, acymailing_isAdmin() ? acymailing_userEditLink().$row->userid : '');
							}
							?>
						</td>
						<?php if(acymailing_isAdmin()){ ?>
						<td align="center" style="text-align:center">
							<span id="<?php echo $visibleid ?>" class="spanloading"><?php echo $this->toggleClass->toggle($visibleid, $row->visible, 'list') ?></span>
						</td>
						<td align="center" style="text-align:center">
							<span id="<?php echo $publishedid ?>" class="spanloading"><?php echo $this->toggleClass->toggle($publishedid, $row->published, 'list') ?></span>
						</td>
						<?php } ?>
						<td align="center" style="text-align:center">
							<?php echo $row->listid; ?>
						</td>
					</tr>
					<?php
					$k = 1 - $k;
				}
				?>
			</tbody>
		</table>

		<?php if(!empty($this->Itemid)) echo '<input type="hidden" name="Itemid" value="'.$this->Itemid.'" />'; ?>
		<?php acymailing_formOptions($this->pageInfo->filter->order); ?>
	</form>
</div>

<?php if($saveOrder) acymailing_sortablelist('list', ltrim($ordering, ',')); ?>
tmpl/index.html000060400000000054152456636750007533 0ustar00<html><body bgcolor="#FFFFFF"></body></html>tmpl/filter.lists.php000060400000020662152456636750010700 0ustar00<?php
/**
 * @package	AcyMailing for Joomla!
 * @version	5.9.6
 * @author	acyba.com
 * @copyright	(C) 2009-2018 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');
?><?php if(count($this->lists) > 10){ ?>
	<script language="javascript" type="text/javascript">
		<!--
		function acymailing_searchAList(){
			var filter = document.getElementById("acymailing_searchList").value.toLowerCase();
			for(var i = 0; i <<?php echo count($this->lists); ?>; i++){
				var itemName = document.getElementById("listName_" + i).innerHTML.toLowerCase();
				if(itemName.indexOf(filter) > -1){
					document.getElementById("acylistrow_" + i).style.display = "table-row";
				}else{
					document.getElementById("acylistrow_" + i).style.display = "none";
				}
			}
		}
		//-->
	</script>
	<div style="margin-bottom:10px;"><input onkeyup="acymailing_searchAList();" type="text" style="width: 200px;max-width:100%;margin-bottom:5px;" placeholder="<?php echo acymailing_translation('ACY_SEARCH'); ?>" id="acymailing_searchList"></div>
<?php }

$k = 0;
$i = 0;

$orderedList = array();
$listsPerCategory = array();
$languages = array();
foreach($this->lists as $row){
	$orderedList[$row->category][$row->listid] = $row;
	$listsPerCategory[$row->category][$row->listid] = $row->listid;
	if(count($this->lists) < 4) continue;

	$languages['all'][$row->listid] = $row->listid;
	if($row->languages == 'all') continue;
	$lang = explode(',', trim($row->languages, ','));
	foreach($lang as $oneLang){
		$languages[strtolower($oneLang)][$row->listid] = $row->listid;
	}
}
ksort($orderedList);
$allCats = array_keys($orderedList);
$this->lists = array();
foreach($orderedList as $oneCategory){
	$this->lists = array_merge($this->lists, $oneCategory);
}

if($currentPage == 'export'){
	$possibleStatuses = array();
	$possibleStatuses[] = acymailing_selectOption("0", acymailing_translation('ACY_DONT_EXPORT'));
	$possibleStatuses[] = acymailing_selectOption("-1", acymailing_translation('ACTION_UNSUBSCRIBED'));
	$possibleStatuses[] = acymailing_selectOption("2", acymailing_translation('PENDING_SUBSCRIPTION'));
	$possibleStatuses[] = acymailing_selectOption("1", acymailing_translation('SUBSCRIBED'));

	if(!acymailing_isAdmin()){
		$possibleStatuses[0]->class = 'btn-danger';
		$possibleStatuses[1]->class = 'btn-success';
		$possibleStatuses[2]->class = 'btn-success';
		$possibleStatuses[3]->class = 'btn-success';
	}
}

echo '<table class="acymailing_table" id="lists_choice"><tbody>';

foreach($this->lists as $row){
	if(empty($row->category)) $row->category = acymailing_translation('ACY_NO_CATEGORY');
	if(count($allCats) > 1 && (empty($currentCatgeory) || $row->category != $currentCatgeory)){
		$currentCatgeory = $row->category; ?>
		<tr class="<?php echo "row$k"; ?>">
			<td colspan="2">
				<a href="#" onclick="checkCats('<?php echo htmlspecialchars(str_replace("'", "\'", $row->category == acymailing_translation('ACY_NO_CATEGORY') ? -1 : $row->category), ENT_QUOTES, "UTF-8"); ?>'); return false;"><strong><?php echo htmlspecialchars($row->category, ENT_QUOTES, "UTF-8"); ?></strong></a>
			</td>
		</tr>
	<?php }
	if($currentPage == 'export'){
		$checked = (empty($this->exportlist) && in_array($row->listid, $this->selectedlists)) ? 1 : 0;
	}elseif($currentPage == 'import'){
		$filter_lists = explode(',', rtrim(acymailing_getVar('string', 'filter_lists'), ','));
		if(!empty($row->campaign)){
			$checked = acymailing_getVar('cmd', 'importlists['.$row->listid.']', in_array($row->listid, $filter_lists) ? 2 : 0);
		}else{
			$checked = !empty($currentValues[$row->listid]) || in_array($row->listid, $filter_lists) || $listid == $row->listid ? 1 : 0;
		}
	}

	$classList = $checked ? 'acy_list_checked' : 'acy_list_unchecked';
	?>
	<tr id="acylistrow_<?php echo $i; ?>" class="<?php echo "row$k $classList"; ?>">
		<td style="display:none;" id="listId_<?php echo $i; ?>"><?php echo $row->listid; ?></td>
		<td style="display:none;" id="listName_<?php echo $i; ?>"><?php echo $row->name; ?></td>
		<td>
			<?php
			echo '<div class="roundsubscrib rounddisp" style="background-color:'.$row->color.'"></div>';
			$text = '<b>'.acymailing_translation('ACY_ID').' : </b>'.$row->listid;
			$text .= '<br />'.$row->description;
			echo acymailing_tooltip($text, $row->name, 'tooltip.png', $row->name);
			?>
		</td>
		<td nowrap="nowrap">
			<?php
			if($currentPage == 'export'){
				if(!empty($this->exportlist) && $this->exportlist == $row->listid){
					$checked = $this->exportliststatus;
					if($this->exportliststatus == -2) $checked = 0;
				}
				echo acymailing_radio($possibleStatuses, "exportlists[".$row->listid."]", '', 'value', 'text', $checked, $row->listid.'listmail');
			}elseif($currentPage == 'import'){
				if(!empty($row->campaign)){
					echo acymailing_radio($this->campaignValues, "importlists[".$row->listid."]", '', 'value', 'text', $checked, $row->listid.'listmail');
				}else{
					echo acymailing_radio($this->subscribeOptions, "importlists[".$row->listid."]", '', 'value', 'text', $checked, $row->listid.'listmail');
				}
			}
			?>
		</td>
	</tr>
	<?php
	$k = 1 - $k;
	$i++;
}
if(count($this->lists) > 3){ ?>
	<tr>
		<td></td>
		<td nowrap="nowrap">
			<script language="javascript" type="text/javascript">
				<!--
				var selectedLists = new Array();
				<?php
				foreach($languages as $val => $listids){
					echo "selectedLists['$val'] = new Array('".implode("','", $listids)."'); ";
				}
				?>
				function updateStatus(selection){
					<?php
					$listidAll = "selectedLists['all'][i]+'listmail";
					$listidSelection = "selectedLists[selection][i]+'listmail";
					?>
					for(var i = 0; i < selectedLists['all'].length; i++){
						if(searchParent(window.document.getElementById(<?php echo $listidAll; ?>0'), 'tr').style.display == 'none') continue;
						<?php if(ACYMAILING_J30) echo "jQuery('label[for='+".$listidAll."0]').click();"; ?>
						window.document.getElementById(<?php echo $listidAll; ?>0').checked = true;
					}
					if(!selectedLists[selection]) return;
					for(i = 0; i < selectedLists[selection].length; i++){
						if(searchParent(window.document.getElementById(<?php echo $listidSelection; ?>1'), 'tr').style.display == 'none') continue;
						<?php if(ACYMAILING_J30) echo "jQuery('label[for='+".$listidSelection."1]').click();"; ?>
						window.document.getElementById(<?php echo $listidSelection; ?>1').checked = true;
					}
				}
				-->
			</script>
			<?php
			$selectList = array();
			$selectList[] = acymailing_selectOption('none', acymailing_translation('ACY_NONE'));
			foreach($languages as $oneLang => $values){
				if($oneLang == 'all') continue;
				$selectList[] = acymailing_selectOption($oneLang, ucfirst($oneLang));
			}
			$selectList[] = acymailing_selectOption('all', acymailing_translation('ACY_ALL'));
			echo acymailing_radio($selectList, "selectlists", 'onclick="updateStatus(this.value);"', 'value', 'text');
			?>
		</td>
	</tr>
<?php } ?>
	</tbody>
	</table>

	<script language="javascript" type="text/javascript">
		<!--
		function searchParent(elem, tag){
			tag = tag.toUpperCase();
			do{
				if(elem.nodeName === tag){
					return elem;
				}
			}while(elem = elem.parentNode);
			return null;
		}

		var listsCats = new Array();

		<?php
		foreach($listsPerCategory as $val => $listids){
			if(empty($val)) $val = '-1';
			echo "listsCats['".str_replace("'", "\'", $val)."'] = new Array('".implode("','", $listids)."'); ";
		}

		$listCatsSelection = 'listsCats[selection][i]+"listmail';

		?>
		function checkCats(selection){
			if(!listsCats[selection]) return;
			var unselect = true;
			for(var i = 0; i < listsCats[selection].length; i++){
				if(searchParent(window.document.getElementById(<?php echo $listCatsSelection; ?>0"), 'tr').style.display == 'none') continue;
				if(window.document.getElementById(<?php echo $listCatsSelection; ?>1").checked == true) continue;
				unselect = false;
				break;
			}
			for(i = 0; i < listsCats[selection].length; i++){
				if(searchParent(window.document.getElementById(<?php echo $listCatsSelection; ?>0"), 'tr').style.display == 'none') continue;
				if(unselect){
					<?php if(ACYMAILING_J30) echo 'jQuery("label[for="+'.$listCatsSelection.'0]").click();'; ?>
					window.document.getElementById(<?php echo $listCatsSelection; ?>0").checked = true;
				}else{
					<?php if(ACYMAILING_J30) echo 'jQuery("label[for="+'.$listCatsSelection.'1]").click();'; ?>
					window.document.getElementById(<?php echo $listCatsSelection; ?>1").checked = true;
				}
			}
		}
		-->
	</script>
<?php
tmpl/form.php000060400000010757152456636750007225 0ustar00<?php
/**
 * @package	AcyMailing for Joomla!
 * @version	5.9.6
 * @author	acyba.com
 * @copyright	(C) 2009-2018 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 acymailing_completeLink(acymailing_getVar('cmd', 'ctrl')); ?>" method="post" name="adminForm" id="adminForm" autocomplete="off">
		<div class="<?php echo acymailing_isAdmin() ? 'acyblockoptions' : 'onelineblockoptions'; ?>" style="display:block; float:none;">
			<span class="acyblocktitle" style="display:block; float:none;"><?php echo acymailing_translation('ACY_LIST_INFORMATIONS'); ?></span>
			<table cellspacing="1" width="100%">
				<tr>
					<td class="acykey">
						<label for="name">
							<?php echo acymailing_translation('LIST_NAME'); ?>
						</label>
					</td>
					<td>
						<input type="text" name="data[list][name]" id="name" class="inputbox" style="width:200px" value="<?php echo $this->escape(@$this->list->name); ?>"/>
					</td>
					<td class="acykey">
						<label for="enabled">
							<?php echo acymailing_translation('ENABLED'); ?>
						</label>
					</td>
					<td>
						<?php echo acymailing_boolean("data[list][published]", '', $this->list->published); ?>
					</td>
				</tr>
				<tr>
					<td class="acykey">
						<label for="alias">
							<?php echo acymailing_translation('JOOMEXT_ALIAS'); ?>
						</label>
					</td>
					<td>
						<input type="text" name="data[list][alias]" id="alias" class="inputbox" style="width:200px" value="<?php echo $this->escape(@$this->list->alias); ?>"/>
					</td>
					<td class="acykey">
						<label for="visible">
							<?php echo acymailing_translation('JOOMEXT_VISIBLE'); ?>
						</label>
					</td>
					<td>
						<?php echo acymailing_boolean("data[list][visible]", '', $this->list->visible); ?>
					</td>
				</tr>
				<tr>
					<td class="acykey">
						<label for="datalistcategory">
							<?php echo acymailing_translation('ACY_CATEGORY'); ?>
						</label>
					</td>
					<td>
						<?php $catType = acymailing_get('type.categoryfield');
						echo $catType->display('list', 'data[list][category]', $this->list->category); ?>
					</td>
					<td class="acykey">
						<label for="colorexample">
							<?php echo acymailing_translation('COLOUR'); ?>
						</label>
					</td>
					<td>
						<?php echo $this->colorBox->displayAll('', 'data[list][color]', @$this->list->color); ?>
					</td>
				</tr>
				<tr>
					<td class="acykey">
						<label for="datalistunsubmailid">
							<?php echo acymailing_translation('MSG_UNSUB'); ?>
						</label>
					</td>
					<td>
						<?php echo $this->unsubMsg->display(@$this->list->unsubmailid); ?>
					</td>
					<td class="acykey">
						<?php if(acymailing_isAdmin()){ ?>
							<label for="creator">
								<?php echo acymailing_translation('CREATOR'); ?>
							</label>
						<?php } ?>
					</td>
					<td>
						<?php if(acymailing_isAdmin()) { ?>
							<input type="hidden" id="listcreator" name="data[list][userid]"
								   value="<?php echo @$this->list->userid; ?>"/>
							<?php echo '<span id="creatorname">' . @$this->list->creatorname . '</span>';
							echo ' '.acymailing_popup(acymailing_completeLink('subscriber&amp;task=choose&amp;onlyreg=1', true), '<img src="' . ACYMAILING_IMAGES . 'icons/icon-16-edit.png" alt="' . acymailing_translation('ACY_EDIT', true) . '"/>');
						} ?>
					</td>
				</tr>
				<tr>
					<td class="acykey">
						<label for="datalistwelmailid">
							<?php echo acymailing_translation('MSG_WELCOME'); ?>
						</label>
					</td>
					<td colspan="3">
						<?php if(acymailing_level(1)){
							echo $this->welcomeMsg->display(@$this->list->welmailid);
						}elseif(acymailing_isAdmin()){
							echo acymailing_getUpgradeLink('essential');
						} ?>
					</td>
				</tr>
			</table>
		</div>

		<div class="<?php echo acymailing_isAdmin() ? 'acyblockoptions' : 'onelineblockoptions'; ?>" style="float:none;display:block;">
			<span class="acyblocktitle"><?php echo acymailing_translation('ACY_DESCRIPTION'); ?></span>
			<?php echo $this->editor->display(); ?>
		</div>
		<?php
		if(acymailing_level(1)){
			if($this->languages->multipleLang){
				include(dirname(__FILE__).DS.'languages.php');
			}
			if(acymailing_level(3)){
				include(dirname(__FILE__).DS.'acl.php');
			}
		} ?>
		<div class="clr"></div>

		<input type="hidden" name="cid[]" value="<?php echo @$this->list->listid; ?>"/>
		<?php acymailing_formOptions(); ?>
	</form>
</div>
view.html.php000060400000020574152456636750007221 0ustar00<?php
/**
 * @package	AcyMailing for Joomla!
 * @version	5.9.6
 * @author	acyba.com
 * @copyright	(C) 2009-2018 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');
?><?php


class ListViewList extends acymailingView{
	
	function display($tpl = null){
		$function = $this->getLayout();
		if(method_exists($this, $function)) $this->$function();

		parent::display($tpl);
	}

	function listing(){
		$config = acymailing_config();
		$pageInfo = new stdClass();
		$pageInfo->filter = new stdClass();
		$pageInfo->filter->order = new stdClass();
		$pageInfo->limit = new stdClass();
		$pageInfo->elements = new stdClass();

		$paramBase = ACYMAILING_COMPONENT.'.'.$this->getName();

		$pageInfo->filter->order->value = acymailing_getUserVar($paramBase.".filter_order", 'filter_order', 'a.ordering', 'cmd');
		$pageInfo->filter->order->dir = acymailing_getUserVar($paramBase.".filter_order_Dir", 'filter_order_Dir', 'asc', 'word');
		if(strtolower($pageInfo->filter->order->dir) !== 'desc') $pageInfo->filter->order->dir = 'asc';
		$pageInfo->search = acymailing_getUserVar($paramBase.".search", 'search', '', 'string');
		$pageInfo->search = strtolower(trim($pageInfo->search));
		$selectedCreator = acymailing_getUserVar($paramBase."filter_creator", 'filter_creator', 0, 'int');
		$selectedCategory = acymailing_getUserVar($paramBase."filter_category", 'filter_category', 0, 'string');

		$pageInfo->limit->value = acymailing_getUserVar($paramBase.'.list_limit', 'limit', acymailing_getCMSConfig('list_limit'), 'int');
		$pageInfo->limit->start = acymailing_getUserVar($paramBase.'.limitstart', 'limitstart', 0, 'int');

		$filters = array();
		if(!empty($pageInfo->search)){
			$searchVal = '\'%'.acymailing_getEscaped($pageInfo->search, true).'%\'';
			$filters[] = "a.name LIKE $searchVal OR a.description LIKE $searchVal OR a.listid LIKE $searchVal";
		}
		$filters[] = "a.type = 'list'";
		if(!empty($selectedCreator)) $filters[] = 'a.userid = '.$selectedCreator;
		if(!empty($selectedCategory)) $filters[] = 'a.category = '.acymailing_escapeDB($selectedCategory);

		if(!acymailing_isAdmin()) {
			$listClass = acymailing_get('class.list');
			$lists = $listClass->getFrontendLists('listid');

			$filters[] = 'listid IN ('.implode(',', array_keys($lists)).')';
		}

		$query = 'SELECT a.*, d.'.$this->cmsUserVars->name.' as creatorname, d.'.$this->cmsUserVars->username.' AS username, d.'.$this->cmsUserVars->email.' AS email';
		$query .= ' FROM '.acymailing_table('list').' as a';
		$query .= ' LEFT JOIN '.acymailing_table($this->cmsUserVars->table, false).' as d on a.userid = d.'.$this->cmsUserVars->id;
		$query .= ' WHERE ('.implode(') AND (', $filters).')';
		if(!empty($pageInfo->filter->order->value)){
			$query .= ' ORDER BY '.$pageInfo->filter->order->value.' '.$pageInfo->filter->order->dir;
		}

		$rows = acymailing_loadObjectList($query, '', $pageInfo->limit->start, $pageInfo->limit->value);

		$queryCount = 'SELECT COUNT(a.listid) FROM  '.acymailing_table('list').' as a';
		$queryCount .= ' WHERE ('.implode(') AND (', $filters).')';

		$pageInfo->elements->total = acymailing_loadResult($queryCount);

		$listids = array();
		foreach($rows as $oneRow){
			$listids[] = $oneRow->listid;
		}

		$subscriptionresults = array();
		if(!empty($listids)){
			$querySubscription = 'SELECT count(subid) as total,listid,status FROM '.acymailing_table('listsub').' WHERE listid IN ('.implode(',', $listids).') GROUP BY listid, status';
			$countresults = acymailing_loadObjectList($querySubscription);
			foreach($countresults as $oneResult){
				$subscriptionresults[$oneResult->listid][intval($oneResult->status)] = $oneResult->total;
			}
		}

		foreach($rows as $i => $oneRow){
			$rows[$i]->nbsub = intval(@$subscriptionresults[$oneRow->listid][1]);
			$rows[$i]->nbunsub = intval(@$subscriptionresults[$oneRow->listid][-1]);
			$rows[$i]->nbwait = intval(@$subscriptionresults[$oneRow->listid][2]);
		}

		$pageInfo->elements->page = count($rows);

		$pagination = new acyPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);

		if(acymailing_isAdmin()) {
			$acyToolbar = acymailing_get('helper.toolbar');
			if (acymailing_isAllowed($config->get('acl_lists_filter', 'all'))) {
				$acyToolbar->link(acymailing_completeLink('filter'), acymailing_translation('ACY_FILTERS'), 'filter');
				$acyToolbar->divider();
			}

			if (acymailing_isAllowed($config->get('acl_lists_manage', 'all'))) $acyToolbar->add();
			if (acymailing_isAllowed($config->get('acl_lists_manage', 'all'))) $acyToolbar->edit();
			if (acymailing_isAllowed($config->get('acl_lists_delete', 'all'))) $acyToolbar->delete();
			if (acymailing_isAllowed($config->get('acl_lists_manage', 'all')) || acymailing_isAllowed($config->get('acl_lists_manage', 'all')) || acymailing_isAllowed($config->get('acl_lists_delete', 'all'))) $acyToolbar->divider();
			$acyToolbar->help('list-listing');
			$acyToolbar->setTitle(acymailing_translation('LISTS'), 'list');
			$acyToolbar->display();
		}

		$order = new stdClass();
		$order->ordering = false;
		$order->orderUp = 'orderup';
		$order->orderDown = 'orderdown';
		$order->reverse = false;
		if($pageInfo->filter->order->value == 'a.ordering'){
			$order->ordering = true;
			if($pageInfo->filter->order->dir == 'desc'){
				$order->orderUp = 'orderdown';
				$order->orderDown = 'orderup';
				$order->reverse = true;
			}
		}

		$filters = new stdClass();
		$creatorfilterType = acymailing_get('type.creatorfilter');
		$creatorfilterType->type = 'list';
		$filters->creator = $creatorfilterType->display('filter_creator', $selectedCreator, 'list');
		$listcategoryType = acymailing_get('type.categoryfield');
		$filters->category = $listcategoryType->getFilter('list', 'filter_category', $selectedCategory, ' onchange="document.adminForm.submit();"');

		$this->config = $config;
		$this->filters = $filters;
		$this->order = $order;
		$toggleClass = acymailing_get('helper.toggle');
		$this->toggleClass = $toggleClass;
		$this->rows = $rows;
		$this->pageInfo = $pageInfo;
		$this->pagination = $pagination;
	}

	function form(){
		$listClass = acymailing_get('class.list');
		$listid = acymailing_getCID('listid');

		if(!empty($listid)){
			$list = $listClass->get($listid);

			if(empty($list->listid)){
				acymailing_display('List '.$listid.' not found', 'error');
				$listid = 0;
			}
		}

		if(empty($listid)){
			$list = new stdClass();
			$list->visible = 1;
			$list->description = '';
			$list->category = '';
			$list->published = 1;
			$list->creatorname = acymailing_currentUserName();
			$list->access_manage = 'none';
			$list->access_sub = 'all';
			$list->languages = 'all';
			$colors = array('#3366ff', '#7240A4', '#7A157D', '#157D69', '#ECE649');
			$list->color = $colors[rand(0, count($colors) - 1)];
		}

		$editor = acymailing_get('helper.editor');
		$editor->name = 'editor_description';
		$editor->content = $list->description;
		$editor->setDescription();

		$script = '
			document.addEventListener("DOMContentLoaded", function(){
				acymailing.submitbutton = function(pressbutton) {
					if (pressbutton == \'cancel\') {
						acymailing.submitform(pressbutton,document.adminForm);
						return;
					}
					if(window.document.getElementById("name").value.length < 2){alert(\''.acymailing_translation('ENTER_TITLE', true).'\'); return false;}';
		$script .= $editor->jsCode();
		$script .= 'acymailing.submitform(pressbutton,document.adminForm);
				};
			 }); ';
		$script .= 'function affectUser(idcreator,name,email){
			window.document.getElementById("creatorname").innerHTML = name;
			window.document.getElementById("listcreator").value = idcreator;
		}';


		acymailing_addScript(true, $script);

		if(acymailing_isAdmin()) {
			$acyToolbar = acymailing_get('helper.toolbar');
			$acyToolbar->addButtonOption('apply', acymailing_translation('ACY_APPLY'), 'apply', false);
			$acyToolbar->save();
			$acyToolbar->cancel();
			$acyToolbar->divider();
			$acyToolbar->help('list-form');
			$acyToolbar->setTitle(acymailing_translation('LIST'), 'list&task=edit&listid=' . $listid);
			$acyToolbar->display();
		}

		$colorBox = acymailing_get('type.color');
		$this->colorBox = $colorBox;
		if(acymailing_level(1)){
			$this->welcomeMsg = acymailing_get('type.welcome');
			$this->languages = acymailing_get('type.listslanguages');
		}
		$unsubMsg = acymailing_get('type.unsub');
		$this->unsubMsg = $unsubMsg;
		$this->list = $list;
		$this->editor = $editor;
	}
}