<?php
	/*
	Hezecom Email Solution
	Author: Hezecom Technologies (http://hezecom.com) info@hezecom.net
	COPYRIGHT 2014 ALL RIGHTS RESERVED
	
	You must have purchased a valid license from CodeCanyon.com in order to have 
	access this file.

	You may only use this file according to the respective licensing terms 
	you agreed to when purchasing this item.
	*/
	session_start();
	include('config/config.php');
	include('language/eng.php');
	include('libraries/functions.php');
	include_once('libraries/class_dbcon.php');
	$dbc=new dboptions();
	$dbc->logged_in_protect();
	$row=UserProfile($_SESSION['mail_username']);
	include('libraries/url_writer.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo H_TITLE;?></title>
<link rel="stylesheet" type="text/css" href="<?php echo H_THEME;?>/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo H_THEME;?>/css/font-awesome.min.css">
<link href="<?php echo H_THEME;?>/css/style.css" rel="stylesheet">
<script src="<?php echo H_THEME;?>/js/modernizr.custom.js"></script>
</head>
<body>
<div id="fixed_block"><a href="libraries/logout.php?logout=mail"></a></div>
<div class="navbar navbar-fixed-top header">
<div class="col-md-12">
<div class="navbar-header">
<a href="#" class="navbar-brand"><?php echo H_TITLE;?></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse1">
<i class="fa fa-search"></i>
</button>
</div>

<div class="collapse navbar-collapse" id="navbar-collapse1">
<?php if(session('mail_username')){ ?>
 <ul class="nav navbar-nav navbar-right">
             <li><a href="#"><?php echo LANG_HI;?> <?php echo $row->cfname;?></a></li>
            
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-user" style="color:#F30;"></span> <?php echo LANG_ACCOUNT;?><b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<div class="navbar-content">
        <div class="row">
       <div class="col-md-5">
       <?php if(is_file(UPLOAD_FOLDER.$row->user_image)){?><a href="#" ><img src="<?php echo UPLOAD_FOLDER.$row->user_image;?>" class="img-responsive"/></a><?php }else{?>
        <span class="fa fa-user" style="color:#CCC; font-size:150px;"></span>
       <?php }?>
       
     
     <p class="text-center small"><a href="<?php echo $update_url;?>"><?php echo LANG_CHANGE_PICTURE;?></a></p>
  </div>
<div class="col-md-7">
<span><?php echo $row->cfname.' '.$row->clname;?></span>
<p class="text-muted small"><?php echo $row->cusername;?></p>
<div class="divider">
</div>
<a href="<?php echo $main;?>" class="btn btn-primary btn-sm active"><?php echo LANG_VIEW_PROFILE;?></a>
</div>
</div>
</div>
<div class="navbar-footer">
<div class="navbar-footer-content">
<div class="row">
<div class="col-md-6">
<a href="<?php echo $cp_url;?>" class="btn btn-default btn-sm"><?php echo LANG_CHANGE_PASSWORD;?></a>
</div>
<div class="col-md-6">
<a href="<?php echo $logout;?>" class="btn btn-default btn-sm pull-right"><?php echo LANG_SIGN_OUT;?></a>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
<?php }?>
</div>	
</div>	
</div>

<!--main-->
<div id="mail">
<iframe frameborder="0" height="690" src="webmail/index.php" width="100%"></iframe>
</div><!--/main-->
  </div>
  </div>
</div>
<script src='<?php echo H_THEME;?>/js/jquery.js'></script>
<script src="<?php echo H_THEME;?>/js/bootstrap.min.js"></script>
<script src="<?php echo H_THEME;?>/js/jquery.form.js"></script>
<script src="<?php echo H_THEME;?>/js/hezecom.custom.js"></script>
<script type='text/javascript'>
    function adjustIframes()
{
  $('iframe').each(function(){
    var
    $this       = $(this),
    proportion  = $this.data( 'proportion'),
    w           = $this.attr('width'),
    actual_w    = $this.width();
    
    if ( ! proportion )
    {
        proportion = $this.attr('height') / w;
        $this.data( 'proportion', proportion );
    }
  
    if ( actual_w != w )
    {
        $this.css( 'height', Math.round( actual_w * proportion ) + 'px' );
    }
  });
}
$(window).on('resize load',adjustIframes);
</script> 
  </body>
  </html>
