<?php
$this->load->view("top_application");
//trace($res);
//exit;
?>
<script src="<?php echo site_url(); ?>assets/sitepanel/js/common.js"></script>
<section>
  <div class="tz">
    <!--LEFT SECTION-->
    <div class="tz-l">      
      <?php $this->load->view("members/left"); ?>
    </div>
    <!--CENTER SECTION-->
    <div class="tz-4">
      <div class="tz-2-com tz-2-main">
        <h4>Job Applications <span class="pull-right"><a href="<?php echo site_url(); ?>members/add_Job" style="color: #FFF;">Add Job</a></span></h4>

        <div class="db-list-com tz-db-table">

          <?php
          error_message();
          if (is_array($res) && !empty($res)) {
            ?>
            <div class="ds-boar-title">
              <h2>Job Application(s) for <?php echo get_db_field_value('wps_career', "career_title", "WHERE career_id = '" . $ref_article_id . "'"); ?></h2>
            </div>
            <?php
            echo form_open("", 'id="data_form"');
            ?>
            <table class="responsive-table bordered">
              <thead>
                <tr>
                  <th><strong>Posted By</strong></th>
                  <th><strong>Comments</strong></th>
                  <th><strong>Date</strong></th>
                </tr>
              </thead>
              <tbody>
                <?php
                $slno = 1;
                foreach ($res as $rkey => $rval) {
                  ?>
                  <tr>
                    <td>
                      <strong>Name : </strong><?php echo $rval['mem_name']; ?><br />
                      <strong>Email : </strong><?php echo $rval['mem_email']; ?><br />
                      <strong>Mobile : </strong><?php echo $rval['mobile']; ?><br />
                      <a href="<?php echo site_url(); ?>uploaded-files/clients/career/<?php echo $rval['resume']; ?>" target="_blank">View Resume</a>
                    </td>
                    <td>
                      <?php echo $rval['comment']; ?>
                    </td>
                    <td><?php echo getDateFormat($rval['post_date'], 3); ?></td>
                  </tr>
                  <?php
                  $slno++;
                }
                ?>
              </tbody>
            </table>
            <?php
            echo form_close();
          } else {
            ?>
            <div class="alert alert-danger" role="alert">
              <strong>Oh snap!</strong> No Client(s) Found.
            </div>
            <div class="row">
              <div class="input-field s12 text-center">
                <div class="row">
                  <div class="input-field s4 "><a href="<?php echo site_url(); ?>members/add_job" class="waves-effect waves-light btn-large" >Add a Job Now!</a></div>
                </div>
              </div>
            </div>
            <?php
          }
          ?>
        </div>
      </div>
    </div>
    <!--RIGHT SECTION-->
  </div>
</section>
<?php $this->load->view("bottom_application"); ?>
