@extends('main')
<!--<style>
#imgid {
    height:150px;
    width:150px;
    position:relative;    
    border-radius:100%;
    overflow:hidden;
}
img {
    border-radius:100%;
}
.header-title{
    line-height: 30px;
}
.number{
        font-size: 16px;
        font-weight: bold;
        color: #15ae9e;
}
.panel-heading span.badge {
    background-color: #fff !important;
    color: #666 !important;
        padding: 3px 4px;
}
.title-dropdown {
    
    float: left;
    line-height: 30px;
    margin-right: 5px;
    margin-left: 5px;
}
.title-dropdown ul.dropdown-menu {
    width: 210px;
        min-height: 150;
}
</style>
@section('css')
<link href="{{ asset('/css/bootstrapValidator.min.css')}}" rel="stylesheet">
@endsection-->
<?php
  if(Auth::user()->id)
  {
   $inbox_count = CustomLoad::InboxCount(Auth::user()->id); 
   $connetion_count = CustomLoad::ConnectionCount(Session::get('auth_selected_profile'));
   $mentor_count = CustomLoad::MentorCount(Session::get('auth_selected_profile'));
  
  }
   ?>
@section('content')

    <div class="container">
      <div class="no-breadcrumb"></div>
     <ol class="breadcrumb cust-breadcrumb">
  <li><a href="{{url('/')}}">Home</a></li>
             
              <li class="active">Dashboard</li>
  </ol>     <section class="body-content"> 
  <div class="row">
        @include("left_menu")

      <div class="col-sm-9 light-pannel">
<div class="profile-information-block">

<div class="panel panel-default custom-panel">
  <div class="panel-heading">
      <h3 class="panel-title">Profile Information <span class="profile-info-icons pull-right dropdown">

   <ul class="profile-info-icons-block">
    <li> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
     <img src="{{url('images/message-icon.png')}}"> <span class="badge profile-infoicon-badge msg-badge">{{$inbox_count}}</span></a>
     <ul class="dropdown-menu" role="menu">
             <?php 
             if($msg){
             foreach($msg as $msgs){
                
                 $result->profile_image = trim($result->profile_image);
                 if(empty($result->profile_image) || !isset($result->profile_image)){ 
                 $url = 'default-profile.png';}
                 else{
                 $url = $msgs['profile_image'];}
                 
                 if(empty($url)){ $url = 'default-profile.png';}
                  
                 ?>
              <li><a href='{{url('messages/details/'.$msgs['id'])}}'><img style="width:40px; height:40px;" src="<?php if($msgs['profile_image'] && is_file('uploads/profile_images/'.$msgs['profile_image'])){ echo 'uploads/profile_images/'.$url;}else {echo 'uploads/profile_images/default-profile.png';}?>">&nbsp;<b><?php echo ucfirst($msgs['name']); ?></b></a></li>
             <?php }} else { ?>
              <li><a href="#"> <h4>No Messages..</h4></a></li>
             <?php } ?>         
          </ul></li>
    <li><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img src="{{url('images/search-people-icon.png')}}"> <span class="badge profile-infoicon-badge">{{$connetion_count }}</span></a><ul class="dropdown-menu" role="menu">
       <?php 
        if($connetion_count) {
        foreach($connections as $cnt){
                
                 //$result->profile_image = trim($result->profile_image);
                 if(empty($cnt['profile_image']) || !isset($cnt['profile_image'])){ 
                 $url = 'default-profile.png';}
                 else{
                 $url = $cnt['profile_image'];}
                 
               
                  
                 ?>
              <li><a href='{{url('connectionview')}}'><img style="width:40px; height:40px;" src="<?php if($cnt['profile_image'] && is_file('uploads/profile_images/'.$cnt['profile_image'])){ echo 'uploads/profile_images/'.$url;}else {echo 'uploads/profile_images/default-profile.png';}?>">&nbsp;<b><?php echo ucfirst($cnt['name']); ?></b></a></li>
               <?php }} else { ?>
              <li><a href="#"> <h4>No Connections..</h4></a></li>
             <?php } ?> 
                        
          </ul></li>
    <li><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img src="{{url('images/talent-people-icon.png')}}"> <span class="badge profile-infoicon-badge">{{$mentor_count}}</span></a>
      <ul class="dropdown-menu" role="menu">
               <?php 
        if($mentor) {
        foreach($mentor as $ment){
                
                 //$result->profile_image = trim($result->profile_image);
                 if(empty($ment['profile_image']) || !isset($ment['profile_image'])){ 
                 $url = 'default-profile.png';}
                 else{
                 $url = $ment['profile_image'];}
                 
                 
                  
                 ?>
              <li><a href='{{url('mentorview')}}'><img style="width:40px; height:40px;" src="<?php if($ment['profile_image'] && is_file('uploads/profile_images/'.$ment['profile_image'])){ echo 'uploads/profile_images/'.$url;}else {echo 'uploads/profile_images/default-profile.png';}?>">&nbsp;<b><?php echo ucfirst($ment['name']); ?></b></a></li>
               <?php }} else { ?>
              <li><a href="#"> <h4>No Mentor/Mentees..</h4></a></li>
             <?php } ?> 
                        
          </ul>
    </li>
    </ul>


   
    



</span>
</h3>

<!--
    <ul class="profile-info-icons-block">
    <li><a href="#"><img src="images/message-icon.png"> <span class="badge profile-infoicon-badge">0</span></a></li>
    <li><a href="#"><img src="images/search-people-icon.png"> <span class="badge profile-infoicon-badge">0</span></a></li>
    <li><a href="#"><img src="images/talent-people-icon.png"> <span class="badge profile-infoicon-badge">0</span></a></li>
    </ul>-->
   
  </div>
  <div class="panel-body">
  <div class="row">
 <div class="col-sm-4 col-md-3 col-xs-6"> <img src="<?php if($result->profile_image && is_file('uploads/profile_images/'.$result->profile_image)){ echo 'uploads/profile_images/'.$result->profile_image;}else {echo 'uploads/profile_images/default-profile.png';}?>"  class="img-responsive profile-info-avatar"></div> 
  <div class="col-sm-8 col-md-9 col-xs-6">
  <div class="profile-info-views-count-block">
   <h1><?php if(isset($result->name)) echo ucfirst($result->name); else echo " "; ?></h1>
                      <h4><?php if(isset($work->description)) echo ucfirst($work->description). ' at'.$work->company_name; else echo ""; ?></h4>
  <p><span ><a href='{{url('myviews')}}'>{{$profcount}}</a> &nbsp;</span>   People viewed your profile in the past 7days</p>
  <p>
 <span ><a href='{{url('connectionview')}}'>{{$conectioncount}}</a> &nbsp;</span> Connections <span class="grow-net"> <a href='{{url('connectionview')}}'>Grow your network</a></span> 
  </p>
  
  </div>
  
   <div class="clearfix"></div>
  </div>
  
  
  
  </div>
  
  
  
  </div>
</div>

    </div>

  </section>
    </div>
 @endsection
@section('js')
<script src="{{ asset('js/bootstrapValidator.min.js')}}"></script>
<script src="{{ asset('js/maskedinput/jquery.maskedinput.min.js')}}"></script>
<script src="{{ asset('js/validation.js')}}"></script>

@endsection
