  <?php 
    $getCurrenciesR = $db->db->prepare("SELECT * FROM screenertable WHERE userid = '$userId'");
    $getCurrenciesR->execute();
    $fetchCurRange = $getCurrenciesR->fetch();

    $currenciesRangeArray = array();

    if (!empty($fetchCurRange)) {
      # code...
      $currenciesRangeArray = unserialize($fetchCurRange['cur']);

      $forjscurrange = json_encode($currenciesRangeArray);
    }
  ?>



  ?>

  <style type="text/css">
    .table-screener > thead
    {
      width: 100%;
      color: #F7614E;
    }
    .table-screener > thead > tr
    {
      width: 100% !important;
    }
    .table-screener > thead > tr > th
    {
      border: 1px solid #fff !important;
      padding: 20px 30px;
      text-align: center;
    }
    .table-screener > tbody > tr > td
    {
      border: 1px solid #fff !important;
      color: #fff !important;
      width: 11%;
      padding: 20px 30px;
      text-align: center;
    }
  </style>

  	   <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  				  <!-- Add Tracker Modal -->
  	  <div class="modal fade" id="allinone" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  	    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
  	      <div class="modal-content">
  	        <div class="modal-header">
  	          <h5 class="modal-title" id="exampleModalLongTitle">Add Layouts</h5>
  	          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  	            <span aria-hidden="true">&times;</span>
  	          </button>
  	        </div>
  	        <div class="modal-body">

  	        	<div class="row">

  	        		<div class="col-md-4 form-group">
  	        			 <button class="btn btn-sm btn-warning" onclick="heatMapLayoutBtn()">
                      Heat Map
                    </button>
  	        		</div>
  	        			<div class="col-md-4 form-group">
  	        			<button class="btn btn-sm btn-warning" onclick="alertSystemLayoutBtn()">
                      Alert System
                    </button>
  	        		</div>
  	        		<div class="col-md-4 form-group">
                    <button class="btn btn-sm btn-warning" onclick="addInputCommand()">
                      Add Input Command
                    </button>

  	        		</div>
  	        		<div class="col-md-4 form-group">

                    <button class="btn btn-sm btn-warning" onclick="sendCommandLayoutBtn()">
                      Send Command
                    </button>
  	        		</div>
  	        		<div class="col-md-4 form-group">
                    <button class="btn btn-sm btn-warning" onclick="outputCommand()">
                      Output Command
                    </button>
  	        		</div>	        		
  	        		<div class="col-md-4 form-group">
  	        			 <button class="btn btn-sm btn-warning" onclick="forexRates()">
                      Forex Rates
                    </button>
  	        		</div>	
                  <div class="col-md-4 form-group">
                  <button class="btn btn-sm btn-warning" onclick="forexScreenerLayoutBtn()">
                      Forex Screeener
                    </button>
                </div>  
                  <div class="col-md-4 form-group">
                 <button class="btn btn-sm btn-warning" onclick="forexHoursLayoutBtn()">
                      Forex Marketing Hours
                    </button>
                </div>
  	        	</div>
  	        	
  	        </div>
  	      </div>
  	    </div>
  	  </div>
  	  <!-- END Modal -->

  	<div class="row" style="margin-top: 20px;">

  		<div class="col-md-4">
  			<button class="btn btn-md btn-success" style="margin-top: 50px;" data-toggle="modal" data-target="#allinone">Add And Remove Layout</button>
  		</div>
  		
  	</div>

    <div class="container-fluid item" id="forexScreenerLayout" style="display: none;">
      <div class="row sm-gutters resizeableCommand">

            <div class="col-md-12">
      
      <div class="crypt-gross-market-cap" style="width: 100%;">

         <i onclick="closeForexScreener()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>

        <h3 style="color: #F7614E;">Forex Screener</h3>


        <table style="width: 100%;" class="table table-screener table-responsive table-hover">
          
          <thead>
            <tr>
              <th>Ticker</th>
              <th>Last</th>
              <th>CHG %</th>
              <th>CHG</th>
              <TH>BID</TH>
              <th>ASK</th>
              <th>HIGH</th>
              <th>LOW</th>
              <th>Rating</th>
            </tr>
          </thead>
          <tbody style="width: 100%;">

            <?php 

            if (empty($currenciesRangeArray)) {
              # code...
              ?>
              <h3>Please Set Currency For Forex Screener</h3>
              <?php 
            }else{


              foreach ($currenciesRangeArray as $curScreener) {
                # code...
                $getCurrentRates = $db->db->prepare("SELECT * FROM currencyrate WHERE cur = '$curScreener' ORDER BY id DESC");
                $getCurrentRates->execute();
                $getOneRate = $getCurrentRates->fetch();

                $newCurScanner = str_replace('_', '/', $curScreener);




                ?>
                <tr>
                  <td id="<?=$curScreener; ?>"><?=$newCurScanner; ?></td>
                  <td id="<?=$curScreener; ?>_last"><?=$getOneRate['bid']; ?></td>
                  <td id="<?=$curScreener; ?>_chg"></td>
                  <td id="<?=$curScreener; ?>_chg2"></td>
                  <td id="<?=$curScreener; ?>_bid"><?=$getOneRate['bid']; ?></td>
                  <td id="<?=$curScreener; ?>_ask"><?=$getOneRate['ask']; ?></td>
                  <td id="<?=$curScreener; ?>_high"></td>
                  <td id="<?=$curScreener; ?>_low"></td>
                  <td id="<?=$curScreener; ?>_rating"></td>
                </tr>
                <?php 
              }


            }

            ?>
            
          </tbody>

        </table>

      </div>
    </div>
  </div>
          
      </div>
    </div>


  	 <div class="container-fluid item" id="sendCommandLayoutShow">
        </div>


          <div class="container-fluid" id="forexHoursLayout" style="display: none;">

            <div class="row sm-gutters resizeableCommand" style="margin-bottom: 50px;">

    <div class="col-md-12 crypt-gross-market-cap mt-">
      <i onclick="closeForexHours()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>
      <h3 style="margin-top: 30px;margin-bottom: 50px;">Forex Marketing Hours</h3>
      <table>
        <tr class="hoursTime">
          <?php 
          for ($i=21; $i < 25; $i++) { 
          # code...
          ?>
          <td id="time_<?=$i; ?>"><?=$i; ?></td>
          <?php 
        }
        for ($i=1; $i < 21; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td id="time_<?=$i; ?>"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
        </tr>
        <tr class="sweden">
        <td>S</td>
        <td>W</td>
        <td>E</td>
        <td>D</td>
        <td>E</td>
        <td>N</td>
        <td></td>
        <td></td>
        <td></td>

        <?php 
        for ($i=6; $i < 21; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
        </tr>
        <tr class="sweden">
        <td style="background-color: gray;">21</td>
        <td style="background-color: gray;">22</td>
        <td class="tokyo">T</td>
        <td class="tokyo">O</td>
        <td class="tokyo">K</td>
        <td class="tokyo">Y</td>
        <td class="tokyo">O</td>
        <td class="tokyo"></td>
        <td class="tokyo"></td>
        <td class="tokyo"></td>
        <td class="tokyo"></td>
        <?php 
        for ($i=8; $i < 21; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
        </tr>

        <tr class="sweden">
          <?php 
        for ($i=21; $i < 25; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
            <?php 
        for ($i=1; $i < 7; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
          <td class="lon">L</td>
          <td class="lon">O</td>
          <td class="lon">N</td>
          <td class="lon">D</td>
          <td class="lon">O</td>
          <td class="lon">N</td>
          <td class="lon"></td>
          <td class="lon"></td>
          <td class="lon"></td>
                    <?php 
        for ($i=16; $i < 21; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
        </tr>
        <tr class="sweden">
            <?php 
        for ($i=21; $i < 25; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
            <?php 
        for ($i=1; $i < 12; $i++) { 
          # code...
          $num_padded = sprintf("%02d", $i);
          ?>
          <td style="background-color: gray;"><?=$num_padded; ?></td>
          <?php 
        }
          ?>
          <td class="ny">N</td>
          <td class="ny">E</td>
          <td class="ny">W</td>
          <td class="ny">Y</td> 
          <td class="ny">O</td>
          <td class="ny">R</td>
          <td class="ny">K</td>
          <td class="ny"></td>
          <td class="ny"></td>
        </tr>
      </table>

    </div>
    
  </div>
            
          </div>


           <div class="container-fluid item" id="bloobbergTv" style="display: none;">
           <div class="row sm-gutters" id="RateBoxLayout">
                   <div class="col-md-12 col-lg-6 col-xl-6 col-xxl-6">
                 <div class="crypt-market-status mt-4 resizeableCommand">
                    <div>
                       <div class="tab-content crypt-tab-content">

                           <i onclick="closeForexRate()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>
                        <fieldset style="background: black !important;">
                                <div class="switch-toggle switch-candy">


                                  <input id="week" name="view" type="radio" value="auto" onchange="showtablelayout()">
                                  <label for="week" onclick="">Table Layout</label>

                                  <input id="month" name="view" type="radio" value="manual" onchange="showboxlayout()">
                                  <label for="month" onclick="">Boxed Layout</label>
                                  <a></a>
                                </div>
                          </fieldset>


                              <script type="text/javascript">
                                function showboxlayout()
                                {
                                  $("#tablelayout").hide();
                                  $("#boxlayout").show();
                                }
                               function showtablelayout()
                               {
                                $("#tablelayout").show();
                                $("#boxlayout").hide();
                               }
                              </script>

                               <div role="tabpanel" class="tab-pane active" id="boxlayout" style="display: none;">


                                  <div class="row" id="expandHere">
                                  


                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('0')" <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading0" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel0" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight0" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP0">0.</p>
                                  						<p class="price" id="p0">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp0">0.</p>
                                  						<p class="price" id="pp0">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp0">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>





                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('1')" <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading1" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel1" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight1" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP1">0.</p>
                                  						<p class="price" id="p1">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp1">0.</p>
                                  						<p class="price" id="pp1">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp1">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>





                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('2')" <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading2" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel2" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight2" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP2">0.</p>
                                  						<p class="price" id="p2">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp2">0.</p>
                                  						<p class="price" id="pp2">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp2">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>




                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('3')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading3" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel3" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight3" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP3">0.</p>
                                  						<p class="price" id="p3">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp3">0.</p>
                                  						<p class="price" id="pp3">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp3">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>





                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('4')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading4" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel4" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight4" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP4">0.</p>
                                  						<p class="price" id="p4">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp4">0.</p>
                                  						<p class="price" id="pp4">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp4">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>






                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('5')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading5" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel5" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight5" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP5">0.</p>
                                  						<p class="price" id="p5">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp5">0.</p>
                                  						<p class="price" id="pp5">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp5">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>




                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('6')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading6" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel6" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight6" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP6">0.</p>
                                  						<p class="price" id="p6">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp6">0.</p>
                                  						<p class="price" id="pp6">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp6">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>





                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('7')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading7" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel7" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight7" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP7">0.</p>
                                  						<p class="price" id="p7">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp7">0.</p>
                                  						<p class="price" id="pp7">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp7">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>



                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('8')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading8" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel8" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight8" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP8">0.</p>
                                  						<p class="price" id="p8">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp8">0.</p>
                                  						<p class="price" id="pp8">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp8">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>



                                  		<div class="col-md-6 col-sm-6 col-xs-12" style="margin-top:25px;">
                                  			<div class="panel panel-default" onclick="sendCommand('9')"  <?php if ($getAccountType == '1') {
                                          # code...
                                          ?>
                                          data-toggle="modal" data-target="#sendCommand"
                                          <?php 
                                        } ?> >
                                  				<div class="panel-heading" id="heading9" style="color:#fff;">
                                  					USD/CAD
                                  				</div>
                                  				<div class="panel-body" id="panel9" style="border:1px solid #fff;">
                                  					<div class="row"><div class="col-md-6" id="colRight9" style="border-right:1px solid #fff;">
                                  						<p class="mainPrice" id="mP9">0.</p>
                                  						<p class="price" id="p9">00</p>
                                  					</div>
                                  					<div class="col-md-6">
                                  						<p class="mainPrice" id="mPp9">0.</p>
                                  						<p class="price" id="pp9">0.0</p>
                                  					</div>
                                  					<div class="col-md-12">
                                  						<p class="resultPrice" id="rp9">0.00</p>
                                  					</div>
                                  				</div>
                                  			</div>
                                  		</div>
                                  	</div>


                                  	





                                  </div>

                          
                              </div>

                          <div role="tabpanel" class="tab-pane active" id="tablelayout">
                             <table class="table table-striped" style="background-color: #131722;">
                                <thead>
                                   <tr id="headRow">
                                      <th scope="col">Pair</th>
                                      <th scope="col">Buy</th>
                                      <th scope="col">Short</th>
                                      <th scope="col">Spread</th>
                                      <th scope="col"></th>
                                   </tr>
                                </thead>
                                <tbody class="crypt-table-hover" id="ratesPanel">

                                </tbody>
                             </table>
                          </div>
                       </div>
                    </div>
                 </div>
              </div>

           </div>
        </div>


         <div class="container-fluid item" id="outputLayout" style="display: none;">
            <div class="row sm-gutters">
                        
              <div class="col-md-6 col-lg-6 col-xl-4 col-xxl-4">
                 <div class="row crypt-gross-market-cap mt-4  resizeableCommand">
                       <div class="col-md-12 col-lg-12 col-xs-12 col-sm-12 inputlayout">
                           <i onclick="closeOutputBox()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>
                          <h3 style="text-align: center;">Output</h3>

                           <textarea class="form form-control" name="output" id="status" placeholder="Output" style="min-height:310px;"> </textarea>
                            <div class="row">
                              <div class="col-md-6">
                           <div><a href="javascript:void(0)" id="correct" class="crypt-button-green-full">Yes</a></div> 
                        </div>
                        <div class="col-md-6">
                           <div><a href="javascript:void(0)" id="incorrect" class="crypt-button-red-full">No</a></div>      
                        </div>
                            </div> 
                        </div>
                 </div>
              </div>
             
            </div>
        </div>






<div class="container-fluid item" id="inputelement1">
</div>









  	 <div class="container-fluid item" id="alertlayout" style="display: none;">
           <div class="row sm-gutters">
              
                   <div class="col-xl-8" id="allayout">
                 <div class="crypt-gross-market-cap mt-4 resizeableCommand" id="alertLayout">
                   <i onclick="closeAlertBox()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>
                    <h3 class="crypt-bg-head" style="margin-bottom: 0px;margin-top: 10px;"><b class="crypt-up">Alerts</b></h3>
                    <div class="row no-gutters">
                       <div class="col-md-12">
                          <div class="row trackingAlerts" style="margin-bottom: 10px;">
                            <div class="col-xs-12 col-sm-12 col-md-4">
                               <button class="btn btn-primary crypt-button-green-full addTracker" data-toggle="modal" style="margin:10px;border: none !important;" data-target="#addTrackerModal">Add Tracker &plus;</button>
                            </div>
                              <table class="table table-striped" id="tableAlert">
                                  <thead>
                                    <th>Order</th>
                                    <th>Currency</th>
                                    <th>Price</th>
                                    <th>Direction</th>
                                    <th>Length</th>
                                    <th>
                                      Action
                                    </th>
                                  </thead>
                                  <tbody>
                                    <?php 
                                      $stmt = $db->db->prepare("SELECT * from invataTracker WHERE user_id = ? ORDER BY id");
                                      $stmt->execute(array($userUId));
                                      $trackerAlert = $stmt->fetchall();
                                      $index = 1;
                                      foreach($trackerAlert as $ta) { ?>
                                        <tr id="<?=$ta['id']; ?>">
                                          <td>#<?php echo $index; ?></td>
                                          <td><?php echo $ta['symbol']; ?></td>
                                          <td><?php echo $ta['price']; ?></td>
                                          <td><?php echo $ta['email']; ?></td>
                                          <td><?php echo $ta['length']; ?></td>
                                         <!--  <td><a href="#" data-toggle="modal" data-target-id="<?php echo $ta['id']; ?>" data-target="#trackerModifyModal" >Modify</a></td>
                                          <td><a href="#" data-target-id="<?php echo $ta['id']; ?>" class="btn-delete" style="color:red;" >X</a></td> -->

                                          <td>
                                            <button data-toggle="modal" data-target="#trackerModifyModal" onclick="modifyTracker('<?=$ta['email']; ?>', '<?=$ta['symbol']; ?>', '<?=$ta['price']; ?>', '<?=$ta['length']; ?>', '<?=$ta['id']; ?>')" class="btn btn-sm btn-warning"><i class="fa fa-wrench"></i></button><button class="btn btn-sm btn-danger" onclick="removeTracker('<?php echo $ta['id']; ?>')" style="margin-left: 5px;"><i class="fa fa-trash"></i></button>
                                          </td>

                                        </tr>
                                      <?php $index++; } ?>
                                  </tbody>
                              </table>
                          </div>
                       </div>
                    </div>

                 </div>
              </div>
          </div>
      </div>



  	<section id="heatmpalayout" style="display: none;">
  		
  		<div class="container-fluid item" id="mainLayout5">
  	  <div class="row sm-gutters crypt-gross-market-cap resizeableCommand">
  	     <div class="col-xl-12">
          <i onclick="closeHeatMap()" class="fa fa-window-close" style="float: right;text-align: right;color: red;font-size: 24px;"></i>
  	        <h3>Heat Map</h3>

  	        <div class="row" style="margin-bottom: 30px;">

  	        <div class="col-md-4">
  	        <fieldset>
  	        <label></label>
  	        <div class="switch-toggle switch-candy">




  	        <input id="demo" name="accType" type="radio" value="hmprice" onchange="hmfunc(value)">
  	        <label for="demo" onclick="">Price</label>



  	        <input id="real" name="accType" type="radio" value="hmper" onchange="hmfunc(value)">
  	        <label for="real" onclick="">
  	        HeatMap
  	        </label>


  	        <a></a>
  	        </div>
  	        </fieldset>
  	        </div>

  	        </div>




  	        <div class="row">

  	      <div class="col-md-12 col-lg-12">
  	        
  	          <table class="table tableHeatMap table-responsive table-hover" id="heatmaptable">
  	            <thead>
  	              <th></th>
  	              <th>EUR <img src="images/flags/eur.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>USD<img src="images/flags/usd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>AUD<img src="images/flags/aud.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>GBP<img src="images/flags/gbp.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>NZD<img src="images/flags/nzd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>CAD<img src="images/flags/cad.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>CHF<img src="images/flags/chf.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>JPY<img src="images/flags/jpy.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>HKD<img src="images/flags/hkd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	              <th>SGD<img src="images/flags/sgd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></th>
  	            </thead>
  	            <tbody>
  	              <tr class="hm">
  	                <td>EUR <img src="images/flags/eur.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></td>
  	                <td></td>
  	                <td id="eurusdhm"></td>
  	                <td id="euraudhm"></td>
  	                <td id="eurgbphm"></td>
  	                <td id="eurnzdhm"></td>
  	                <td id="eurcadhm"></td>
  	                <td id="eurchfhm"></td>
  	                <td id="eurjpyhm"></td>
  	                <td id="eurhkdhm"></td>
  	                <td id="eursgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>EUR <img src="images/flags/eur.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></td>
  	                <td></td>
  	                <td id="eurusdhmp"></td>
  	                <td id="euraudhmp"></td>
  	                <td id="eurgbphmp"></td>
  	                <td id="eurnzdhmp"></td>
  	                <td id="eurcadhmp"></td>
  	                <td id="eurchfhmp"></td>
  	                <td id="eurjpyhmp"></td>
  	                <td id="eurhkdhmp"></td>
  	                <td id="eursgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>USD<img src="images/flags/usd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></td>
  	                <td id="usdeurhm"></td>
  	                <td></td>
  	                <td id="usdaudhm"></td>
  	                <td id="usdgbphm"></td>
  	                <td id="usdnzdhm"></td>
  	                <td id="usdcadhm"></td>
  	                <td id="usdchfhm"></td>
  	                <td id="usdjpyhm"></td>
  	                <td id="usdhkdhm"></td>
  	                <td id="usdsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>USD<img src="images/flags/usd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/></td>
  	                <td id="usdeurhmp"></td>
  	                <td></td>
  	                <td id="usdaudhmp"></td>
  	                <td id="usdgbphmp"></td>
  	                <td id="usdnzdhmp"></td>
  	                <td id="usdcadhmp"></td>
  	                <td id="usdchfhmp"></td>
  	                <td id="usdjpyhmp"></td>
  	                <td id="usdhkdhmp"></td>
  	                <td id="usdsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                AUD<img src="images/flags/aud.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                <td id="audeurhm"></td>
  	                <td id="audusdhm"></td>
  	                <td></td>
  	                <td id="audgbphm"></td>
  	                <td id="audnzdhm"></td>
  	                <td id="audcadhm"></td>
  	                <td id="audchfhm"></td>
  	                <td id="audjpyhm"></td>
  	                <td id="audhkdhm"></td>
  	                <td id="audsgdhm"></td>
  	                </td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                AUD<img src="images/flags/aud.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                <td id="audeurhmp"></td>
  	                <td id="audusdhmp"></td>
  	                <td></td>
  	                <td id="audgbphmp"></td>
  	                <td id="audnzdhmp"></td>
  	                <td id="audcadhmp"></td>
  	                <td id="audchfhmp"></td>
  	                <td id="audjpyhmp"></td>
  	                <td id="audhkdhmp"></td>
  	                <td id="audsgdhmp"></td>
  	                </td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                GBP<img src="images/flags/gbp.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="gbpeurhm"></td>
  	                <td id="gbpusdhm"></td>
  	                <td id="gbpaudhm"></td>
  	                <td id="gbpgbphm"></td>
  	                <td id="gbpnzdhm"></td>
  	                <td id="gbpcadhm"></td>
  	                <td id="gbpchfhm"></td>
  	                <td id="gbpjpyhm"></td>
  	                <td id="gbphkdhm"></td>
  	                <td id="gbpsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                GBP<img src="images/flags/gbp.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="gbpeurhmp"></td>
  	                <td id="gbpusdhmp"></td>
  	                <td id="gbpaudhmp"></td>
  	                <td id="gbpgbphmp"></td>
  	                <td id="gbpnzdhmp"></td>
  	                <td id="gbpcadhmp"></td>
  	                <td id="gbpchfhmp"></td>
  	                <td id="gbpjpyhmp"></td>
  	                <td id="gbphkdhmp"></td>
  	                <td id="gbpsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                NZD<img src="images/flags/nzd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="nzdeurhm"></td>
  	                <td id="nzdusdhm"></td>
  	                <td id="nzdaudhm"></td>
  	                <td id="nzdgbphm"></td>
  	                <td id="nzdnzdhm"></td>
  	                <td id="nzdcadhm"></td>
  	                <td id="nzdchfhm"></td>
  	                <td id="nzdjpyhm"></td>
  	                <td id="nzdhkdhm"></td>
  	                <td id="nzdsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                NZD<img src="images/flags/nzd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="nzdeurhmp"></td>
  	                <td id="nzdusdhmp"></td>
  	                <td id="nzdaudhmp"></td>
  	                <td id="nzdgbphmp"></td>
  	                <td id="nzdnzdhmp"></td>
  	                <td id="nzdcadhmp"></td>
  	                <td id="nzdchfhmp"></td>
  	                <td id="nzdjpyhmp"></td>
  	                <td id="nzdhkdhmp"></td>
  	                <td id="nzdsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                CAD<img src="images/flags/cad.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="cadeurhm"></td>
  	                <td id="cadusdhm"></td>
  	                <td id="cadaudhm"></td>
  	                <td id="cadgbphm"></td>
  	                <td id="cadnzdhm"></td>
  	                <td id="cadcadhm"></td>
  	                <td id="cadchfhm"></td>
  	                <td id="cadjpyhm"></td>
  	                <td id="cadhkdhm"></td>
  	                <td id="cadsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                CAD<img src="images/flags/cad.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="cadeurhmp"></td>
  	                <td id="cadusdhmp"></td>
  	                <td id="cadaudhmp"></td>
  	                <td id="cadgbphmp"></td>
  	                <td id="cadnzdhmp"></td>
  	                <td id="cadcadhmp"></td>
  	                <td id="cadchfhmp"></td>
  	                <td id="cadjpyhmp"></td>
  	                <td id="cadhkdhmp"></td>
  	                <td id="cadsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                CHF<img src="images/flags/chf.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="chfeurhm"></td>
  	                <td id="chfusdhm"></td>
  	                <td id="chfaudhm"></td>
  	                <td id="chfgbphm"></td>
  	                <td id="chfnzdhm"></td>
  	                <td id="chfcadhm"></td>
  	                <td id="chfchfhm"></td>
  	                <td id="chfjpyhm"></td>
  	                <td id="chfhkdhm"></td>
  	                <td id="chfsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                CHF<img src="images/flags/chf.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="chfeurhmp"></td>
  	                <td id="chfusdhmp"></td>
  	                <td id="chfaudhmp"></td>
  	                <td id="chfgbphmp"></td>
  	                <td id="chfnzdhmp"></td>
  	                <td id="chfcadhmp"></td>
  	                <td id="chfchfhmp"></td>
  	                <td id="chfjpyhmp"></td>
  	                <td id="chfhkdhmp"></td>
  	                <td id="chfsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                JPY<img src="images/flags/jpy.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="jpyeurhm"></td>
  	                <td id="jpyusdhm"></td>
  	                <td id="jpyaudhm"></td>
  	                <td id="jpygbphm"></td>
  	                <td id="jpynzdhm"></td>
  	                <td id="jpycadhm"></td>
  	                <td id="jpychfhm"></td>
  	                <td id="jpyjpyhm"></td>
  	                <td id="jpyhkdhm"></td>
  	                <td id="jpysgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                JPY<img src="images/flags/jpy.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="jpyeurhmp"></td>
  	                <td id="jpyusdhmp"></td>
  	                <td id="jpyaudhmp"></td>
  	                <td id="jpygbphmp"></td>
  	                <td id="jpynzdhmp"></td>
  	                <td id="jpycadhmp"></td>
  	                <td id="jpychfhmp"></td>
  	                <td id="jpyjpyhmp"></td>
  	                <td id="jpyhkdhmp"></td>
  	                <td id="jpysgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                HKD<img src="images/flags/hkd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="hkdeurhm"></td>
  	                <td id="hkdusdhm"></td>
  	                <td id="hkdaudhm"></td>
  	                <td id="hkdgbphm"></td>
  	                <td id="hkdnzdhm"></td>
  	                <td id="hkdcadhm"></td>
  	                <td id="hkdchfhm"></td>
  	                <td id="hkdjpyhm"></td>
  	                <td id="hkdhkdhm"></td>
  	                <td id="hkdsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                HKD<img src="images/flags/hkd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="hkdeurhmp"></td>
  	                <td id="hkdusdhmp"></td>
  	                <td id="hkdaudhmp"></td>
  	                <td id="hkdgbphmp"></td>
  	                <td id="hkdnzdhmp"></td>
  	                <td id="hkdcadhmp"></td>
  	                <td id="hkdchfhmp"></td>
  	                <td id="hkdjpyhmp"></td>
  	                <td id="hkdhkdhmp"></td>
  	                <td id="hkdsgdhmp"></td>
  	              </tr>
  	              <tr class="hm">
  	                <td>
  	                SGD<img src="images/flags/sgd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="sgdeurhm"></td>
  	                <td id="sgdusdhm"></td>
  	                <td id="sgdaudhm"></td>
  	                <td id="sgdgbphm"></td>
  	                <td id="sgdnzdhm"></td>
  	                <td id="sgdcadhm"></td>
  	                <td id="sgdchfhm"></td>
  	                <td id="sgdjpyhm"></td>
  	                <td id="sgdhkdhm"></td>
  	                <td id="sgdsgdhm"></td>
  	              </tr>
  	              <tr class="hmp" style="display: none;">
  	                <td>
  	                SGD<img src="images/flags/sgd.svg" style="width: 20px;border-radius: 50px;margin-left: 5px;margin-top: -5px;"/>
  	                </td>
  	                <td id="sgdeurhmp"></td>
  	                <td id="sgdusdhmp"></td>
  	                <td id="sgdaudhmp"></td>
  	                <td id="sgdgbphmp"></td>
  	                <td id="sgdnzdhmp"></td>
  	                <td id="sgdcadhmp"></td>
  	                <td id="sgdchfhmp"></td>
  	                <td id="sgdjpyhmp"></td>
  	                <td id="sgdhkdhmp"></td>
  	                <td id="sgdsgdhmp"></td>
  	              </tr>
  	            </tbody>
  	          </table>

  	      </div>
  	      
  	    </div>












  	     </div>
  	  </div>
  	</div> 

  	</section>


