<?php
session_start();

require('../includes/database.php');

if (isset($_SESSION['username']) && $_SESSION['password'] != "") {
} else {
    header("Location:index.php");
}
$username = $_SESSION['username'];


$username = $_SESSION['username'];
$password = $_SESSION['password'];

$query = "SELECT *
			FROM admin	
			WHERE username = '$username'
			&&   password = '$password'";

$result = mysqli_query($con, $query) or die(mysqli_connect_error());
$rows = mysqli_num_rows($result);
if ($rows == 1) {
    while ($data = mysqli_fetch_assoc($result)) {

        extract($data);
        include('head.php');

?>
        <body class="theme-blush">

            <!-- Page Loader -->
            <?php
            include('loader.php');
            ?>

            <!-- Overlay For Sidebars -->
            <div class="overlay"></div>

            <!-- Main Search -->
            <div id="search">
                <button id="close" type="button" class="close btn btn-primary btn-icon btn-icon-mini btn-round">x</button>
                <form>
                    <input type="search" value="" placeholder="Search..." />
                    <button type="submit" class="btn btn-primary">Search</button>
                </form>
            </div>

            <?php
            include('right-sidebar.php');
            include('left-side.php');
            include('settings&pops.php');
            ?>

            <?php
            require('../includes/database.php');
            $user = $_GET['user'];
            $sql = "SELECT * FROM accounts where email = '$user'";
            $cons_list = mysqli_query($con, $sql) or die(mysqli_connect_error());
            if ($row = mysqli_fetch_assoc($cons_list)) {

            ?>
                <section class="content">
                    <div class="body_scroll">
                        <div class="block-header">
                            <div class="row">
                                <div class="col-lg-7 col-md-6 col-sm-12">
                                    <h2>Profile</h2>
                                    <ul class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="dashboard.php"><i class="zmdi zmdi-home"></i> Online Bank</a></li>
                                        <li class="breadcrumb-item"><?php echo $user ?></li>
                                        <li class="breadcrumb-item active">Transfer Code Editor</li>
                                    </ul>
                                    <button style="background:red;" class="btn btn-icon mobile_menu" type="button"><i class="zmdi zmdi-sort-amount-desc"></i></button>
                                </div>
                                <div class="col-lg-5 col-md-6 col-sm-12">
                                    <button style="background:red;" class="btn btn-icon float-right right_icon_toggle_btn" type="button"><i class="zmdi zmdi-arrow-right"></i></button>
                                </div>
                            </div>
                        </div>
                        <div class="container-fluid">
                            <div class="row">
                                <div style="margin:auto;" class="col-lg-10 col-sm-12 col-md-6">
                                     <div class="row clearfix">
                                         <div class="col-lg-4 col-md-6 col-sm-12">
                                            <div class="card widget_2">
                                                <div class="body">
                                                    <h6>IRS CODE</h6>
                                                    <div class="form-group">
                                                        <label for="">Current</label>
                                                        <input type="text" name="" style="font-size: 14px; font-weight:bold" disabled class="form-control " value="<?php echo $row['irs_code']; ?>" id="">
                                                    </div>
                                                    <form action="../bank-manager.php?action=tfcode-update" method="post">
                                                        <div class="form-group">
                                                            <label for="">Update IRS Code</label>
                                                            <input required type="text" name="code" class="form-control " placeholder="Input New IRS Code" id="">
                                                            <input type="hidden" name="type" value="IRS">
                                                            <input type="hidden" name="user" value="<?php echo $user ?>">
                                                        </div>
                                                        <div style="margin:0 auto 0 auto;" class="row">
                                                            <button class="btn btn-warning" type="submit">Update Now</button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-4 col-md-6 col-sm-12">
                                            <div class="card widget_2">
                                                <div class="body">
                                                    <h6>TAX CODE</h6>
                                                    <div class="form-group">
                                                        <label for="">Current</label>
                                                        <input type="text" name="" style="font-size: 14px; font-weight:bold" disabled class="form-control " value="<?php echo $row['tax_code']; ?>" id="">
                                                    </div>
                                                    <form action="../bank-manager.php?action=tfcode-update" method="post">
                                                        <div class="form-group">
                                                            <label for="">Update TAX Code</label>
                                                            <input required type="text" name="code" class="form-control " placeholder="Input New TAX Code" id="">
                                                            <input type="hidden" name="type" value="TAX">
                                                            <input type="hidden" name="user" value="<?php echo $user ?>">
                                                        </div>
                                                        <div style="margin:0 auto 0 auto;" class="row">
                                                            <button class="btn btn-warning" type="submit">Update Now</button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-4 col-md-6 col-sm-12">
                                            <div class="card widget_2">
                                                <div class="body">
                                                    <h6>AML CODE</h6>
                                                    <div class="form-group">
                                                        <label for="">Current</label>
                                                        <input type="text" name="" style="font-size: 14px; font-weight:bold" disabled class="form-control " value="<?php echo $row['aml_code']; ?>" id="">
                                                    </div>
                                                    <form action="../bank-manager.php?action=tfcode-update" method="post">
                                                        <div class="form-group">
                                                            <label for="">Update AML Code</label>
                                                            <input required type="text" name="code" class="form-control " placeholder="Input New AML Code" id="">
                                                            <input type="hidden" name="type" value="AML">
                                                            <input type="hidden" name="user" value="<?php echo $user ?>">
                                                        </div>
                                                        <div style="margin:0 auto 0 auto;" class="row">
                                                            <button class="btn btn-warning" type="submit">Update Now</button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-4 col-md-6 col-sm-12">
                                            <div class="card widget_2">
                                                <div class="body">
                                                    <h6>IMF CODE</h6>
                                                    <div class="form-group">
                                                        <label for="">Current</label>
                                                        <input type="text" name="" style="font-size: 14px; font-weight:bold" disabled class="form-control " value="<?php echo $row['imf_code']; ?>" id="">
                                                    </div>
                                                    <form action="../bank-manager.php?action=tfcode-update" method="post">
                                                        <div class="form-group">
                                                            <label for="">Update IMF Code</label>
                                                            <input required type="text" name="code" class="form-control " placeholder="Input New IMF Code" id="">
                                                            <input type="hidden" name="type" value="IMF">
                                                            <input type="hidden" name="user" value="<?php echo $user ?>">
                                                        </div>
                                                        <div style="margin:0 auto 0 auto;" class="row">
                                                            <button class="btn btn-warning" type="submit">Update Now</button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>

                </section>
    <?php include('footer.php');
            }
        }
    } ?>