<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
  <title>Request For Card | <?php echo $sitename; ?></title>
  
     <!----------------------------------------------------------------------->
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
     <script src="bootstrap/js/jquery.min.js"></script>
     <script src="bootstrap/js/bootstrap.min.js"></script>
     <!----------------------------------------------------------------------->
     <link rel="icon" href="images/fav-icon.ico" type="image/x-icon" />
    <!-- <link rel="shortcut icon" href="images/fav-icon.ico" type="image/x-icon" />
     <!----------------------------------------------------------------------->
     <!-------------------Constumized CSS--------------------------->
     <link rel="stylesheet" type="text/css" href="css/style.cs">

     <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
     <style>
        body{
          background-color: #f5f5f5;
        }
      .icons-links{
        text-decoration: none;
        color: #555;
        font-size: 16px;
        font-weight: bolder;
      }
      .icons-links:hover{
        color:#0c2074;
        text-decoration: none;
      }
     </style>
     
</head>
<body>
  <?php  include("includes/dashboard_nav.php"); ?>
    <br>
  <div class="container-fluid">
    

        <div class="row">
      <div class="col-sm-2">
        <?php include("includes/sidebar.php"); ?>
          <?php include("includes/side.php"); ?>
      </div>
      <div class="col-sm-10">
               <div class="row">

                   <!------------------LEFT ROW ---------------------------->
                   <div class="col-sm-8">
                       
                      
                     
                       <!------------------------------------------------------>

                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style="">CARDS</h4>
                               <hr>

                               <div class="row">

                                <div class="col-sm-12" align="center">
                                 <img src="images/1198299.png" class="img-responsive" style="margin-top: 15px;" width="110">
                                  <br>
                                  <span>Set up instant card to control your spending and make purchases online.</span><br><br>
                                   <a href="apply-cards.php" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> &nbsp;Apply for Card</a>
                                   <div class="hidden-md hidden-lg"><hr></div>
                                </div>


                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       <!------------------------------------------------------>
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style=""><img src="images/3527271.png" width="25px"> &nbsp;CARD DETAILS</h4>
                               <hr>

                               <div class="row">

                                <div class="col-sm-3" align="center">
                                 <img src="images/349221.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($visa_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">VISA</span><br><br>
                                  
                                   <div class="hidden-md hidden-lg"><hr></div>
                                </div>


                                <div class="col-sm-3" align="center">
                                  <img src="images/147258.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($maestro_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">MAESTRO</span><br><br>
                                   
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>

                                 <div class="col-sm-3" align="center">
                                   <img src="images/349228.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($amex_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">AMEX</span><br><br>
                                   
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>

                                 <div class="col-sm-3" align="center">
                                   <img src="images/349230.png" class="img-responsive" style="margin-top: 15px;" width="50">
                                  <br>
                                  <span style="font-size:12px; font-weight: bold;"><?php echo $b_currency; ?><?php echo number_format($discover_card_balance, 2); ?></span><br>
                                  <span style="font-size:14px;">DISCOVER</span><br><br>
                                   
                                   <div class="hidden-md hidden-lg"><hr></div>
                                 </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                       
                       
                       <!------------------------------------------------------>
                       <div class="row">
                         <div class="col-sm-12">
                            <div class="panel panel-default">
                             <div class="panel-body">
                               <h4 style=""><img src="images/4313085.png" width="45"> CARD HISTORY</h4>
                               <hr>
                               <form>
                                 <input type="text" class="form-control input-lg" style="border-radius: 0px;" value="" placeholder="Search cards..." />
                               </form>

                               <div class="row">
                                  <div class="col-xs-6">
                                    <form action="request-cards.php" method="GET">
                                    <select name="filter" onchange="this.form.submit()" class="form-control input-lg" style="border-radius: 0px;">
                                      <option>Filter</option>
                                      <option>All Cards</option>
                                      <option>Credit Cards</option>
                                      <option>Debit Cards</option>
                                    </select>
                                  </form>
                                  </div>
                                  <div class="col-xs-6">
                                    <form action="request-cards.php" method="GET">
                                    <select name="status" onchange="this.form.submit()" class="form-control input-lg" style="border-radius: 0px;">
                                      <option>Card Type</option>
                                      <option>AMEX</option>
                                      <option>DISCOVER</option>
                                      <option>MASTER</option>
                                      <option>VISA</option>
                                    </select>
                                     </form>
                                  </div>
                                </div>

                               <div class="row">

                                <div class="col-sm-12" align="left">
                        <?php
                        $query = mysqli_query($conn, "SELECT * FROM card_trans WHERE user_id = '$u_dbid' ORDER BY id DESC");
                        $numrow = mysqli_num_rows($query);
                        if($numrow >= 1){
                           include("card-details.php");
                              
                        }else{
                         echo '<br><br><div align="center"><img  src="images/353553535.png" width="140"/><br>
                       <h2><small>No transaction.</small></h2>
                       <p>You dont have any card transactions yet.</p></div>';
                        }
                         ?> 
                         
                       </div>
                                 
                               </div>

                               <br>
                               
                             </div>
                           </div>
                         </div>
                       </div>
                   </div>
                   <!-----------------/LEFT ROW ---------------------------->

                   <!------------------------------------------------------->

                   <!------------------RIGHT ROW --------------------------->
                   <div class="col-sm-4">

                    <div class="row">
                      <div class="col-sm-12">
                         <div class="panel panel-default">
                          <div class="panel-body">
                            <h4 style="">STOCK MARKET</h4>
                            <hr>

                            <!-- TradingView Widget BEGIN -->
                            <div class="tradingview-widget-container">
                              <div class="tradingview-widget-container__widget"></div>
                              <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-mini-symbol-overview.js" async>
                              {
                              "symbol": "NYSE:MA",
                              "width": "100%",
                              "height": 220,
                              "locale": "en",
                              "dateRange": "12M",
                              "colorTheme": "light",
                              "trendLineColor": "rgba(41, 98, 255, 1)",
                              "underLineColor": "rgba(41, 98, 255, 0.3)",
                              "underLineBottomColor": "rgba(41, 98, 255, 0)",
                              "isTransparent": true,
                              "autosize": false,
                              "largeChartUrl": ""
                            }
                              </script>
                            </div>
                            <!-- TradingView Widget END -->

                            <hr>

                           <!-- TradingView Widget BEGIN -->
                           <div class="tradingview-widget-container">
                             <div class="tradingview-widget-container__widget"></div>
                             <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-technical-analysis.js" async>
                             {
                             "interval": "1m",
                             "width": "100%",
                             "isTransparent": true,
                             "height": 450,
                             "symbol": "NYSE:MA",
                             "showIntervalTabs": true,
                             "locale": "en",
                             "colorTheme": "light"
                           }
                             </script>
                           </div>
                           <!-- TradingView Widget END -->
                            
                          </div>
                        </div>
                      </div>
                    </div>


                    <!--------------------------------->

                          
                    
                   </div>
                   <!-----------------/RIGHT ROW --------------------------->
               </div>
      </div>
    </div>
  </div>
</body>
</html>