 {include file="mlogo.tpl"}

<h3>Make Deposit</h3>
	<!----
	<div class="content-box">
		<h4 class="mb-3">Which order is better?  Automated or manual?</h4>

		<button class="btn-bordered" type="button" data-toggle="collapse" data-target="#which_better" aria-expanded="false" aria-controls="which_better">Let's investigate all the pros and cons of each of the orders!</button>

		<div class="collapse" id="which_better">
			<div class="row mt-4">
				<div class="col-xl-6 mb-xl-0 mb-md-4">
					<h4 class="mb-3">Automated order</h4>
					<ul class="differnce">
						<li>+ Total profitability is higher than that of a manual order (estimation for 30 days)</li>
						<li>+ No limits on opening an order</li>
						<li>+ Affiliate program is available</li>
						<li>+ Daily accruals from 0.5 to 5%</li>
						<li class="minus">- Fee for the possibility of creating an order (one-time)</li>
					</ul>
					<b>Brief description:</b><br>
 					It is designed for long-term profit; no completion term; brings profit from 0.5 to 5% daily. Affiliate program is available.				</div>
				<div class="col-xl-6">
					<h4 class="mb-3">Manual order</h4>
					<ul class="differnce">
						<li>+ No fee for order activation</li>
						<li>+ No limits on opening an order</li>
						<li>+ Quick order closing and profit</li>
						<li class="minus">- The overall profitability is lower than that of an automated order (estimation for 30 days)</li>
						<li class="minus">- Affiliate program is not available</li>
					</ul>
					<b>Brief description:</b><br>
					It is designed for testing platform capabilities;  brings profit according to the chosen pair.  Affiliate program is not available.				</div>
			</div>
		</div>
	</div>
	---->
 
	<ul class="nav nav-tabs">
		<li class="nav-item">
		   	<a class="active" data-toggle="tab" href="#automatic">Deposit From Payment Processor</a>
		</li>
		<li class="nav-item">
		   	<a data-toggle="tab" href="#manual">Deposit From Account Balance</a>
		</li>		
	</ul>
	 

	<div class="tab-content">
		<div class="tab-pane active" id="automatic">
			<div class="content-box">
			With payment processor deposit method, you can deposit from your ecurrency wallet to your selected investment plan to generate profit according to the plan specification. You also can select account balance option for deposits if you have available fund in your account balance.
			
			
			</div>


{if $fatal}

{if $fatal == 'one_per_month'}
You can deposit once a month only.
{/if}

{else}

{literal}
<script language="javascript"><!--
function openCalculator(id)
{

  w = 225; h = 400;
  t = (screen.height-h-30)/2;
  l = (screen.width-w-30)/2;
  window.open('?a=calendar&type=' + id, 'calculator' + id, "top="+t+",left="+l+",width="+w+",height="+h+",resizable=1,scrollbars=0");

{/literal}
  {if $qplans > 1}
{literal}
  for (i = 0; i < document.spendform.h_id.length; i++)
  {
    if (document.spendform.h_id[i].value == id)
    {
      document.spendform.h_id[i].checked = true;
    }
  }
{/literal}
  {/if}
{literal}

}

function updateCompound() {
  var id = 0;
  var tt = document.spendform.h_id.type;
  if (tt && tt.toLowerCase() == 'hidden') {
    id = document.spendform.h_id.value;
  } else {
    for (i = 0; i < document.spendform.h_id.length; i++) {
      if (document.spendform.h_id[i].checked) {
        id = document.spendform.h_id[i].value;
      }
    }
  }

  var cpObj = document.getElementById('compound_percents');
  if (cpObj) {
    while (cpObj.options.length != 0) {
      cpObj.options[0] = null;
    }
  }

  if (cps[id] && cps[id].length > 0) {
    document.getElementById('coumpond_block').style.display = '';

    for (i in cps[id]) {
      cpObj.options[cpObj.options.length] = new Option(cps[id][i]);
    }
  } else {
    document.getElementById('coumpond_block').style.display = 'none';
  }
}
var cps = {};
--></script>
{/literal}

{if $frm.say eq 'deposit_success'}
<h1>The deposit has been successfully saved.</h1>
<br><br>
{/if}

{if $frm.say eq 'deposit_saved'}
<h1>The deposit has been saved. It will become active when the administrator checks statistics.</h1><br><br>
{/if}
<form method=post name="spendform">
<input type=hidden name=a value=deposit>

				<div class="row">
				

				<div class="col-xl-7 col-lg-12">
					
						<h3>Investment Plans</h3>
						
						
						
{section name=plans loop=$plans}

	<div class="content-box ">
<table class="tab" >
 
<tr>
 <td colspan=3>
  <b>{$plans[plans].name}</b></td>
</tr>
 
<tr class="head">
 <th class=inheader>Plan</th>
 <th class=inheader width=200>Spent Amount ({$currency_sign})</th>
 <th class=inheader width=100 nowrap><nobr>{$plans[plans].period} Profit (%)</nobr></th>
</tr> 
{section name=options loop=$plans[plans].plans}
<tr>
 <td class=item>{$plans[plans].plans[options].name|escape:html}</td>
 <td class=item align=right>{$plans[plans].plans[options].deposit}</td>
 <td class=item align=right>{$plans[plans].plans[options].percent}</td>
</tr>
{/section}
{if $settings.enable_calculator}
<tr>
 <td colspan=3 align=right><a href="javascript:openCalculator('{$plans[plans].id}')">Calculate your profit &gt;&gt;</a></td>
</tr>
{/if}
</table><br><br>
<script>
cps[{$plans[plans].id}] = {$plans[plans].compound_percents_json};
</script></div>
{/section}

						
						
					 
					</div>
					<div class="col-xl-5 col-lg-12">
						<h3>Process Deposit </h3>
						
						
						<div class="content-box ">
							<table cellspacing=0 cellpadding=2 border=0  class="tab">
<tr>
 <td>Your account balance ({$currency_sign}):</td>
 <td align=right>{$currency_sign}{$ab_formated.total}</td>
</tr>


<tr>
 <td>Select Investment Plan </td>
 <td align=right>
   <select name=h_id  class="form-control">
{section name=plans loop=$plans}
   <option value='{$plans[plans].id}'>{$plans[plans].name}</option>
{/section}
     </select> </td>
</tr>

<tr>
 <td>Select Payment method </td>
 <td align=right>
	  <select name=type class="form-control">

{section name=p loop=$ps}
   {if $ps[p].status}


 <option value='process_{$ps[p].id}'>{$ps[p].name}</option>
  {/if}
{/section}

{section name=p loop=$ps}
   {if $ps[p].balance > 0 and $ps[p].status == 1}
   <option value='account_{$ps[p].id}'>Balance {$ps[p].name}</option>
   
   {/if}
{/section}

     </select>
	 </td>
</tr>

 
<tr>
 <td>Amount to Spend ({$currency_sign}):</td>
 <td align=right><input type=text name=amount value='{$min_deposit}' class="form-control" size=15 style="text-align:right;"></td>
</tr>
<tr id="coumpond_block" style="display:none">
 <td>Compounding(%):</td>
 <td align=right>
  <select name="compound" class="form-control" id="compound_percents"></select>
 </td>
</tr>
 
<tr>
 <td colspan=2><input type=submit value="Spend" class=sbmt></td>
</tr></table> 
							 
							 
						</div>
					</div>
				</div>

</form>	
{literal}
<script language=javascript>
for (i = 0; i<document.spendform.type.length; i++) {
  if ((document.spendform.type[i].value.match(/^process_/))) {
    document.spendform.type[i].checked = true;
    break;
  }
}
updateCompound();
</script>
{/literal}

{/if}			
		</div>

		<div class="tab-pane" id="manual">
		 
{if $fatal}

{if $fatal == 'one_per_month'}
You can deposit once a month only.
{/if}

{else}

{literal}
<script language="javascript"><!--
function openCalculator(id)
{

  w = 225; h = 400;
  t = (screen.height-h-30)/2;
  l = (screen.width-w-30)/2;
  window.open('?a=calendar&type=' + id, 'calculator' + id, "top="+t+",left="+l+",width="+w+",height="+h+",resizable=1,scrollbars=0");

{/literal}
  {if $qplans > 1}
{literal}
  for (i = 0; i < document.spendform.h_id.length; i++)
  {
    if (document.spendform.h_id[i].value == id)
    {
      document.spendform.h_id[i].checked = true;
    }
  }
{/literal}
  {/if}
{literal}

}

function updateCompound() {
  var id = 0;
  var tt = document.spendform.h_id.type;
  if (tt && tt.toLowerCase() == 'hidden') {
    id = document.spendform.h_id.value;
  } else {
    for (i = 0; i < document.spendform.h_id.length; i++) {
      if (document.spendform.h_id[i].checked) {
        id = document.spendform.h_id[i].value;
      }
    }
  }

  var cpObj = document.getElementById('compound_percents');
  if (cpObj) {
    while (cpObj.options.length != 0) {
      cpObj.options[0] = null;
    }
  }

  if (cps[id] && cps[id].length > 0) {
    document.getElementById('coumpond_block').style.display = '';

    for (i in cps[id]) {
      cpObj.options[cpObj.options.length] = new Option(cps[id][i]);
    }
  } else {
    document.getElementById('coumpond_block').style.display = 'none';
  }
}
var cps = {};
--></script>
{/literal}

{if $frm.say eq 'deposit_success'}
<h1>The deposit has been successfully saved.</h1>
<br><br>
{/if}

{if $frm.say eq 'deposit_saved'}
<h1>The deposit has been saved. It will become active when the administrator checks statistics.</h1><br><br>
{/if}
<form method=post name="spendform">
<input type=hidden name=a value=deposit>

				<div class="row">
				

				<div class="col-xl-7 col-lg-12">
					
						<h3>Investment Plans</h3>
						
						
						
{section name=plans loop=$plans}

	<div class="content-box ">
<table class="tab" >
 
<tr>
 <td colspan=3>
  <b>{$plans[plans].name}</b></td>
</tr>
 
<tr class="head">
 <th class=inheader>Plan</th>
 <th class=inheader width=200>Spent Amount ({$currency_sign})</th>
 <th class=inheader width=100 nowrap><nobr>{$plans[plans].period} Profit (%)</nobr></th>
</tr> 
{section name=options loop=$plans[plans].plans}
<tr>
 <td class=item>{$plans[plans].plans[options].name|escape:html}</td>
 <td class=item align=right>{$plans[plans].plans[options].deposit}</td>
 <td class=item align=right>{$plans[plans].plans[options].percent}</td>
</tr>
{/section}
{if $settings.enable_calculator}
<tr>
 <td colspan=3 align=right><a href="javascript:openCalculator('{$plans[plans].id}')">Calculate your profit &gt;&gt;</a></td>
</tr>
{/if}
</table><br><br>
<script>
cps[{$plans[plans].id}] = {$plans[plans].compound_percents_json};
</script></div>
{/section}

						
						
					 
					</div>
					<div class="col-xl-5 col-lg-12">
						<h3>Process Deposit </h3>
						
						
						<div class="content-box ">
							<table cellspacing=0 cellpadding=2 border=0  class="tab">
<tr>
 <td>Your account balance ({$currency_sign}):</td>
 <td align=right>{$currency_sign}{$ab_formated.total}</td>
</tr>


<tr>
 <td>Select Investment Plan </td>
 <td align=right>
   <select name=h_id  class="form-control">
{section name=plans loop=$plans}
   <option value='{$plans[plans].id}'>{$plans[plans].name}</option>
{/section}
     </select> </td>
</tr>

<tr>
 <td>Select Payment method </td>
 <td align=right>
	  <select name=type class="form-control">
{section name=p loop=$ps}
   {if $ps[p].balance > 0 and $ps[p].status == 1}
   <option value='account_{$ps[p].id}'>Balance {$ps[p].name}</option>
   
   {/if}
{/section}
 {if $ab_formated.total ==0}
  <option value=' '>No Balance available</option>
	  {/if}

     </select>
	 </td>
</tr>

 
<tr>
 <td>Amount to Spend ({$currency_sign}):</td>
 <td align=right><input type=text name=amount value='{$min_deposit}' class="form-control" size=15 style="text-align:right;"></td>
</tr>
<tr id="coumpond_block" style="display:none">
 <td>Compounding(%):</td>
 <td align=right>
  <select name="compound" class="form-control" id="compound_percents"></select>
 </td>
</tr>

 
<tr>
 <td colspan=2><input type=submit value="Spend" class=sbmt></td>
</tr></table> 
							 
							 
						</div>
					</div>
				</div>

</form>	
{literal}
<script language=javascript>
for (i = 0; i<document.spendform.type.length; i++) {
  if ((document.spendform.type[i].value.match(/^process_/))) {
    document.spendform.type[i].checked = true;
    break;
  }
}
updateCompound();
</script>
{/literal}

{/if}		
		</div>

	</div>

 








 {include file="mfooter2.tpl"}