<?php
include"initialize_page.php";
include"systemfunctions.php";
$redirect_url = $website_url . "user/welcome.php";
$test_q = mysqli_query($con, "SELECT * FROM x_fundtransfer WHERE x_userid='$user_id' and x_trtype='local' and x_step='step5' ORDER by x_id DESC");
$test_row = mysqli_num_rows($test_q);
if ($test_row == 0) {

    //header("location:$redirect_url");	 
    echo "<script>window.location ='" . $redirect_url . "';</script>";

    exit();
} else {
    $test_array = mysqli_fetch_array($test_q);



    //test for time
    $test_id = $test_array['x_id'];
    ?>
    <?php include('resources/header.php') ?>
    <title>IFI CODE</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <?php include('resources/css-file.php') ?>
    <?php include('resources/navigation.php') ?> 
    <!-- Dashboard wrapper starts -->
    <div class="dashboard-wrapper">
        <div class="main-container">				
            <div class="row">
                <div class="col-sm-12 ac-summ">
                    <h2>IFI CODE</h2>
                </div>
            </div>
            <div class="row gutter">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <ul class="boxli">
                        <li>
                            <p>Your transfer has been interrupted due to a restriction in your account. Your account is subjected to IFI clearance, for you to continue you must make use of your IFI code to complete your transfer. Input your IFI code now and click on proceed.</p>

                            <p>This is not a regular procedure during a transfer, only inactive or restricted accounts are subjected to ISF verification. This restriction is implemented by the public finance center and signed by a Juge d'instance.</p>



                            <p>Why bank accounts become inactive/dormant?</p>
                            <p>If your current/savings account does not witness any activities over a period of 12 months, it gets classified as an inactive account. Thereafter, if such account continues to remain inactive for another 12 months, it is reclassified as dormant account. </p>

                            <p>A restricted account limit or prevent you from your full account functionalities. It may even limit the number of deposits you can make and checks you can write.</p>

                            <p>Government Agency Restrictions:</p>

                            <p>Government agencies can place restrictions on a bank account. If you fail to pay your taxes, the Internal Revenue Service has the ability to seize assets, including your bank account. If your bank account is levied, the funds are frozen. You can still make deposits, but you are unable to withdraw funds until restriction has been lifted.</p>

                            <p>Bank Placed Restrictions:</p>

                            <p>If your account has been overdrawn due to insufficient funds, the bank likely will restrict your account. You can deposit funds, but can't withdraw. Any check written or pending purchases against the account may be declined. When your account is no longer in the negative, it is restored to good standing and the restrictions are lifted.</p>

                            <p>When your account is restricted, usually, we ask you to complete one or more tasks to remove your account restriction. We always list the steps in your Resolution Center. I would advise that you contact our customer support center directly and we will be able to offer you help in restoring your account.</p>
                            <div class="panel">
                                <div class="panel-heading">
                                    <h4>Transfer Funds</h4>
                                </div>
                                <div class="panel-body">
                                    <label>IFI CODE</label>
                                    <form method="post" action="" id="local5form">         
                                        <div class="form-group">
                                            <input type="hidden" name="q" class="form-control" value="validate_step_local5">
                                            <input type="hidden" name="id" class="form-control" value="<?php echo $test_id; ?>">
                                            <input type="text" required placeholder="" class="form-control" name="pinopin">
                                        </div>
                                        <div class="form-group">
                                            <input type="submit" value="Validate IFI CODE" class="buttonacvali btn btn-info">
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </li>
                    </ul>	
                </div>
            </div>	
            </br>
        </div>
        <!-- Main container ends -->
    </div>
    <!-- Dashboard wrapper ends -->
    <?php include('resources/footer.php') ?>
    <?php include('resources/js-file.php') ?>
    <script src="js/jQuery.style.switcher.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#local5form").on('submit', (function (e) {
                e.preventDefault();

                $.ajax({
                    url: "controller.php", // Url to which the request is send
                    type: "POST", // Type of request to be send, called as method
                    data: new FormData(this), // Data sent to server, a set of key/value pairs (i.e. form fields and values)
                    contentType: false, // The content type used when sending data to the server.
                    cache: false, // To unable request pages to be cached
                    processData: false, // To send DOMDocument or non processed data file it is set to false
                    success: function (data)   // A function to be called if request succeeds
                    {
                        //alert(data);
                        if (data == 0)
                        {
                            alert("Please fill all fields...");
                        }
                        if (data == 1)
                        {
                            window.location.href = '<?php echo website_settingdata('x_weburl'); ?>user/process.php?url=complete.php';
                        }
                        if (data == 2)
                        {
                            alert("Invalid Code..");
                        }

                    }
                });
            }));
        });

    </script>

    <?php
}
?>