First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,53 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*/
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
session_start();
require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
$log->alert('payment_notification processor_name=AuthNet', $_REQUEST);
$authorizeNetIPN = new CRM_Core_Payment_AuthorizeNetIPN($_REQUEST);
try {
$authorizeNetIPN->main();
}
catch (CRM_Core_Exception $e) {
CRM_Core_Error::debug_log_message($e->getMessage());
CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
echo "The transaction has failed. Please review the log for more detail";
}

View file

@ -0,0 +1,35 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
CRM_Utils_System::loadBootStrap(array(), FALSE);
CRM_Cxn_BAO_Cxn::createApiServer()
->handle(file_get_contents('php://input'))
->send();

View file

@ -0,0 +1,67 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*/
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
session_start();
require_once '../civicrm.config.php';
/* Cache the real UF, override it with the SOAP environment */
$config = CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
if (empty($_GET)) {
$log->alert('payment_notification processor_name=PayPal', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalProIPN($_REQUEST);
}
else {
$log->alert('payment_notification PayPal_Standard', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalIPN($_REQUEST);
// @todo upgrade standard per Pro
}
try {
//CRM-18245
if ($config->userFramework == 'Joomla') {
CRM_Utils_System::loadBootStrap();
}
$paypalIPN->main();
}
catch (CRM_Core_Exception $e) {
CRM_Core_Error::debug_log_message($e->getMessage());
CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
//@todo give better info to logged in user - ie dev
echo "The transaction has failed. Please review the log for more detail";
}

View file

@ -0,0 +1,28 @@
<?php
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Core/Error.php';
require_once 'CRM/Utils/Array.php';
$config = CRM_Core_Config::singleton();
$queue_id = CRM_Utils_Array::value('q', $_GET);
if (!$queue_id) {
echo "Missing input parameters\n";
exit();
}
require_once 'CRM/Mailing/Event/BAO/Opened.php';
CRM_Mailing_Event_BAO_Opened::open($queue_id);
$filename = "../i/tracker.gif";
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Description: File Transfer');
header('Content-type: image/gif');
header('Content-Length: ' . filesize($filename));
header('Content-Disposition: inline; filename=tracker.gif');
readfile($filename);
exit();

View file

@ -0,0 +1,55 @@
<?php
/*
* PxPay Functionality Copyright (C) 2008 Lucas Baker,
* Logistic Information Systems Limited (Logis)
* PxAccess Functionality Copyright (C) 2008 Eileen McNaughton
* Licensed to CiviCRM under the Academic Free License version 3.0.
*
* Grateful acknowledgements go to Donald Lobo for invaluable assistance
* in creating this payment processor module
*/
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
session_start();
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
$config = CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
$log->alert('payment_notification processor_name=Payment_Express', $_REQUEST);
/*
* Get the password from the Payment Processor's table based on the DPS user id
* being passed back from the server
*/
$query = "
SELECT url_site, password, user_name, signature
FROM civicrm_payment_processor
LEFT JOIN civicrm_payment_processor_type ON civicrm_payment_processor_type.id = civicrm_payment_processor.payment_processor_type_id
WHERE civicrm_payment_processor_type.name = 'Payment_Express'
AND user_name = %1
";
$params = array(1 => array($_GET['userid'], 'String'));
$dpsSettings = CRM_Core_DAO::executeQuery($query, $params);
while ($dpsSettings->fetch()) {
$dpsUrl = $dpsSettings->url_site;
$dpsUser = $dpsSettings->user_name;
$dpsKey = $dpsSettings->password;
$dpsMacKey = $dpsSettings->signature;
}
if ($dpsMacKey) {
$method = "pxaccess";
}
else {
$method = "pxpay";
}
require_once 'CRM/Core/Payment/PaymentExpressIPN.php';
$rawPostData = $_GET['result'];
CRM_Core_Payment_PaymentExpressIPN::main($method, $rawPostData, $dpsUrl, $dpsUser, $dpsKey, $dpsMacKey);

View file

@ -0,0 +1,42 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
session_start();
$rest = new CRM_Utils_REST();
// Json-appropriate header will be set by CRM_Utils_Rest
// But we need to set header here for non-json
if (empty($_GET['json'])) {
header('Content-Type: text/xml');
}
echo $rest->bootAndRun();

View file

@ -0,0 +1,55 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
}
session_start();
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
$server = new SoapServer(NULL,
array(
'uri' => 'urn:civicrm',
'soap_version' => SOAP_1_2,
)
);
require_once 'CRM/Utils/SoapServer.php';
$crm_soap = new CRM_Utils_SoapServer();
/* Cache the real UF, override it with the SOAP environment */
$config = CRM_Core_Config::singleton();
$server->setClass('CRM_Utils_SoapServer', $config->userFrameworkClass);
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->handle();

View file

@ -0,0 +1,62 @@
<?php
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Core/Error.php';
require_once 'CRM/Utils/Array.php';
$config = CRM_Core_Config::singleton();
// To keep backward compatibility for URLs generated
// by CiviCRM < 1.7, we check for the q variable as well.
if (isset($_GET['qid'])) {
$queue_id = CRM_Utils_Array::value('qid', $_GET);
}
else {
$queue_id = CRM_Utils_Array::value('q', $_GET);
}
$url_id = CRM_Utils_Array::value('u', $_GET);
if (!$url_id) {
echo "Missing input parameters\n";
exit();
}
require_once 'CRM/Mailing/Event/BAO/TrackableURLOpen.php';
$url = CRM_Mailing_Event_BAO_TrackableURLOpen::track($queue_id, $url_id);
// CRM-7103
// Looking for additional query variables and append them when redirecting.
$query_param = $_GET;
unset($query_param['q'], $query_param['qid'], $query_param['u']);
$query_string = http_build_query($query_param);
if (strlen($query_string) > 0) {
// Parse the url to preserve the fragment.
$pieces = parse_url($url);
if (isset($pieces['fragment'])) {
$url = str_replace('#' . $pieces['fragment'], '', $url);
}
// Handle additional query string params.
if ($query_string) {
if (stristr($url, '?')) {
$url .= '&' . $query_string;
}
else {
$url .= '?' . $query_string;
}
}
// slap the fragment onto the end per URL spec
if (isset($pieces['fragment'])) {
$url .= '#' . $pieces['fragment'];
}
}
// CRM-18320 - Fix encoded ampersands (see CRM_Utils_System::redirect)
$url = str_replace('&amp;', '&', $url);
// CRM-17953 - The CMS is not bootstrapped so cannot use CRM_Utils_System::redirect
header('Location: ' . $url);
CRM_Utils_System::civiExit();

View file

@ -0,0 +1,65 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
* $Id$
*/
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
$config = CRM_Core_Config::singleton();
$template = CRM_Core_Smarty::singleton();
require_once 'CRM/Utils/Request.php';
$cpageId = CRM_Utils_Request::retrieve('cpageId', 'Positive');
$widgetId = CRM_Utils_Request::retrieve('widgetId', 'Positive');
$format = CRM_Utils_Request::retrieve('format', 'Positive');
$includePending = CRM_Utils_Request::retrieve('includePending', 'Boolean');
require_once 'CRM/Contribute/BAO/Widget.php';
$jsonvar = 'jsondata';
if (isset($format)) {
$jsonvar .= $cpageId;
}
$data = CRM_Contribute_BAO_Widget::getContributionPageData($cpageId, $widgetId, $includePending);
$output = '
var ' . $jsonvar . ' = ' . json_encode($data) . ';
';
// FIXME: Not using CRM_Core_Page_AJAX::setJsHeaders because CMS is not bootstrapped
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 60));
header('Content-Type: application/javascript');
header("Cache-Control: max-age=60, public");
echo $output;
CRM_Utils_System::civiExit();