<?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>
<div class="row">

  <!-- Add Tracker Modal -->
  <div class="modal fade" id="screenerCur" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document" style="margin-top: 80px;">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLongTitle">Add Forex Screener Currencies</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <form action="" class="form" method="post">

              <div class="row" style="margin-top: 0px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">EUR</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_USD" <?php if (in_array('EUR_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?> 

                                    >
                                    EUR/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_AUD" <?php if (in_array('EUR_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_GBP" <?php if (in_array('EUR_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_NZD" <?php if (in_array('EUR_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_CAD" <?php if (in_array('EUR_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_CHF" <?php if (in_array('EUR_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_JPY" <?php if (in_array('EUR_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_HKD" <?php if (in_array('EUR_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="EUR_SGD" <?php if (in_array('EUR_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    EUR/SGD
                                  </div>
                                  
                                </div>





                                <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">USD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_EUR" <?php if (in_array('USD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_AUD" <?php if (in_array('USD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_GBP" <?php if (in_array('USD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_NZD" <?php if (in_array('USD_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_CAD" <?php if (in_array('USD_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_CHF" <?php if (in_array('USD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_JPY" <?php if (in_array('USD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_HKD" <?php if (in_array('USD_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="USD_SGD" <?php if (in_array('USD_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    USD/SGD
                                  </div>
                                  
                                </div>














                                  <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">AUD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_EUR" <?php if (in_array('AUD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_USD" <?php if (in_array('AUD_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_GBP" <?php if (in_array('AUD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_NZD" <?php if (in_array('AUD_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_CAD" <?php if (in_array('AUD_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_CHF" <?php if (in_array('AUD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_JPY" <?php if (in_array('AUD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_HKD" <?php if (in_array('AUD_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="AUD_SGD" <?php if (in_array('AUD_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    AUD/SGD
                                  </div>
                                  
                                </div>








                                <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">GBP</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_EUR" <?php if (in_array('GBP_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_USD" <?php if (in_array('GBP_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_AUD" <?php if (in_array('GBP_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_NZD" <?php if (in_array('GBP_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_CAD" <?php if (in_array('GBP_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_CHF" <?php if (in_array('GBP_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_JPY" <?php if (in_array('GBP_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_HKD" <?php if (in_array('GBP_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="GBP_SGD" <?php if (in_array('GBP_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    GBP/SGD
                                  </div>
                                  
                                </div>










                                <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">NZD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_EUR" <?php if (in_array('NZD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_AUD" <?php if (in_array('NZD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_AUD" <?php if (in_array('NZD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_GBP" <?php if (in_array('NZD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_CAD" <?php if (in_array('NZD_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_CHF" <?php if (in_array('NZD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_JPY" <?php if (in_array('NZD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_HKD" <?php if (in_array('NZD_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="NZD_SGD" <?php if (in_array('NZD_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    NZD/SGD
                                  </div>
                                  
                                </div>









                                  <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">CAD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_EUR" <?php if (in_array('CAD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_AUD" <?php if (in_array('CAD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_AUD" <?php if (in_array('CAD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_GBP" <?php if (in_array('CAD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_NZD" <?php if (in_array('CAD_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_CHF" <?php if (in_array('CAD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_JPY" <?php if (in_array('CAD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_HKD" <?php if (in_array('CAD_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CAD_SGD" <?php if (in_array('CAD_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CAD/SGD
                                  </div>
                                  
                                </div>









                                    <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">CHF</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_EUR" <?php if (in_array('CHF_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_USD" <?php if (in_array('CHF_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_AUD" <?php if (in_array('CHF_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_GBP" <?php if (in_array('CHF_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_NZD" <?php if (in_array('CHF_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_CAD" <?php if (in_array('CHF_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_JPY" <?php if (in_array('CHF_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_HKD" <?php if (in_array('CHF_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="CHF_SGD" <?php if (in_array('CHF_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    CHF/SGD
                                  </div>
                                  
                                </div>









                                    <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">JPY</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_EUR" <?php if (in_array('JPY_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_USD" <?php if (in_array('JPY_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_AUD" <?php if (in_array('JPY_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_GBP" <?php if (in_array('JPY_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_NZD" <?php if (in_array('JPY_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_CAD" <?php if (in_array('JPY_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_CHF" <?php if (in_array('JPY_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_HKD" <?php if (in_array('JPY_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/HKD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="JPY_SGD" <?php if (in_array('JPY_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    JPY/SGD
                                  </div>
                                  
                                </div>













                                    <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">HKD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_EUR" <?php if (in_array('HKD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_USD" <?php if (in_array('HKD_USD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_AUD" <?php if (in_array('HKD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_GBP" <?php if (in_array('HKD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_NZD" <?php if (in_array('HKD_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_CAD" <?php if (in_array('HKD_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_CHF" <?php if (in_array('HKD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_JPY" <?php if (in_array('HKD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="HKD_SGD" <?php if (in_array('HKD_SGD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    HKD/SGD
                                  </div>
                                  
                                </div>





                                      <div class="row" style="margin-top: 30px;">
                                  <div class="col-md-12">
                                    <p style="color: #F7614E;font-size: 24px;font-weight: 700">SGD</p>
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_EUR" <?php if (in_array('SGD_EUR', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/EUR
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_AUD" <?php if (in_array('SGD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/USD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_AUD" <?php if (in_array('SGD_AUD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/AUD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_GBP" <?php if (in_array('SGD_GBP', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/GBP
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_NZD" <?php if (in_array('SGD_NZD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/NZD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_CAD" <?php if (in_array('SGD_CAD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/CAD
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_CHF" <?php if (in_array('SGD_CHF', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/CHF
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_JPY" <?php if (in_array('SGD_JPY', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/JPY
                                  </div>
                                  <div class="col-md-2 form-group" style="color: #F7614E;font-weight: 700;font-size: 14px;">
                                    <input type="checkbox" name="rangeCur[]" value="SGD_HKD" <?php if (in_array('SGD_HKD', $currenciesRangeArray)): ?>
                                      checked
                                    <?php endif ?>>
                                    SGD/HKD
                                  </div>
                                  
                                </div>










           
             <div class="col-md-12" style="margin-top:1em;">
                <div class="row">
                  <div class="col-md-4">
                  </div>
                  <div class="col-md-3">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal" style="width: 100%;">Close</button>    
                  </div>
                  <div class="col-md-5">
                    <input type="submit" class="btn btn-primary pull-right trackerSubmit" name="submitScreener" value="Save Currencies" style="background-color: #F15A24;width: 100%;border: none;">    
                  </div>
                </div>
                
                
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
  <!-- END Modal -->




  <div class="col-md-4">
      <button class="btn btn-primary crypt-button-green-full addTracker" data-toggle="modal" style="margin:10px;border: none !important;" data-target="#screenerCur">+ Add Currencies</button>
  </div>

<?php 

if (isset($_POST['submitScreener'])) {
	# code...
	$screenerCur = $_POST['rangeCur'];

	$rCurSerialize = serialize($screenerCur);
	

	if (empty($fetchCurRange)) {
		# code...
		$inertQuery = $db->db->prepare("INSERT INTO screenertable(userid, cur) VALUES ('$userId', '$rCurSerialize')");

	}else{

		$inertQuery = $db->db->prepare("UPDATE screenertable SET cur = '$rCurSerialize' WHERE userid = '$userId'");
	}

	if ($inertQuery->execute()) {
		# code...
		?>
		<script type="text/javascript">
			location.href = location.href;
		</script>
		<?php 
	}


}

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

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