<?php
include "../includes/config.php";
include "../includes/session.php";
include "../includes/functions.php";
if (get_magic_quotes_gpc()) {
    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
    $_SESSION = array_map('stripslashes_deep', $_SESSION);
}
if(isset( $_SESSION["sess_artistid"]) and $_SESSION["sess_artistid"]!= ""){
	$userid = $_SESSION["sess_artistid"];
}
$paymentMethod = "PP";

if(checkArtistExpired($userid)){
    header("Location:seller_plan_upgrade.php?sellerid=".$userid);
    exit;
}

//$totaltopay = getCartTotal($userid);

if (isset($_REQUEST['pid'])) {
    $pid = $_REQUEST['pid'];
    header("location:myproducts.php?message=".MSG_PROC_FAIL);
    exit();
} else {
    
}

//getting payment info
$sql = "SELECT * FROM " . $tableprefix . "settings ";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
$txtPaypalEmail = $row["paypalemail"];
$txtPaypalSandbox = $row["enablepaypalsandbox"];

/* pass transaction id */
$uique_sessionid = $userid . time() . session_id();
$_SESSION['sess_unique_sessid'] = $uique_sessionid;
$uique_sessionid_md5encrypted = md5($uique_sessionid);


/* * ************** */

if ($txtPaypalSandbox == "Y") {
    //$paypalurl ="http://192.168.0.11/sudheesh/paypal.php";
    $paypalurl = "https://www.sandbox.paypal.com/cgi-bin/webscr";
    $paypalbuttonurl = "https://www.sandbox.paypal.com/en_US/i/btn/x-click-but23.gif";
} else {
    //$paypalurl ="http://192.168.0.11/sudheesh/paypal.php";
    $paypalurl = "https://www.paypal.com/cgi-bin/webscr";
    $paypalbuttonurl = "https://www.paypal.com/en_US/i/btn/x-click-but23.gif";
}

$referrer = $_SERVER["HTTP_REFERER"];

/* display the active template */

$active_template = displayTemplate();


include "../includes/htmltop.php";


/* Top File Name */

//include_once ("../includes/".$active_template[0]);
?>

<body>
<center>
    <div id="layout">

<?php
include_once("../includes/topheader_seller.php");
?>

        <!--categories area start -->

<?php
//	include_once("../includes/categorylist.php");
?>
        <div align="left" class="main_body" >
            <!--main body start -->
        <?php
        include "../includes/artisttopmenu.php";
        ?>
            <!--center content area start-->

            <div align="right" class="content_area">


                <!--items display area start -->

                <div align="left" id="items_top_area">
<!--				<img src="<?php //echo $active_template[3] ?>/top_title_left.gif" alt="" class="items_top_area_img" /> -->
                    <div align="left" id="items_top_area_ttl"><h2><?php echo TEXT_PMNT_GTWY;?></h2> </div>
<!--				<img src="<?php //echo $active_template[3] ?>/top_title_right.gif" alt="" class="items_top_area_img" /> -->
                </div>

                <div>&nbsp;</div>

                <div class="text_information" align="center"><?php echo $message ?></div>

                <div>

                    <table cellpadding="0" cellspacing="0" width="100%">

                        <tr>
                            <td align="left" class="text_information"><?php echo MSG_PROC_FAIL;?></td>
                        </tr>
                        <tr>
                            <td height="100" align="center"><input type='button' value='<?php echo BTN_HOME;?>'  class='button' onClick="window.location.href='<?php echo SITE_URL ?>/sellers/artistmain.php'"></td>
                        </tr>
                        <tr>
                            <td align="center">&nbsp;


                            </td>
                        </tr>
                        <tr>
                            <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                            <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                            <td align="center">





                    </table>


                </div>


                <div align="left" class="float_clear1"></div>


                <div align="left" class="float_clear"><img src="images/clear.gif" alt="" width="1" height="1" /></div>
                <!--mainbody area end -->
                <div align="left" class="float_clear"><img src="images/clear.gif" alt="" width="1" height="1" /></div>


                <div align="left" class="clear_float"><img src="images/clear_admin.gif" alt="" width="1" height="1" /></div>
                <!--main body end -->

            </div>
            <div align="left" class="clear_float"><img src="<?php echo $imagefolder; ?>/clear.gif" alt="" width="1" height="1" /></div>
            <!--main body end -->
        </div>
<?php
include "../includes/footer.php";
?>