<?php 
session_start();
        
if(!isset($_SESSION['customer_login'])) 
    header('location:index.php');   
?>
<?php include 'header.php' ?>
<?php include 'customer_navbar.php'?>



<div class="content-wrapper">
          <div class="content">                 

<div class="row">
<!-- TradingView Widget BEGIN -->
<div class="col-xl-12">
                                <div class="card widget-block p-4 ">
                                    <div class="card-block">
<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-ticker-tape.js" async>
  {
  "symbols": [
    {
      "proName": "OANDA:SPX500USD",
      "title": "S&P 500"
    },
    {
      "proName": "OANDA:NAS100USD",
      "title": "Nasdaq 100"
    },
    {
      "proName": "FX_IDC:EURUSD",
      "title": "EUR/USD"
    },
    {
      "proName": "BITSTAMP:BTCUSD",
      "title": "BTC/USD"
    },
    {
      "proName": "BITSTAMP:ETHUSD",
      "title": "ETH/USD"
    }
  ],
  "colorTheme": "light",
  "isTransparent": false,
  "displayMode": "adaptive",
  "locale": "en"
}
  </script>
</div></div></div></div>


 <div class="col-xl-12">
                                <div class="card widget-block p-4 ">
                                    <div class="card-block">



<?php 
        include '_inc/dbconn.php';
        $sender_id=$_SESSION["login_id"];
        
        $sql="SELECT * FROM cheque_book WHERE account_no='$sender_id'";
        $result=mysqli_query($con, $sql) or die(mysqli_error($con));
        $rws=mysqli_fetch_array($result);
        $c_status=$rws[3];
        $c_id=$rws[2];
        
        $sql="SELECT * FROM atm WHERE account_no='$sender_id'";
        $result=mysqli_query($con, $sql) or die(mysqli_error($con));
        $rws=mysqli_fetch_array($result);
        $atm_status=$rws[3];
        $a_id=$rws[2];
        
        if(($a_id==$sender_id) || ($c_id==$sender_id))
        {
            
        echo "<table align='center'>";
        echo "<th>Requests</th><th>Status</th>";
        echo "<tr><td>ATM Card Status: </td><td>$atm_status</td></tr>";
        echo "<tr><td>Cheque Book Status: </td><td>$c_status</td></tr>";
        echo "</table>"; }

?>     
<div class='content_customer'>

           
     <div class="customer_top_nav">
            
            </div>
            <br><br>
    
    <form action="customer_issue_atm_process.php" method="POST">
    <table align="center">
        <tr><td>Issue: <select name="atm">
        <option value='ATM' selected>ATM</option>
        <option value='CHEQUE'>Cheque Book</option></td><tr>
        
    </select>
          </table>      
    <table align="center"><tr><td><input type="submit" name="submitBtn" value="Request" class='addstaff_button'></td></tr>
    </table>    </form>
    
                                     </div>
                                    </div>
                                </div>
                            </div>







</div>
</div>


    <?php include 'footer.php';?>