<div class="content">
    <section class="banner-2" id="pageHeaderBanner">
        <div class="container text-center banner-content ">
            <h1 class="text-uppercase common-page-heading page-title-2"><?php echo $current_section ?></h1>
        </div>
    </section>
    <section id="customerAccountIndex" class="common-page-bg-no">
        <div class="container">
            <div class="row">
                <div class="col c3">
                    <?php echo $this->load->view('myaccount/nav') ?>
                </div>
                <div class="col c9">
                    <div class="block-form">
                        <div><span class="sub-title-2">Hi</span>&nbsp;<span class="sub-title-1"><?php echo $customer['name'] ?></span></div>
                        <p>Welcome at "<?php echo $this->config->item('general_name') ?>" Customer section. Here You can view or update your account information. You can also check your order details and view available addresses you use for placing order from <?php echo $this->config->item('general_name') ?> online order system.</p>
                        <p style="font-size: 20px;font-weight: bold;">
                            <span>You account Panel</span> | <span>You account is <?php $customer['verified'] === '2' ? print'<span style="color:green;">verified<span>' : print '<span style="color:green;">not verified</span>' ?></span>
                        </p>

                        <div class="row">
                            <div class="col c3">
                                <div class="dashboad-block text-center">
                                    <a href="<?php echo site_url('my-account/orders') ?>">
                                        <div class="dashboad-block-inner">
                                            <div class="dashboard-icon-block"><span class="icon icon-list"></span></div>
                                            <div class="title-block"><h3>My Orders</h3></div>
                                        </div>
                                    </a>
                                </div>
                            </div>
                            <div class="col c3">
                                <div class="dashboad-block text-center">
                                    <a href="<?php echo site_url('my-account/profile'); ?>">
                                        <div class="dashboad-block-inner">
                                            <div class="dashboard-icon-block"><span class="icon icon-user"></span></div>
                                            <div class="title-block"><h3>My Profile</h3></div>
                                        </div>
                                    </a>
                                </div>
                            </div>
                            <div class="col c3">
                                <div class="dashboad-block text-center">
                                    <a href="<?php echo site_url('my-account/password') ?>">
                                        <div class="dashboad-block-inner">
                                            <div class="dashboard-icon-block"><span class="icon icon-lock-open"></span></div>
                                            <div class="title-block"><h3>Change Password</h3></div>
                                        </div>
                                    </a>
                                </div>
                            </div>
                            <div class="col c3">
                                <div class="dashboad-block text-center">
                                    <a href="<?php echo site_url('my-account/address') ?>">
                                        <div class="dashboad-block-inner">
                                            <div class="dashboard-icon-block"><span class="icon icon-book-open"></span></div>
                                            <div class="title-block"><h3>Address Book</h3></div>
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <p><span style="font-size: 17px; font-weight: bold;"><label><input type="checkbox" id="customerInterest" <?php $customer['is_interested'] == "yes" ? print'checked="checked"' : '' ?> /> I am interested to hear your offer news and letters</label></span> </p>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    $('document').ready(function () {
        $('#customerInterest').on('change', function () {
            var is_interested = 'yes';
            if ($(this).is(':checked')) {
                is_interested = 'yes';
            } else {
                is_interested = 'no';
            }
            $.ajax({
                url: '<?php echo site_url('myaccount/interest') ?>',
                data: {is_interested: is_interested},
                type: 'POST',
                dataType: 'json'
            });
        });
    });
</script>