<?php
(@include ('../dt_page/lic.php')) or die("<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>You not have a license to use this script on this domain,<br>Please contact us to purchase a license.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy;2009 - ".date("Y")." www.primadesain.com</p>");
$lic=$license;if(!$lic){echo "<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>You not have a license to use this script on this domain,<br>Please contact us to purchase a license.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy;2009 - ".date("Y")." www.primadesain.com</p>";}$svr=$_SERVER['SERVER_NAME'];$c=curl_init();curl_setopt($c,CURLOPT_URL,"http://www.primadesain.com/verifylicenses.php");curl_setopt($c,CURLOPT_TIMEOUT,30);curl_setopt($c,CURLOPT_POST,1);curl_setopt($c,CURLOPT_RETURNTRANSFER,1);$postfields='svr='.$svr.'&lic='.$lic;curl_setopt($c,CURLOPT_POSTFIELDS,$postfields);$result=curl_exec($c);if($result=="fail"){echo "<p style='font-family:Arial, Helvetica, sans-serif; margin-top:80px; font-size:16px; line-height:180%; letter-spacing:2px;' align='center'><img src='https://primadesain.com/images/block.png' width='90' height='90' /></br></br>You not have a license to use this script on this domain,<br>Please contact us to purchase a license.<br><strong><a href='http://www.primadesain.com'>www.primadesain.com</a></strong></p><br><p style='font-family:Arial, Helvetica, sans-serif; margin-top:30px; font-size:12px; line-height:180%; letter-spacing:2px;' align='center'>&copy;2009 - ".date("Y")." www.primadesain.com</p>";die();}
if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)){
echo "<p align=center><br><br><br><br><br><br><font size=\"6\" color=\"#FF0000\">ILLEGAL ACCESS !!";
echo "<meta http-equiv=\"refresh\" content=\"2; url=../index.php\">";
exit();} 
?>
   
  <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Trade
      </h1>
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="breadcrumb-item active">Trade</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
				
<?php
if($db->dataku("status", $user_session) == 0 || $db->dataku("blokir", $user_session) == 1) {
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".$LANG["status0"]."</div>";
}else{
?>
<?php
if($db->config("styletheme") == 1){ 
$backgrnde="";
$themeforex="light";
}else{
$backgrnde=" style='background-color:#222; color:#FFF;'";
$themeforex="dark";
}
?>


        <div class="row">
            <div class="col-12">
               <div class="box">
            <div class="box-body">       
                    
                    
                    
                      <select class="form-control"  onchange="location =  this.options[this.selectedIndex].value" <?php echo $backgrnde;?>>
                                            
                                            
                                             <?php 
											 
										if($_GET['cr'] == "ethbtc"){
			 echo "<option value='index.php?go=trade&cr=ethbtc'>ETH/BTC</option>";
		 }else if($_GET['cr'] == "bnbbtc"){
			 echo "<option value='index.php?go=trade&cr=bnbbtc'>BNB/BTC</option>";
		 }else if($_GET['cr'] == "ltcbtc"){
			 echo "<option value='index.php?go=trade&cr=ltcbtc'>LTC/BTC</option>";
		 }else if($_GET['cr'] == "snteth"){
			 echo "<option value='index.php?go=trade&cr=snteth'>SNT/ETH</option>";
		 }else if($_GET['cr'] == "bnteth"){
			 echo "<option value='index.php?go=trade&cr=bnteth'>BNT/ETH</option>";
		 }else if($_GET['cr'] == "btcusdt"){
			 echo "<option value='index.php?go=trade&cr=btcusdt'>BTC/USDT</option>";
		 }else if($_GET['cr'] == "ethusdt"){
			 echo "<option value='index.php?go=trade&cr=ethusdt'>ETH/USDT</option>";
		 }else if($_GET['cr'] == "dashbtc"){
			 echo "<option value='index.php?go=trade&cr=dashbtc'>DASH/BTC</option>";
		 }else if($_GET['cr'] == "dasheth"){
			 echo "<option value='index.php?go=trade&cr=dasheth'>DASH/ETH</option>";
		 }else if($_GET['cr'] == "xrpbtc"){
			 echo "<option value='index.php?go=trade&cr=xrpbtc'>XRP/BTC</option>";
		 }else if($_GET['cr'] == "xrpeth"){
			 echo "<option value='index.php?go=trade&cr=xrpeth'>XRP/ETH</option>";
		 }else if($_GET['cr'] == "bnbusdt"){
			 echo "<option value='index.php?go=trade&cr=bnbusdt'>BNB/USDT</option>";
		 }else if($_GET['cr'] == "bcceth"){
			 echo "<option value='index.php?go=trade&cr=bcceth'>BCC/ETH</option>";	
		 }else if($_GET['cr'] == "bccusdt"){
			 echo "<option value='index.php?go=trade&cr=bccusdt'>BCC/USDT</option>";	
		 }else if($_GET['cr'] == "bccbnb"){
			 echo "<option value='index.php?go=trade&cr=bccbnb'>BCC/BNB</option>";
		 }else if($_GET['cr'] == "ltcusdt"){
		     echo "<option value='index.php?go=trade&cr=ltcusdt'>LTC/USDT</option>";
		 }else if($_GET['cr'] == "ltcbnb"){
			 echo "<option value='index.php?go=trade&cr=ltcbnb'>LTC/BNB</option>";
		 }else if($_GET['cr'] == "adabtc"){
			 echo "<option value='index.php?go=trade&cr=adabtc'>ADA/BTC</option>";
		 }else if($_GET['cr'] == "adaeth"){
			 echo "<option value='index.php?go=trade&cr=adaeth'>ADA/ETH</option>";
		}else if($_GET['cr'] == "wavesbnb"){
			 echo "<option value='index.php?go=trade&cr=wavesbnb'>WAVES/BNB</option>";	 
		}else if($_GET['cr'] == "atombnb"){
			 echo "<option value='index.php?go=trade&cr=atombnb'>ATOM/BNB</option>";	 
		}else if($_GET['cr'] == "atombtc"){
			 echo "<option value='index.php?go=trade&cr=atombtc'>ATOM/BTC</option>";	 
		}else if($_GET['cr'] == "dogebtc"){
			 echo "<option value='index.php?go=trade&cr=dogebtc'>DOGE/BTC</option>";	  
		}else if($_GET['cr'] == "dogeusdt"){
			 echo "<option value='index.php?go=trade&cr=dogeusdt'>DOGE/USDT</option>";	  
		}else if($_GET['cr'] == "adausdt"){
			 echo "<option value='index.php?go=trade&cr=adausdt'>ADA/USDT</option>";	  
		
		 }else{
			 }
			 ?>
             
            
             
             
          <?php if($ethbtc_status == 1){ ?><option value='index.php?go=trade&cr=ethbtc'>ETH/BTC</option><?php } ?>
          <?php if($bnbbtc_status == 1){ ?><option value='index.php?go=trade&cr=bnbbtc'>BNB/BTC</option><?php } ?>
          <?php if($ltcbtc_status == 1){ ?><option value='index.php?go=trade&cr=ltcbtc'>LTC/BTC</option><?php } ?>
          <?php if($snteth_status == 1){ ?><option value='index.php?go=trade&cr=snteth'>SNT/ETH</option><?php } ?>
          <?php if($bnteth_status == 1){ ?><option value='index.php?go=trade&cr=bnteth'>BNT/ETH</option><?php } ?>
          <?php if($btcusdt_status == 1){ ?><option value='index.php?go=trade&cr=btcusdt'>BTC/USDT</option><?php } ?>
          <?php if($ethusdt_status == 1){ ?><option value='index.php?go=trade&cr=ethusdt'>ETH/USDT</option><?php } ?>
          <?php if($dashbtc_status == 1){ ?><option value='index.php?go=trade&cr=dashbtc'>DASH/BTC</option><?php } ?>
          <?php if($dasheth_status == 1){ ?><option value='index.php?go=trade&cr=dasheth'>DASH/ETH</option><?php } ?>
          <?php if($xrpbtc_status == 1){ ?><option value='index.php?go=trade&cr=xrpbtc'>XRP/BTC</option><?php } ?>
          <?php if($xrpeth_status == 1){ ?><option value='index.php?go=trade&cr=xrpeth'>XRP/ETH</option><?php } ?>
          <?php if($bnbusdt_status == 1){ ?><option value='index.php?go=trade&cr=bnbusdt'>BNB/USDT</option><?php } ?>
          <?php if($bcceth_status == 1){ ?><option value='index.php?go=trade&cr=bcceth'>BCC/ETH</option><?php } ?>
          <?php if($bccusdt_status == 1){ ?><option value='index.php?go=trade&cr=bccusdt'>BCC/USDT</option><?php } ?>
          <?php if($bccbnb_status == 1){ ?><option value='index.php?go=trade&cr=bccbnb'>BCC/BNB</option><?php } ?>
          <?php if($ltcusdt_status == 1){ ?><option value='index.php?go=trade&cr=ltcusdt'>LTC/USDT</option><?php } ?>
          <?php if($ltcbnb_status == 1){ ?><option value='index.php?go=trade&cr=ltcbnb'>LTC/BNB</option><?php } ?>
          <?php if($adabtc_status == 1){ ?><option value='index.php?go=trade&cr=adabtc'>ADA/BTC</option><?php } ?>
          <?php if($adaeth_status == 1){ ?><option value='index.php?go=trade&cr=adaeth'>ADA/ETH</option><?php } ?>
          <?php if($wavesbnb_status == 1){ ?><option value='index.php?go=trade&cr=wavesbnb'>WAVES/BNB</option><?php } ?>
          <?php if($atombnb_status == 1){ ?><option value='index.php?go=trade&cr=atombnb'>ATOM/BNB</option><?php } ?>
          <?php if($atombtc_status == 1){ ?><option value='index.php?go=trade&cr=atombtc'>ATOM/BTC</option><?php } ?>
          <?php if($dogebtc_status == 1){ ?><option value='index.php?go=trade&cr=dogebtc'>DOGE/BTC</option><?php } ?>
          <?php if($dogeusdt_status == 1){ ?><option value='index.php?go=trade&cr=dogeusdt'>DOGE/USDT</option><?php } ?>
          <?php if($adausdt_status == 1){ ?><option value='index.php?go=trade&cr=adausdt'>ADA/USDT</option><?php } ?>
          
          
         
                                            </select>
                                            
                                            
                                            
                                            
                                            
                    


   <?php if($_GET['cr'] == "wthbtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ETHBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "bnbbtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BNBBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "ltcbtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:LTCBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "snteth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:SNTETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "bnteth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BNTETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "btcusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BTCUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "ethusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ETHUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "dashbtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:DASHBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "dasheth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:DASHETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "xrpbtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:XRPBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "xrpeth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:XRPETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "bnbusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BNBUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "bcceth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BCCETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "bccusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BCCUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "bccbnb"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:BCCBNB",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "ltcusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:LTCUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "ltcbnb"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:LTCBNB",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "adabtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ADABTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "adaeth"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ADAETH",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "wavesbnb"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:WAVESBNB",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } else if($_GET['cr'] == "atombnb"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ATOMBNB",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "atombtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ATOMBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "dogebtc"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:DOGEBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "dogeusdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:DOGEUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->
<?php } else if($_GET['cr'] == "adausdt"){?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_b36b9"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ADAUSDT",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_b36b9"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->


<?php } else { ?>
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div id="tradingview_cc245"></div>
  <div class="tradingview-widget-copyright"></div>
  <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  <script type="text/javascript">
  new TradingView.widget(
  {
  "width": "auto",
  "height": 440,
  "symbol": "BINANCE:ETHBTC",
  "interval": "1",
  "timezone": "Etc/UTC",
  "theme": "<?php echo $themeforex;?>",
  "style": "1",
  "locale": "en",
  "toolbar_bg": "#f1f3f6",
  "enable_publishing": false,
  "allow_symbol_change": true,
  "studies": [
    "BB@tv-basicstudies",
    "PSAR@tv-basicstudies"
  ],
  "container_id": "tradingview_cc245"
}
  );
  </script>
</div>
<!-- TradingView Widget END -->

<?php } ?>                        
               
<?php
$results = $_GET['result'];
$mine = $_GET['min'];
$byye = $_GET['biy'];
if($results == "insufficient_walet") { 
echo "<div class='alert alert-danger'><button type='button' class='close' data-dismiss='alert'><i class='icon-remove'></i></button>Your Wallet balance is insufficient. Max Stake is ".$_GET['tc'].".</div>";
}
?>
  
<?php
if(isset($_GET['result'])&&$_GET['result']=="min_stake"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Min. stake amount is ".rupiahx($_GET['mn']).".</div>";
}
?>
<?php
if(isset($_GET['result'])&&$_GET['result']=="max_stake"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Max. stake amount is ".rupiahx($_GET['mx']).".</div>";
}
?>
<?php
 if(isset($_GET['result'])&&$_GET['result']=="success"){
if(isset($_GET["co"])){ $co = $_GET["co"]; }
echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Add Stake ".$co." successfully created.</div>";
}
?>

<?php
 if(isset($_GET['result'])&&$_GET['result']=="no_pin"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".LANG_FORGOT_NO_PIN."</div>";
}
?>  
 <?php
 if(isset($_GET['result'])&&$_GET['result']=="wrong_pin"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".LANG_FORGOT_WRONG_PIN."</div>";
}
?>  
 <?php
 if(isset($_GET['result'])&&$_GET['result']=="pin_lock"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".LANG_FORGOT_BLOCK_PIN."</div>";
}
?>  

 <?php
 if(isset($_GET['result'])&&$_GET['result']=="pin_off"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".LANG_FORGOT_OFF_PIN."</div>";
}
?>
<?php
 if(isset($_GET['result'])&&$_GET['result']=="amount"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Amount Package must be filled!</div>";
}
?>
<?php
 if(isset($_GET['result'])&&$_GET['result']=="errors"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>This transaction already submit before!</div>";
}
?>
<?php
 if(isset($_GET['result'])&&$_GET['result']=="no_pass"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Your membership is not valid, please contact administrator.</div>";
}
?>  
 <?php
 if(isset($_GET['result'])&&$_GET['result']=="wrong_pass"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Wrong password</div>";
}
?>

<?php
 if(isset($_GET['result'])&&$_GET['result']=="errors_max"){
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>Max stake is ".$maksinvest." stake per days.</div>";
}
?>
		<?php
if(isset($_GET['result'])&&$_GET['result']=="wrong_captcha"){
echo "<div class='alert alert-danger'>Wrong Captcha!</div>";
}
?>	

  <?php
$results = $_GET['result'];
if($results == "error") { 
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'></button>".$LANG["tctnotfnd"]."</div>";
}
?>

         <?php
$results = $_GET['result'];
if($results == "wrong_auth") { 
echo "<div class='alert alert-danger'>You're enable two factor authentication at your account, Please enter your google authenticator six-digit code!</div>";
}
?>       
      

<?php      
$initiale = substr(str_shuffle(str_repeat("ABCEFGHIJKLMNPRSTUVWXYZ", 36)), 6, 2);
$stkode = strtotime(date("Y-m-d H:i:s"));
$kodec = $initiale."".$stkode;
$initialex = substr(str_shuffle(str_repeat("ABEF123456789GHIJKLMNPR123456789KLEFGHILMNP123456789RRSTUVWXYZ", 46)), 22, 12);




?>


        

<script>
		function confirmActionaddinvest(){
      var confirmed = confirm("You not have <?php echo $currencye; ?> Balance! Please Upgrade your membership");
      return confirmed;
}
</script>

<script>
		function confirmActionaddinvestx(){
      var confirmed = confirm("You not have <?php echo $currencye; ?> Balance! Please Add <?php echo $currencye; ?> Balance.");
      return confirmed;
}
</script>

<script>
		function confirmActionbuyy(){
      var confirmed = confirm("Buy Now?");
      return confirmed;
}
</script>
<script>
		function confirmActionsell(){
      var confirmed = confirm("Sell Now?");
      return confirmed;
}
</script>
                        <script type="text/javascript">
         
                            function isNumberKey(evt, obj) {
         
                                var charCode = (evt.which) ? evt.which : event.keyCode
                                var value = obj.value;
                                var dotcontains = value.indexOf(".") != -1;
                                if (dotcontains)
                                    if (charCode == 46) return false;
                                if (charCode == 46) return true;
                                if (charCode > 31 && (charCode < 48 || charCode > 57))
                                    return false;
                                return true;
                            }
         

         
                        </script>       
           <br />
   <form method="POST" action="set_bet.php" accept-charset="UTF-8" id="form-B" class="form-inline">
<input type="hidden" id="kode" name="kode" value="<?php echo $initialex; ?>" readonly="readonly"/>
<input type="hidden" id="user" name="user" value="<?php echo $user_session; ?>" readonly="readonly"/> 
<input type="hidden" id="sendnow" name="sendnow" value="" readonly="readonly"/> 
 <?php  if($_GET['cr'] == "ethbtc"){
			 echo "<input type='hidden' name='sysmarket' value='ethbtc' readonly='readonly'/>";
		 }else if($_GET['cr'] == "bnbbtc"){
			 echo "<input type='hidden' name='sysmarket' value='bnbbtc' readonly='readonly'/>";
		 }else if($_GET['cr'] == "ltcbtc"){
			 echo "<input type='hidden' name='sysmarket' value='ltcbtc' readonly='readonly'/>";
		 }else if($_GET['cr'] == "snteth"){
			 echo "<input type='hidden' name='sysmarket' value='snteth' readonly='readonly'/>";
		 }else if($_GET['cr'] == "bnteth"){
			 echo "<input type='hidden' name='sysmarket' value='bnteth' readonly='readonly'/>";
		 }else if($_GET['cr'] == "btcusdt"){
			 echo "<input type='hidden' name='sysmarket' value='btcusdt' readonly='readonly'/>";
		 }else if($_GET['cr'] == "ethusdt"){
			 echo "<input type='hidden' name='sysmarket' value='ethusdt' readonly='readonly'/>";
		 }else if($_GET['cr'] == "dashbtc"){
			 echo "<input type='hidden' name='sysmarket' value='dashbtc' readonly='readonly'/>";
		 }else if($_GET['cr'] == "dasheth"){
			 echo "<input type='hidden' name='sysmarket' value='dasheth' readonly='readonly'/>";
		 }else if($_GET['cr'] == "xrpbtc"){
			 echo "<input type='hidden' name='sysmarket' value='xrpbtc' readonly='readonly'/>";
		 }else if($_GET['cr'] == "xrpeth"){
			 echo "<input type='hidden' name='sysmarket' value='xrpeth' readonly='readonly'/>";
			 
		
		 }else if($_GET['cr'] == "bnbusdt"){
			 echo "<input type='hidden' name='sysmarket' value='bnbusdt' readonly='readonly'/>";
		 }else if($_GET['cr'] == "bcceth"){
			 echo "<input type='hidden' name='sysmarket' value='bcceth' readonly='readonly'/>";
		 }else if($_GET['cr'] == "bccusdt"){
			 echo "<input type='hidden' name='sysmarket' value='bccusdt' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "bccbnb"){
			 echo "<input type='hidden' name='sysmarket' value='bccbnb' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "ltcusdt"){
			 echo "<input type='hidden' name='sysmarket' value='ltcusdt' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "ltcbnb"){
			 echo "<input type='hidden' name='sysmarket' value='ltcbnb' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "adabtc"){
			 echo "<input type='hidden' name='sysmarket' value='adabtc' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "adaeth"){
			 echo "<input type='hidden' name='sysmarket' value='adaeth' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "wavesbnb"){
			 echo "<input type='hidden' name='sysmarket' value='wavesbnb' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "atombnb"){
			 echo "<input type='hidden' name='sysmarket' value='atombnb' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "atombtc"){
			 echo "<input type='hidden' name='sysmarket' value='atombtc' readonly='readonly'/>";	 
		 }else if($_GET['cr'] == "dogebtc"){
			 echo "<input type='hidden' name='sysmarket' value='dogebtc' readonly='readonly'/>";		 
		 }else if($_GET['cr'] == "dogeusdt"){
			 echo "<input type='hidden' name='sysmarket' value='dogeusdt' readonly='readonly'/>";	 	 
		 }else if($_GET['cr'] == "adausdt"){
			 echo "<input type='hidden' name='sysmarket' value='adausdt' readonly='readonly'/>";	 
			 
			 
		 }else{ 
			 echo "<input type='hidden' name='sysmarket' value='ethbtc' readonly='readonly'/>";
		 } ?>                                              

					
						
                            <div class="input-group mb-2 mr-sm-2">
                               <div class="input-group">
                   <span class="input-group-addon" id="basic-addon1"><?php echo $currencye; ?>
</span>
                                <input type="text" style="width:120px;" class="form-control" name="amount" id="inlineFormInputGroupUsername2" placeholder="Stake Amount" required='required' value="<?php echo $minpro; ?>" min="<?php echo $minpro; ?>" onkeypress="return isNumberKey(event,this)">
                            </div> </div>

                           <label class="sr-only" for="inlineFormInputGroupUsername2">Trade</label>
                            <div class="input-group mb-2 mr-sm-2">
                               <div class="input-group">
                    <span class="input-group-addon" id="basic-addon1"><i class="fa fa-clock-o" aria-hidden="true"></i></span>
           <select id="gotime" name="gotime" class="form-control" required='required'>
								<?php if($seconds_10 == 1){ ?><option value="10s">10 Second</option><?php } ?>
								<?php if($seconds_30 == 1){ ?><option value="30s">30 Second</option><?php } ?>
								<?php if($minutes_1 == 1){ ?><option value="1m">1 Minutes</option><?php } ?>
								<?php if($minutes_2 == 1){ ?><option value="2m">2 Minutes</option><?php } ?>
								<?php if($minutes_3 == 1){ ?><option value="3m">3 Minutes</option><?php } ?>
                                <?php if($minutes_5 == 1){ ?><option value="5m">5 Minutes</option><?php } ?>
                                <?php if($minutes_10 == 1){ ?><option value="10m">10 Minutes</option><?php } ?>
                                <?php if($minutes_30 == 1){ ?><option value="30m">30 Minutes</option><?php } ?>
								<?php if($hours_1 == 1){ ?><option value="1h">1 Hour</option><?php } ?>
								<?php if($hours_2 == 1){ ?><option value="2h">2 Hour</option><?php } ?>
								<?php if($hours_3 == 1){ ?><option value="3h">3 Hour</option><?php } ?>
								<?php if($hours_6 == 1){ ?><option value="6h">6 Hour</option><?php } ?>
								<?php if($hours_12 == 1){ ?><option value="12h">12 Hour</option><?php } ?>
								<?php if($days_1 == 1){ ?><option value="1d">1 Days</option><?php } ?>
								<?php if($days_3 == 1){ ?><option value="3d">3 Days</option><?php } ?>
								<?php if($days_6 == 1){ ?><option value="6d">3 Days</option><?php } ?>
								<?php if($weeks_1 == 1){ ?><option value="1w">1 Week</option><?php } ?>
								<?php if($months_1 == 1){ ?><option value="1mo">1 Month</option><?php } ?>
                            </select>
                            </div> </div>
                            
                        
                            

               
               <?php if($usepins == 1){ ?>
          <label class="sr-only" for="inlineFormInputGroupUsername2">Secure PIN</label>
                            <div class="input-group mb-2 mr-sm-2">
                               <div class="input-group">
                   <span class="input-group-addon" id="basic-addon1"><i class="fa fa-key" aria-hidden="true"></i></span>
         <input type="password" class="form-control" placeholder="Enter Secure PIN" name="pincode" style="width:250px;">
                            </div> </div>      
                         <?php } ?>     
 
 
         
          <?php if($db->dataku("authgoogle", $user_session) == 1){ ?>
            <label class="sr-only" for="inlineFormInputGroupUsername2">2FA Google Authenticator</label>
                            <div class="input-group mb-2 mr-sm-2">
                               <div class="input-group">
                   <span class="input-group-addon" id="basic-addon1"><i class="fa fa-qrcode fa-lg"></i></span>
        <input type="text" class="form-control" placeholder="2FA Google Authenticator" name="one_time_password" style="width:250px;">
                            </div> </div>      

          <?php } ?>

         
 
          <div>
        
<center>
<?php  if($db->dataku("free", $user_session) == 1 && $freetradings == 0){?>


           <button class='btn btn-success btn-lg' type='button' onclick='return confirmActionaddinvest()'><i class='fa fa-chevron-circle-right'></i>&nbsp;&nbsp;Buy <?php echo $profitse;?>%</button>
             <button class='btn btn-danger btn-lg' type='button' onclick='return confirmActionaddinvest()'><i class='fa fa-chevron-circle-left'></i>&nbsp;&nbsp;Sell <?php echo $profitse;?>%</button> 
                 
  <?php } else { ?>  
  
  
  
<?php  if(!$totalcwalete) {?>
  
             
         <button class='btn btn-success btn-lg' type='button' onclick='return confirmActionaddinvestx()'><i class='fa fa-chevron-circle-right'></i>&nbsp;&nbsp;Buy <?php echo $profitse;?>%</button>
             <button class='btn btn-danger btn-lg' type='button' onclick='return confirmActionaddinvestx()'><i class='fa fa-chevron-circle-left'></i>&nbsp;&nbsp;Sell <?php echo $profitse;?>%</button>     
              
    
           
            <?php } else { ?>
             <button class='btn btn-success btn-lg sendbuy' type='submit' onclick="return confirmActionbuyy()"><i class='fa fa-chevron-circle-right'></i>&nbsp;&nbsp;Buy <?php echo $profitse;?>%</button>
             <button class='btn btn-danger btn-lg sendsell' type='submit' onclick="return confirmActionsell()"><i class='fa fa-chevron-circle-left'></i>&nbsp;&nbsp;Sell <?php echo $profitse;?>%</button>
             <?php } ?>   

      <?php } ?>  </center>


          </div>

        </form>
        
        
        
        
        <br /><br />
 
    <script src="tema1/js/jquery-min.js"></script>               
<div id="div_element"></div>     
        
        
                        
        
                </div></div> </div>   
                
                
            
			</div>
			<!-- END PAGE CONTENT -->     
            
            
            
            
              <div class="row">
            	<div class="col-md-12">
                
                  <div class="box box-solid bg-dark">
            <div class="box-header with-border">
              <h3 class="box-title">History</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
				<div class="table-responsive">
				
            
            <table id="examplex" class="table table-hover" width="100%">


                        <thead>
                            <tr>
                                <th width='15%'>Date</th> 
                                <th width='10%'>Market</th>
                                <th width='15%'>Trx</th> 
                                <th width='10%'>Package</th>
                                <th width='10%'>Amount</th>
                                <th width='10%'>Rate Stake</th>
                                <th width='10%'>Rate End</th>
                                <th width='10%'>Status</th>
                            </tr>
                        </thead>
                        <tbody>
                       
                        </tbody>
                    </table>
                                                </div>                      


                 
                              
                       
                        
                        
                    </div>
                </div>
                </div>
			</div></article>
			</div>
			<!-- END PAGE CONTENT -->   
            
            
            
            
            
            
            
			<!-- END PAGE CONTENT -->   
            
            
                    
<script type="text/javascript">
<!--
var interval = null;
var intervalplay = null;



function loadHistoryPlay(limit){
	
			$.ajax({
			type: 'GET',
			url: 'get_history2.php',
			 dataType: "html",
			data: { 
				'limit': limit, 
			},
			success: function(response){
				
					//console.log(response);	
				if (limit == 1){
					var data=$(response).text();
					var beforekode = $("#examplex > tbody > tr:first > td")[2];
					//console.log($(beforekode).text().trim()+" "+data);
					var n = (data).indexOf($(beforekode).text().trim());
					
					if (n > -1){
						return;
					}
					$("#examplex > tbody > tr:first").before(response);
				}else{
					$("#examplex > tbody").html(response);
				}
				
				setTimeout(function() {
					$('#examplex > tbody > tr:first').addClass('blink-win');
				
						setTimeout(function() {$('#examplex > tbody > tr:first').removeClass('blink-win')}, 1000);
				}, 6);
				
				
				
			}
		});
}

$(document).ready(function() {	

setInterval(function(){ loadHistoryPlay(6); }, 1000);


		$(".sendbuy").click(function(){
		$("#sendnow").val("buy");

	});



	$(".sendsell").click(function(){
		$("#sendnow").val("sell");
	});
		
	
	
		
		
	$(".playnow").click(function(){
		var n = ($(".playnow").html()).indexOf("Play");
			if (n > -1){
			$(".playnow").html("<i class='fa fa-stop'></i> Stop Now");
			interval = setInterval(setBet,1000);
		}else{
			clearInterval(interval);
			$(".playnow").html("<i class='fa fa-play'></i> Play Now");
			
		}
		//
	});
	
  //alert( "ready!" );	
	loadHistory(10);
});

var isproses = false;
function setBet(){	
	if (!isproses){
		sendBet();
	}
}


function loadHistory(limit){		
		$.ajax({
			type: 'GET',
			url: 'get_transaksi.php',
			 dataType: "html",
			data: { 
				'limit': limit, 
			},
			success: function(response){
				//console.log(response);	
				if (limit == 1){
					var data=$(response).text();
					var beforekode = $("#table-transaksi > tbody > tr:first > td")[1];
					//console.log($(beforekode).text().trim()+" "+data);
					var n = (data).indexOf($(beforekode).text().trim());
					
					if (n > -1){
						return;
					}
					$("#table-transaksi > tbody > tr:first").before(response);
				}else{
					$("#table-transaksi > tbody").html(response);
				}
				
				setTimeout(function() {
					$('#table-transaksi > tbody > tr:first').addClass('blink-win');
				
						setTimeout(function() {$('#table-transaksi > tbody > tr:first').removeClass('blink-win')}, 500);
				}, 10);
		 
			}
			
		});
		
		loadHistoryPlay(limit);
			$.ajax({
			type: 'GET',
			url: 'get_sum.php',
			dataType: "json",
			data: { 
				'limit': limit, 
			},
			success: function(response){
				//console.log(response);	
			//	console.log(response);	   		
					
					
		     var obj = response;//JSON.parse();
			  // console.log(obj);
              //  alert(obj.result);			
			  //	console.log(obj);
			   if (obj.result == "success"){
				   
				      	$(".total-win").html(obj.win);
						$(".total-lose").html(obj.lose);
						$(".total-balance").html(obj.balance);
			   }
			}
		});
		
	}
		
$("#form-B").submit(function(e){
	isproses = true;
	e.preventDefault();
    sendBet();
	 return false;

});

function sendBet(){
	var form = $("#form-B");
	
    var action = form.attr('action');
    var data = form.serialize();
	
	
    $.ajax({
       type: 'POST',
       url: action,
       data: data,
	   dataType: "json",
       success: function (response) {
		   console.log(response);
		   
		   		
					
					
		     var obj = response;//JSON.parse();
			  // console.log(obj);
              //  alert(obj.result);
				
				
			
					
		   if (obj.result == "success"){
			   
			   
			 	if (obj.dt == "Lose"){
					var strlosswin = '<div class="sales-info"><h3>$'+parseFloat(obj.am).toFixed(8)+'<br><font style="font-size:16px;">You Lose <strong>$'+parseFloat(obj.ps).toFixed(8)+' USD</strong></font></h3><span>Win Lose : <strong>'+obj.co+'</strong></span></div>';
			  strlosswin += '<div class="progress progress-lg"><div class="progress-bar bg-danger" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="width:100%;"></div></div>';
				}else{
					var strlosswin = '<div class="sales-info"><h3>$'+parseFloat(obj.am).toFixed(8)+'<br><font style="font-size:16px;">You Win <strong>$'+parseFloat(obj.ps).toFixed(8)+' USD</strong></font></h3><span>Win Lose : <strong>'+obj.co+'</strong></span></div>';
					strlosswin += '<div class="progress progress-lg"><div class="progress-bar bg-success" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="width:100%;"></div></div>';
				}		
				
				$("#lostwin-info").html(strlosswin);
			 //  alert("success");
		   }else if (obj.result == "amount"){
				alert("Amount Error");
		   }else if (obj.result == "insufficient"){
				alert("Insufficient Wallet Balance");
		   }else if (obj.result == "min_stake"){
				alert("Min Stake is <?php echo rupiah($minpro);?>");
		   }else if (obj.result == "max_stake"){
				alert("Min Stake is <?php echo rupiah($maxpro);?>");
		   }else if (obj.result == "wrong_auth"){
				alert("Enter google authenticator six-digit code!");
		   }else if (obj.result == "wrong_pin"){
				alert("Wrong PIN!");
		   }else if (obj.result == "no_pin"){
				alert("Enter PIN!");
		   }else if (obj.result == "lock_pin"){
				alert("PIN Locked!");
		   }else if (obj.result == "off_pin"){
				alert("PIN Off!");
		   }
		   else{
				alert("Error");
		   }
		   
		   isproses = false;
           loadHistory(1);
        }
    });
}
	

</script>


<?php } ?>


</section>
    <!-- /.content -->