<?php
$cmpy_details = get_basic_setting();
$design_setting = get_design_setting();
$user_data = get_session_userdata();
if ((!empty($cmpy_details->favicon)) && (file_exists(DIR_FAVICON . $cmpy_details->favicon))) {
    $favicon = base_url() . DIR_FAVICON . $cmpy_details->favicon;
}
else {
    $favicon = base_url() . DEFAULT_FAVICON;
}
?>
<!DOCTYPE html>
<html class="bg-myclr">
    <head>
        <meta charset="UTF-8">
        <title>
            <?php echo (defined('PAGE_TITLE_PREFIX')) ? PAGE_TITLE_PREFIX : '';?>
            <?php echo (!empty($title)) ? ' :: ' . $title : '';?>
        </title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <link rel="icon" href="<?php echo $favicon;?>" sizes="16x16" />
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link type="text/css" rel="stylesheet" href="<?php echo base_url();?>assets/css/library/AdminLTE.css" />
        <link type="text/css" rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css" />   
        
        <script src="<?php echo base_url();?>assets/js/library/jquery-1.11.1.min.js"></script>
        <script src="<?php echo base_url();?>assets/js/library/bootstrap-3.2.0.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url();?>assets/js/login.js" type="text/javascript"></script>
    </head>
    
    <body class="bg-myclr">
        <div class="page_loader"></div>
        <div class="form-box login_container" id="login-box">
            <div class="header logo">
            <a href="<?php echo base_url();?>" class="logo" style="margin: 0px; padding: 0px;">
            <?php
            if ((!empty($design_setting->logo)) && (file_exists(FCPATH . DIR_COMPANY_LOGO . $design_setting->logo))) {
                $image_url = base_url() . DIR_COMPANY_LOGO . $design_setting->logo;
                $alt = $cmpy_details->temple_name;
            }
            else {
                $image_url = base_url() . 'assets/images/layout/logo.png';
                $alt = 'Logo not found!';
            }
            ?>
            <img src="<?php echo $image_url;?>" alt="<?php echo $alt;?>" height="100%" />
            </a>
            </div>
            <form action="<?php echo $form_action;?>" method="post" class="user" onSubmit="return validate()">
                <div class="body bg-gray">
                    <input type="hidden" name="time_zone_offset" value="" />
                    
                    <div class="form-group" style="margin-left:5px">
                        <input type="text" name="user_name" id="user_name" class="form-control" placeholder="User Name" autofocus />
                    </div>
                    <div class="form-group" style="margin-left:5px">
                        <input type="password" name="password" id="password" class="form-control" placeholder="Password"/>
                    </div>
                    
                    <div id="wrapper_container">    
                        <?php if($this->session->flashdata('message')) {?>
                            <p style="font-size:15px; margin-left:90px; color:red; width:37;">
                            <?php echo $this->session->flashdata('message'); ?></p>
                        <?php }?>
                     </div> 
                </div>
                
                <div class="footer">                                                               
                    <button type="reset" id="afterrst" class="btn btn-gry btn-sm"  style="margin-left:4px; width:152px; font-size:14px;" onClick="form_reset();">Reset</button>
                    <button type="submit" class="btn btn-success btn-sm" style="margin-left:6px; width:155px;  font-size:14px">Sign in</button>
                </div>
            </form>            
        </div>
    </body>
</html>