<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php $this->load->view('user/common_style'); ?>
    <link rel="stylesheet" href="<?php echo base_url();?>styles/fonts/Socialico/stylesheet.css">
    <link href="<?php echo base_url();?>styles/css/table.css" type="text/css" rel="stylesheet" />
    <script src="<?php echo base_url();?>styles/js/modernizr.js"></script>
</head>
<body>
    <div id="preloader">
        <div class="preloader_spinner"> </div>
    </div>
    <section class="body_wrapper home_one">
  
        <?php
            $this->load->view('user/header');
        ?>
            
        <?php
            $this->load->view('user/login_header');
            $currency_info = defaultcurrency();
            $pays= $form_payment['payment_id'];

            $currency_det=$this->db->query("select * from payment_currency");
            $currency_dat=$currency_det->result();
            $usd_decimal=$currency_dat[0]->deimal_point;
            $usd_name=$currency_dat[0]->currency_unit;
            $btc_decimal=$currency_dat[1]->deimal_point;
            $btc_name=$currency_dat[1]->currency_unit;
            $eth_decimal=$currency_dat[2]->deimal_point;
            $eth_name=$currency_dat[2]->currency_unit;
            if($pays=='2')
            {
                $pay_curr="BTC";
                $decimal=$btc_decimal;
            }
            else if($pays=='20')
            {
                $pay_curr="ETH";
                $decimal=$eth_decimal;
            }
            else
            {
                $pay_curr="USD";
                $decimal=$usd_decimal;
            }

    ?>
  <style type="text/css">
      

  </style>
  <section class="dmain">
  	<div class="container">
        <div class="row">
            
            <div class="col-lg-2"></div>
          <div class="col-lg-8">
                <div class="gry clearfix ">
                    <div class="profilesub">
                        <h2><?php echo $this->lang->line('lbl_your');?> <span><?php echo $this->lang->line('lbl_summary');?></span></h2>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-sm-12">
                        <div class="profilesub">
                        <div class="col-sm-7">
                         <h2><?php echo $this->lang->line('lbl_total_deposit_amount');?>  </h2>
                        </div>
                        <div class="col-sm-5">
                        <h2><span style="float:right"><?php echo number_format($form_deposit['amount'],$decimal).' '.strtoupper($pay_curr); ?></span></h2>
                        </div>
                        <div style="clear:both;"><br></div>
                        <div class="col-sm-7">
                            <h2><?php echo $this->lang->line('lbl_payment_name');?></h2> 
                        </div>
                        <div class="col-sm-5">
                        <h2><span style="float:right"><?php echo ucfirst($form_payment['payment_name']); ?></span> </h2>
                     </div>
                     <div class="clearfix"></div>
                    <?php
                    $currency_up=strtolower($currency_info->currency_unit);
                    $currency_det=$this->db->query("select * from payment_currency");
                    $currency_dat=$currency_det->result();
                    $btc_decimal=$currency_dat[1]->deimal_point;
                    $btc_name=$currency_dat[1]->currency_unit;
                    if(isset($form_payment['pay_mode']))
                    {
                        if($form_payment['payment_id']=='2' && $form_payment['pay_mode']=='block')
                        {   
                            $flag=0;
                            if($form_payment['coin_mode']=='BTC')
                            {
                                //$data_amt=file_get_contents("https://blockchain.info/tobtc?currency=USD&value=".$form_deposit['amount']);
                                /*$url = "https://api.cryptonator.com/api/ticker/".$currency_up."-btc";
                                 $json = file_get_contents($url);
                                 $data_api = json_decode($json, TRUE);
                                 $data_amts=$data_api['ticker']['price'];
                                 $data_amt= $data_amts*$form_deposit['amount'];*/
                                 $data_amt=number_format($form_deposit['amount'],$btc_decimal);
                                 $data_amt=str_replace(",",'',$data_amt);
                            }
                            if($form_payment['coin_mode']=='LTC')
                            {
                                $url = "https://api.cryptonator.com/api/ticker/".$currency_up."-ltc";
                                $json = file_get_contents($url);
                                $data_api = json_decode($json, TRUE);
                                $data_amts=$data_api['ticker']['price'];
                                $data_amt= $data_amts*$form_deposit['amount'];
                                $data_amt=number_format($data_amt,$btc_decimal);
                                $data_amt=str_replace(",",'',$data_amt);

                                
                                //$data_amt=file_get_contents("https://blockchain.info/tobtc?currency=USD&value=".$form_deposit['amount']);
                            }
                            if($form_payment['coin_mode']=='DOGE')
                            {
                                $url = "https://api.cryptonator.com/api/ticker/".$currency_up."-doge";
                                $json = file_get_contents($url);
                                $data_api = json_decode($json, TRUE);
                                $data_amts=$data_api['ticker']['price'];
                                $data_amt= $data_amts*$form_deposit['amount'];
                                $data_amt= $data_amts*$form_deposit['amount'];
                                $data_amt=number_format($data_amt,$btc_decimal);
                                $data_amt=str_replace(",",'',$data_amt);
                                //$data_amt=file_get_contents("https://blockchain.info/tobtc?currency=USD&value=".$form_deposit['amount']); 
                            }
                            $user=$this->session->userdata('uusersid');
                            $find_addr=$this->db->query("select * from deposit_address where status='0' and typ='1' and uuserid='$user'");
                            $rest=$find_addr->num_rows();
                            if($rest >0)
                            {
                                $rest=$find_addr->result();
                            	$getaddress=$rest[0]->btc_address;
                            }
                            else
                            {
    							$wallet_addr = $form_payment['email'];
    	                        $wallet_pass = $form_payment['ipn_secret_block'];
    	                        $wallet_api  = $form_payment['api_key'];
                                $json_url = "https://block.io/api/v2/get_new_address/?api_key=$wallet_api";
    	                        $ch = curl_init();            
    	                        curl_setopt($ch,CURLOPT_URL,$json_url);
    	                        curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    	                        $json_data=curl_exec($ch);
                                curl_close($ch);
	                            if($json_data)
	                            {   
	                               $output = json_decode($json_data);
	                               if($output->data)
	                               {                          
	                                   $paid = $output->data;        
	                                   foreach ($paid as $row => $value)
	                                   {      
	                                         if($row=='address')
	                                         {     
	                                            $getaddress = $value;
	                                            $this->db->query("insert into deposit_address(btc_address,amount,status,uuserid,typ)values('$getaddress','0','0','$user','1')");
	                                           }
	                                           if($row=='error_message')  
	                                           {
	                                               $error = $value;
	                                               echo "<b style='color:red;'>".$error."</b><br>";
	                                           }     
	                                       }     
	                                   }   
	                               }
	                           }

                    
                    ?>
                    <br>
                    <h5><?php echo $this->lang->line('lbl_attend');?></h5>
                    <br><BR>
                        <li class="divclas">- <?php echo $this->lang->line('lbl_pay_amt');?> <b style='color:green;'><?php echo $data_amt;?></b> <?php echo $form_payment['coin_mode'];?></li>
                                  <li class="divclas">- <?php echo $this->lang->line('lbl_pay_addr');?>.  <b style='color:green;'><?php echo $getaddress;?></b></li>
                                  <li class="divclas">- <?php echo $this->lang->line('lbl_pay_det');?>. </li>
                                  <div style="clear:both;height:50px;"><br></div>
                    <?php
                    }

                    if($form_payment['payment_id']=='2' && $form_payment['pay_mode']=='address')
                    {
                        $user=$this->session->userdata('uusersid');
                        $find_addr=$this->db->query("select * from btc_addresses where status='2' and typ='1' and uuserid='$user'");
                        $rest=$find_addr->num_rows();
                        if($rest >0)
                        {
                            $rest=$find_addr->result();
                            $getaddress=$rest[0]->payment_value;
                        }
                        else
                        {
                           $find_addr=$this->db->query("select * from btc_addresses where status='1' and typ='1' and uuserid='0'");
                           $rest=$find_addr->result();
                           $getaddress=$rest[0]->payment_value;
                           $pid=$rest[0]->pid;
                           $this->db->query("update btc_addresses set status='2',uuserid='$user' where pid='$pid'");
                        }
                        ?>
                          <div class="refrrinfo clearfix" style="background:none;">
                          <div style="clear:both;"><br></div>
                            <h3>Make a payment through below mentioned address </h3>
                            <div style="clear:both;"><br></div>
                            <div class="col-xs-8">
                             <input id="link01" type="text" class="rtu"  value="<?php echo $getaddress; ?>" placeholder="Your Address" style="border-radius:0px;height:50px;" readonly/></div>
                                <div class="col-xs-4"> 
                                <button style="width:auto;" data-copytarget="#link01" class="copy">Copy</button>
                                </div>
                           <div style="clear:both;"><Br></div>
                            <h3>QR CODE</h3>
                            <div align="center">
                            <img src="https://api.qrserver.com/v1/create-qr-code/?size=350x170&data=<?php echo $getaddress;?>">
                            </div>
                            <div style="clear:both;"><br></div>
                            </div>

                        <?php


                    }

                }
                ?>

                        <?php
                        $flag=0;
                        if($form_payment['payment_name']=='bitcoin')
                        {
                            if($form_payment['pay_mode']!='coin')
                            {
                                $flag=1;
                            }
                            
                        }
                        if($form_payment['payment_name']=='etherum')
                            $flag=1;
                     ?>
                     <?php 
                     if($flag!='1') 
                     {
                      ?>
                        <div class="col-xs-6 cmmn">
                        	<div class="contact_page_btn">
                            <input value="Cancel" name="submit" onclick="goBack()" type="submit">
                            </div>
                        </div>
                     <?php
                        } 
                     ?>
                        
                        <?php
                        if($flag!='1')
                        {
                        ?>
                         <div class="col-xs-6 cmmn">
                         <div class="contact_page_btn">

                        <?php
                        }
                        ?>


                    
                    <?php
                        // check user reinvetment
                        if(isset($form_payment['reinvest'])){
                    ?>
                            <form action="<?php echo $form_payment['action'];?>" method="post" target="_self" style="display:block;" >
                                <input type="hidden" name="item_name" value="Deposit">
                                
                                <input type="hidden" name="amount" value="<?php echo $form_deposit['amount']; ?>">
                                <input type="hidden" name="cancel_return" value="<?php echo $form_payment['cancel_url'];?>"/>
                                <input type="hidden" name="return" value="<?php echo $form_payment['success_url'];?>"/>
                                <input type="hidden" name="uusersid"  value="<?php echo $form_deposit['uusersid'];?>"/>
                                <input type="hidden" name="planid"  value="<?php echo $form_deposit['planid'];?>"/>
                                <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                                <input type="hidden" name="payment_name"  value="<?php echo $form_payment['payment_name'];?>"/>
                                <input type="hidden" name="payment_id"  value="<?php echo $form_payment['payment_id'];?>"/>
                                <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">

                            </form>
                    <?php
                        } else {

                        // online payment gateway
                        // pr($form_payment);
                        if($form_payment['payment_name']=='paypal') {
                      ?>
                        
                        <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_self" style="display:block;" >
                            <input type="hidden" name="cmd" value="_xclick" />
                            <input type="hidden" name="business" value="<?php echo $form_payment['email'];?>" />
                            <input type="hidden" name="item_name" value="Deposit">
                            <input type="hidden" name="currency_code" value="<?php echo strtoupper($pay_curr); ?>" />
                            <input type="hidden" name="amount" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="cancel_return" value="<?php echo $form_payment['cancel_url'];?>"/>
                            <input type="hidden" name="return" value="<?php echo $form_payment['success_url'];?>"/>
                            <input type="hidden" name="notify_url" value="<?php echo $form_payment['ipn_url'];?>"/>
                            <input type="hidden" name="custom"  value="<?php echo $form_deposit['deposit_id'];?>" id="custom">
                            <input type="hidden" name="charset" value="UTF%252d8"/>
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='payza') { ?>
                        

                        <form method="post" action="https://secure.payza.com/checkout">
                            <input type="hidden" name="ap_merchant" value="<?php echo $form_payment['account_id']; ?>"/>
                            <input type="hidden" name="ap_purchasetype" value="item"/>
                            <input type="hidden" name="ap_itemname" value="Investment from <?php echo $form_deposit['username'];?>"/>
                            <input type="hidden" name="ap_amount" value="<?php echo $form_deposit['amount']; ?>"/>
                            <input type="hidden" name="ap_currency" value="<?php echo strtoupper($pay_curr); ?>"/>
                            <input type="hidden" name="ap_description" value=""/>
                            <input type="hidden" name="ap_returnurl" value="<?php echo $form_payment['success_url'];?>"/>
                            <input type="hidden" name="ap_cancelurl" value="<?php echo $form_payment['cancel_url'];?>"/>
                            <input type="hidden" name="ap_alerturl" value="<?php echo $form_payment['ipn_url'];?>"/>
                            <input type="hidden" name="apc_1" value="<?php echo $form_deposit['uusersid'];?>"/>
                            <input type="hidden" name="apc_2" value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="hidden" name="apc_3" value="<?php echo $form_deposit['amount'];?>"/>
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='payeer') { ?>

                        <?php
                            $payid = 28;
                            $m_shop = $form_payment['shop_id']; 
                            $m_orderid = $form_deposit['deposit_id'];
                            $m_amount = number_format($form_deposit['amount'], 2);
                            $m_curr = strtoupper($pay_curr); 
                            $m_desc = base64_encode('Amount Deposited'); 
                            $m_key = $form_payment['secret_key']; 
                            
                            // $m_orderid = $form_deposit['deposit_id'];
                            
                            $arHash = array(
                                $m_shop,
                                $m_orderid,
                                $m_amount,
                                $m_curr,
                                $m_desc,
                                $m_key
                            );
                                    
                            $sign = strtoupper(hash('sha256', implode(':', $arHash)));
                        ?>

                        <form method="GET" action="//payeer.com/merchant/">
                            <input type="hidden" name="m_shop" value="<?=$m_shop?>">
                            <input type="hidden" name="m_orderid" value="<?=$m_orderid?>">
                            <input type="hidden" name="m_amount" value="<?=$m_amount?>">
                            <input type="hidden" name="m_curr" value="<?=$m_curr?>">
                            <input type="hidden" name="m_desc" value="<?=$m_desc?>">
                            <input type="hidden" name="m_sign" value="<?=$sign?>">
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" name="m_process" class="black_btn" value="Click here to Invest"  />
                        </form>

                    <?php } 


                    else if($form_payment['payment_name']=='perfectmoney') { 



                        ?>

                        <?php 
                            //HASH STRING


                            $stamp  = time();

                            $alt_hash = $form_payment['alternate_password'];
                            $md5_hash_alt = strtoupper(md5($alt_hash));

                            /*$string = $form_payment['account_number'].':'. $form_deposit['amount'].':'.strtoupper($currency_info->currency_unit).':'. $form_payment['account_name'];*/

                            $string = $form_payment['account_number'].':'. $form_deposit['amount'].':'.strtoupper($currency_info->currency_unit).':'. $form_payment['account_name'].':'.$md5_hash_alt;

                            $hash   = strtoupper(md5($string));
                        ?>

                        <form action="https://perfectmoney.is/api/step1.asp" method="POST">
                            <input type="hidden" name="PAYEE_ACCOUNT" value="<?php echo $form_payment['account_number']; ?>" >
                            <input type="hidden" name="PAYEE_NAME" value="<?php echo $form_payment['account_number']; ?>">
                            <input type="hidden" name="PAYMENT_ID" value="<?php echo $form_deposit['deposit_id']; ?>">
                            <input type="hidden" name="PAYMENT_AMOUNT" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="PAYMENT_UNITS" value="<?php echo strtoupper($pay_curr); ?>">
                            <input type="hidden" name="STATUS_URL" value='<?php echo $form_payment['ipn_url'];?>'>
                            <input type="hidden" name="PAYMENT_URL" value='<?php echo $form_payment['success_url'];?>'>
                            <input type="hidden" name="NOPAYMENT_URL" value='<?php echo $form_payment['cancel_url'];?>' >
                            <input type="hidden" name="MEMO" value="Purchage" class="pmuser1">
                            <input type="hidden" name="V2_HASH" value="<?=$hash;?>">
                            <input type="hidden" name="code"  class="apc_1"  value="<?php echo $form_deposit['deposit_id']; ?>">
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='okpay') { ?>

                        <?php $customvalues = $form_deposit['uusersid'].','.$form_deposit['deposit_id'].','.$form_deposit['amount'];?>

                        <form  method="post" action="https://www.okpay.com/process.html">
                            <input type="hidden" name="ok_receiver" value="<?php echo $form_payment['merchant_id'];?>"/>
                            <input type="hidden" name="ok_item_1_name" value="Investment from <?php echo $form_deposit['username'];?>"/>
                            <input type="hidden" name="ok_item_1_price" value="<?php echo $form_deposit['amount'];?>"/>
                            <input type="hidden" name="ok_item_1_custom_2_value" value="<?php echo $customvalues;?>"/>
                            <input type="hidden" name="ok_currency" value="<?php echo strtoupper($pay_curr); ?>"/>
                            <input type="hidden" name="ok_return_success" value="<?php echo $form_payment['success_url'];?>" />
                            <input type="hidden" name="ok_return_fail" value="<?php echo $form_payment['cancel_url'];?>" />
                            <input type="hidden" name="ok_ipn" value="<?php echo $form_payment['ipn_url'];?>" />
                            <input type="hidden" name="ok_payment_methods" value="SOF"/>
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='pexpay') { ?>

                        <form action='https://www.pexpay.com/payments/autopay.php' method='post' target='_top' name='pexpay-purchase-form'>
                            <input type='hidden' name='payee_account' value='<?php echo $form_payment['account_number'];?>'> 
                            <input type='hidden' name='amount' value='<?php echo $form_deposit['amount'];?>'> 
                            <input type='hidden' name='memo' value='Investment from <?php echo $form_deposit['username'];?>'> 
                            <input type='hidden' name='return_url' value='<?php echo $form_payment['success_url'];?>'> 
                            <input type='hidden' name='cancel_url' value='<?php echo $form_payment['cancel_url'];?>'> 
                            <input type='hidden' name='notify_url' value='<?php echo $form_payment['ipn_url'];?>'>
                            
                            <input type='hidden' name='extra1' value='<?php echo $form_deposit['uusersid'];?>'> 
                            <input type='hidden' name='extra2' value='<?php echo $form_deposit['deposit_id'];?>'> 
                            <input type='hidden' name='extra3' value='<?php echo $form_deposit['amount'];?>'> 
                            <input type='hidden' name='extra4' value='<?php echo $compound;?>'> 
                            <input type='hidden' name='extra5' value='<?php echo $payid;?>'> 
                            <input type='hidden' name='test' value='on'>
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='solidtrustpay') { ?>

                        <form method="post" action="https://solidtrustpay.com/handle.php">
                            <input type="hidden" name="merchantAccount" value="<?php echo $form_payment['account_login'];?>">
                            <input type="hidden" name="sci_name" value="<?php echo $form_payment['sci_button_name'];?>">
                            <input type="hidden" name="amount" value="<?php echo $form_deposit['amount'];?>">
                            <input type="hidden" name="testmode" value="ON">
                            <input type="hidden" name="item_id" value="Investment from <?php echo $form_deposit['username'];?>">
                            <input type="hidden" name="return_url" value="<?php echo $form_payment['success_url'];?>">
                            <input type="hidden" name="notify_url" value="<?php echo $form_payment['ipn_url'];?>">
                            <input type="hidden" name="cancel_url" value="<?php echo $form_payment['cancel_url'];?>">
                            <input type="hidden" name="SUGGESTED_MEMO" value="Investment from <?php echo $form_deposit['username'];?>">
                            <input type="hidden" name="user1" value="<?php echo $form_deposit['uusersid'];?>">
                            <input type="hidden" name="user2" value="<?php echo $form_deposit['deposit_id'];?>">
                            <input type="hidden" name="user3" value="<?php echo $form_deposit['amount'];?>">
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='skrill') { ?>
                        
                        <form action="https://www.moneybookers.com/app/payment.pl?p=zhyip" method="post">
                            <input type="hidden" name="pay_to_email" value="<?php echo $form_payment['email']; ?>" />
                            <input type="hidden" name="recipient_description" value="Investment from <?php echo $form_deposit['username'];?>" />
                            <input type="hidden" name="transaction_id" value="<?php echo $form_deposit['uusersid'];?>" />
                            <input type="hidden" name="return_url" value="<?php echo $form_payment['success_url']; ?>" />
                            <input type="hidden" name="cancel_url" value="<?php echo $form_payment['cancel_url']; ?>" />
                            <input type="hidden" name="status_url" value="<?php echo $form_payment['ipn_url']; ?>" />
                            <!-- <input type="hidden" name="language" value="<?php echo $language; ?>" />
                            <input type="hidden" name="logo_url" value="<?php echo $logo; ?>" /> -->
                            
                            <input type="hidden" name="amount" value="<?php echo $form_deposit['amount']; ?>" />
                            <input type="hidden" name="currency" value="<?php echo strtoupper($pay_curr); ?>" />
                            <input type="hidden" name="detail1_text" value="Investment from <?php echo $form_deposit['username'];?>" />
                            <input type="hidden" name="merchant_fields" value="order_id" />
                            <input type="hidden" name="order_id" value="<?php echo $form_deposit['deposit_id'];?>" />
                            <!-- <input type="hidden" name="platform" value="<?php echo $platform; ?>" /> -->
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" value="Click here to Invest" class="btn btn-primary" name="Send" />
                        </form>

                    <?php } else if($form_payment['payment_name']=='hdmoney') { ?>

                        <form action="https://www.hd-money.com/sci/Payment.aspx" method="post">
                            <input type="hidden" name="hd_recipient" value="<?php echo $form_payment['account_number'];?>" />
                            <input type="hidden" name="hd_sci_name" value="<?php echo $form_payment['account_name'];?>" />
                            <input type="hidden" name="hd_amount" value="<?php echo $form_deposit['amount']; ?>" />
                            <input type="hidden" name="hd_item_name" value="<?php echo $form_deposit['planid'];?>" />
                            <input type="hidden" name="hd_description" value="Investment from <?php echo $form_deposit['username'];?>" />
                            <input type="hidden" name="hd_callback_url" value="<?php echo $form_payment['ipn_url'];?>" />
                            <input type="hidden" name="hd_callback_method" value="post" />
                            <input type="hidden" name="hd_success_url" value="<?php echo $form_payment['success_url'];?>" />
                            <input type="hidden" name="hd_failure_url" value="<?php echo $form_payment['cancel_url'];?>" />
                            <input type="hidden" name="hd_varX" value="<?php echo $form_deposit['uusersid'];?>" />
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send"></li>
                        </form>

                    <?php } else if($form_payment['payment_name']=='webmoney') { ?>
                        
                        <form method="POST" action="https://merchant.wmtransfer.com/lmi/payment.asp">
                            <input type="hidden" name="LMI_PAYEE_PURSE" value="<?php echo $form_payment['purse_id'];?>">
                            <input type="hidden" name="LMI_PAYMENT_AMOUNT" value="<?php echo $form_deposit['amount'];?>">
                            <input type="hidden" name="LMI_PAYMENT_DESC" value="Investment from <?php echo $form_deposit['username'];?>">
                            <input type="hidden" name="LMI_MODE" value="1">
                            <input type="hidden" name="LMI_RESULT_URL" value="<?php echo $form_payment['ipn_url'];?>">
                            <input type="hidden" name="LMI_SUCCESS_URL" value="<?php echo $form_payment['success_url'];?>">
                            <input type="hidden" name="LMI_FAIL_URL" value="<?php echo $form_payment['cancel_url'];?>">
                            <input type="hidden" name="FIELD_1" value="<?php echo $form_deposit['uusersid'];?>">
                            <input type="hidden" name="FIELD_2" value="<?php echo $form_deposit['planid'];?>">
                            <input type="hidden" name="FIELD_3" value="<?php echo $form_deposit['amount'];?>">
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="submit" id="send" class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php } else if($form_payment['payment_name']=='bankwire') { ?>

                        <form action="<?php echo base_url();?>user/deposit/bankwire" method="post" target="_self" style="display:block;" >
                            <input type="hidden" name="item_name" value="Deposit">
                            <input type="hidden" name="amount" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="cancel_return" value="<?php echo $form_payment['cancel_url'];?>"/>
                            <input type="hidden" name="return" value="<?php echo $form_payment['success_url'];?>"/>
                            <input type="hidden" name="uusersid"  value="<?php echo $form_deposit['uusersid'];?>"/>
                            <input type="hidden" name="planid"  value="<?php echo $form_deposit['planid'];?>"/>
                            <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                            <input type="hidden" name="payment_name"  value="<?php echo $form_payment['payment_name'];?>"/>
                            <input type="hidden" name="payment_id"  value="<?php echo $form_payment['payment_id'];?>"/>
                            <input type="submit" id="send"  class="black_btn" value="Click here to Invest" name="Send">
                        </form>

                    <?php 
                        } 
                        else if($form_payment['payment_name']=='bitcoin') 
                        { 
                        if(isset($form_payment['pay_mode'])){

                            if($form_payment['pay_mode']=='coin')
                            {

                        ?>

                        <form method="post" action="https://www.coinpayments.net/index.php" role="form" id="coform">
                            <input type="hidden" value="_pay" name="cmd">
                            <input type="hidden" value="1" name="reset">
                            <input type="hidden" name="merchant" value="<?php echo $form_payment['merchant_id'];?>">
                            <input type="hidden" name="currency" value="<?php echo strtoupper($pay_curr); ?>">
                            <input type="hidden" name="amountf" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="item_name" value="Deposit">
                            <input type="hidden" name="item_number" value="<?php echo $form_deposit['deposit_id'];?>">
                            <input type="hidden" name="on1" value="<?php echo $form_deposit['uusersid'];?>">
                            <input type="hidden" name="allow_currencies" value="BTC">
                            <input type="hidden" name="want_shipping" value="0">
                            <input type=hidden name="success_url" value="<?php echo $form_payment['success_url'];?>">
                            <input type=hidden name="notify_url" value="<?php echo $form_payment['ipn_url'];?>">
                            <input type=hidden name="cancel_url" value="<?php echo $form_payment['cancel_url'];?>">
                            <input type="submit" name="button" id="button" value="Deposit" class="button" />
                            <input type="button" name="button" id="button" onclick="window.location='deposit.php'" value="Cancel" class="button" />
                        </form>
                        <?php
                            }
                            else
                            {
                                ?>
                                 <form action="<?php echo base_url();?>user/deposit/block" method="post" target="_self" style="display:block;" >
                                    <input type="hidden" name="item_name" value="Deposit">
                                    <input type="hidden" name="amount" value="<?php echo $data_amt; ?>">
                                    <input type="hidden" name="btc_amount" value="<?php echo $data_amt; ?>">
                                    <input type="hidden" name="pay_mode" value="1">
                                    <input type="hidden" name="pay_address" value="<?php echo $getaddress;?>">

                                    <input type="hidden" name="cancel_return" value="<?php echo $form_payment['cancel_url'];?>"/>
                                    <input type="hidden" name="return" value="<?php echo $form_payment['success_url'];?>"/>
                                    <input type="hidden" name="uusersid"  value="<?php echo $this->session->userdata('uusersid');?>"/>
                                    <input type="hidden" name="planid"  value="<?php echo $form_deposit['planid'];?>"/>
                                    <input type="hidden" name="depositid"  value="<?php echo $form_deposit['deposit_id'];?>"/>
                                    <input type="hidden" name="payment_name"  value="<?php echo $form_payment['payment_name'];?>"/>
                                    <input type="hidden" name="payment_id"  value="<?php echo $form_payment['payment_id'];?>"/>
                                   
                                   
                                </form>

                                <?php

                            } }

                        ?>

                    <?php } else if($form_payment['payment_name']=='advcash') { ?>

                        <?php
                            $ac_account_email = $form_payment['ac_account_email'];
                            $ac_sci_name = $form_payment['ac_sci_name'];
                            $ac_amount = $form_deposit['amount'];
                            $ac_currency = strtoupper($currency_info->currency_unit);
                            $secret = $form_payment['ac_api_pwd'];
                            $ac_order_id = $form_deposit['deposit_id'];

                            $sign_hash = hash('sha256', implode(":", array(
                                $ac_account_email,
                                $ac_sci_name,
                                $ac_amount,
                                $ac_currency,
                                $secret,
                                $ac_order_id
                            )));
                        ?>

                            <form method="post" action="https://wallet.advcash.com/sci/" role="form" id="coform">
                                <input type="hidden" name="ac_account_email" value="<?php echo $form_payment['ac_account_email'];?>" />
                                <input type="hidden" name="ac_sci_name" value="<?php echo $form_payment['ac_sci_name'];?>" />
                                <input type="hidden" name="ac_amount" value="<?php echo $form_deposit['amount']; ?>" />
                                <input type="hidden" name="ac_currency" value="<?php echo strtoupper($pay_curr); ?>" />
                                <input type="hidden" name="ac_order_id" value="<?php echo $form_deposit['deposit_id'];?>" />
                                <input type="hidden" name="ac_sign" value="<?php echo $sign_hash;?>" />
                                <!-- Optional Fields -->
                                <input type="hidden" name="ac_success_url" value="<?php echo $form_payment['success_url'];?>" />
                                <input type="hidden" name="ac_success_url_method" value="POST" />
                                <input type="hidden" name="ac_fail_url" value="<?php echo $form_payment['cancel_url'];?>" />
                                <input type="hidden" name="ac_fail_url_method" value="POST" />
                                <input type="hidden" name="ac_status_url" value="<?php echo $form_payment['ipn_url'];?>" />
                                <input type="hidden" name="ac_status_url_method" value="POST" />
                                <input type="hidden" name="ac_comments" value="Comment" />
                                <input type="hidden" name="operation_id" value="<?php echo $form_deposit['uusersid'];?>">
                                <input type="submit" name="button" id="button" value="Deposit" class="button" />
                                <input type="button" name="button" id="button" onclick="window.location='deposit.php'" value="Cancel" class="button" />
                            </form>

                    <?php } else if($form_payment['payment_name']=='ether') { ?>

                        <form method="post" action="https://www.coinpayments.net/index.php" role="form" id="coform">
                            <input type="hidden" value="_pay" name="cmd">
                            <input type="hidden" value="1" name="reset">
                            <input type="hidden" name="merchant" value="<?php echo $form_payment['merchant_id'];?>">
                            <input type="hidden" name="currency" value="ETH">
                            <input type="hidden" name="amountf" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="item_name" value="Deposit">
                            <input type="hidden" name="item_number" value="<?php echo $form_deposit['deposit_id'];?>">
                            <input type="hidden" name="on1" value="<?php echo $form_deposit['uusersid'];?>">
                            <!-- <input type="hidden" name="allow_currencies" value=""> -->
                            <input type="hidden" name="want_shipping" value="0">
                            <input type=hidden name="success_url" value="<?php echo $form_payment['success_url'];?>">
                            <input type=hidden name="notify_url" value="<?php echo $form_payment['ipn_url'];?>">
                            <input type=hidden name="cancel_url" value="<?php echo $form_payment['cancel_url'];?>">
                            <input type="submit" name="button" id="button" value="Deposit" class="button" />
                            <input type="button" name="button" id="button" onclick="window.location='deposit.php'" value="Cancel" class="button" />
                        </form>

                   <?php }

                            else if($form_payment['payment_name']=='etherum') {


                            $url = "https://api.cryptonator.com/api/ticker/".$currency_up."-eth";
                            $json = file_get_contents($url);
                            $data_api = json_decode($json, TRUE);
                            $data_amts=$data_api['ticker']['price'];
                            $data_amt= $data_amts*$form_deposit['amount'];


                     ?>

                            <form action="<?php echo base_url();?>makeadeposit" method="post" target="_self" style="display:block;" >
                            <input type="hidden" value="_pay" name="cmd">
                            <input type="hidden" value="1" name="reset">
                            <input type="hidden" name="planid"  value="<?php echo $form_deposit['planid'];?>"/>
                            <input type="hidden" name="uusersid" value="<?php echo $form_deposit['uusersid'];?>">
                            <input type="hidden" name="merchant" value="<?php echo $form_payment['merchant_id'];?>">
                            <input type="hidden" name="currency" value="ETH">
                            <input type="hidden" name="payid" value="20">
                             <input type="hidden" name="btc_amount" value="<?php echo $data_amt; ?>">
                            <input type="hidden" name="amountf" value="<?php echo $form_deposit['amount']; ?>">
                            <input type="hidden" name="deposit" value="Deposit">
                            <input type="hidden" name="success_url" value="<?php echo $form_payment['success_url'];?>">
                            <input type="hidden" name="cancel_url" value="<?php echo $form_payment['cancel_url'];?>">
                            <br><br>

                            <div class="col-xs-12"><br><br>
                         
                    <div class="col-md-12 cmmn">
                        <div class="contact_page_btn">
                            <input  class="button" type="submit" name="submit" id="button" onclick="goBack()" value="Cancel" class="button" />

                            </div>
                            </div>
                    <div class="col-md-12 cmmn">
                        <div class="contact_page_btn">
                            <input  class="button" type="submit" name="button" id="button" value="Deposit" class="button" />
                        
                        </div>
                    </div>
                           </div>
                        </form>
                        <!-- Ethereum End -->

                    <?php }

                            

                        // reinvestment process
                        } 
                    ?>
                     <!-- <div class="contact_page_btn" style="width:100%">
                          <input value="Cancel" name="submit" type="submit" style="width:96%">
                      </div> -->
                    
                  </div>	
                   </div> 
                </div>
            </div>
        </div>
                <div class="col-lg-2">
             </div>
                
         </div>    
     </div>
   </section>
                
                
            
  <section class="dmain">
  </section>

    <?php
        $this->load->view('user/footer');
    ?>
  
</section>


    <script src="<?php echo base_url();?>styles/js/jquery-1.12.2.min.js"></script>

    <script src="<?php echo base_url();?>styles/js/jquery.meanmenu.js"></script>
    <script src="<?php echo base_url();?>styles/js/owl.carousel.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/waypoints.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/jquery.counterup.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/jquery.mixitup.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/waypoints.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/instafeed.min.js"></script>
    <script src="<?php echo base_url();?>styles/js/bootstrap.min.js"></script>

    <script src="<?php echo base_url();?>styles/js/main.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>styles/js/owl.carousel.min.js"></script>
    <script type="text/javascript">

    	$(document).ready(function($) {
        	$("#owl-example").owlCarousel({  
            	nav:true,
            	items : 8, 
                itemsCustom : false,
                itemsDesktop : [1199,8],
                itemsDesktopSmall : [980,5],
                itemsTablet: [768,5],
                itemsTabletSmall: [768,4],
                itemsMobile : [479,2],
                singleItem : false,
                itemsScaleUp : true,
            	navigation : true,
                navigationText : ["",""],
                rewindNav : true,
                scrollPerPage : true,
        	});

            document.body.addEventListener('click', copy, true);
        function copy(e) {

            
          var
            t = e.target,
            c = t.dataset.copytarget,
            inp = (c ? document.querySelector(c) : null);

          if (inp && inp.select) {
            inp.select();
            try {
              document.execCommand('copy');
              inp.blur();
            }
            catch (err) {
              swal({
                  title: "<?php echo $this->lang->line('referral_copy_lbl'); ?>",
                  confirmButtonColor: "#f5ab35"
              });
            }

          }

        }

    	});
    	
    </script>
    <script>
        function goBack() {
            var depositid = $("input[name='depositid']").val();
            console.log(depositid);
            $.ajax({
                method : 'POST',
                url   : '<?php echo base_url();?>user/deposit/Cancelprocess',
                data : {'depositid':depositid},
                success : function(res)
                {
                    if(res=='1') {
                        window.history.back();
                    } else {
                        console.log('not cancel');
                    }
                }
            })
        }
    </script>

</body>
</html>
