{include file="header.tpl"}
<main class="content cabinet-content">
            <div class="container">
                <div class="row">
                    <div class="col-xl-12">
                        <div class="cabinet-head">
                            <div class="cabinet-head__box">
                                <div class="main-title">Deposit</div>
                                <div class="main-subtitle">Make</div>
                            </div>
		<div class="cabinet-btns">
		    <a class="main-btn" href="/?a=deposit">Make Deposit</a><a class="main-btn main-btn_transparent" href="/?a=withdraw">withdrawal</a></div>

                        </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'}
<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.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}
<div class="alert alert-info">Note: For daily plans, you will get profit on working day only (from Monday to Friday)</div>

<br><br>
<form method=post name="spendform">
<input type=hidden name=a value=deposit>
<div class="col-md-12">
                            <div class="cabinet-plans">						


				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='1' checked>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">10%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">24</div>
											<div class="plan-day__text">
												<p>After </p>
												<p>Hours</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$25</p></div><div class="plan-info"><span>Max:</span><p>$300</p></div></div>

								</div>
				</label>
				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='2'>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">25%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">24</div>
											<div class="plan-day__text">
												<p>After </p>
												<p>Hours</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$300</p></div><div class="plan-info"><span>Max:</span><p>$10000</p></div></div>

								</div>
				</label>
				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='3'>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">40%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">24</div>
											<div class="plan-day__text">
												<p>After </p>
												<p>Hours</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$6000</p></div><div class="plan-info"><span>Max:</span><p>$100000</p></div></div>

								</div>
				</label>
				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='4'>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">55%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">24</div>
											<div class="plan-day__text">
											<p>After </p>
												<p>Hours</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$8000</p></div><div class="plan-info"><span>Max:</span><p>$100,000</p></div></div>

								</div>
				</label>
				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='5'>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">20%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">30</div>
											<div class="plan-day__text">
												<p>Dairy For </p>
												<p>Days</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$30,000</p></div><div class="plan-info"><span>Max:</span><p>$500,000</p></div></div>

								</div>
				</label>
				<label class="cabinet-plans__item">
					<input type="radio" name=h_id value='6'>
                                    <div class="plan">
									<div class="plan-icon">
										<svg>
											<use xlink:href="/assets/img/sprite.svg#check"></use>
										</svg>
									</div>
									<div class="plan-percent">40%</div>
									<div class="plan-top">
										<div class="plan-day">
											<svg>
												<use xlink:href="/assets/img/sprite.svg#time"></use>
											</svg>
											<div class="plan-day__num">40</div>
											<div class="plan-day__text">
												<p>Dairy For</p>
												<p>Days</p>
											</div>
										</div>
										
									 </div>  
									 <div class="plan-bot"><div class="plan-info"><span>Min:</span><p>$50,000</p></div><div class="plan-info"><span>Max:</span><p>$1000000</p></div></div>

								</div>
				</label>


</div></div>



<label class="cabinet-amount">
<div class="cabinet-refs__title"><svg><use xlink:href="/assets/img/sprite.svg#turn-right"></use></svg>Enter amount</div>
<div class="cabinet-input"><input type="text" name="amount" value="{$min_deposit}"><span id="amount_curr">USD</span></div>
</label>


             <!--payment account -->

<div class="main-title">PAYMENT SYSTEM</div>
   <div class="main-subtitle">Select from Account Balance</div>
<div class="cabinet-payment">
   
{section name=p loop=$ps}
   {if $ps[p].balance > 0 and $ps[p].status == 1}
   <label>
<input class="plan_item" type="radio" name=type value="account_{$ps[p].id}" {if $smarty.section.p.index == 0} checked {/if}>
        <div class="cabinet-payment__item">
<div class="cabinet-payment__item-icon">
<img src="/assets/img/{$ps[p].id}.png"/>
</div><p>{$ps[p].name}</p>
<div class="cabinet-payment__item-check">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492 492" id="check"><path d="M484.128 104.478l-16.116-16.116c-5.064-5.068-11.816-7.856-19.024-7.856s-13.964 2.788-19.028 7.856L203.508 314.81 62.024 173.322c-5.064-5.06-11.82-7.852-19.028-7.852-7.204 0-13.956 2.792-19.024 7.852l-16.12 16.112C2.784 194.51 0 201.27 0 208.47c0 7.204 2.784 13.96 7.852 19.028l159.744 159.736c.212.3.436.58.696.836l16.12 15.852c5.064 5.048 11.82 7.572 19.084 7.572h.084c7.212 0 13.968-2.524 19.024-7.572l16.124-15.992c.26-.256.48-.468.612-.684l244.784-244.76c10.5-10.476 10.5-27.52.004-38.008z"></path></svg>
                                            </svg>
                                        </div>
                                    </div>
                                </label>

   {/if}
{/section}
</div>

<div class="main-subtitle">Select From Payment System</div>
<div class="cabinet-payment"> 
{section name=p loop=$ps}
   {if $ps[p].status}
<label>
<input class="plan_item" type="radio" name=type value="process_{$ps[p].id}" {if $smarty.section.p.index == 0} checked {/if}>
        <div class="cabinet-payment__item">
<div class="cabinet-payment__item-icon">
<img src="/assets/img/{$ps[p].id}.png"/>
</div><p>{$ps[p].name}</p>
<div class="cabinet-payment__item-check">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 492 492" id="check"><path d="M484.128 104.478l-16.116-16.116c-5.064-5.068-11.816-7.856-19.024-7.856s-13.964 2.788-19.028 7.856L203.508 314.81 62.024 173.322c-5.064-5.06-11.82-7.852-19.028-7.852-7.204 0-13.956 2.792-19.024 7.852l-16.12 16.112C2.784 194.51 0 201.27 0 208.47c0 7.204 2.784 13.96 7.852 19.028l159.744 159.736c.212.3.436.58.696.836l16.12 15.852c5.064 5.048 11.82 7.572 19.084 7.572h.084c7.212 0 13.968-2.524 19.024-7.572l16.124-15.992c.26-.256.48-.468.612-.684l244.784-244.76c10.5-10.476 10.5-27.52.004-38.008z"></path></svg>
                                            </svg>
                                        </div>
                                    </div>
                                </label>
   {/if}
{/section}
   </div></div>
<div class="cabinet-btn-center">
<button class="main-btn" type="submit">Spend</button>
                            </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></div>
</div>
</div></div>
</section>
{include file="footer2.tpl"}