<div class="mainTop">
        <div class="inner">
            <div class="upBal">
                <span class="cap">Новый депозит</span>
                <div  class="default_form form">
                    <label>Выберите способ пополнения</label>
                    

                    <select name="system" id="system" class="search_form_select_calk" style="display: none;">
                        <option value="perfect">PerfectMoney</option>
                        <option value="payeer">Payeer</option>
                        <option value="ya">YandexMoney</option>
						<option value="vise">Visa/MasterCard</option>
                        <!--<option value="Qiwi">Qiwi</option>-->
                    </select>
                    
                    <script>
            		    $(function() {
            		        $('[name="system"]').selectmenu({
                                change: function (event, ui) {
                                    var paySystem = $('[name="system"]').val();
                		            if (paySystem === "Qiwi") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").hide();
										$(".pe").hide();
                		                $(".qiwi").show();
                		            } if (paySystem === "perfect") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").show();
										$(".pe").hide();
                		                $(".qiwi").hide();
                		            } 
									if (paySystem === "payeer") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").hide();
										$(".pe").show();
                		                $(".qiwi").hide();
                		            } 
									if (paySystem === "ya") {
                		                $(".vise").hide();
										$(".ya").show();
										$(".pm").hide();
										$(".pe").hide();
										$(".qiwi").hide();
                		            } 
									if (paySystem === "vise") {
                		                $(".vise").show();
										$(".ya").hide();
										$(".pm").hide();
										$(".pe").hide();
										$(".qiwi").hide();
                		            } 									
                                },
                            });

            		        var paySystem = $('[name="system"]').val();
									if (paySystem === "Qiwi") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").hide();
										$(".pe").hide();
                		                $(".qiwi").show();
                		            } if (paySystem === "perfect") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").show();
										$(".pe").hide();
                		                $(".qiwi").hide();
                		            } 
									if (paySystem === "payeer") {
										$(".vise").hide();
										$(".ya").hide();
                		                $(".pm").hide();
										$(".pe").show();
                		                $(".qiwi").hide();
                		            } 
									if (paySystem === "ya") {
                		                $(".vise").hide();
										$(".ya").show();
										$(".pm").hide();
										$(".pe").hide();
										$(".qiwi").hide();
                		            } 
									if (paySystem === "vise") {
                		                $(".vise").show();
										$(".ya").hide();
										$(".pm").hide();
										$(".pe").hide();
										$(".qiwi").hide();
                		            }
            		    });
            		</script>
<? $http="http";?>
                    <div class="sum">
					<form class="pm" action="https://perfectmoney.is/api/step1.asp" method="post">
					<input type="hidden" name="PAYEE_ACCOUNT" value="<?=$cfgPerfect;?>">
					<input type="hidden" name="PAYEE_NAME" value="<?=$cfgPAYEE_NAME;?>">
					<input type="hidden" name="PAYMENT_ID" value="<?=$user_id;?>">
					<input type="hidden" name="PAYMENT_UNITS" value="USD">
					<input type="hidden" name="STATUS_URL" value="<?=$http;?>://<?=$cfgURL;?>/pmresult.php">
					<input type="hidden" name="PAYMENT_URL" value="<?=$http;?>://<?=$cfgURL;?>/enter/">
					<input type="hidden" name="PAYMENT_URL_METHOD" value="POST">
					<input type="hidden" name="NOPAYMENT_URL" value="<?=$http;?>://<?=$cfgURL;?>/enter/">
					<input type="hidden" name="NOPAYMENT_URL_METHOD" value="POST">
					<input type="hidden" name="BAGGAGE_FIELDS" value="">
					<input type="hidden" name="SUGGESTED_MEMO" value="<?=$cfgURL;?>">
					<label class="pm">Сумма USD</label>
						<input class="pm"  type="number" min="5" max="5000" name="PAYMENT_AMOUNT"  value="5"  style="border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border: 1px solid rgb(221, 221, 221); display: none;"  >
						<button  class="transfer_button" type="submit">Perfect money</button>
                    </form> 
					<form class="pe" action="/payeer/" method="Post">
                        <label class="pe">Сумма USD</label>
						<input class="pe" name="sum"  type="number" min="5" max="5000"  value="5" style="border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border: 1px solid rgb(221, 221, 221); display: none;"  >
						<button   class="transfer_button" type="submit">Payeer</button>
                    </form>
					<form class="ya" action="https://money.yandex.ru/quickpay/confirm.xml" method="POST" >
					<input  type="hidden" name="paymentType" value="PC">
                    <input type="hidden" name="receiver" value="410011171965252">
                    <input type="hidden" name="label" value="<?=$user_id;?>">
					<input type="hidden" name="successURL" value="<?=$cfgURL;?>/enter">
					<input type="hidden" name="formcomment" value="<?=$cfgURL;?>">
                    <input type="hidden" name="short-dest" value="Пополнение">
                    <input type="hidden" name="quickpay-form" value="donate">
					<input type="hidden" name="targets" value="Участнику проекта <?=$cfgURL;?>">
					<label class="ya">Сумма RUB</label>
					<input class="ya"  name="sum"  type="number" min="200" max="5000"  value="200"  style="border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border: 1px solid rgb(221, 221, 221); display: none;"  >
					<button  class="transfer_button" type="submit">Yandex money</button>
                    </form> 
					<form class="vise" action="https://money.yandex.ru/quickpay/confirm.xml" method="POST" >
					<input  type="hidden" name="paymentType" value="AC">
                    <input type="hidden" name="receiver" value="410011171965252">
                    <input type="hidden" name="label" value="<?=$user_id;?>">
					<input type="hidden" name="successURL" value="<?=$cfgURL;?>/enter">
					<input type="hidden" name="formcomment" value="<?=$cfgURL;?>">
                    <input type="hidden" name="short-dest" value="Пополнение">
                    <input type="hidden" name="quickpay-form" value="donate">
					<input type="hidden" name="targets" value="Участнику проекта <?=$cfgURL;?>">
					<label class="vise">Сумма RUB</label>
					<input class="vise"  name="sum"  type="number" min="200" max="5000"  value="200"  style="border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border: 1px solid rgb(221, 221, 221); display: none;"  >
					<button name="add_cashin_btn" class="transfer_button" type="submit">Visa/MasterCard</button>
                    </form> 					
					<div class="qiwi" style="display: none;">
                            <label class="qiwi" style="width: 100%; display: none;">Номер для перевода: +7**********</label><br>
                            <label class="qiwi" style="width: 114px; display: none;">№ транзакции</label><br>
                            <input style="border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border: 1px solid rgb(221, 221, 221); display: none;" class="qiwi" name="transaction" placeholder="147858589655" type="text">
                    <button name="add_cashin_btn" class="transfer_button" class="qiwi" type="submit">Оформить депозит</button>
					</div>
                    </div>
                    
                </div>
            </div>

          
		  <div class="calc">
        
                 <div class="proc">
				 <div class="perce">
                    <span>120%</span>
                    <span class="sec">120%</span>
                </div> </div> 
                <div class="right">
                    <div class="calcBl">
                        <div class="l1 cfix">
                            <input id="calc_sum" type="number" min="5" max="5000" value="5">
                            <label>$</label>
                            <span class="orCap">Расчет прибыли</span>
                        </div>        
                        <div class="sliderBl">
                            <div class="n cfix " >
                                <span class="min">5$</span>
                                <span class="max">5000$</span>
                            </div>        
                            <div id="slide" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><div class="ui-slider-range ui-widget-header ui-corner-all ui-slider-range-min" style="width: 0%;"></div>        <span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 0%;"></span></div>        
                        </div>        
                        <div class="stat">
                            <ul>
                                <li><span id="calc_d">0.23$</span>В час</li>
                                <li>за 12 часов<span id="calc_m">6.92$</span></li>
                                <li><span id="calc_m3">20.77$</span>В сутки</li>
                                <li>за 2 дня<span id="calc_m6">41.54$</span></li>
                                <li class="act"><span id="calc_y">83.08$</span>за неделю</li>
                            </ul>
                        </div>        
                    </div>        
                </div>        
             </div>        

<script>
    function calc() {
        number = $('#calc_sum').val()*1.2/24;
        $('#calc_d').html((number).toFixed(2) + "$");
        $('#calc_m').html((12 * number).toFixed(2) + "$");
        $('#calc_m3').html((24 * number).toFixed(2) + "$");
        $('#calc_m6').html((48 * number).toFixed(2) + "$");
        $('#calc_y').html((168 * number).toFixed(2) + "$");
    }

    $(".calc .sliderBl #slide").slider({
        value: 5.000000,
        min: 5.000000,
        max: 5000.000000,
        orientation: "horizontal",
        range: "min",
        slide: function(event, ui) {
            $('#calc_sum').val(ui.value);
            calc();
        }
    });

    $('#calc_sum').on('change keyup',function(){
        $(".calc .sliderBl #slide").slider({
            value: $(this).val(),
        });
        calc();
    });

    calc();
</script>

   

        </div>
    </div>
		
<div class="invests">	

					<h3 class="cfix rightl">Открытые Вклады</h3>
					<h3 class="cfix right">Статистика Начислений</h3>
					<div class="cfix rightl">
	
	
					 <div >
					 
                        <table style="margin-top: 0px; border :0;">
                            <thead style="border :0;">
                                <tr>
                                    <td>№</td>
									<td>Платежная системма</td>
                                    <td>Сумма</td>
                                    <td >Был Открыт</td>
                                </tr>
                            </thead>
                        </table>
                        <div style="max-height: 322px; overflow-y:auto;">
                            <table style="margin: 0;">
                                <tbody >
<?
$s = 0;
$result	= mysql_query("SELECT * FROM deposits WHERE user_id = ".$user_id." ORDER BY id ASC");
if(mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$s++;
	If($row['plan']==1){$pyse=" usd";}else{$pyse=" руб";}
	?>
	
									<tr><td ><?=$s;?></td><td ><?=$row['paysys'];?></td><td><?=$row['sum'].$pyse;?></td><td><?=date("H:i d.m.Yг ", $row['date']);?></td></tr>
									
<? } 
} else {
		print "<tr><td colspan=\"4\" >Еще не было Депозитов</td></tr>";
	}
?>									
								</tbody>
                            </table>
                        </div>
                    </div>
					</div>
					<div class="cfix right">
	
	
					 <div >
                        <table style="margin-top: 0px; border :0;">
                            <thead style="border :0;">
                                <tr>
                                    <td >№</td>
									<td >Тариф</td>
                                    <td >Сумма начисления</td>
                                    <td >Общий доход</td>
                                </tr>
                            </thead>
                        </table>
                        <div style="max-height: 322px; overflow-y:auto;">
                            <table style="margin: 0;">
                                <tbody >
<?
$n=0;
	$sql	= 'SELECT * FROM stat WHERE user_id = '.$user_id.' order by id DESC';
	$rs		= mysql_query($sql);
	if(mysql_num_rows($rs)) {

		while($a = mysql_fetch_array($rs)) {
			If($a['plan']==1){$pyse=" usd";$sumis=$sumis+$a['sum'];
			}else{$pyse=" руб"; $sumis=$sumis+($a['sum']/65);}
		$n++;
			
?>								
									<tr ><td style="width:20px;" ><?=$n;?></td><td style="width:100px;"><?=$a['paysys'];?></td><td><?=$a['sum'].$pyse;;?></td><td><?=sprintf( '%01.2f',$sumis);?>$</td></tr>
		<?}
} else {
		print "<tr><td colspan=\"4\" >Еще не было Начислений</td></tr>";
	}
?>								
									
									
								</tbody>
                            </table>
                        </div>
                    </div>
			</div>
</div>