| Current Path : /proc/1908984/root/proc/thread-self/root/tmp/ |
| Current File : //proc/1908984/root/proc/thread-self/root/tmp/phpDDwbxd |
home/digilove/public_html/components/com_jce/editor/libraries/classes/response.php 0000644 00000005211 15235563073 0024642 0 ustar 00 <?php
/**
* @copyright Copyright (c) 2009-2021 Ryan Demmer. All rights reserved
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* JCE 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
*/
defined('JPATH_PLATFORM') or die;
final class WFResponse
{
private $content = null;
private $id = null;
private $error = null;
private $headers = array(
'Content-Type' => 'text/json;charset=UTF-8',
);
/**
* Constructor.
*
* @param $id Request id
* @param null $content Response content
* @param array $headers Optional headers
*/
public function __construct($id, $content = null, $headers = array())
{
// et response content
$this->setContent($content);
// set id
$this->id = $id;
// set header
$this->setHeaders($headers);
return $this;
}
/**
* Send response.
*
* @param array $data
*/
public function send($data = array())
{
$data = array_merge($data, array(
'jsonrpc' => '2.0',
'id' => $this->id,
'result' => $this->getContent(),
'error' => $this->getError(),
));
ob_start();
// set custom headers
foreach ($this->headers as $key => $value) {
header($key.': '.$value);
}
// set output headers
header('Expires: Mon, 4 April 1984 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
// only echo response if an id is set
if (!empty($this->id)) {
echo json_encode($data);
}
exit(ob_get_clean());
}
public function getHeader()
{
return $this->headers;
}
public function setHeaders($headers)
{
foreach ($headers as $key => $value) {
$this->headers[$key] = $value;
}
return $this;
}
/**
* @param array $error
*/
public function setError($error = array('code' => -32603, 'message' => 'Internal error'))
{
$this->error = $error;
return $this;
}
public function getError()
{
return $this->error;
}
public function getContent()
{
return $this->content;
}
public function setContent($content)
{
$this->content = $content;
return $this;
}
}
home/digilove/public_html/110/plugins/vmpayment/amazon/tmpl/response.php 0000644 00000003162 15242603713 0022417 0 ustar 00 <?php
/**
*
* Amazon payment plugin
*
* @author Valérie Isaksen
* @version $Id: response.php 10649 2022-05-05 14:29:44Z Milbo $
* @package VirtueMart
* @subpackage payment
* Copyright (C) 2004 - 2022 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.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
defined('_JEXEC') or die();
if ($viewData['include_amazon_css']) {
$doc = JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/plugins/vmpayment/amazon/assets/css/amazon.css');
}
$success = $viewData["success"];
$order = $viewData["order"];
?>
<div id="amazonResponse">
<h3> <?php echo vmText::_('VMPAYMENT_AMAZON_THANK_YOU'); ?></h3>
<div class="amazonResponseOrderId">
<label><?php echo vmText::_('VMPAYMENT_AMAZON_ORDER_ID'); ?> </label>
<?php echo $viewData["amazonOrderId"]; ?>
</div>
<?php if ($success) { ?>
<div class="amazonResponseItem">
<a class="vm-button-correct" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number=' . $viewData["order"]['details']['BT']->order_number . '&order_pass=' . $viewData["order"]['details']['BT']->order_pass, false) ?>"><?php echo vmText::_('COM_VIRTUEMART_ORDER_VIEW_ORDER'); ?></a>
</div>
<?php } ?>
</div>