<?php 
if($_REQUEST['renew'])
{
	$title = RENEW_SUCCESS_TITLE;
}else
{
	$title = POSTED_SUCCESS_TITLE;
}
?>
<?php
$paymentmethod = get_post_meta($_REQUEST['pid'],'paymentmethod',true);
$paid_amount = get_currency_sym().get_post_meta($_REQUEST['pid'],'paid_amount',true);
global $upload_folder_path;
if($paymentmethod == 'prebanktransfer')
{
	$filecontent = POSTED_SUCCESS_PREBANK_MSG;
}else
{
	$filecontent = __(POSTED_SUCCESS_MSG);	
	$filecontent = __($filecontent);
}
if(file_exists($destinationfile))
{
	$filecontent = file_get_contents($destinationfile);
}
?>
<?php get_header(); ?>

<div id="wrapper" class="clearfix">
     <div id="content" class="clearfix" >

    <h1><?php echo $title;?></h1>   
    <?php if ( get_option( 'ptthemes_breadcrumbs' )) {  ?>
    <div class="breadcrumb clearfix">
        <div class="breadcrumb_in"><?php yoast_breadcrumb('',' &raquo; '.$title);  ?></div>
    </div>
<?php } ?>
<div id="content" class="content_inner" >
<?php
$store_name = get_option('blogname');
if($paymentmethod == 'prebanktransfer')
{
	$paymentupdsql = "select option_value from $wpdb->options where option_name='payment_method_".$paymentmethod."'";
	$paymentupdinfo = $wpdb->get_results($paymentupdsql);
	$paymentInfo = unserialize($paymentupdinfo[0]->option_value);
	$payOpts = $paymentInfo['payOpts'];
	$bankInfo = $payOpts[0]['value'];
	$accountinfo = $payOpts[1]['value'];
}
$order_id = $_REQUEST['pid'];
$post_link = get_option('siteurl').'/?ptype=preview&alook=1&pid='.$_REQUEST['pid'];
$orderId = $_REQUEST['pid'];
$search_array = array('[#$order_amt#]','[#$bank_name#]','[#$account_number#]','[#$orderId#]','[#$store_name#]','[#$submited_link#]');
$replace_array = array($paid_amount,$bankInfo,$accountinfo,$order_id,$store_name,$post_link);
$filecontent = str_replace($search_array,$replace_array,$filecontent);
echo $filecontent;
?> 
</div> <!-- content #end -->
</div> <!-- content #end -->

    <?php get_sidebar(); ?>

</div> <!-- wrapper #end -->
<div id="bottom"></div>  
<?php get_footer(); ?>