<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			 */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<?php echo $javascript->link('jquery.js'); ?>
<script>
    function setNewsletter(thisform,st)
    {

        var constr='';
        if(st=='Y') {
            checkval='N'; constr="Do you want to Unsubscribe the Newsletters." }
        else if(st=='N') {
            checkval='Y'; constr="Do you want to Subscribe for Newsletters." }
   
        var con=confirm(constr);
        if(con==true)
        {  
            $('#hidnews').val(checkval);
            thisform.submit();
        } 
    }   
</script> 
<div align="center">
    <h2 class="title text-center mainhd">My Account</h2>
</div>
<br />
<?php if ($session->check('Message.flash')) { ?><div id="okbox"><font color="#078402"><?php $session->flash(); ?></font></div><?php } ?>

<form name="myaccount" method="post" action="">
    <div id="item_details_admin">
        <!--items display area start -->
        <div id="items_display_area_admin" class="myaccountblk">
            <div class="inr">
                <?php $session->flash(); ?>
               <!-- <div id="admin_heading"></div> -->
                <div class="col-md-6">
                        <i class="fa fa-shopping-cart"></i> 

<?php echo $html->link('My Cart', '/carts/show/'); ?>
                </div>
                <div class="col-md-6">
                            <i class="fa fa-list-alt"></i>
 <?php echo $html->link('My Orders', '/orders/myorder/' . $userid); ?>
                </div>
                <div class="col-md-6">
                        <i class="fa fa-map-marker"></i>
 <?php echo $html->link('My Billing Address', '/user_addresses/mybilladd/' . $userid); ?>
                </div>
                <div class="col-md-6">
                            <i class="fa fa-map-marker"></i>
 <?php echo $html->link('My Shipping Address', '/user_addresses/myshippadd/' . $userid); ?>
                </div>
                <div class="col-md-6">
                       <i class="fa fa-user"></i>
 <?php echo $html->link('My Profile', '/users/chngpword/' . $userid); ?>
                </div>
                    <?php if ($cnfg["allow_rma"] == "Y") { ?>
                <div class="col-md-6">    
                        <i class="fa fa-exchange"></i>
 <?php echo $html->link('My Refund Requests', array('controller' => 'refunds', 'action' => 'myreturns')); ?>                            
                        
                </div>
                    <?php }else{ ?>
                        <!--p class="maintext_inner maintext_inner_arrow">&nbsp;                            
                                
                        </p-->
                    <?php } ?>

                <?php if($cnfg["allow_giftcard"] == 'Y') { ?>
                <div class="col-md-6">
                        
                            <i class="fa fa-gift"></i>
 <?php echo $html->link('My Giftcards', array('controller' => 'giftcard_details', 'action' => 'index')); ?> 
                       
                </div>
                <div class="col-md-6">
                        					 
                            <i class="fa fa-gift"></i>
 <?php echo $html->link('Giftcard Usage', array('controller' => 'giftcardusers', 'action' => 'mygiftcard')); ?> 

                       
                </div>
                <?php } ?>

                <div class="col-md-6">
                       
                        <i class="fa fa-file-o"></i>

                            <?php
                            if (isset($status)) {
                                if ($status == 'Y')
                                    $str = "Unsubscribe Newsletters";
                                else
                                    $str = "Subscribe Newsletters";
                                ?>		  
                                <?php echo $html->link($str, "javascript:setNewsletter(document.myaccount,'" . $status . "');"); ?>
                            <?php } ?>
                        
                </div>
                       	
                            
                        
                </div>

                <div class="clearfix"></div>


                <div id="admin_bottom">
                    <div class="col-md-6">
                        <p class="maintext_inner">&nbsp;</p>
                    </div>
                    <div class="col-md-6">
                        <span class="toplinks">		

                        </span>
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1)); ?></div>
                </div>
            </div>            
        </div>
        <div align="left" class="float_clear1"></div>
    </div>
    <input type="hidden" name="hidnews" id="hidnews" />
    <input type="hidden" name="hidnewsid" id="hidnewsid" value="<?php if (isset($newsid)) echo $newsid; ?>" />
</form>	
<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif'); ?></div>
