Пример #1
0
 */
require_once '../lib-common.php';
// take user back to the homepage if the plugin is not active
if (!in_array('paypal', $_PLUGINS)) {
    echo COM_refresh($_CONF['site_url'] . '/index.php');
    exit;
}
/* Ensure sufficient privs to read this page */
paypal_access_check('paypal.viewer');
$vars = array('msg' => 'text', 'page' => 'number', 'category' => 'number', 'type' => 'text', 'n' => 'text');
paypal_filterVars($vars, $_REQUEST);
//Main
if ($_REQUEST['n'] == '') {
    $display .= PAYPAL_siteHeader($_PAY_CONF['seo_shop_title']);
} else {
    $display .= PAYPAL_siteHeader($_REQUEST['n'] . ' | ' . $_PAY_CONF['seo_shop_title']);
}
if (SEC_hasRights('paypal.user', 'paypal.admin')) {
    $display .= paypal_user_menu();
} else {
    $display .= paypal_viewer_menu();
}
switch ($_REQUEST['mode']) {
    case 'endTransaction':
        // START SESSION
        session_start();
        // INITIALIZE JCART AFTER SESSION START
        $cart =& $_SESSION['jcart'];
        if (!is_object($cart)) {
            $cart = new jcart();
        }
Пример #2
0
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.          |
// |                                                                          |
// +--------------------------------------------------------------------------+
/**
 * Login form
 * @package paypal
 */
/**
 * require core geeklog code
 */
require_once '../lib-common.php';
// take user back to the homepage if the plugin is not active
if (!in_array('paypal', $_PLUGINS)) {
    echo COM_refresh($_CONF['site_url'] . '/index.php');
    exit;
}
/* Ensure sufficient privs to read this page */
paypal_access_check();
//Main
$display = PAYPAL_siteHeader($_PAY_CONF['seo_shop_title']);
if (SEC_hasRights('paypal.user', 'paypal.admin')) {
    $display .= paypal_user_menu();
} else {
    $display .= paypal_viewer_menu();
}
if (!empty($_REQUEST['msg'])) {
    $display .= COM_showMessageText(stripslashes($_REQUEST['msg']), $LANG_PAYPAL_1['message']);
}
$display .= '<div id="login">' . SEC_loginRequiredForm() . '</div>';
$display .= PAYPAL_siteFooter();
COM_output($display);
Пример #3
0
// +--------------------------------------------------------------------------+
/**
 * require core geeklog code
 */
require_once '../../lib-common.php';
// take user back to the homepage if the plugin is not active
if (!in_array('paypal', $_PLUGINS)) {
    $display .= COM_refresh($_CONF['site_url'] . '/index.php');
    exit;
}
/* Ensure sufficient privs to read this page */
paypal_access_check('paypal.user');
$vars = array('msg' => 'text', 'pid' => 'number');
paypal_filterVars($vars, $_REQUEST);
//Main
$display .= PAYPAL_siteHeader();
$display .= paypal_user_menu();
/*==================================================================
 PayPal Express Checkout Call
 ===================================================================
*/
// Check to see if the Request object contains a variable named 'token'
$token = "";
if (isset($_REQUEST['token'])) {
    $token = $_REQUEST['token'];
}
// If the Request object contains the variable 'token' then it means that the user is coming from PayPal site.
if ($token != "") {
    require_once $_CONF['path'] . 'plugins/paypal/proversion/paypalfunctions.php';
    /*
    '------------------------------------
Пример #4
0
/*
Main
*/
// query database for product
$res = DB_query("SELECT p.*, c.cat_name\n                 FROM {$_TABLES['paypal_products']} AS p\n\t\t\t\t LEFT JOIN {$_TABLES['paypal_categories']} AS c\n\t\t\t\t ON p.cat_id = c.cat_id\n\t\t\t\t WHERE id = {$pid}");
// count number of returned results, if unexpected redirect to product list
if (DB_numRows($res) != 1) {
    echo COM_refresh($_PAY_CONF['site_url'] . '/index.php');
    exit;
}
$A = DB_fetchArray($res);
if ($A['customisable'] != 0 && !function_exists('PAYPALPRO_displayAttributes')) {
    echo COM_refresh($_PAY_CONF['site_url'] . '/index.php');
    exit;
}
$display .= PAYPAL_siteHeader($A['name'] . ' - ' . $A['cat_name']);
if (SEC_hasRights('paypal.user', 'paypal.admin')) {
    $display .= paypal_user_menu();
} else {
    $display .= paypal_viewer_menu();
}
$breadcrumbs = PAYPAL_Breadcrumbs($A['cat_id']);
if ($breadcrumbs != '') {
    $display .= '<p><small>' . $breadcrumbs . '</small></p>';
}
$product = COM_newTemplate($_CONF['path'] . 'plugins/paypal/templates');
$product->set_file(array('product' => 'product_detail.thtml', 'buy' => 'buy_now_button.thtml', 'cart' => 'add_to_cart_button.thtml', 'custom' => 'customised_button.thtml'));
$product->set_var('site_url', $_CONF['site_url']);
$product->set_var('paypal_folder', $_PAY_CONF['site_url']);
//Edit link
if (SEC_hasRights('paypal.admin')) {