proceed.php 8.41 KB


<?php

@include 'includes/header.php';
@session_start();
$uid = $_SESSION['user_id'];
$a_id = base64_decode($_GET['a_id']);
$sp_id = base64_decode($_GET['sp_id']);
?>
<!--CenterBar-->




<style>
    @import url('https://fonts.googleapis.com/css?family=Roboto');
    body{
        margin:0px;
        padding:0px;
        font-family: 'Roboto', sans-serif;
    }
    .log_wrapper{
        background: url("../images/log_background.png");
        background-position: center top;
        background-repeat: no-repeat;
        background-size: 100%;
        padding-top: 200px;
    }
    .log_wrapper h4{
        text-align: center;
        color: #3d3d3d;
        font-size: 25px;
        padding-bottom: 20px;
    }
    .log_wrapper p{
        text-align: center;
        color: #616161;
		    font-size: 20px;
    }
    .log_wrapper h3{
        text-align: center;
        color: #d0202a;
        margin: 0px;
        font-size: 35px;
    }
    .log_tab{
        width:100%;
        margin-top:30px;
    }
    .log_tab ul{
        width:100%;
        text-align: center;
        padding:0px;
        margin:0px;
    padding: 30px !important;
		padding-left:0px !important;
		padding-right:0px !important;
    }
    .log_tab ul li{
        display:inline-flex;
        text-align: center;
        color:#afafaf;
		    margin: 15px;
       
    }
	.log_tab ul li a{
		padding:8px !important; 
		text-decoration:none !important;
		font-weight:700 !important;
		color:#afafaf !important;
		border-radius:3px !important;
		padding-left:25px !important;
		padding-right:25px !important;
		border:none !important;
		background:transparent;
		font-family: 'Roboto', sans-serif;
		    font-size: 16px;
		transition-timing-function: ease-in-out;
		    letter-spacing: 2px;
	}
	.log_tab ul li a:hover{
		background: #222222 !important;
		color:#fff !important;
		transition-timing-function: ease-in-out;
	}
    .log_tab ul .selected a{
        background: #222222 !important;
		color:#fff !important;
    }
	.log_tab .tabcontents{
		width:60%;
		margin: 0 auto;
		border:none;
		margin-top: 25px;
		background:transparent !important;
		    max-height: 500px;
    overflow: scroll;
    overflow-x: hidden;
	}
	.log_tab .tabcontents::-webkit-scrollbar { 
    display: none; 
}
	.log_tab .tabcontents ul{
		width:100%;
		padding:0px;
		margin:0px;
		

	}
	.log_tab .tabcontents ul li{
		list-style:none;
		width:100%;
		display:block;
		border-bottom:1px solid #ececec;
		padding-bottom:20px;
		    background-repeat: no-repeat !important;
    background-position: -15px !important;
		
	}
	.log_tab .tabcontents ul li p{
		text-align:left;
		margin:0px !important;
		padding:0px !important;
		width:100%;
		color:#282828;
		font-size: 18px !important;
		    padding-bottom: 10px !important;
	}

	.log_tab .tabcontents ul li h4{
		text-align:left;
		margin:0px !important;
		padding:0px !important;
		color:#606060;
		    font-weight: 300;
    font-size: 22px;
	}
	.log_tab .tabcontents ul li h5{
		text-align:left;
		margin:0px !important;
		padding:0px !important;
		color:#a2a2a2;
		    font-size: 17px;
    letter-spacing: 1px;
    font-weight: 400;
	}
	.log_tab .tabcontents ul li h6{
		text-align:left;
		margin:0px !important;
		padding:0px !important;
		color:#b7b7b7;
		    font-size: 14px !important;
    font-weight: 300;
    letter-spacing: 4px;
		
     padding-top: 5px !important;
	}
	.log_tabcontent_inner{
		float:left;
		width:calc(100% - 260px) !important;
		padding-left:60px;
	}
	
	.log_tabcontent_inner_price{
		float:right;
		width:200px;
		text-align:right;
	}
	.log_tabcontent_inner_price p{
		color:#494848 !important;
		font-weight:600 !important;
		font-size: 18px;
		text-align:right !important;
	}
	.paidin{
		background: url("../images/paidin.png") !important;
	}
	.paidout{
		background: url("../images/paidout.png") !important;
	}
	
	.add_btn{
		width:70px;
		height:70px;
		background-color:#cc0e0e;
		border-radius:50%;
		position:fixed;
		bottom:40px;
		right:40px;
		border:none;
		    box-shadow: 0px 0px 20px 0px #000;
		outline:none;
		cursor:pointer;
		color:#fff;
		font-size:48px;
		font-weight:400;
	}
	
	#add_modal{
		position:absolute;
		top:0px;
		right:0px;
		left:0px;
		bottom:0px;
		background:rgba(0,0,0,0.6) !important;
	}
	.add_modal_inner{
		width:400px;
		padding:40px;
		    background: #cc0e0e !important;
		margin:0 auto;
		position:relative;
		top:10%;
	}
	.add_modal_inner h4 {
    text-align: center;
    color: #fff;
    font-size: 25px;
    padding-bottom: 20px;
		margin:0px;
		padding:0px;
}
	.add_modal_inner .close{
		width:30px;
		height:30px;
		background:transparent;
		color:#fff !important;
		    border: none;
    font-size: 35px;
		position:absolute;
		top:10px;
		right:10px;
		cursor:pointer;
		outline:none;
	}
	
	.add_modal_inner .pay_btn{
		width:100%;
		height: 45px;
  		border-radius: 5px;
    background-color: #fff;
    border: 2px solid #fff;
    color: #cc0e0e;
    font-size: 20px;
    font-weight: 300;
		cursor:pointer;
		outline:none;
	}
	.add_money_input{
		height: 45px;
		    width: calc(100% - 20px);
  border-radius: 5px;
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding-left: 10px;
		padding-right: 10px;
    font-size: 20px;
    font-weight: 300;
		margin-bottom:20px;
	}
	.add_money_input::placeholder{
		color:#fff;
	}
	
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
                       <?php
							$list_array = array(

								"primarykey" => "id",

								"fields" => "*",

								"where" => "id=$a_id"

							);

							$details_array = $Main->GetRecord("lts_post_inquiry", $list_array);

								foreach ($details_array as $key4 => $type) {
								//		   
								  $list_array = array(

														"primarykey" => "id",

														"fields" => "*",

														"where" => "type='".$type['nature_of_business']."'"

													);
								  $commission_array = $Main->GetRecord("lts_commission", $list_array);                

								}
				       foreach ($commission_array as $key3 => $value3) {
					   
                      
						
					   }

                       $list_array = array(

                            "primarykey" => "user_id",

                            "fields" => "wallet",
		
		                    "where" => "user_id='".$uid."'"

                        );
   
					 $wallet_amount = $Main->GetRecord("lts_user_master", $list_array);


                       $list_array = array(

                            "primarykey" => "id",

                            "fields" => "*",
		
		                    "where" => "user_id='".$uid."'"

                        );
   
					 $transaction = $Main->GetRecord("lts_transaction", $list_array);?>
        <div class="log_wrapper">
			
            <h4>WALLET</h4>
            <div style="text-align:center;" >
			<div style="display:inline-block;margin:20px;">
				<p>Wallet Balance</p>
				<?php  
					 foreach ($wallet_amount as $key => $value) {
							$wallet_amt = $value['wallet'];?>
			 <h3><?php echo $wallet_amt; ?> KD</h3>
	        <?php }?>
			</div>
			<div style="display:inline-block;margin:20px;">
				<p>Commission Amount</p>
			<?php  
					 foreach ($commission_array as $key3 => $value3) {
							?>
			 <h3><?php echo $value3['amount']; ?> KD</h3>
	        <?php }?>
			</div>
			</div>
			
			
			
			<div style="text-align:center;" >
           	<button class="btn" id="walletproceedbutton" style="width:29%;display:inline-block;height: 45px;font-size: 18px;color: #fff;"> Proceed </button>
			</div>
        </div>






<br /><br />


<?php


include('includes/sidebar_right.php');
include 'includes/footer.php';

?>

<script type="text/javascript">
jQuery("#walletproceedbutton").on( 'click', function () {
              var wallet_amount = "<?php echo $wallet_amt; ?>";
              var a_id = "<?php echo $a_id; ?>";
              var sp_id = "<?php echo $sp_id; ?>";
              var com_amt = "<?php echo $value3['amount']; ?>";
	
    if(wallet_amount>=com_amt){
              var payment_id = "<?php echo rand(0,999999999999);?>";
              var paid_on = "<?php echo date('Y-m-d H:i:s');?>";
		      var site_url = "<?php echo SITE_URL; ?>";
          
    if(a_id=="" || sp_id==""){
		var status = 0;
	}else{
		var status = 1;
	}

    window.location=site_url+"/user/response.php?Status="+status+"&PaymentId="+payment_id+"&PaidOn="+paid_on+"&Variable1="+a_id+"&Variable2="+sp_id+"&Variable3="+com_amt+"&Variable4=2&Method=3";
    
    }else{
	  alert("please recharge your wallet");
	
	}


});
</script>