| 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-2015 * $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', CRM_Core_DAO::$_nullObject); $widgetId = CRM_Utils_Request::retrieve('widgetId', 'Positive', CRM_Core_DAO::$_nullObject); $format = CRM_Utils_Request::retrieve('format', 'Positive', CRM_Core_DAO::$_nullObject); $includePending = CRM_Utils_Request::retrieve('includePending', 'Boolean', CRM_Core_DAO::$_nullObject); 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) . '; '; echo $output; CRM_Utils_System::civiExit();
| 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-2014 * $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', CRM_Core_DAO::$_nullObject); $widgetId = CRM_Utils_Request::retrieve('widgetId', 'Positive', CRM_Core_DAO::$_nullObject); $format = CRM_Utils_Request::retrieve('format', 'Positive', CRM_Core_DAO::$_nullObject); require_once 'CRM/Contribute/BAO/Widget.php'; $jsonvar = 'jsondata'; if (isset($format)) { $jsonvar .= $cpageId; } $data = CRM_Contribute_BAO_Widget::getContributionPageData($cpageId, $widgetId); $output = ' var ' . $jsonvar . ' = ' . json_encode($data) . '; '; echo $output; CRM_Utils_System::civiExit();