本文整理汇总了PHP中acymailing_completeLink函数的典型用法代码示例。如果您正苦于以下问题:PHP acymailing_completeLink函数的具体用法?PHP acymailing_completeLink怎么用?PHP acymailing_completeLink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acymailing_completeLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listing
function listing()
{
$app = JFactory::getApplication();
$config = acymailing_config();
if (!class_exists('plgSystemAcymailingClassMail')) {
$app->enqueueMessage('AcyMailing can customize some Joomla messages. If you want to do this, please first <a href="index.php?option=com_acymailing&ctrl=cpanel">enable the plugin acymailingclassmail</a>', 'notice');
}
$pageInfo = new stdClass();
$pageInfo->filter = new stdClass();
$pageInfo->filter->order = new stdClass();
$paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
$pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'mailid', 'cmd');
$pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
$db = JFactory::getDBO();
$query = 'SELECT mailid, subject, alias, fromname, published, fromname, fromemail, replyname, replyemail FROM #__acymailing_mail WHERE `type` = ' . $db->Quote($this->type);
if (!empty($pageInfo->filter->order->value)) {
$query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
}
$db->setQuery($query);
$rows = $db->loadObjectList();
acymailing_setTitle(JText::_($this->nameListing), $this->icon, $this->ctrl);
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::custom('preview', 'acypreview', '', JText::_('ACY_PREVIEW'), true);
JToolBarHelper::editList();
JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
JToolBarHelper::divider();
$bar->appendButton('Pophelp', $this->doc);
$bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
$toggleClass = acymailing_get('helper.toggle');
$this->assignRef('toggleClass', $toggleClass);
$this->assignRef('pageInfo', $pageInfo);
$this->assign('config', $config);
$this->assign('rows', $rows);
}
示例2: export
function export()
{
$selectedMail = JRequest::getInt('filter_mail', 0);
$selectedStatus = JRequest::getString('filter_status', '');
$filters = array();
if (!empty($selectedMail)) {
$filters[] = 'a.mailid = ' . $selectedMail;
}
if (!empty($selectedStatus)) {
if ($selectedStatus == 'bounce') {
$filters[] = 'a.bounce > 0';
} elseif ($selectedStatus == 'open') {
$filters[] = 'a.open > 0';
} elseif ($selectedStatus == 'notopen') {
$filters[] = 'a.open < 1';
} elseif ($selectedStatus == 'failed') {
$filters[] = 'a.fail > 0';
}
}
$query = 'SELECT `subid` FROM `#__acymailing_userstats` as a ';
if (!empty($filters)) {
$query .= ' WHERE (' . implode(') AND (', $filters) . ')';
}
$currentSession =& JFactory::getSession();
$currentSession->set('acyexportquery', $query);
$this->setRedirect(acymailing_completeLink('data&task=export&sessionquery=1', false, true));
}
示例3: update
function update()
{
$config = acymailing_config();
if (!acymailing_isAllowed($config->get('acl_config_manage', 'all'))) {
acymailing_display(JText::_('ACY_NOTALLOWED'), 'error');
return false;
}
acymailing_setTitle(JText::_('UPDATE_ABOUT'), 'acyupdate', 'update');
$bar =& JToolBar::getInstance('toolbar');
$bar->appendButton('Link', 'back', JText::_('ACY_CLOSE'), acymailing_completeLink('dashboard'));
return $this->_iframe(ACYMAILING_UPDATEURL . 'update');
}
示例4: export
function export()
{
if (!$this->isAllowed('subscriber', 'export')) {
return;
}
$cids = JRequest::getVar('cid');
if (!empty($cids)) {
$_SESSION['acymailing']['exportusers'] = $cids;
$this->setRedirect(acymailing_completeLink('data&task=export&sessionvalues=1', false, true));
} else {
$this->setRedirect(acymailing_completeLink('data&task=export', false, true));
}
}
示例5: view
function view()
{
$mailid = acymailing_getCID('mailid');
if (empty($mailid)) {
$db =& JFactory::getDBO();
$query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l LEFT JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid LEFT JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid';
$query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1';
if (!empty($listid)) {
$query .= ' AND l.`listid` = ' . (int) $listid;
}
$query .= ' ORDER BY m.`mailid` DESC LIMIT 1';
$db->setQuery($query);
$mailid = $db->loadResult();
if (empty($mailid)) {
return JError::raiseError(404, 'Newsletter not found');
}
}
$access_sub = true;
$mailClass = acymailing_get('helper.mailer');
$mailClass->loadedToSend = false;
$oneMail = $mailClass->load($mailid);
if (empty($oneMail->mailid)) {
return JError::raiseError(404, 'Newsletter not found : ' . $mailid);
}
if (!$access_sub or !$oneMail->published or !$oneMail->visible) {
$key = JRequest::getString('key');
if (empty($key) or $key !== $oneMail->key) {
$app = JFactory::getApplication();
$app->enqueueMessage('You can not have access to this e-mail', 'error');
$app->redirect(acymailing_completeLink('lists', false, true));
return false;
}
}
$user = JFactory::getUser();
if (!empty($user->email)) {
$userClass = acymailing_get('class.subscriber');
$receiver = $userClass->get($user->email);
} else {
$receiver = new stdClass();
$receiver->name = JText::_('VISITOR');
}
$oneMail->sendHTML = true;
$mailClass->dispatcher->trigger('acymailing_replaceusertags', array(&$oneMail, &$receiver, false));
$document = JFactory::getDocument();
$document->setTitle($oneMail->subject);
if (!empty($oneMail->text)) {
echo nl2br($mailClass->textVersion($oneMail->text, false));
} else {
echo nl2br($mailClass->textVersion($oneMail->body, true));
}
}
示例6: doimport
function doimport()
{
if (!$this->isAllowed('subscriber', 'import')) {
return;
}
JRequest::checkToken() or die('Invalid Token');
$function = JRequest::getCmd('importfrom');
$importHelper = acymailing_get('helper.import');
if (!$importHelper->{$function}()) {
return $this->import();
}
$app = JFactory::getApplication();
$this->setRedirect(acymailing_completeLink($app->isAdmin() ? 'subscriber' : 'frontsubscriber', false, true));
}
示例7: export
function export(){
$selectedMail = JRequest::getInt('filter_mail',0);
$selectedUrl = JRequest::getInt('filter_url',0);
$filters = array();
if(!empty($selectedMail)) $filters[] = 'urlclick.mailid = '.$selectedMail;
if(!empty($selectedUrl)) $filters[] = 'urlclick.urlid = '.$selectedUrl;
$query = 'FROM `#__acymailing_urlclick` as urlclick JOIN `#__acymailing_subscriber` as s ON s.subid = urlclick.subid JOIN `#__acymailing_url` as url ON url.urlid = urlclick.urlid';
if(!empty($filters)) $query .= ' WHERE ('.implode(') AND (',$filters).')';
$currentSession = JFactory::getSession();
$currentSession->set('acyexportquery',$query);
$app = JFactory::getApplication();
$app->redirect(acymailing_completeLink(($app->isAdmin()?'':'front').'data&task=export&sessionquery=1',true,true));
}
示例8: subscribe
function subscribe()
{
$user = JFactory::getUser();
$userClass = acymailing_get('class.subscriber');
if (!empty($user->id) and $userClass->identify(true)) {
return $this->modify();
}
$config = acymailing_config();
$allowvisitor = $config->get('allow_visitor', 1);
if (empty($allowvisitor)) {
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('ONLY_LOGGED'), 'notice');
$app->redirect(acymailing_completeLink('lists', false, true));
return;
}
JRequest::setVar('layout', 'modify');
return parent::display();
}
示例9: send
function send()
{
if (!$this->isAllowed('newsletters', 'send')) {
return;
}
JRequest::checkToken() or die('Invalid Token');
JRequest::setVar('tmpl', 'component');
$mailid = acymailing_getCID('mailid');
if (empty($mailid)) {
exit;
}
$user = JFactory::getUser();
$time = time();
$queueClass = acymailing_get('class.queue');
$queueClass->onlynew = JRequest::getInt('onlynew');
$queueClass->mindelay = JRequest::getInt('mindelay');
$totalSub = $queueClass->queue($mailid, $time);
if (empty($totalSub)) {
acymailing_display(JText::_('NO_RECEIVER'), 'warning');
return;
}
$mailObject = new stdClass();
$mailObject->senddate = $time;
$mailObject->published = 1;
$mailObject->mailid = $mailid;
$mailObject->sentby = $user->id;
$db = JFactory::getDBO();
$db->updateObject(acymailing_table('mail'), $mailObject, 'mailid');
$config =& acymailing_config();
$queueType = $config->get('queue_type');
if ($queueType == 'onlyauto') {
$messages = array();
$messages[] = JText::sprintf('ADDED_QUEUE', $totalSub);
$messages[] = JText::_('AUTOSEND_CONFIRMATION');
acymailing_display($messages, 'success');
return;
} else {
JRequest::setVar('totalsend', $totalSub);
$app = JFactory::getApplication();
$app->redirect(acymailing_completeLink('send&task=continuesend&mailid=' . $mailid . '&totalsend=' . $totalSub, true, true));
exit;
}
}
示例10: export
function export()
{
if (!$this->isAllowed('subscriber', 'export')) {
return;
}
$app = JFactory::getApplication();
$cids = JRequest::getVar('cid');
$selectedList = JRequest::getInt('filter_lists');
$_SESSION['acymailing'] = array();
if (!empty($cids) || !empty($selectedList)) {
if (!empty($cids)) {
$_SESSION['acymailing']['exportusers'] = $cids;
} else {
$_SESSION['acymailing']['exportlist'] = $selectedList;
}
$this->setRedirect(acymailing_completeLink(($app->isAdmin() ? '' : 'front') . 'data&task=export&sessionvalues=1', false, true));
} else {
$this->setRedirect(acymailing_completeLink(($app->isAdmin() ? '' : 'front') . 'data&task=export', false, true));
}
}
示例11: display
function display()
{
echo '<div ' . (empty($this->topfixed) ? '' : 'id="acymenu_top"') . ' class="acytoolbarmenu donotprint ' . (empty($this->topfixed) ? '' : 'acyaffix-top ') . $this->htmlclass . '" >';
if (!empty($this->title)) {
$title = htmlspecialchars($this->title, ENT_COMPAT, 'UTF-8');
if (!empty($this->titleLink)) {
$title = '<a style="color:white;" href="' . acymailing_completeLink($this->titleLink) . '">' . $title . '</a>';
}
echo '<span class="acytoolbartitle">' . $title . '</span>';
}
echo '<div class="acytoolbarmenu_menu">';
echo implode(' ', $this->buttons);
echo '</div></div>';
$types = array('acymessagesuccess' => 'success', 'acymessageinfo' => 'info', 'acymessagewarning' => 'warning', 'acymessageerror' => 'error', 'acymessagenotice' => 'notice', 'acymessagemessage' => 'message');
foreach ($types as $key => $type) {
if (empty($_SESSION[$key])) {
continue;
}
acymailing_display($_SESSION[$key], $type);
unset($_SESSION[$key]);
}
}
示例12: listing
function listing()
{
$app = JFactory::getApplication();
$pageInfo = new stdClass();
$pageInfo->filter = new stdClass();
$pageInfo->filter->order = new stdClass();
$pageInfo->limit = new stdClass();
$pageInfo->elements = new stdClass();
$config = acymailing_config();
$paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
$pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'a.mailid', 'cmd');
$pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
$pageInfo->search = $app->getUserStateFromRequest($paramBase . ".search", 'search', '', 'string');
$pageInfo->search = JString::strtolower($pageInfo->search);
$selectedList = $app->getUserStateFromRequest($paramBase . "filter_list", 'filter_list', 0, 'int');
$selectedCreator = $app->getUserStateFromRequest($paramBase . "filter_creator", 'filter_creator', 0, 'int');
$pageInfo->limit->value = $app->getUserStateFromRequest($paramBase . '.list_limit', 'limit', $app->getCfg('list_limit'), 'int');
$pageInfo->limit->start = $app->getUserStateFromRequest($paramBase . '.limitstart', 'limitstart', 0, 'int');
$database = JFactory::getDBO();
$searchMap = array('a.mailid', 'a.alias', 'a.subject', 'a.fromname', 'a.fromemail', 'a.replyname', 'a.replyemail', 'a.userid', 'b.name', 'b.username', 'b.email');
$filters = array();
if (!empty($pageInfo->search)) {
$searchVal = '\'%' . acymailing_getEscaped($pageInfo->search, true) . '%\'';
$filters[] = implode(" LIKE {$searchVal} OR ", $searchMap) . " LIKE {$searchVal}";
}
$filters[] = 'a.type = \'' . $this->type . '\'';
if (!empty($selectedList)) {
$filters[] = 'c.listid = ' . $selectedList;
}
if (!empty($selectedCreator)) {
$filters[] = 'a.userid = ' . $selectedCreator;
}
$selection = array_merge($searchMap, array('a.created', 'a.frequency', 'a.senddate', 'a.published', 'a.type', 'a.visible'));
if (empty($selectedList)) {
$query = 'SELECT ' . implode(',', $selection) . ' FROM ' . acymailing_table('mail') . ' as a';
$queryCount = 'SELECT COUNT(a.mailid) FROM ' . acymailing_table('mail') . ' as a';
} else {
$query = 'SELECT ' . implode(',', $selection) . ' FROM ' . acymailing_table('listmail') . ' as c';
$query .= ' JOIN ' . acymailing_table('mail') . ' as a on a.mailid = c.mailid ';
$queryCount = 'SELECT COUNT(c.mailid) FROM ' . acymailing_table('listmail') . ' as c';
$queryCount .= ' JOIN ' . acymailing_table('mail') . ' as a on a.mailid = c.mailid ';
}
$query .= ' LEFT JOIN ' . acymailing_table('users', false) . ' as b on a.userid = b.id ';
$query .= ' WHERE (' . implode(') AND (', $filters) . ')';
if (!empty($pageInfo->filter->order->value)) {
$query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
}
if (count($filters) > 1) {
$queryCount .= ' LEFT JOIN ' . acymailing_table('users', false) . ' as b on a.userid = b.id ';
}
$queryCount .= ' WHERE (' . implode(') AND (', $filters) . ')';
$database->setQuery($query, $pageInfo->limit->start, $pageInfo->limit->value);
$rows = $database->loadObjectList();
if (!empty($pageInfo->search)) {
$rows = acymailing_search($pageInfo->search, $rows);
}
$database->setQuery($queryCount);
$pageInfo->elements->total = $database->loadResult();
$pageInfo->elements->page = count($rows);
jimport('joomla.html.pagination');
$pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
acymailing_setTitle(JText::_($this->nameListing), $this->icon, $this->ctrl);
$bar = JToolBar::getInstance('toolbar');
$buttonPreview = JText::_('ACY_PREVIEW');
if ($this->type == 'autonews') {
JToolBarHelper::custom('generate', 'process', '', JText::_('GENERATE'), false);
} elseif ($this->type == 'news') {
$buttonPreview .= ' / ' . JText::_('SEND');
}
JToolBarHelper::custom('preview', 'acypreview', '', $buttonPreview, true);
JToolBarHelper::divider();
JToolBarHelper::addNew();
JToolBarHelper::editList();
if (acymailing_isAllowed($config->get('acl_' . $this->aclCat . '_delete', 'all'))) {
JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
}
JToolBarHelper::spacer();
JToolBarHelper::custom('copy', 'copy.png', 'copy.png', JText::_('ACY_COPY'));
JToolBarHelper::divider();
$bar->appendButton('Pophelp', $this->doc);
if (acymailing_isAllowed($config->get('acl_cpanel_manage', 'all'))) {
$bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
}
$filters = new stdClass();
$listmailType = acymailing_get('type.listsmail');
$listmailType->type = $this->type;
$mailcreatorType = acymailing_get('type.mailcreator');
$mailcreatorType->type = $this->type;
$filters->list = $listmailType->display('filter_list', $selectedList);
$filters->creator = $mailcreatorType->display('filter_creator', $selectedCreator);
$this->assignRef('filters', $filters);
$toggleClass = acymailing_get('helper.toggle');
$this->assignRef('toggleClass', $toggleClass);
$this->assignRef('rows', $rows);
$this->assignRef('pageInfo', $pageInfo);
$this->assignRef('pagination', $pagination);
$delay = acymailing_get('type.delaydisp');
$this->assignRef('delay', $delay);
$this->assignRef('config', $config);
}
示例13: view
function view(){
global $Itemid;
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$this->addFeed();
$pathway = $app->getPathway();
$my = JFactory::getUser();
$frontEndManagement = false;
$listid = acymailing_getCID('listid');
$values = new stdClass();
$values->suffix = '';
$jsite = JFactory::getApplication('site');
$menus = $jsite->getMenu();
$menu = $menus->getActive();
if(empty($menu) AND !empty($Itemid)){
$menus->setActive($Itemid);
$menu = $menus->getItem($Itemid);
}
if (is_object( $menu )) {
jimport('joomla.html.parameter');
$menuparams = new acyParameter( $menu->params );
}
if(!empty($menuparams)){
$values->suffix = $menuparams->get('pageclass_sfx','');
}
if(empty($listid) && !empty($menuparams)){
$listid = $menuparams->get('listid');
if ($menuparams->get('menu-meta_description')) $document->setDescription($menuparams->get('menu-meta_description'));
if ($menuparams->get('menu-meta_keywords')) $document->setMetadata('keywords',$menuparams->get('menu-meta_keywords'));
if ($menuparams->get('robots')) $document->setMetadata('robots',$menuparams->get('robots'));
if ($menuparams->get('page_title')) acymailing_setPageTitle($menuparams->get('page_title'));
}
$config = acymailing_config();
$indexFollow = $config->get('indexFollow', '');
$tagIndFol = array();
if(strpos($indexFollow, 'noindex') !== false) $tagIndFol[] = 'noindex';
if(strpos($indexFollow, 'nofollow') !== false) $tagIndFol[] = 'nofollow';
if(!empty($tagIndFol)) $document->setMetadata('robots',implode(',',$tagIndFol));
if(!empty($listid)){
$listClass = acymailing_get('class.list');
$oneList = $listClass->get($listid);
if(!empty($oneList->visible) AND $oneList->published AND (empty($menuparams) || !$menuparams->get('listid'))){
$pathway->addItem($oneList->name,acymailing_completeLink('archive&listid='.$oneList->listid.':'.$oneList->alias));
}
if(!empty($oneList->listid) AND acymailing_level(3)){
if(!empty($my->id) AND (int)$my->id == (int)$oneList->userid){
$frontEndManagement = true;
}
if(!empty($my->id)){
if($oneList->access_manage == 'all' OR acymailing_isAllowed($oneList->access_manage)){
$frontEndManagement = true;
}
}
}
}
$mailid = JRequest::getString('mailid','nomailid');
if(empty($mailid)){
die('This is a Newsletter-template... and you can not access the online version of a Newsletter-template!<br />Please <a href="administrator/index.php?option=com_acymailing&ctrl=newsletter&task=edit" >create a Newsletter</a> using your template and then try again your "view it online" link!');
exit;
}
if($mailid == 'nomailid'){
$db = JFactory::getDBO();
$query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid';
$query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1 AND m.`type` = "news" AND l.`type` = "list"';
if(!empty($listid)) $query .= ' AND l.`listid` = '.(int) $listid;
$query .= ' ORDER BY m.`senddate` DESC, m.`mailid` DESC LIMIT 1';
$db->setQuery($query);
$mailid = $db->loadResult();
}
$mailid = intval($mailid);
if(empty($mailid)) return JError::raiseError( 404, 'Newsletter not found');
$access_sub = true;
if(acymailing_level(3)){
$listmail = acymailing_get('class.listmail');
$allLists = $listmail->getLists($mailid);
$access_sub = false;
if(!empty($allLists)){
foreach($allLists as $alist){
if(empty($alist->mailid)) continue;
if(!$alist->published OR !$alist->visible OR $alist->access_sub == 'none') continue;
if(acymailing_isAllowed($alist->access_sub)){
//.........这里部分代码省略.........
示例14: acymailing_completeLink
<a href="<?php
echo acymailing_completeLink('stats&task=detaillisting&filter_status=failed&filter_mail=' . $row->mailid);
?>
">
<?php
echo $row->fail;
?>
</a>
</td>
<?php
if (acymailing_level(3)) {
?>
<td align="center" style="text-align:center" >
<?php
if ($row->type != 'followup') {
echo '<a class="modal" href="' . acymailing_completeLink('stats&task=mailinglist&mailid=' . $row->mailid, true) . '" rel="{handler: \'iframe\', size: {x: 800, y: 590}}"><img src="' . ACYMAILING_IMAGES . 'icons/icon-16-stats.png"/></a>';
}
?>
</td>
<?php
}
?>
<td align="center" style="text-align:center" >
<?php
echo $row->mailid;
?>
</td>
</tr>
<?php
$k = 1 - $k;
}
示例15: form
//.........这里部分代码省略.........
}
$js .= "while(!document.getElementById('" . $datatype . "type{$num}')){" . $jsFunction . "();}\r\n\t\t\t\t\t\tdocument.getElementById('" . $datatype . "type{$num}').value= '{$oneType}';\r\n\t\t\t\t\t\tupdate" . ucfirst($datatype) . "({$num});";
if (empty($filter->{$datatype}[$num][$oneType])) {
continue;
}
foreach ($filter->{$datatype}[$num][$oneType] as $key => $value) {
if (is_array($value)) {
$js .= "try{";
foreach ($value as $subkey => $subval) {
$js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $subval)) . "';";
$js .= "if(document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].type && document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].type == 'checkbox'){ document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}][{$subkey}]'].checked = 'checked'; }";
}
$js .= "}catch(e){}";
}
$myVal = is_array($value) ? implode(',', $value) : $value;
$js .= "try{";
$js .= "document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].value = '" . addslashes(str_replace(array("\n", "\r"), ' ', $myVal)) . "';";
$js .= "if(document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].type && document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].type == 'checkbox'){ document.adminForm.elements['" . $datatype . "[{$num}][{$oneType}][{$key}]'].checked = 'checked'; }";
$js .= "}catch(e){}";
}
$js .= "\n" . " if(typeof(onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . ") == 'function'){\r\n\t\t\t\t\ttry{ onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . "({$num}); }catch(e){alert('Error in the onAcyDisplay" . ucfirst($datatype) . "_" . $oneType . " function : '+e); }\r\n\t\t\t\t}";
if ($datatype == 'filter') {
$js .= " countresults({$num});";
}
}
}
$listid = JRequest::getInt('listid');
if (!empty($listid)) {
$js .= "document.getElementById('actiontype0').value = 'list'; updateAction(0); document.adminForm.elements['action[0][list][selectedlist]'].value = '" . $listid . "';";
}
$doc->addScriptDeclaration("window.addEvent('domready', function(){ {$js} });");
$triggers = array();
$triggers['daycron'] = JText::_('AUTO_CRON_FILTER');
$nextDate = $config->get('cron_plugins_next');
$listHours = array();
$listMinutess = array();
for ($i = 0; $i < 24; $i++) {
$listHours[] = JHTML::_('select.option', $i, $i < 10 ? '0' . $i : $i);
}
$hours = JHTML::_('select.genericlist', $listHours, 'triggerhours', 'class="inputbox" size="1" style="width:60px;"', 'value', 'text', acymailing_getDate($nextDate, 'H'));
for ($i = 0; $i < 60; $i += 5) {
$listMinutess[] = JHTML::_('select.option', $i, $i < 10 ? '0' . $i : $i);
}
$defaultMin = floor(acymailing_getDate($nextDate, 'i') / 5) * 5;
$minutes = JHTML::_('select.genericlist', $listMinutess, 'triggerminutes', 'class="inputbox" size="1" style="width:60px;"', 'value', 'text', $defaultMin);
$this->assign('hours', $hours);
$this->assign('minutes', $minutes);
$this->assign('nextDate', !empty($nextDate) ? ' (' . JText::_('NEXT_RUN') . ' : ' . acymailing_getDate($nextDate, '%d %B %Y %H:%M') . ')' : '');
$triggers['allcron'] = JText::_('ACY_EACH_TIME');
$triggers['subcreate'] = JText::_('ON_USER_CREATE');
$triggers['subchange'] = JText::_('ON_USER_CHANGE');
$this->dispatcher->trigger('onAcyDisplayTriggers', array(&$triggers));
$name = empty($filter->name) ? '' : ' : ' . $filter->name;
if (JRequest::getCmd('tmpl', '') != 'component') {
$acyToolbar = acymailing::get('helper.toolbar');
$acyToolbar->custom('filterDisplayUsers', JText::_('FILTER_VIEW_USERS'), 'user', false, '');
$acyToolbar->custom('process', JText::_('PROCESS'), 'process', false, '');
$acyToolbar->divider();
if (acymailing_level(3)) {
$acyToolbar->save();
if (!empty($filter->filid)) {
$acyToolbar->link(acymailing_completeLink('filter&task=edit&filid=0'), JText::_('ACY_NEW'), 'new');
}
}
$acyToolbar->link(acymailing_completeLink('dashboard'), JText::_('ACY_CLOSE'), 'cancel');
$acyToolbar->divider();
$acyToolbar->help('filter');
$acyToolbar->setTitle(JText::_('ACY_MASS_ACTIONS') . $name, 'filter&task=edit&filid=' . $filid);
$acyToolbar->display();
} else {
acymailing_setPageTitle(JText::_('ACY_MASS_ACTIONS') . $name);
}
$subid = JRequest::getString('subid');
if (!empty($subid)) {
$subArray = explode(',', trim($subid, ','));
JArrayHelper::toInteger($subArray);
$db->setQuery('SELECT `name`,`email` FROM `#__acymailing_subscriber` WHERE `subid` IN (' . implode(',', $subArray) . ')');
$users = $db->loadObjectList();
if (!empty($users)) {
$this->assignRef('users', $users);
$this->assignRef('subid', $subid);
}
}
$this->assignRef('typevaluesFilters', $typevaluesFilters);
$this->assignRef('typevaluesActions', $typevaluesActions);
$this->assignRef('outputFilters', $outputFilters);
$this->assignRef('outputActions', $outputActions);
$this->assignRef('filter', $filter);
$this->assignRef('triggers', $triggers);
if (JRequest::getCmd('tmpl') == 'component') {
$doc->addStyleSheet(ACYMAILING_CSS . 'frontendedition.css?v=' . filemtime(ACYMAILING_MEDIA . 'css' . DS . 'frontendedition.css'));
}
if (acymailing_level(3) and JRequest::getCmd('tmpl') != 'component') {
$db->setQuery('SELECT * FROM #__acymailing_filter ORDER BY `published` DESC, `filid` DESC');
$filters = $db->loadObjectList();
$toggleClass = acymailing_get('helper.toggle');
$this->assignRef('toggleClass', $toggleClass);
$this->assignRef('filters', $filters);
}
}