<?php 
/*
##################################################################
#                       PHP 4&5 MySQL 4&5                        #
##################################################################
#           Copyright (c) 2004-2008 Armia Systems Inc            #
##################################################################
#               This file is part of Cybermatch site             #
##################################################################
#    Developed By: simi (simi@armia.com)                         #

##################################################################
#               Developed On:   03-04-2008                       #
##################################################################
#               Modified By:                                     #
##################################################################
#               Modified On:                                     #
##################################################################
# This script may not be distributed, sold, given away for free  #
# to third party, or used as a part of any internet services 	 #
# such as webdesign etc.                                         #
##################################################################
*/

require_once ("config.inc.php");
require_once ("includes/userlogincheck.inc.php");
require_once ("includes/mysql.inc.php");
require_once ("classes/misc.class.php");
require_once ("classes/userside.class.php");

$message	= "";
$script		= "";
$mail		= "";
$product	= isset($_REQUEST['product'])	?	trim($_REQUEST['product'])	:	"0";

if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objM		= new misc($objDB);
	$objU		= new userside($objDB);	
	$script		= $objM->get_script($message);
	$message	= $objM->remove_script($message);
}

if($_SESSION['show_credit_balance']==true)
{
	//checking credits avilable
	$sql_check=mysql_query("select nCredits from ".TABLEPREFIX."user where nUser_Id='".$_SESSION['user_id']."'") or die(mysql_error());
	if(mysql_num_rows($sql_check)>0)
	{
		$showCredits='( You have '.mysql_result($sql_check,0,'nCredits').' credits in balance )';
	}//end if
	else
	{
		$showCredits='';
	}//end else
}//end if

$_SESSION['sess_check_validation']='';
$_SESSION['sess_Paymode']='';
$_SESSION['sess_TransId']='';
$_SESSION['sess_product']='';
$_SESSION['show_credit_balance']='';

include_once ("title.inc.php");
include_once ("tophtml.inc.php");
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="72%" valign="top"><div class="search-rslts"><table width="100%"  border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td>              <table width="100%"  border="0" cellspacing="0" cellpadding="5">
              <tr>

                <td width="100%" class="inenr-hd"><h2>Subscription Process Completed </h2></td>
               
              </tr>
            </table>
              <table width="100%"  border="0" cellspacing="0" cellpadding="10">
                <tr>
                  <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="headings2">Success</td>
                    </tr>
                  </table>
                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/spacer.gif" width="1" height="10"></td>
                      </tr>
                    </table>
					<form name="frmTell" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" onSubmit="return validate();">
                    <table width="100%"  border="0" cellspacing="0" cellpadding="5">
					<?php if(isset($message) && trim($message)!='')
					      {
					?>
                    <tr align="center">
                      <td class="maintext1 warning"><?php echo $message;?></td>
                      </tr>
					<?php }//end if?>
                      <?php if($showCredits){ ?>
                    <tr>
                      <td width="54%" class="maintext1">You have successfully subscribed
                                      <?php echo stripslashes($objU->get_product($product))?> 
by paying an amount of $<?php echo $objU->get_amount($product)?>. <?php echo $showCredits;?></td>
                      </tr>
                      <?php } else { ?>
                         <tr>
                      <td width="54%" class="maintext1">You have successfully subscribed <?php echo stripslashes($objU->get_product($product))?> 
by paying an amount of $<?php echo $objU->get_amount($product)?>.</td>
                      </tr>
                      <?php } ?>
                  </table>
					</form>
                    </td>
                </tr>
              </table>
					  <div id="hide"><?php echo $script?></div>
			</td>
          </tr>
        </table></div></td>
        <td width="28%" valign="top"><?php include_once ("left.inc.php");?></td>
      </tr>
    </table>      
      </td>
  </tr>
</table>
<?php include_once('bottomhtml.inc.php');?>
