<?php
$sessionAddUserContainer = new \Zend\Session\Container('addUserData');
$sessionUserId = isset($sessionAddUserContainer->user_id) ? $sessionAddUserContainer->user_id : '';
$sessionUserName = isset($sessionAddUserContainer->user_name) ? $sessionAddUserContainer->user_name : '';
$sessionUserMobile = isset($sessionAddUserContainer->mobile) ? $sessionAddUserContainer->mobile : '';
$sessionUserEmail = isset($sessionAddUserContainer->email) ? $sessionAddUserContainer->email : '';
?>
<style>
    .each{
        border-bottom: 1px solid #555;
        padding: 1px 0;
    }
    .acItem .name{
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
    }

    .acItem .desc{
        font-size: 10px;
        font-family: Arial, Helvetica, sans-serif;
        color:#555;
    }
</style>


<div class="col-sm-12">
    <div class="row" style="float: right;">
        <div class="col-sm-12">
            <?php if (!empty($sessionUserId)) { ?>
   <a class="btn btn-info" role="button" title="<?php echo $sessionUserName .' - '.$sessionUserMobile.' - '.$sessionUserEmail;?>">
                    <?php echo $sessionUserName?>
                </a>
                <a href="#" class="btn btn-primary remove-user" role="button">Remove</a>
            <?php } else { ?>
                <a href="#" data-target="#add-user-modal" data-toggle="modal" data-remote="true" data-keyboard="false" data-backdrop="static" class="btn btn-primary add-user" role="button">Login User</a>
                <a href="javascript: void(0);" onclick="addUser()" class="btn btn-info" role="button">Add User</a>
            <?php } ?>
        </div>
    </div> 
</div>


<div id="add-user-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">

        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Login User</h4>
            </div>
            <div class="modal-body">
                <div class="row" style="padding:0 15px;">
                    <div class="col-sm-12 price-one no-padding">            

                        <div class="user_login_window">
                            <form method="post" name="login-form" id="login-form">                



                                <div class="col-sm-12 no-padding" >
                                    <div class="col-lg-12 no-padding">Name</div>

                                    <input type="text" name="user_name" id="user_name_id" class="form-control input-border" placeholder="Name" value="">                        <span class="showerror">   </span>


                                    <div class="col-lg-12 no-padding">Email</div>

                                    <input type="text" name="email" id="email_id" class="form-control input-border" placeholder="Email" value="" readonly="">                        <span class="showerror"></span>


                                    <div class="col-lg-12 no-padding">Mobile</div>

                                    <input type="text" name="mobile" id="mobile_id" class="form-control input-border" placeholder="Mobile" value="" readonly="">                        <span class="showerror"></span>


                                    <div class="col-lg-6 login-but pull-right no-padding margin-top-5 right">
                                        <input type="hidden" name="user_id" id="user-id" class="form-control" value="">
                                        <input type="submit" name="login_form" class="btn btn-primary btn-lg btn-login-user" value="Login">
                                        <a href="javascript: void(0);" onclick="addUser()" class="btn btn-info" role="button" data-dismiss="modal">Add User</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="addUserModal" role="dialog">
    <div class="modal-dialog  modal-dialogfeedback modal-dialog-adduser">
        <!-- Modal content-->
        <div class="modal-content modal-content-add-user">
        </div>
    </div>
</div>