<commit_before><script type="text/javascript">

function saveScrollPositions(theForm) {

if(theForm) {

var scrolly = typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement.scrollTop;

var scrollx = typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement.scrollLeft;

theForm.scrollx.value = scrollx;

theForm.scrolly.value = scrolly;

}

}

</script>


      <?php
      //$badge = $totalRep;
                  

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','1');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $gold = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','2');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $silver = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','3');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $bronze = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','4');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $black = $query->num_rows();

      $rep = (($gold*20)+($silver*10)+($bronze*5))-($black*15);   
      ?>
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            User Profile
          </h1>
          <ol class="breadcrumb">
            <li><a href="../dashboard/index.php"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">User profile</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">

          <div class="row">
            <div class="col-md-3">
              <?php foreach($data as $row):
                echo '<div class="box box-widget widget-user">';
                # Add the bg color to the header using any of the bg-* classes -->
                echo '<div class="widget-user-header bg-black" style="background: url(\''.base_url().'/user/defaultcover_user.png\') center center; background-size:contain;">';
                  
                echo '</div>
                <div class="widget-user-image">';
                  echo'<img class="img-circle" src="'.base_url().'/user/'.$row['avatar_name'].'" alt="User Avatar">
                </div>
                <div class="box-footer">
                <h3>';
                  if($row['user_Type']=='Ideator'||$row['user_Type']=='Investor')
                  {
                    if($row['user_midInit']==null)
                      echo $row['user_fName']."  ".$row['user_lName']; 
                    else
                      echo $row['user_fName']." ".$row['user_midInit'].". ".$row['user_lName'];
                  }
                    else
                  {
                    echo $row['company_name'];
                  }                  
                  ?>
                </h3>
              <?php  endforeach;?>
                      
                <p>Reputation:<b> &nbsp;&nbsp;<?php echo $rep;?></b><span class="pull-right">
                <?php
                 if($gold==0 && $silver==0 && $bronze==0)
                 {
                     ?><i class='fa fa-star' style="color:SandyBrown"></i><?php
                 }
                 elseif ($gold>=$silver && $gold>=$bronze) 
                 {
                     ?><i class='fa fa-star' style="color:Gold"></i><?php   
                 } 
                 elseif ($silver>$gold && $silver>=$bronze)
                 {
                     ?><i class='fa fa-star' style="color:Silver"></i><?php
                 }
                 elseif ($bronze>$gold && $bronze>$silver)
                 {
                     ?><i class='fa fa-star' style="color:SandyBrown"></i><?php
                 }
                   
                ?>
                </p>
                  <div class="row">
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $gold;?></span>
                        <span class="description-text text-muted">&nbsp;GOLD&nbsp;</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $silver;?></span> 
                        <span class="description-text text-muted">SILVER</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $bronze;?></span> 
                        <span class="description-text text-muted">BRONZE</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $black;?></span>
                        <span class="description-text text-muted">BLACK</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                  </div><!-- /.row -->
                </div>
              </div><!-- /.widget-user -->
              <!-- App Buttons -->
              <div>
                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#message" title="Send Message" style="background-color:#3C8DBC;color:white;">
                <i class="fa fa-envelope"></i>Message
                </button>

                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#badge" title="Rate this User" style="background-color:#3C8DBC;color:white;">
                <i class="fa fa-star"></i>Badge
                </button>
                
                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#group" title="Send Group Request" style="background-color:#3C8DBC;color:white;"><commit_msg>pushing<commit_after><script type="text/javascript">

function saveScrollPositions(theForm) {

if(theForm) {

var scrolly = typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement.scrollTop;

var scrollx = typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement.scrollLeft;

theForm.scrollx.value = scrollx;

theForm.scrolly.value = scrolly;

}

}

</script>


      <?php
      //$badge = $totalRep;
                  

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','1');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $gold = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','2');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $silver = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','3');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $bronze = $query->num_rows();

      $this->db->select('*');
      $this->db->from('badge_dtl');
      $this->db->where('voteBadge','4');
      $this->db->where('userId',$this->session->userdata('userId'));
      $query = $this->db->get();
      $black = $query->num_rows();

      $rep = (($gold*20)+($silver*10)+($bronze*5))-($black*15);   
      ?>
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            User Profile
          </h1>
          <ol class="breadcrumb">
            <li><a href="../dashboard/index.php"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">User profile</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">

          <div class="row">
            <div class="col-md-3">
              <?php foreach($data as $row):
                echo '<div class="box box-widget widget-user">';
                # Add the bg color to the header using any of the bg-* classes -->
                echo '<div class="widget-user-header bg-black" style="background: url(\''.base_url().'/user/defaultcover_user.png\') center center; background-size:contain;">';
                  
                echo '</div>
                <div class="widget-user-image">';
                  echo'<img class="img-circle" src="'.base_url().'/user/'.$row['avatar_name'].'" alt="User Avatar">
                </div>
                <div class="box-footer">
                <h3>';
                  if($row['user_Type']=='Ideator'||$row['user_Type']=='Investor')
                  {
                    if($row['user_midInit']==null)
                      echo $row['user_fName']."  ".$row['user_lName']; 
                    else
                      echo $row['user_fName']." ".$row['user_midInit'].". ".$row['user_lName'];
                  }
                    else
                  {
                    echo $row['company_name'];
                  }                  
                  ?>
                </h3>
              <?php  endforeach;?>
                      
                <p>Reputation:<b> &nbsp;&nbsp;<?php echo $rep;?></b><span class="pull-right">
                <?php
                 if($gold==0 && $silver==0 && $bronze==0)
                 {
                     ?><i class='fa fa-star' style="color:SandyBrown"></i><?php
                 }
                 elseif ($gold>=$silver && $gold>=$bronze) 
                 {
                     ?><i class='fa fa-star' style="color:Gold"></i><?php   
                 } 
                 elseif ($silver>$gold && $silver>=$bronze)
                 {
                     ?><i class='fa fa-star' style="color:Silver"></i><?php
                 }
                 elseif ($bronze>$gold && $bronze>$silver)
                 {
                     ?><i class='fa fa-star' style="color:SandyBrown"></i><?php
                 }
                   
                ?>
                </p>
                  <div class="row">
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $gold;?></span>
                      </br>
                        <span class="description-text text-muted">GOLD</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $silver;?></span>
                      </br> 
                        <span class="description-text text-muted">SILVER</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $bronze;?></span>
                      </br> 
                        <span class="description-text text-muted">BRONZE</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                    <div class="col-sm-3 border-right">
                      <div class="description-block">
                      <span><?php echo $black;?></span>
                      </br>
                        <span class="description-text text-muted">BLACK</span>
                      </div><!-- /.description-block -->
                    </div><!-- /.col -->
                  </div><!-- /.row -->
                </div>
              </div><!-- /.widget-user -->
              <!-- App Buttons -->
              <div>
                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#message" title="Send Message" style="background-color:#3C8DBC;color:white;">
                <i class="fa fa-envelope"></i>Message
                </button>

                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#badge" title="Rate this User" style="background-color:#3C8DBC;color:white;">
                <i class="fa fa-star"></i>Badge
                </button>
                
                <button type="button" class="btn btn-app" data-toggle="modal" data-target="#group" title="Send Group Request" style="background-color:#3C8DBC;color:white;">
{'fraction_non_alphanumeric': 0.1888208269525268, 'fraction_numerical': 0.00444104134762634, 'mean_word_length': 1.477897932081199, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 353, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7238521', 'n_tokens_mistral': 3827, 'n_tokens_neox': 3634, 'n_words': 593}