| Current Path : /proc/thread-self/root/var/tmp/ |
| Current File : //proc/thread-self/root/var/tmp/phpCiRRbn |
home/digilove/public_html/components/com_marketplace/views/follow/view.html.php 0000644 00000003562 15234610102 0024200 0 ustar 00 <?php
/**
* Marketplace - Component Marketplace
* ******************************************************************
*
* PHP version 7.0
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
* ******************************************************************
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
if (!class_exists('MarketplaceHelper')) {
include JPATH_ADMINISTRATOR."components/com_marketplace/helpers.marketplace.php";
}
/**
* MarketplaceViewFollow class of JViewLegacy
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link Technical Support: webkul.uvdesk.com
*/
class MarketplaceViewFollow extends JViewLegacy
{
/**
* This is display function
*
* @param [type] $tpl var
*
* @return void
*/
public function display($tpl = null)
{
global $option;
$jinput=JFactory::getApplication()->input;
$method=$jinput->getMethod();
$sel_id=$jinput->get('sel_id', 0, 'INT');
if (!$sel_id) {
$sel_id=$jinput->get('seller_id', 0, 'INT');
}
$uid=JFactory::getUser()->id;
$isseller=MarketplaceHelper::checkseller($sel_id);
if ($sel_id && isset($isseller)) {
parent::display($tpl);
} else {
JFactory::getApplication()->enqueueMessage(
JText::_('SOMETHING_IS_WRONG'),
'error'
);
}
}
}
home/digilove/public_html/components/com_weblinks/views/category/view.html.php 0000644 00000005125 15235135637 0024056 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* HTML View class for the WebLinks component
*
* @since 1.5
*/
class WeblinksViewCategory extends JViewCategory
{
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise a Error object.
*/
public function display($tpl = null)
{
parent::commonCategoryDisplay();
// Prepare the data.
// Compute the weblink slug & link url.
foreach ($this->items as $item)
{
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
if ($item->params->get('count_clicks', $this->params->get('count_clicks')) == 1)
{
$item->link = JRoute::_('index.php?option=com_weblinks&task=weblink.go&id=' . $item->id);
}
else
{
$item->link = $item->url;
}
$temp = new JRegistry;
$temp->loadString($item->params);
$item->params = clone($this->params);
$item->params->merge($temp);
}
return parent::display($tpl);
}
/**
* Prepares the document
*
* @return void
*/
protected function prepareDocument()
{
parent::prepareDocument();
$app = JFactory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = $menus->getActive();
if ($menu)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
}
else
{
$this->params->def('page_heading', JText::_('COM_WEBLINKS_DEFAULT_PAGE_TITLE'));
}
$id = (int) @$menu->query['id'];
if ($menu && ($menu->query['option'] != 'com_weblinks' || $id != $this->category->id))
{
$this->params->set('page_subheading', $this->category->title);
$path = array(array('title' => $this->category->title, 'link' => ''));
$category = $this->category->getParent();
while (($menu->query['option'] != 'com_weblinks' || $id != $category->id) && $category->id > 1)
{
$path[] = array('title' => $category->title, 'link' => WeblinksHelperRoute::getCategoryRoute($category->id));
$category = $category->getParent();
}
$path = array_reverse($path);
foreach ($path as $item)
{
$pathway->addItem($item['title'], $item['link']);
}
}
parent::addFeed();
}
}
home/digilove/public_html/components/com_marketplace/views/login/view.html.php 0000644 00000002246 15235160130 0024006 0 ustar 00 <?php
/**
* Marketplace - Component Marketplace
* ******************************************************************
*
* PHP version 7.0
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
* ******************************************************************
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
/**
* MarketplaceViewLogin class
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link Technical Support: webkul.uvdesk.com
*/
class MarketplaceViewLogin extends JViewLegacy
{
/**
* This is display function
*
* @param [type] $tpl var
*
* @return void
*/
public function display($tpl = null)
{
parent::display($tpl);
}
}
home/digilove/public_html/components/com_marketplace/views/sellerprofile/view.html.php 0000644 00000005256 15235177412 0025564 0 ustar 00 <?php
/**
* Marketplace - Component Marketplace
* ******************************************************************
*
* PHP version 7.0
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
* ******************************************************************
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
if (!class_exists('VmConfig')) {
include JPATH_ADMINISTRATOR.'/components/com_virtuemart/helpers/config.php';
}
if (!class_exists('VmConfig')) {
include JPATH_ADMINISTRATOR.
'/components/com_virtuemart/helpers/currncydisplay.php';
}
VmConfig::loadConfig();
if (!class_exists('MarketplaceHelper')) {
include JPATH_ADMINISTRATOR."components/com_marketplace/helpers.marketplace.php";
}
/**
* MarketplaceViewSellerprofile class
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link Technical Support: webkul.uvdesk.com
*/
class MarketplaceViewSellerprofile extends JViewLegacy
{
/**
* This is display function
*
* @param [type] $tpl view
*
* @return void
*/
function display($tpl = null)
{
global $option;
$model=$this->getModel();
$user_id=JFactory::getUser()->id;
$lang_tag=VmConfig::$vmlang;
$jinput=JFactory::getApplication()->input;
$method=$jinput->getMethod();
$seller_id=$jinput->get('seller_id', 0, 'INT');
/*Trigger to add tab and its data*/
JPluginHelper::importPlugin('system');
$dispatcher =JDispatcher::getInstance();
$addonData=$dispatcher->trigger('onSellerProfileRender', array($seller_id));
$this->assignRef('addonData', $addonData);
/*Trigger to add tab and its data*/
if (!$seller_id) {
$seller_id=$user_id;
}
$isseller=MarketplaceHelper::checkSeller($seller_id);
if ($seller_id > 0) {
$id=$seller_id;
} elseif (!strlen($seller_id) && isset($isseller)) {
$id=$user_id;
}
if (isset($id)&&isset($isseller)) {
$this->assignRef('seller_id', $id);
parent::display($tpl);
} else {
$app=JFactory::getApplication();
$app->enqueueMessage(JText::_('NO_SELLER_ID'), 'error');
}
}
}
home/digilove/public_html/components/com_marketplace/views/asktoadmin/view.html.php 0000644 00000003234 15235221015 0025026 0 ustar 00 <?php
/**
* Marketplace - Component Marketplace
* ******************************************************************
*
* PHP version 7.0
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
* ******************************************************************
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
if (!class_exists('MarketplaceHelper')) {
include JPATH_ADMINISTRATOR."components/com_marketplace/helpers.marketplace.php";
}
/**
* MarketplaceViewAsktoadmin class
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link Technical Support: webkul.uvdesk.com
*/
class MarketplaceViewAsktoadmin extends JViewLegacy
{
/**
* This is display function
*
* @param boolean $cachable view var
* @param [type] $urlparams view var
*
* @return void
*/
public function display($cachable = false, $urlparams = Array())
{
global $option;
$userdetails = JFactory::getUser();
$app = JFactory::getApplication();
if (MarketplaceHelper::checkSeller($userdetails->id)) {
parent::display();
} else {
$app->enqueueMessage(JText::_("PLZ_LOG_ASK_TO_ADMIN"), 'error');
}
}
}
home/digilove/public_html/components/com_acymailing/views/lists/view.html.php 0000644 00000005453 15235305103 0023665 0 ustar 00 <?php
/**
* @package AcyMailing for Joomla!
* @version 5.5.0
* @author acyba.com
* @copyright (C) 2009-2016 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 listsViewLists extends acymailingView{
function display($tpl = null){
$function = $this->getLayout();
if(method_exists($this, $function)) $this->$function();
parent::display($tpl);
}
function listing(){
$app = JFactory::getApplication();
global $Itemid;
$config = acymailing_config();
$jsite = JFactory::getApplication('site');
$menus = $jsite->getMenu();
$menu = $menus->getActive();
if(empty($menu) AND !empty($Itemid)){
$menus->setActive($Itemid);
$menu = $menus->getItem($Itemid);
}
if(empty($menu)) {
acymailing_enqueueMessage(JText::_('ACY_NOTALLOWED'));
$app->redirect('index.php');
}
$selectedLists = 'all';
if(is_object($menu)){
jimport('joomla.html.parameter');
$menuparams = new acyParameter($menu->params);
$this->assign('listsintrotext', $menuparams->get('listsintrotext'));
$this->assign('listsfinaltext', $menuparams->get('listsfinaltext'));
$selectedLists = $menuparams->get('lists', 'all');
$document = JFactory::getDocument();
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'));
}
if(empty($menuparams)){
$pathway = $app->getPathway();
$pathway->addItem(JText::_('MAILING_LISTS'));
}
$document = JFactory::getDocument();
$link = '&format=feed&limitstart=';
if($config->get('acyrss_format') == 'rss' || $config->get('acyrss_format') == 'both'){
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
$document->addHeadLink(JRoute::_($link.'&type=rss'), 'alternate', 'rel', $attribs);
}
if($config->get('acyrss_format') == 'atom' || $config->get('acyrss_format') == 'both'){
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
$document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
}
$listsClass = acymailing_get('class.list');
$allLists = $listsClass->getLists('', $selectedLists);
if(acymailing_level(1)){
$allLists = $listsClass->onlyCurrentLanguage($allLists);
}
$myItem = empty($Itemid) ? '' : '&Itemid='.$Itemid;
$this->assignRef('rows', $allLists);
$this->assignRef('item', $myItem);
}
}
home/digilove/public_html/components/com_acymailing/views/user/view.html.php 0000644 00000020701 15235305144 0023503 0 ustar 00 <?php
/**
* @package AcyMailing for Joomla!
* @version 5.5.0
* @author acyba.com
* @copyright (C) 2009-2016 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 UserViewUser extends acymailingView{
function display($tpl = null){
$function = $this->getLayout();
if(method_exists($this, $function)) $this->$function();
parent::display($tpl);
}
function modify(){
global $Itemid;
$app = JFactory::getApplication();
$pathway = $app->getPathway();
$document = JFactory::getDocument();
$values = new stdClass();
$values->show_page_heading = 0;
$listsClass = acymailing_get('class.list');
$subscriberClass = acymailing_get('class.subscriber');
$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)){
$this->assign('introtext', $menuparams->get('introtext'));
$this->assign('finaltext', $menuparams->get('finaltext'));
$this->assign('dropdown', $menuparams->get('dropdown'));
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'));
$values->suffix = $menuparams->get('pageclass_sfx', '');
$values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title');
$values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading', 0) : $menuparams->get('show_page_title', 0);
}
}
$subscriber = $subscriberClass->identify(true);
if(empty($subscriber)){
$subscription = $listsClass->getLists('listid');
$subscriber = new stdClass();
$subscriber->html = 1;
$subscriber->subid = 0;
$subscriber->key = 0;
if(!empty($subscription)){
foreach($subscription as $id => $onesub){
$subscription[$id]->status = 1;
if(!empty($menuparams) && strtolower($menuparams->get('listschecked', 'all')) != 'all' && !in_array($id, explode(',', $menuparams->get('listschecked', 'all')))){
$subscription[$id]->status = 0;
}
}
}
$pathway->addItem(JText::_('SUBSCRIPTION'));
if(empty($menu)) acymailing_setPageTitle(JText::_('SUBSCRIPTION'));
}else{
$subscription = $subscriberClass->getSubscription($subscriber->subid, 'listid');
$pathway->addItem(JText::_('MODIFY_SUBSCRIPTION'));
if(empty($menu)) acymailing_setPageTitle(JText::_('MODIFY_SUBSCRIPTION'));
}
acymailing_initJSStrings();
if(!empty($menuparams) AND strtolower($menuparams->get('lists', 'all')) != 'all'){
$visibleLists = strtolower($menuparams->get('lists', 'all'));
if($visibleLists == 'none'){
$subscription = array();
}else{
$newSubscription = array();
$visiblesListsArray = explode(',', $visibleLists);
foreach($subscription as $id => $onesub){
if(in_array($id, $visiblesListsArray)) $newSubscription[$id] = $onesub;
}
$subscription = $newSubscription;
}
}
if(!acymailing_level(3)){
if(!empty($menuparams) && strtolower($menuparams->get('customfields', 'default')) != 'default'){
$fieldsToDisplay = strtolower($menuparams->get('customfields', 'default'));
$this->assignRef('fieldsToDisplay', $fieldsToDisplay);
}else{
$this->assign('fieldsToDisplay', 'default');
}
}
$hiddenLists = '';
if(!empty($menuparams)){
$hiddenLists = trim($menuparams->get('hiddenlists', 'None'));
if(empty($subscriber)){
$allLists = $listsClass->getLists('listid');
}else $allLists = $subscriberClass->getSubscription($subscriber->subid, 'listid');
$hiddenListsArray = array();
if(strpos($hiddenLists, ',') || is_numeric($hiddenLists)){
$allhiddenlists = explode(',', $hiddenLists);
foreach($allLists as $oneList){
if(!$oneList->published || !in_array($oneList->listid, $allhiddenlists)) continue;
$hiddenListsArray[] = $oneList->listid;
unset($subscription[$oneList->listid]);
}
}elseif(strtolower($hiddenLists) == 'all'){
$subscription = array();
foreach($allLists as $oneList){
if(!empty($oneList->published)) $hiddenListsArray[] = $oneList->listid;
}
}
$hiddenLists = implode(',', $hiddenListsArray);
}
$displayLists = false;
foreach($subscription as $oneSub){
if(!empty($oneSub->published) AND $oneSub->visible){
$displayLists = true;
break;
}
}
$this->assignRef('hiddenlists', $hiddenLists);
$this->assignRef('values', $values);
$this->assign('status', acymailing_get('type.festatus'));
$this->assignRef('subscription', $subscription);
$this->assignRef('subscriber', $subscriber);
$this->assignRef('displayLists', $displayLists);
$this->assign('config', acymailing_config());
}
function saveunsub(){
$subscriberClass = acymailing_get('class.subscriber');
$subscriber = $subscriberClass->identify();
$this->assignRef('subscriber', $subscriber);
$listid = JRequest::getInt('listid');
if(!empty($listid)){
$listClass = acymailing_get('class.list');
$mylist = $listClass->get($listid);
$this->assignRef('list', $mylist);
}
}
function unsub(){
$subscriberClass = acymailing_get('class.subscriber');
$config = acymailing_config();
$this->assignRef('config', $config);
$subscriber = $subscriberClass->identify();
$this->assignRef('subscriber', $subscriber);
$mailid = JRequest::getInt('mailid');
$this->assignRef('mailid', $mailid);
$db = JFactory::GetDBO();
$query = 'SELECT l.listid, l.name FROM '.acymailing_table('list').' as l';
$query .= ' JOIN '.acymailing_table('listsub').' AS ls ON ls.listid = l.listid AND ls.subid = '.JRequest::getInt('subid');
$query .= ' WHERE l.type = \'list\' AND (ls.unsubdate < ls.subdate OR ls.unsubdate IS NULL) AND l.visible = 1 AND l.published = 1';
$query .= ' ORDER BY l.ordering ASC';
$db->setQuery($query);
$otherSubscriptions = $db->loadObjectList();
$query = 'SELECT lm.listid FROM '.acymailing_table('mail').' AS m INNER JOIN '.acymailing_table('listmail').' AS lm ON m.mailid = lm.mailid WHERE m.mailid = '.JRequest::getInt('mailid');
$db->setQuery($query);
$listsToDeny = $db->loadObjectList();
if(!empty($otherSubscriptions)){
$i = 0;
foreach($otherSubscriptions as $anotherSubscription){
foreach($listsToDeny as $oneListToDeny){
if($anotherSubscription->listid == $oneListToDeny->listid){
unset($otherSubscriptions[$i]);
continue;
}
}
$i++;
}
}
$this->assignRef('otherSubscriptions', $otherSubscriptions);
$replace = array();
$replace['{list:name}'] = '';
foreach($subscriber as $oneProp => $oneVal){
$replace['{user:'.$oneProp.'}'] = $oneVal;
$replace['{user:'.$oneProp.' | ucwords}'] = ucwords($oneVal);
}
if(!empty($mailid)){
$classListmail = acymailing_get('class.listmail');
$lists = $classListmail->getLists($mailid);
$this->assignRef('lists', $lists);
if(!empty($lists)){
$oneList = reset($lists);
foreach($oneList as $oneProp => $oneVal){
$replace['{list:'.$oneProp.'}'] = $oneVal;
}
}
$mailClass = acymailing_get('class.mail');
$news = $mailClass->get($mailid);
if(!empty($news)){
foreach($news as $oneProp => $oneVal){
if(!is_string($oneVal)) continue;
$replace['{mail:'.$oneProp.'}'] = $oneVal;
}
}
}
$intro = str_replace('UNSUB_INTRO', JText::_('UNSUB_INTRO'), $config->get('unsub_intro', 'UNSUB_INTRO'));
$intro = ' <div class="unsubintro" > '.nl2br(str_replace(array_keys($replace), $replace, $intro)).'</div> ';
$this->assignRef('intro', $intro);
$this->assignRef('replace', $replace);
$unsubtext = str_replace(array_keys($replace), $replace, JText::_('UNSUBSCRIBE'));
$app = JFactory::getApplication();
$pathway = $app->getPathway();
$pathway->addItem($unsubtext);
acymailing_setPageTitle($unsubtext);
}
}
home/digilove/public_html/components/com_acymailing/views/archive/view.html.php 0000644 00000050347 15235305500 0024153 0 ustar 00 <?php
/**
* @package AcyMailing for Joomla!
* @version 5.5.0
* @author acyba.com
* @copyright (C) 2009-2016 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 archiveViewArchive extends acymailingView{
function display($tpl = null){
$function = $this->getLayout();
if(method_exists($this, $function)) $this->$function();
parent::display($tpl);
}
function forward(){
$my = JFactory::getUser();
$subkeys = JRequest::getString('subid', JRequest::getString('sub'));
if(!empty($subkeys)){
$db = JFactory::getDBO();
$subid = intval(substr($subkeys, 0, strpos($subkeys, '-')));
$subkey = substr($subkeys, strpos($subkeys, '-') + 1);
$db->setQuery('SELECT * FROM '.acymailing_table('subscriber').' WHERE `subid` = '.intval($subid).' AND `key` = '.$db->Quote($subkey).' LIMIT 1');
$receiver = $db->loadObject();
}
if(empty($receiver) AND !empty($my->email)){
$userClass = acymailing_get('class.subscriber');
$receiver = $userClass->get($my->email);
}
if(empty($receiver)){
$receiver = new stdClass();
$receiver->name = '';
$receiver->email = '';
}
$this->assignRef('senderName', $receiver->name);
$this->assignRef('senderMail', $receiver->email);
$config = acymailing_config();
$this->assignRef('config', $config);
$js = 'var numForwarders = 1;function addLine(){
if(numForwarders > 4) return;
var myTable = window.document.getElementById("friend_table");
var line1 = document.createElement("tr");
var tdname = document.createElement("td");
var itdname = document.createElement("td");
var line2 = document.createElement("tr");
var tdemail = document.createElement("td");
var itdemail = document.createElement("td");
var inputName = document.createElement("input");
inputName.type = \'text\';
inputName.name = \'forwardusers[\'+numForwarders+\'][name]\';
inputName.style.width = "200px";
var inputEmail = document.createElement("input");
inputEmail.type = \'text\';
inputEmail.name = \'forwardusers[\'+numForwarders+\'][email]\';
inputEmail.style.width = "200px";
var nameLabel = document.createElement("label");
nameLabel.innerHTML="'.JText::_('FRIEND_NAME', true).'";
var emailLabel = document.createElement("label");
emailLabel.innerHTML="'.JText::_('FRIEND_EMAIL', true).'";
tdname.appendChild(nameLabel);
itdname.appendChild(inputName);
line1.appendChild(tdname);
line1.appendChild(itdname);
myTable.appendChild(line1);
tdemail.appendChild(emailLabel);
itdemail.appendChild(inputEmail);
line2.appendChild(tdemail);
line2.appendChild(itdemail);
myTable.appendChild(line2);
numForwarders++;
}
';
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
return $this->view();
}
private function addFeed(){
$config = acymailing_config();
$document = JFactory::getDocument();
$link = '&format=feed&limitstart=';
if($config->get('acyrss_format') == 'rss' || $config->get('acyrss_format') == 'both'){
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
$document->addHeadLink(JRoute::_($link.'&type=rss'), 'alternate', 'rel', $attribs);
}
if($config->get('acyrss_format') == 'atom' || $config->get('acyrss_format') == 'both'){
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
$document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
}
}
function listing(){
global $Itemid;
$app = JFactory::getApplication();
$my = JFactory::getUser();
$values = new stdClass();
$jsite = JFactory::getApplication('site');
$menus = $jsite->getMenu();
$menu = $menus->getActive();
if(empty($menu) AND !empty($Itemid)){
$menus->setActive($Itemid);
$menu = $menus->getItem($Itemid);
}
$myItem = empty($Itemid) ? '' : '&Itemid='.$Itemid;
$this->assignRef('item', $myItem);
if(is_object($menu)){
jimport('joomla.html.parameter');
$menuparams = new acyParameter($menu->params);
}
$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->dir = $app->getUserStateFromRequest($paramBase.".ordering_dir", 'ordering_dir', 'DESC', 'word');
$pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase.".ordering", 'ordering', 'senddate', 'cmd');
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->limit->value = $app->getUserStateFromRequest($paramBase.'.list_limit', 'limit', $app->getCfg('list_limit'), 'int');
$pageInfo->limit->start = JRequest::getInt('limitstart', 0);
$listClass = acymailing_get('class.list');
$listid = acymailing_getCID('listid');
if(empty($listid) AND !empty($menuparams)){
$listid = $menuparams->get('listid');
}
if(empty($listid)){
$allLists = $listClass->getLists('listid');
}else{
$oneList = $listClass->get($listid);
if(empty($oneList->listid)) return JError::raiseError(404, 'Mailing List not found : '.$listid);
$allLists = array($oneList->listid => $oneList);
if($oneList->access_sub != 'all' && ($oneList->access_sub == 'none' || empty($my->id) || !acymailing_isAllowed($oneList->access_sub))) $allLists = array();
}
if(empty($allLists)){
if(empty($my->id)){
$usercomp = ACYMAILING_J16 ? 'com_users' : 'com_user';
$uri = JFactory::getURI();
$app->redirect('index.php?option='.$usercomp.'&view=login&return='.base64_encode($uri->toString()), JText::_('ACY_NOTALLOWED'));
}else{
$app->enqueueMessage(JText::_('ACY_NOTALLOWED'), 'error');
$app->redirect(acymailing_completeLink('lists', false, true));
}
return false;
}
$doc = JFactory::getDocument();
$db = JFactory::getDBO();
$pathway = $app->getPathway();
$config = acymailing_config();
if(!empty($menuparams)){
$values->suffix = $menuparams->get('pageclass_sfx', '');
$values->page_title = $menuparams->get('page_title');
$values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title');
$values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading', 1) : $menuparams->get('show_page_title', 1);
}else{
$values->suffix = '';
$values->show_page_heading = 1;
}
$values->show_description = $config->get('show_description', 1);
$values->show_senddate = $config->get('show_senddate', 1);
$values->show_receiveemail = $config->get('show_receiveemail', 0) && acymailing_level(1);
$values->filter = $config->get('show_filter', 1);
if(empty($values->page_title)) $values->page_title = (count($allLists) > 1 || empty($listid)) ? JText::_('NEWSLETTERS') : $allLists[$listid]->name;
if(empty($values->page_heading)) $values->page_heading = (count($allLists) > 1 || empty($listid)) ? JText::_('NEWSLETTERS') : $allLists[$listid]->name;
if(empty($menuparams)){
$pathway->addItem(JText::_('MAILING_LISTS'), acymailing_completeLink('lists'));
$pathway->addItem($values->page_title);
}elseif(!$menuparams->get('listid')){
$pathway->addItem($values->page_title);
}
acymailing_setPageTitle($values->page_title);
$this->addFeed();
$searchMap = array('a.mailid', 'a.subject', 'a.alias');
$filters = array();
if(!empty($pageInfo->search)){
$searchVal = '\'%'.acymailing_getEscaped($pageInfo->search, true).'%\'';
$filters[] = implode(" LIKE $searchVal OR ", $searchMap)." LIKE $searchVal";
}
$filters[] = 'a.type = \'news\'';
$noManageableLists = array();
foreach($allLists as &$oneList){
if(empty($my->id)) $noManageableLists[] = $oneList->listid;
if((int)$my->id == (int)$oneList->userid) continue;
if($oneList->access_manage == 'all' || acymailing_isAllowed($oneList->access_manage)) continue;
$noManageableLists[] = $oneList->listid;
}
$accessFilter = '';
$manageableLists = array_diff(array_keys($allLists), $noManageableLists);
if(!empty($manageableLists)) $accessFilter = 'c.listid IN ('.implode(',', $manageableLists).')';
if(!empty($noManageableLists)){
if(empty($accessFilter)){
$accessFilter = 'c.listid IN ('.implode(',', $noManageableLists).') AND a.published = 1 AND a.visible = 1';
}else $accessFilter .= ' OR (c.listid IN ('.implode(',', $noManageableLists).') AND a.published = 1 AND a.visible = 1)';
}
if(!empty($accessFilter)) $filters[] = $accessFilter;
if($config->get('open_popup', 1) || !empty($manageableLists)) JHTML::_('behavior.modal', 'a.modal');
$selection = array_merge($searchMap, array('a.senddate', 'a.created', 'a.visible', 'a.published', 'a.fromname', 'a.fromemail', 'a.replyname', 'a.replyemail', 'a.userid', 'a.summary', 'a.thumb', 'c.listid'));
$query = 'SELECT "" AS body, "" AS altbody, html AS sendHTML, '.implode(',', $selection);
$query .= ' FROM '.acymailing_table('listmail').' as c';
$query .= ' JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid ';
$query .= ' WHERE ('.implode(') AND (', $filters).')';
$query .= ' GROUP BY c.mailid';
$query .= ' ORDER BY a.'.acymailing_secureField($pageInfo->filter->order->value).' '.acymailing_secureField($pageInfo->filter->order->dir).', c.mailid DESC';
$db->setQuery($query, $pageInfo->limit->start, $pageInfo->limit->value);
$rows = $db->loadObjectList();
$pageInfo->elements->page = count($rows);
if($pageInfo->limit->value > $pageInfo->elements->page){
$pageInfo->elements->total = $pageInfo->limit->start + $pageInfo->elements->page;
}else{
$queryCount = 'SELECT COUNT(DISTINCT c.mailid) FROM '.acymailing_table('listmail').' as c';
$queryCount .= ' JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid ';
$queryCount .= ' WHERE ('.implode(') AND (', $filters).')';
$db->setQuery($queryCount);
$pageInfo->elements->total = $db->loadResult();
}
if(!empty($my->email)){
$userClass = acymailing_get('class.subscriber');
$receiver = $userClass->get($my->email);
}
if(empty($receiver)){
$receiver = new stdClass();
$receiver->name = JText::_('VISITOR');
}
JPluginHelper::importPlugin('acymailing');
$dispatcher = JDispatcher::getInstance();
foreach($rows as $mail){
if(strpos($mail->subject, "{") !== false){
$dispatcher->trigger('acymailing_replacetags', array(&$mail, false));
$dispatcher->trigger('acymailing_replaceusertags', array(&$mail, &$receiver, false));
}
}
jimport('joomla.html.pagination');
$pagination = new JPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value);
$js = 'function tableOrdering( order, dir, task ){
var form = document.adminForm;
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
document.adminForm.submit( task );
}
function changeReceiveEmail(checkedbox){
var form = document.adminForm;
if(checkedbox){
form.nbreceiveemail.value++;
}else{
form.nbreceiveemail.value--;
}
if(form.nbreceiveemail.value > 0 ){
document.getElementById(\'receiveemailbox\').className = \'receiveemailbox receiveemailbox_visible\';
}else{
document.getElementById(\'receiveemailbox\').className = \'receiveemailbox receiveemailbox_hidden\';
}
}
';
$doc->addScriptDeclaration($js);
$orderValues = array();
$orderValues[] = JHTML::_('select.option', 'senddate', JText::_('SEND_DATE'));
$orderValues[] = JHTML::_('select.option', 'subject', JText::_('JOOMEXT_SUBJECT'));
$orderValues[] = JHTML::_('select.option', 'created', JText::_('CREATED_DATE'));
$orderValues[] = JHTML::_('select.option', 'mailid', JText::_('ACY_ID'));
$ordering = '';
if($config->get('show_order', 1) == 1){
$ordering = '<span style="float:right;" id="orderingoption">';
$ordering .= JHTML::_('select.genericlist', $orderValues, 'ordering', 'size="1" style="width:100px;" onchange="this.form.submit();"', 'value', 'text', $pageInfo->filter->order->value);
$orderDir = array();
$orderDir[] = JHTML::_('select.option', 'ASC', JText::_('ACY_ASC'));
$orderDir[] = JHTML::_('select.option', 'DESC', JText::_('ACY_DESC'));
$ordering .= ' '.JHTML::_('select.genericlist', $orderDir, 'ordering_dir', 'size="1" style="width:75px;" onchange="this.form.submit();"', 'value', 'text', $pageInfo->filter->order->dir);
$ordering .= '</span>';
}
$this->assignRef('ordering', $ordering);
$this->assignRef('rows', $rows);
$this->assignRef('values', $values);
if(count($allLists) > 1){
$list = new stdClass();
$list->listid = 0;
$list->description = '';
}else{
$list = array_pop($allLists);
}
$this->assignRef('list', $list);
$this->assignRef('manageableLists', $manageableLists);
$this->assignRef('pagination', $pagination);
$this->assignRef('pageInfo', $pageInfo);
$this->assignRef('config', $config);
$this->assignRef('my', $my);
}
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