Your IP : 216.73.217.95


Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2404962/root/tmp/
Upload File :
Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2404962/root/tmp/phpCTwqXC

home/digilove/public_html/components/com_acymailing/views/archive/view.pdf.php000064400000004542152353054510023761 0ustar00<?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();

	}

	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));

		acymailing_setPageTitle($oneMail->subject );

		if(!empty($oneMail->text)) echo nl2br($mailClass->textVersion($oneMail->text,false));
			else echo nl2br($mailClass->textVersion($oneMail->body,true));

	}
}
home/digilove/public_html/components/com_virtuemart/views/pdf/view.pdf.php000064400000003207152432521740023175 0ustar00<?php
/**
*
* Description
*
* @package	VirtueMart
* @subpackage
* @author P.Kohl
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: view.pdf.php 5320 2012-01-25 14:28:40Z Electrocity $
 */
defined('_JEXEC') or die;

class VirtueMartViewPdf extends VmView
{

	var $virtuemart_vendor_id = 1;

	function __construct( $config = array() ) {

		$config['base_path'] = JPATH_COMPONENT_SITE;

		parent::__construct( $config );

	}


	function display($tpl = 'pdf'){

		if(vmDefines::tcpdf()){
			$vendorModel = VmModel::getModel('vendor');
			$vendor = $vendorModel->getVendor($this->virtuemart_vendor_id);

			$viewName = vRequest::getCmd('view','productdetails');
			$class= 'VirtueMartView'.ucfirst($viewName);
			if(!class_exists($class)) require(VMPATH_SITE.'/views/'.$viewName.'/view.html.php');
			$view = new $class ;

			if($vendor->vendor_letter_for_product_pdf) {
				ob_start();
				$view->display($tpl);
				$html = ob_get_contents();
				ob_end_clean();

				$pdf = new VmVendorPDF();
				$pdf->AddPage();
				$pdf->PrintContents($html);

				$doc = JFactory::getDocument();
				$page_title = $doc->getTitle();

				$pdf->Output($page_title .'.pdf', 'I');
				JFactory::getApplication()->close();
			} else {
				$view->display($tpl);
			}
		}

	}

}