{include file="header.tpl"}

                <!-- PAGE-NAVIGATOR -->
        <section id="page-navigator">
            <div class="container-fluid">
                <div aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="/">Home</a></li>
                        <li class="breadcrumb-item"><a href="/"
                                                       class="cursor-inherit">Make Deposit</a></li>
                    </ol>
                </div>
            </div>
        </section>
        <!-- /PAGE-NAVIGATOR -->
        </header>
    <!-- DASHBOARD-HEADER -->

    <main id="page-container">
        {include file="left.tpl"}
  
{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}

{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}
 


 <!-- INVESTMENT -->
<section id="investment" class="secbg-1  pt-0 ">
<div class=" container-fluid ">
            
<div class="investment-wrapper">
<div class="row">


{foreach from=$plans item=plan name=fplans}
<div class=" col-md-6 col-lg-4 col-xl-3   ">
<form method=post name="spendform">
<input type=hidden name=a value=deposit>
<div class="card-type-1 card align-items-start wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.15s">
{foreach from=$plan.plans item=o}<div class="featured"><span>{$o.name|escape:html}</span></div>{/foreach}
<h4 class="h4">{$plan.name|escape:html}</h4>
{foreach from=$plan.plans item=o}
<h4 class="h4 themecolor"> {$o.min_deposit|fiat} - {if $o.max_deposit == 0}&infin;{else}{$o.max_deposit|fiat}{/if} </h4>
<div class="d-flex align-items-baseline"> <h4 class="h4"> {$o.percent}% </h4> <h6 class="ml-5">{$plan.period} </h6></div>
{/foreach}
<hr class="hr">
<!--<p class="text">Profit For  Every Day</p>-->
<p class="text"> Capital will back : <span class="badge badge-success px-2 py-1">Yes</span> </p>
<!--p class="text"> Total   10 % + <span class="badge badge-success">Capital</span> </p-->
<hr class="hr">
<p class="text"><input type=text name=amount value='{$frm.amount|default:$min_deposit|amount_format}' class="form-control form-control-lg bg-transparent" ></p>
<br>
<p class="text">
<select name=type class="form-control-lg bg-transparent"  style="color: #fff;">
{foreach from=$dps item=p name=p}
<option value="process_{$p.id}" {if $frm.type == "process_`$p.id`"}checked{/if} data-fiat="{$p.fiat}" style="color: #000;">{$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} style="color: #000;">{$p.name} - {$p.available|fiat:$p.id}</option>
{/foreach} </select></p>
<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()">

<button type="submit" class="btn-base text-uppercase mt-30 investNow">Invest Now</button>
</div>
{*{if $settings.enable_calculator}
<tr>
 <td colspan=3 align=right><a href="javascript:openCalculator('{$plan.id}')">Calculate your profit &gt;&gt;</a></td>
</tr>
{/if}
<script>
cps[{$plan.id}] = {$plan.compound_percents_json};
</script>*}
</form></div>
{/foreach}

</div></div>

</div>
           
    </section>
    <!-- /INVESTMENT -->



{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}






    </main>
</div>
<!-- /DASHBOARD-PAGE-LAYOUT -->
{include file="footer.tpl"}