{include file="header.tpl"}
	<!-- Hor-Content -->
			<div class="hor-content main-content">
				<div class="container">

					<!--Page header-->
					<div class="page-header">

						<div class="page-leftheader">
							<ol class="breadcrumb">
								<li class="breadcrumb-item"><a href="./"><i class="fe fe-home mr-2 fs-14"></i>Home</a>
								</li>
								<li class="breadcrumb-item active" aria-current="page"><a href="#">Account Deposit</a>
								</li>
							</ol>
						</div>


					</div>
					<!--End Page header-->

					<!-- Row-1 -->
					<center>
						<div class="" id="packages">
							<h3>Investment Packages</h3>
						</div>
					</center>

				
{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'}
<h3>The deposit has been successfully saved.</h3>
<br><br>
{/if}

{if $frm.say eq 'deposit_saved'}
<h3>The deposit has been saved. It will become active when the administrator checks statistics.</h3><br><br>
{/if}

<br>
{if $errors}
{if $errors.less_min}
Sorry, you can deposit not less than {$currency_sign}{$errors.less_min} with selected processing<br><br>
{/if}
{if $errors.greater_max}
Sorry, you can deposit not greater than {$currency_sign}{$errors.greater_max} with selected processing<br><br>
{/if}
{if $errors.not_enough_funds}
You have no enough funds to complete the operation.<br><br>
{/if}
{if $errors.ec_forbidden}
Sorry, deposit with selected processing is temproary forbidden.<br><br>
{/if}
{if $errors.cannot_invest_this_plan_anymore}
Sorry, you cannot invest this plan anymore<br><br>
{/if}
{if $errors.external_deposits_disabled}
Deposit to this plan from external processing is forbidden.
{/if}
{if $errors.internal_deposits_disabled}
Deposit to this plan from balance is forbidden.
{/if}
{if $errors.no_ps}
Please, select funds source.
{/if}
{if $errors.deposits_amount_exeeded}
Your total deposit in &quot;{$errors.deposits_amount_exeeded.plan|escape:html}&quot; should not more than {$errors.deposits_amount_exeeded.amount_limit|fiat}<br><br>
{/if}
{/if}
	<!-- Row -->
					<div class="row">
{foreach from=$plans item=plan name=fplans}
<div class="col-md-4">
<div class="panel price  panel-color">
{foreach from=$plan.plans item=o}
<div class="panel-body text-center pt-0"><br>
<center><img src="bb/lg.png" ></center><br>
<div class="price-title" style="color: #fff; font-size: 30px;">{$o.name|escape:html}</div><br>
<p class="lead font-weight-semibold"><strong>{$o.percent} /</strong> %</p></div>
{/foreach}
<form method=post name="spendform">
<input type=hidden name=a value=deposit>
<ul class="list-group list-group-flush text-center">
{foreach from=$plan.plans item=o}
<li class="list-group-item">{$plan.name|escape:html}</li>
<li class="list-group-item">Min. Deposit: {$o.min_deposit|fiat}</li>
<li class="list-group-item">Max. Deposit: {if $o.max_deposit == 0}&infin;{else}{$o.max_deposit|fiat}{/if}</li>
{/foreach}
<li>
<div class="row">
<div class="col-lg">
<input class="form-control" align=center placeholder="{$o.min_deposit}" type="text" name="amount" value='{$frm.amount|default:$min_deposit|amount_format}' >
<select class="form-control" name="type">
<option value="0">Select Crypto</option>
{foreach from=$dps item=p name=p}
<option value="process_{$p.id}" {if $frm.type == "process_`$p.id`"}checked{/if} data-fiat="{$p.fiat}" >{$p.name}</option>
{/foreach}
{foreach from=$dps item=p name=p}
<option value="account_{$p.id}" {if $frm.type == "account_`$p.id`"}checked{/if} data-fiat="{$p.fiat}" {if $p.available <= 0}disabled{/if} >{$p.name} - {$p.available|fiat:$p.id}</option>
{/foreach}
</select>
<input type="hidden" name=h_id value="{$plan.id}" {if (($smarty.foreach.fplans.first == 1) && (!$frm.h_id)) || ($frm.h_id == $plan.id)} checked {/if} onclick="updateCompound()">
</div>
</div>
</li>
</ul>
<div class="panel-footer text-center border-right-0 border-left-0">
<button type="submit" class="btn btn-lg btn-primary btn-block">Deposit Now!</button>
</div>
</form>
</div>
</div>
{/foreach}
</div>
					<!-- End Row -->
					<!-- End Row-1 -->

				</div>
			</div>
			<!-- End hor-content-->
		</div>
{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}
{include file="footer.tpl"}