<?php 
session_start();

require("config.php");
require("db.php");

if(isset($_SESSION['SESS_LOGGEDIN']) == FALSE) {
    header("Location: login.php");

    function display_currency($currency){

        foreach($currency as $currence){
            echo $currence;
        }
    }
    
    $username = $_SESSION['SESS_USERNAME'];
    $currency = array();
    $query = mysql_query("SELECT * FROM logins WHERE username='$username'");
    $user_data = mysql_fetch_array($query);
    if($user_data['currency']==mysql_real_escape_string('USD')){
        $currency[]='$';
    }
    else if($user_data['currency']==mysql_real_escape_string('GBP')){
        $currency[]='£';
    }
    else if($user_data['currency']==mysql_real_escape_string('EUR')){
        $currency[]='€';
    }
    else if($user_data['currency']==mysql_real_escape_string('AUD')){
        $currency[]='$';
    }
    else if($user_data['currency']==mysql_real_escape_string('CAD')){
        $currency[]='$';
    }
}

$seller= $_SESSION['SESS_USERID']; 
$sql = mysql_query("SELECT * FROM logins WHERE id='$seller'");

$numrow=mysql_fetch_array($sql);
$balc=$numrow['balance'];
?>
<!DOCTYPE html>
<html>


    <head>
        
       <title>Trade Now</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!--<link rel="shortcut icon" href="PUT YOUR FAVICON HERE">-->

        <!-- Google Web Font Embed -->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>

        <link href="js/colorbox/colorbox.css"  rel='stylesheet' type='text/css'>
        <link href="css/templatemo_style.css"  rel='stylesheet' type='text/css'>

        <link href="css/grid.css" rel='stylesheet' type='text/css'>
        <link href="css/bootstrap.css" rel='stylesheet' type='text/css'>

    </head>
    <body style="background-color:black">
        <!-- /container -->
        <div>/ 
        <div class="col-md-2" style="float:left;color:white;margin-top:250px;padding-right:-20px">
            <nav class="nav nav-pills nav-stacked dep-nav">
                <li>
                    <select name="postcodeBox" class="form-control" required="required">
                        <option value="AUD/USD">AUD/USD</option>
                        <option value="EUR/GBP">EUR/GBP</option>
                        <option value="EUR/AUD">EUR/AUD</option>
                        <option value="EUR/JPY">EUR/JPY</option>
                        <option value="EUR/USD">EUR/USD</option>
                        <option value="GBP/JPY">GBP/JPY</option>
                        <option value="GBP/USD">GBP/USD</option>
                        <option value="USD/CAD">USD/CAD</option>
                        <option value="USD/CHF">USD/CHF</option>
                        <option value="USD/JPY">USD/JPY</option>
                        <option value="ALPHABETHICAL_INC">ALPHABETICAL Inc C(Google)</option>
                        <option value="APPLE">APPLE</option>
                        <option value="RTS">RTS F-SEP16</option>
                        <option value="GOLD/EUR">GOLD/EUR</option>   
                    </select>
                </li>
                <li>
                    <a href="account-details.php">My Account</a>
                </li>
                <li >
                    <a href="history.php">History</a>
                </li>

                <li>
                    <a href="withdraw.php">Withdraw</a>
                </li>
                <li class="active">
                    <a href="deposit.php" style="background: green !important">Deposit</a>
                </li>
            </nav>
            
        </div>
        <div class="col-md-8" style="margin-left:-80px;">
        <video  autoplay="autoplay" loop="loop">&nbsp;<source src="https://gramoption.com/account/images/20160729_190805_VP8_VP8.webm" type="video/mp4" />
            <p>Sorry your browser does not support this type of video file. Try Chrome.</p>
        </video>
        </div>
        </div>
    <div class="col-md-2" style="float:right;color:white;margin-top:200px;padding-left:80px">
        <table class="table" >
            <tr>
                <td>
                    BALANCE: <?php  echo' '. $balc ?>.00
                </td> 

            </tr>
            <tr>
            <td>
                <div class="input-group">
                Amount <br /><input type="number" placeholder="0.00" name="amount" class="form-control" />
                </div>
            </td> 
               
            </tr>
            <tr >
                <td>Profit <br /><span style="font-size:40px;color:green;font-weight:600">88%</span><br />+$0.88</td>   
            </tr>
            <tr>
                <td>Time Remaining <br /> 01:06</td>   
            </tr>
            <tr>
                <td>
                    <button type="button" class="btn btn-success">Call</button></td> 
            </tr>
            <tr>
                <td>
                    <button type="button" class="btn btn-danger">Put</button> </td> 
            </tr>
            
            
        </table>
        </div>
    
    </body>
</html>