<?php

include('master/config.php');

 session_start();
if(!isset($_SESSION['username'])){
     header('Location:index.php');
}

?>

<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
  
     <?php require('master/link.php');?>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
    <style>
          @font-face{
          font-family:'Glyphicons Halflings';
          src:url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.eot");
          src:url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),
          url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.woff2") format("woff2"),
          url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.woff") format("woff"),
          url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.ttf") format("truetype"),
          url("https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular") format("svg")
        }
        
          table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

td, th {
    border: 1px solid #ddd;
    text-align: left;
    padding: 8px;
}

tr:nth-child(even) {
    background-color: #e2eff7;
}
    </style>
</head>

<body>

    <div class="preloader">
        <div class="lds-ripple">
            <div class="lds-pos"></div>
            <div class="lds-pos"></div>
        </div>
    </div>

    <div id="main-wrapper" data-layout="vertical" data-navbarbg="skin5" data-sidebartype="full" data-sidebar-position="absolute" data-header-position="absolute" data-boxed-layout="full">

     <?php require('master/header.php');?>

        <?php require('master/sidebar.php');?>

        <div class="page-wrapper">

            <div class="page-breadcrumb">
                <div class="row align-items-center">
                    <div class="col-5">
                        <h4 class="page-title">Career Leads</h4>
                        <div class="d-flex align-items-center">
                            <!--<nav aria-label="breadcrumb">-->
                            <!--    <ol class="breadcrumb">-->
                            <!--        <li class="breadcrumb-item"><a href="#">Home</a></li>-->
                            <!--        <li class="breadcrumb-item active" aria-current="page">Library</li>-->
                            <!--    </ol>-->
                            <!--</nav>-->
                        </div>
                    </div>


                   

                </div>
            </div>



            <div class="container-fluid">

                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-body">


                                <div class="table-responsive">

                   <table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">

    <thead>
        <tr>

            <th>Full Name</th>
            <th>Company</th>
            <th>Phone No.</th>

            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <?php $query=mysqli_query($conn, "SELECT * FROM `career` ORDER BY id DESC");
while($rows=mysqli_fetch_array($query)){ ?>
        <tr>


            <td data-options='{"maxCharacterCount":"30"}' class="js-text"><?php echo $rows['fname'].'&nbsp;'.$rows['lname'] ; ?></td>
            <td data-options='{"maxCharacterCount":"23"}' class="js-text"><?php echo $rows['company']; ?></td>

      <td style="width:18%;"><?php echo $rows['phone']; ?></td>

            <td data-order="1000">
            <a data-toggle="modal" data-target="#myModal<?php echo $rows['id']; ?>" class="btn btn-danger text-white"><img src="https://img.icons8.com/ios-glyphs/14/000000/visible.png"/></a>


            <a href="../admin/assets/images/cv/<?php echo $rows['uploadfile']; ?>" class="btn btn-danger text-white" download><img src="https://img.icons8.com/metro/14/000000/download.png"/></a>

            </td>
        </tr>
        <?php }?>
    </tbody>
</table>
                                </div>

                            </div>

                        </div>
                    </div>

                </div>

            </div>

            <footer class="footer text-center">
                <a href="https://www.iglobesolution.com/" target="_blank">iglobesolution.com</a>
            </footer>

        </div>

    </div>

      <?php $query=mysqli_query($conn, "SELECT * FROM `career`");
while($rows=mysqli_fetch_array($query)){ ?>

             <div id="myModal<?php echo $rows['id']; ?>" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
       
       
      </div>
      <div class="modal-body">
        
                         <table>

                              
                             <tbody>
  <tr>
    <td>full name:</td>
    <td><?php echo $rows['fname']; ?></td>
   
  </tr>
  <tr>
    <td>Email:</td>
    <td><?php echo $rows['lname']; ?></td>
  </tr>
  <tr>
    <td>Apply Post:</td>
    <td><?php echo $rows['company']; ?></td>
  </tr>
  <tr>
    <td>Current Designation:</td>
    <td><?php echo $rows['phone']; ?></td>
  </tr>
  <tr>
    <td>Current CTC:</td>
    <td><?php echo $rows['message']; ?></td>
  </tr>
  
                                 
    
                             </tbody>                   
</table>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>
<?php } ?>

       <?php require('master/footer.php');?>
    <script>

    </script>
</body>

</html>