Beispiel #1
0
*   @copyright  Copyright (c) 2005-2006 Vincent Furia
*   @package    paypal
*   @version    0.5.0
*   @license    http://opensource.org/licenses/gpl-2.0.php 
*               GNU Public License v2 or later
*   @filesource
*/
/** Import Required glFusion libraries */
require_once '../../../lib-common.php';
// If plugin is installed but not enabled, display an error and exit gracefully
if (!in_array('paypal', $_PLUGINS)) {
    COM_404();
}
require_once '../../auth.inc.php';
// Check for required permissions
PAYPAL_access_check('paypal.admin');
USES_paypal_functions();
USES_lib_admin();
USES_paypal_class_product();
$content = '';
// Get the message to the admin, if any
$msg = array();
if (isset($_REQUEST['msg'])) {
    $msg[] = $_REQUEST['msg'];
}
// Set view and action variables.  We use $action for things to do, and
// $view for the page to show.  $mode is often set by glFusion functions,
// so we'll check for it and see if we should use it, but by using $action
// and $view we don't tend to conflict with glFusion's $mode.
$action = '';
$expected = array('deleteproduct', 'deletecatimage', 'deletecat', 'delete_img', 'saveproduct', 'savecat', 'saveopt', 'deleteopt', 'resetbuttons', 'gwmove', 'gwsave', 'wfmove', 'gwinstall', 'gwdelete', 'history', 'orderhist', 'ipnlog', 'editproduct', 'editcat', 'catlist', 'attributes', 'editattr', 'other', 'productlist', 'gwadmin', 'gwedit', 'wfadmin', 'order');
Beispiel #2
0
*   @copyright  Copyright (c) 2009-2011 Lee Garner
*   @copyright  Copyright (c) 2005-2006 Vincent Furia
*   @package    paypal
*   @version    0.5.3
*   @license    http://opensource.org/licenses/gpl-2.0.php 
*               GNU Public License v2 or later
*   @filesource
*/
/** Require core glFusion code */
require_once '../lib-common.php';
// If plugin is installed but not enabled, display an error and exit gracefully
if (!in_array('paypal', $_PLUGINS)) {
    COM_404();
}
// Ensure sufficient privs and dependencies to read this page
PAYPAL_access_check();
// Import plugin-specific functions
USES_paypal_functions();
// Create a global shopping cart for our use.  This allows the cart to be
// manipulated in an action and then displayed in a view, without necessarily
// having to revisit the database or create a new cart.
USES_paypal_class_cart();
$ppGCart = new ppCart();
// First try to get the SEO-friendly arguments.  A single "action" and "id"
// will probably be the most common anyway.  If that fails, go through all
// the possibilies for actions that might come from submit buttons, etc.
COM_setArgNames(array('action', 'id'));
$action = COM_getArgument('action');
$actionval = '';
if (!empty($action)) {
    $id = COM_sanitizeID(COM_getArgument('id'));