<?php
// $my_intransaction = InTransaction::find_by_query("SELECT * FROM in_transaction WHERE user_id =$user->id  ORDER BY date DESC");

// $my_intransactions = InTransaction::find_by_query("SELECT * FROM in_transaction WHERE user_id =$user->id and service_id != 0  ORDER BY id DESC");



if (!isset($_GET['userah'])) {

    echo "<script>window.location.href='./users'</script>";
    // redirect("./users");
}


$id = base64_decode($_GET['userah']);

$usera = User::find_by_id($id);

if (!$usera) {
    echo "<script>window.location.href='./users'</script>";
    // redirect("?page=users");
}


$his_wallet = Wallet::find_by_query("SELECT * FROM wallet WHERE user_id=$id LIMIT 1");
$his_wallet = array_shift($his_wallet);

if (isset($_POST['update_wallet'], $_POST['amount'])) {
    if ($user->id != $usera->id) {

        // if ($wallet->balance >= intval($_POST['amount'])) {
        if($wallet->balance >= intval($_POST['amount']) && (intval($his_wallet->balance) + intval($_POST['amount']) > 0) ){

            $his_wallet->balance += intval($_POST['amount']);
            if ($his_wallet->save()) {

                $payment = new Payment;
                $payment->user_id = $usera->id;
                $payment->amount = intval($_POST['amount']);
                $payment->reference = "***********";
                $payment->status = "Verified";
                $payment->date_created = $date;
                $payment->method = "Manual Funding by: " . $user->id . " - " . $user->email;

                if ($payment->save()) {

                    $wallet->balance -= intval($_POST['amount']);

                    if ($wallet->save()) {
                        $payment = new Payment;
                        $payment->user_id = $user->id;
                        $payment->amount = (-intval($_POST['amount']));
                        $payment->reference = "***********";
                        $payment->status = "Verified";
                        $payment->date_created = $date;
                        $payment->method = "Transfer to: " . $usera->id . " - " . $usera->email;
                        $payment->save();

                        echo '<script>iziToast.success({
                        title: "Hey!",
                        message: "User Wallet Updated Successfuly",
                        position: "topRight",
                        balloon: true
                    });</script>';
                    } else {
                        echo '<script>iziToast.error({
                        title: "Hey!",
                        message: "Error in Updating Wallet",
                        position: "topRight",
                        balloon: true
                    });</script>';
                    }
                } else {
                    echo '<script>iziToast.error({
                        title: "Hey!",
                        message: "Error in Updating Wallet",
                        position: "topRight",
                        balloon: true
                    });</script>';
                }
            } else {
                echo '<script>iziToast.error({
                    title: "Hey!",
                    message: "Error in Updating Wallet",
                    position: "topRight",
                    balloon: true
                });</script>';
            }
        } else {
            echo '<script>iziToast.warning({
                    title: "Caution!",
                    message: "You have insufficient amount to Transfer",
                    position: "topRight",
                    balloon: true
                });</script>';

        }
    } else {

        echo '<script>iziToast.warning({
                    title: "Caution!",
                    message: "You cannot transfer fund to yourself",
                    position: "topRight",
                    balloon: true
                });</script>';

    }

}
?>


<div class="p-2 sm:ml-64 mb-14">
    <nav class="md:max-w-max flex px-5 py-2 mt-20 mx-2 text-teal-700 border border-teal-200 rounded-lg bg-teal-50 dark:bg-teal-800 dark:border-teal-700"
        aria-label="Breadcrumb">
        <ol class="inline-flex items-center space-x-1 md:space-x-3">
            <li class="inline-flex items-center">
                <a href="<?= BASE_URL ?>"
                    class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white">
                    <svg class="w-3 h-3 mr-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
                        fill="currentColor" viewBox="0 0 20 20">
                        <path
                            d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z" />
                    </svg>
                    Home
                </a>
            </li>
            <li>
                <div class="flex items-center">
                    <svg class="w-3 h-3 mx-1 text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
                        fill="none" viewBox="0 0 6 10">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="m1 9 4-4-4-4" />
                    </svg>
                    <a href="<?= BASE_URL ?>/users"
                        class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white">Users</a>
                </div>
            </li>
            <li>
                <div class="flex items-center">
                    <svg class="w-3 h-3 mx-1 text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
                        fill="none" viewBox="0 0 6 10">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="m1 9 4-4-4-4" />
                    </svg>
                    <a href="#"
                        class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white">User
                        Detail</a>
                </div>
            </li>
        </ol>
    </nav>
    <div class="p-2 rounded-lg dark:border-gray-700">
        <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4 ">
            <div
                class="flex flex-col rounded dark:text-gray-100 p-4 h-full bg-gray-50 dark:bg-emerald-500 shadow-emerald-950 shadow-lg">
                <p class="flex items-center mb-3">
                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
                        style="fill: rgb(205, 204, 204);transform: ;msFilter:;">
                        <path
                            d="M12 2a5 5 0 1 0 5 5 5 5 0 0 0-5-5zm0 8a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm9 11v-1a7 7 0 0 0-7-7h-4a7 7 0 0 0-7 7v1h2v-1a5 5 0 0 1 5-5h4a5 5 0 0 1 5 5v1z">
                        </path>
                    </svg>
                    <span class="flex-1 ml-3 whitespace-nowrap text-sm">User Details</span>
                </p>
                <p class="font-bold text-sm">
                    <?= strtoupper($usera->first_name . " " . $usera->last_name) ?>
                </p>
                <p class="text-sm">
                    USER ID:
                    <?= md5($usera->id) ?>
                </p>
            </div>
            <div>
                <div
                    class="flex items-center justify-between p-4 rounded bg-gray-50 h-full dark:bg-emerald-500 shadow-emerald-950 shadow-lg">
                    <div>
                        <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24"
                            style="fill: rgb(255, 255, 255);transform: ;msFilter:;">
                            <path
                                d="M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm-7.5 12a2.5 2.5 0 1 1 0-5 2.47 2.47 0 0 1 1.5.512c-.604.456-1 1.173-1 1.988s.396 1.532 1 1.988a2.47 2.47 0 0 1-1.5.512zm4 0a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z">
                            </path>
                        </svg>
                        <p class="font-bold text-2xl text-white">₦
                            <?= number_format($his_wallet->balance) ?>
                        </p>
                    </div>
                    <div class="flex items-center rounded-xl h-28 ">

                        <button type="button" data-modal-target="crypto-modal" data-modal-toggle="crypto-modal"
                            class="rounded-lg text-white border px-5 py-2 text-sm md:py-3 hover:bg-gray-900 hover:scale-105 transition-all  bg-gray-800"
                            class="rounded-lg text-white border px-5 py-2 text-sm md:py-3 hover:bg-gray-900 hover:scale-105 transition-all  bg-gray-800">Fund
                            Wallet</button>
                    </div>
                </div>

            </div>
        </div>




        <!-- Main modal -->
        <div id="crypto-modal" tabindex="-1" aria-hidden="true"
            class="fixed top-0 left-0 right-0 z-50 hidden w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full backdrop-blur transition-all">
            <div class="relative w-full max-w-md max-h-full">
                <!-- Modal content -->
                <div class="relative rounded-lg shadow bg-teal-700">
                    <button type="button"
                        class="absolute top-3 right-2.5 bg-transparent  rounded-lg text-sm w-8 h-8 ml-auto inline-flex justify-center items-center hover:bg-gray-600 hover:text-white"
                        data-modal-hide="crypto-modal">
                        <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
                            viewBox="0 0 14 14">
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" />
                        </svg>
                        <span class="sr-only">Close modal</span>
                    </button>
                    <!-- Modal header -->
                    <div class="px-6 py-2 border-b rounded-t dark:border-gray-600">
                        <h3 class="text-base font-semibold lg:text-xl text-white">
                            Wallet Top-up
                        </h3>
                    </div>
                    <!-- Modal body -->
                    <div class="p-4">
                        <h3 class="text-xl font-medium text-gray-900 dark:text-white">Minimun Top-up Amount is ₦500</h3>
                        <p class="p-2 bg-pale-200 rounded text-sm font-normal text-gray-500 dark:text-gray-400">Note:
                            Every Funding will be Charge from your Wallet Balance and will be recoded.</p>
                        <form class="space-y-6" id="formm" method="POST" action="" role="form">
                            <div>
                                <label for="amount" class="block mb-2 text-sm font-medium text-white">Enter the amount
                                    you will like to top-up.</label>
                                <input type="number" name="amount" id="amount"
                                    class="border text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 bg-gray-600 border-gray-500 placeholder-gray-400 text-white"
                                    placeholder="e.g 500" required>
                            </div>

                            <button id="pay_btn" type="submit" name="update_wallet"
                                class="w-full text-white focus:ring-4 focus:outline-none  font-medium rounded-lg text-sm px-5 py-2.5 text-center bg-blue-600 hover:bg-blue-700 focus:ring-blue-800">Fund
                                Wallet</button>

                        </form>
                    </div>
                </div>
            </div>
        </div>




        <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4 ">

            <div
                class="relative flex flex-col h-full min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
                <div
                    class="relative py-3 px-3 flex flex-col min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
                    <!-- <div class="p-6 mt-0 bg-white rounded-t-2xl"> -->
                    <h6 class="text-sm text-white">Recent Services Performed</h6>
                    <hr class="h-px bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent" />
                    <!-- </div> -->
                    <div class="table-responsive text-gray-400" style="font-size: 12px !important;">
                        <table class="table table-flush text-white datatable text-sm " datatable
                            id="datatable-search" style="font-size: 12px !important; padding: 0;">
                            <thead class="thead-light">
                                <tr>
                                    <th>#</th>
                                    <th>ID</th>
                                    <th>Service type</th>
                                    <th>Amount</th>
                                    <th>Searching Query</th>
                                    <th>Status</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $my_intransaction = InTransaction::find_by_query("SELECT * FROM in_transaction WHERE user_id =$usera->id  ORDER BY id DESC");
                                $i = 1;
                                foreach ($my_intransaction as $intransaction):
                                    if($intransaction->service_id !=0 || $intransaction->status==0):
                                        // $service = $intransaction->service_id !=0 ?  $parent_service->service_name ." > " .$intransaction->service: $intransaction->service;
                                        
                                        if($intransaction->service_id !=0){
                                            $parent_service=Service::find_by_id($intransaction->service_id);
                                                $service = $parent_service->service_name ." > " .$intransaction->service;
                                                $amount = intval($parent_service->service_fee)+intval($intransaction->amount);
                                        }else{
                                            $service = $intransaction->service;
                                            $amount =intval($intransaction->amount);
                                        }

                                    ?>
                                    <tr class='hover:bg-emerald-300 hover:text-emerald-950'>

                                        <td style="padding: 0;">
                                            <?= $i ?>
                                        </td>
                                        <td style="padding: 0;">
                                            <?= $intransaction->id ?>
                                        </td>
                                        <td style="padding: 0;">
                                            <?= $service ?>
                                        </td>
                                        <td style="padding: 0;">₦
                                            <?= number_format($amount) ?>
                                        </td>
                                        <td style="padding: 0;">
                                            <?= $intransaction->search_query ?>
                                        </td>
                                        <td style="padding: 0;">
                                            <?= $intransaction->status == 1 ? '<span class="badge badge-lg bg-gradient-to-tl from-green-600 to-lime-400">Successful</span>' : '<span
                                        class="badge badge-lg bg-gradient-to-tl from-red-600 to-rose-400">Failed</span>' ?>
                                        </td>
                                        <td>
                                            <?= $intransaction->date ?>
                                        </td>

                                    </tr>
                                    <?php $i++;
                                    endif;
                                endforeach; ?>
                            <tbody>
                        </table>
                    </div>
                </div>
            </div>


            <div
                class="relative flex flex-col h-full min-w-0 break-words text-white bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
                <div class="p-4 pb-0 mb-0 bg-emerald-800 border-b-0 rounded-t-2xl">
                    <div class="flex flex-wrap text-gray-400 -mx-3">
                        <div class="flex items-center w-full max-w-full px-3 shrink-0 md:w-8/12 md:flex-none">
                            <h6 class="mb-0 text-white">User Information</h6>
                        </div>
                        <div id="edit_profile_btn"
                            class="w-full max-w-full px-3 text-right shrink-0 md:w-4/12 md:flex-none rounded-lg shadow-soft-lg bg-emerald-950 text-white">
                            <a href="javascript:;" data-target="tooltip_trigger" data-placement="top">
                                <i class="leading-normal fas fa-user-edit text-sm"></i>&nbsp; Edit
                                Profile
                            </a>
                            <div data-target="tooltip"
                                class="hidden px-2 py-1 text-center text-white bg-black rounded-lg text-sm"
                                role="tooltip">
                                Edit Profile
                                <div class="invisible absolute h-2 w-2 bg-inherit before:visible before:absolute before:h-2 before:w-2 before:rotate-45 before:bg-inherit before:content-['']"
                                    data-popper-arrow></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="flex-auto p-4 text-gray-400">
                    <!-- <div class="col-md-8 profile-text"> -->
                    <span class="msg"></span>
                    <h3 class="text-gray-400">
                        <?= strtoupper($usera->first_name . " " . $usera->last_name) ?>

                    </h3>
                    <form id="update_profile_form" action="" method="post">
                        <table class="table table-flush text-gray-400 text-sm">
                            <tr class='hover:bg-emerald-300 hover:text-emerald-950'>

                                <th>Email Address</th>
                                <td>
                                    <?= $usera->email ?>
                                </td>
                            </tr>
                            <tr>
                                <th>Phone Number</th>
                                <td>
                                    <?= $usera->phone ?>
                                </td>
                            </tr>
                            <tr>
                                <th>Address</th>
                                <td>
                                    <textarea required disabled class="form-control" name="address" id="address"
                                        rows="4"><?= $usera->address ?></textarea>
                                </td>
                            </tr>
                            <tr>
                                <th>Password</th>
                                <td>
                                    <input required disabled class="form-control" type="text" name="password"
                                        id="password" value="<?= $usera->password ?>">
                                </td>
                            </tr>
                            <tr>
                                <th>Confirm Password</th>
                                <td>
                                    <input required disabled class="form-control" type="text" name="confirm_pass"
                                        id="confirm_pass" value="">
                                </td>
                            </tr>
                            <tr>
                                <th>User Status</th>
                                <td>

                                        <select disabled name="status" class="form-select" id="status">
                                        <?php
                                            if($usera->status==0):
                                            ?>
                                                <option value="<?php $usera->status ?>">Deactivated</option>
                                            <?php else:?>
                                                <option value="<?php $usera->status ?>">Activated</option>
                                            <?php endif?>

                                            <option value="1">Activate</option>
                                            <option value="0">Deactivate</option>

                                        </select>

                                </td>
                            </tr>
                            <input id="user_id" type="hidden" name="user_id" value="<?= $usera->id ?>">

                        </table>
                        <!-- <br> -->
                        <button type="submit" style="display: none;" id="save_btn"
                            class="btn btn-theme m-2 rounded-lg text-white bg-gradient-to-tl from-green-600 to-lime-400"><i
                                class="fa fa-save"></i>
                            Update</button>

                    </form>

                </div>
            </div>

        </div>


    </div>




    <div
        class="relative flex flex-col m-3 h-full min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
        <div
            class="relative flex flex-col min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
            <div class="p-6 px-4 pb-0 mb-0 bg-emerald-800 border-b-0 rounded">
                <h6 class="mb-0 text-sm text-white">Recent Payments</h6>
            </div>
            <div class="flex-auto p-4 pt-6 text-white">
                <hr class="h-px bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent" />
                <!-- </div> -->
                <div class="table-responsive" style="font-size: 12px !important;">
                    <table class="table table-flush text-white datatable text-sm " datatable id="datatable-search"
                        style="font-size: 12px !important;">
                        <thead class="thead-light">
                            <tr>
                                <th>#</th>
                                <th>ID</th>
                                <th>User ID</th>
                                <th>Amount</th>
                                <th>Method</th>
                                <th>Ref</th>
                                <th>Date</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $i = 1;
                            $his_payments = Payment::find_by_query("SELECT * FROM payment WHERE user_id =$usera->id ORDER BY id DESC");

                            foreach ($his_payments as $his_payment):
                                ?>
                                <tr class='hover:bg-emerald-300 hover:text-emerald-950'>

                                    <td>
                                        <?= $i ?>
                                    </td>
                                    <td>
                                        <?= $his_payment->id ?>
                                    </td>
                                    <td>
                                        <?= User::find_by_id($his_payment->user_id)->email ?>
                                    </td>
                                    <td>₦
                                        <?= $his_payment->amount ?>
                                    </td>
                                    <td>
                                        <?= $his_payment->method ?>
                                    </td>
                                    <td>
                                        <?= $his_payment->reference ?>
                                    </td>
                                    <td>
                                        <?= $his_payment->date_created ?>
                                    </td>

                                </tr>
                                <?php $i++;
                            endforeach; ?>
                        <tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div
        class="relative flex flex-col m-3 h-full min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
        <div
            class="relative flex flex-col min-w-0 break-words bg-emerald-800 border-0 shadow-soft-xl rounded bg-clip-border">
            <div class="p-6 px-4 pb-0 mb-0 bg-emerald-800 border-b-0 rounded">
                <h6 class="mb-0 text-sm text-white">Transactions</h6>
            </div>
            <div class="flex-auto p-4 pt-6 text-white">
                <hr class="h-px bg-transparent bg-gradient-to-r from-transparent via-black/40 to-transparent" />
                <!-- </div> -->
                <div class="table-responsive" style="font-size: 12px !important;">
                    <table class="table table-flush text-white datatable text-sm " datatable id="datatable-search"
                        style="font-size: 12px !important;">
                        <thead class="thead-light">
                            <tr>
                                <th>#</th>
                                <th>ID</th>
                                <th>Amount</th>
                                <th>Method</th>
                                <th>Ref</th>
                                <th>Status</th>
                                <th>Date Created</th>
                                <th>Date Updated</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $i = 1;
                            $his_transactions = MyTransaction::find_by_query("SELECT * FROM transaction WHERE user_id =$usera->id  ORDER BY id DESC");

                            foreach ($his_transactions as $his_transaction):
                                ?>
                                <tr class='hover:bg-emerald-300 hover:text-emerald-950'>

                                    <td>
                                        <?= $i ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->id ?>
                                    </td>
                                    <td>₦
                                        <?= $his_transaction->amount ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->method ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->reference ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->status == 'Varified' ? '<span class="badge badge-lg bg-gradient-to-tl from-green-600 to-lime-400">Verified</span>' : '<span
                                        class="badge badge-lg bg-gradient-to-tl from-red-600 to-rose-400">Not Verify</span>' ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->date_created ?>
                                    </td>
                                    <td>
                                        <?= $his_transaction->date_updated ?>
                                    </td>

                                </tr>
                                <?php $i++;
                            endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>
<script>



    $(document).ready(function () {
        $("#edit_profile_btn").click(function () {
            $("#save_btn").css({
                "display": ""
            })

            $(this).hide()


            $("#address").prop("disabled", false)
            $("#password").prop("disabled", false)
            $("#status").prop("disabled", false)
            $("#confirm_pass").prop("disabled", false)

        })
    })


    $(document).on("submit", "#update_profile_form", function (e) {

        e.preventDefault()
        var address = $("#address").val()
        var password = $("#password").val()
        var confirm_pass = $("#confirm_pass").val()
        var user_id = $("#user_id").val()
        var status = $("#status").val()


        if (user_id == '') {

            return false
        }

        if (address == "") {
            iziToast.show({
                title: 'Error!',
                message: "Address Field Cannot be Empty",
                color: "yellow",
                position: "topRight",
                balloon: true
            });

            return false
        }

        if (password.length < 6) {

            iziToast.show({
                title: 'Error!',
                message: "Password length must be at least 6 characters",
                color: "yellow",
                position: "topRight",
                balloon: true
            });

            return false
        }
        if (confirm_pass != password) {

            iziToast.show({
                title: 'Error!',
                message: "Password do not match",
                color: "yellow",
                position: "topRight",
                balloon: true
            });


            return false
        }

        $.ajax({
            method: "POST",
            dataType: 'json',
            url: "../main_includes/components/save_profile.php",
            data: $(this).serialize(),
            success: function (response) {
                // console.log(response)
                if (response.response_code == "00") {

                    iziToast.show({
                        title: 'Done!',
                        message: "Profile Updated Successfuly",
                        color: "green",
                        position: "center",
                        balloon: true
                    });


                } else {

                    iziToast.show({
                        title: 'Error!',
                        message: response.message,
                        color: "red",
                        position: "topRight",
                        balloon: true
                    });

                }
            },
            error: function (error) {
                // console.log(error)
                if (error) {
                    var res = JSON.parse(error.responseText)

                    iziToast.show({
                        title: 'Error!',
                        message: res.message,
                        color: "red",
                        position: "topRight",
                        balloon: true
                    });

                }
            }
        }).done(function () {
            $("#save_btn").css({
                "display": "none"
            })

            $("#edit_profile_btn").show()

            $("#address").prop("disabled", true)
            $("#password").prop("disabled", true)
            $("#confirm_pass").prop("disabled", true)

        })



    })
</script>
<!-- </div> -->

<!-- </div> -->