Exemple #1
0
// | GNU General Public License for more details.                             |
// |                                                                          |
// | You should have received a copy of the GNU General Public License        |
// | along with this program; if not, write to the Free Software Foundation,  |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             |
// |                                                                          |
// +--------------------------------------------------------------------------+
/**
 * @package paypal
 */
/**
 * Required geeklog
 */
require_once '../lib-common.php';
// Check for required permissions
paypal_access_check('paypal.user');
$vars = array('msg' => 'text', 'mode' => 'alpha', 'uid' => 'number', 'name' => 'text', 'street1' => 'text', 'street2' => 'text', 'postal' => 'alpha', 'city' => 'text', 'country' => 'text', 'phone1' => 'alpha', 'phone2' => 'alpha', 'fax' => 'alpha', 'contact' => 'text', 'proid' => 'alpha', 'pay_by' => 'alpha', 'shipping' => 'text');
paypal_filterVars($vars, $_REQUEST);
//Main
$display = '';
$display .= paypal_user_menu();
if (!empty($_REQUEST['msg'])) {
    $display .= PAYPAL_message($_REQUEST['msg']);
}
switch ($_REQUEST['mode']) {
    case 'edit':
        // Get the details to edit and display the form
        if (isset($_USER['uid']) && $_USER['uid'] > 1) {
            $sql = "SELECT * FROM {$_TABLES['paypal_users']} WHERE user_id = {$_USER['uid']}";
            //only admin can edit details of a user
            if (SEC_hasRights('paypal.admin')) {
Exemple #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);
Exemple #3
0
 * @author Vincent Furia <vinny01 AT users DOT sourceforge DOT net>
 * @copyright Vincent Furia 2005 - 2006
 * @package paypal
 * @todo Add more complex logic to decide link display between:  purchase, login, download
 */
/**
 * 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('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':
// | GNU General Public License for more details.                             |
// |                                                                          |
// | You should have received a copy of the GNU General Public License        |
// | along with this program; if not, write to the Free Software Foundation,  |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.          |
// |                                                                          |
// +--------------------------------------------------------------------------+
/**
 * @package paypal
 */
/**
 * Required geeklog
 */
require_once '../../../lib-common.php';
// Check for required permissions
paypal_access_check('paypal.admin');
$vars = array('msg' => 'text', 'mode' => 'alpha');
paypal_filterVars($vars, $_REQUEST);
function PAYPAL_listRecurringPayments()
{
    global $_CONF, $_TABLES, $LANG_PAYPAL_ADMIN, $LANG_ADMIN, $LANG_PAYPAL_1, $LANG_PAYPAL_PRO;
    if (!file_exists($_CONF['path_data'] . '/paypal_data/proversion/proversion.php')) {
        return $LANG_PAYPAL_PRO['pro_feature'];
    }
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $retval = '';
    $header_arr = array(array('text' => $LANG_PAYPAL_1['user_name'], 'field' => 'user_id', 'sort' => true), array('text' => $LANG_PAYPAL_1['profile_id'], 'field' => 'profileid', 'sort' => true), array('text' => $LANG_PAYPAL_1['recdate'], 'field' => 'recdate', 'sort' => true), array('text' => $LANG_PAYPAL_1['status'], 'field' => 'status', 'sort' => true));
    $defsort_arr = array('field' => 'recdate', 'direction' => 'desc');
    $text_arr = array('has_extras' => true, 'form_url' => $_CONF['site_admin_url'] . '/plugins/paypal/recurring_payments.php');
    $sql = "SELECT\n\t            r.*, u.username\n            FROM \n\t\t\t    {$_TABLES['paypal_recurrent']} as r\n\t\t\tLEFT JOIN\n\t\t\t\t{$_TABLES['users']} AS u \n\t\t\tON\n\t\t\t\tr.user_id = u.uid\n\t\t\tWHERE 1=1 \t\n\t\t\t";
    $query_arr = array('sql' => $sql, 'query_fields' => array('r.user_id', 'r.profileid', 'r.recdate', 'r.status'));