<?php
require('db.php');
include "x.php";
?>
<!doctype html>
<html lang="en">
  <head>
    
     <?php include "include/meta.php"; ?>

     <?php include "include/css.php"; ?>

       <link rel="stylesheet" href="assets/css/bootstrap.css">
<style>
  td{
    padding: 10px 10px;
  }
   .center{
    text-align: center;
  }
</style>
  </head>
  <body>
<?php include "include/header.php"; ?>


<section class="w3l-contact-breadcrum">
  <div class="breadcrum-bg py-sm-5 py-4">
    <div class="container py-lg-3">
      <h2>Student Placed </h2>
      <p><a href="index.php">Home</a> &nbsp; / &nbsp; Recruitments </p>
    </div>
  </div>
</section>


<div class="container">
  <div class="row">

    <div class="col-md-12">
      <br>
<div class="well form-horizontal">

            
  <p align="left"><table width="98%" border="1" cellspacing="3" cellpadding="3" bordercolor="#000000" style="border-collapse:collapse;">
           <tr align="center" style="background:grey; border:1px solid #000; color:#fff;">
            <td  colspan="8" style="co lor: black; padding: 20px 0; font-size: 20px; ">Students Placed in the year 2019</td>
           </tr>
           <tr align="center" style="background:#990000; border:1px solid #000; color:#fff;">
            <td width="30">Sl. No.</td>
            <td width="129">Name of The Companies</td>
              <td width="90">Date</td>
              <td width="90">Venue of the Drive</td>
              <td width="90">Eligible Departments</td>
              <td width="90">Appeared</td>
              <td width="90">Selected</td>
              <td width="90">Package (CTC) in Lakhs</td>

           </tr>

           <?php
                    $iv_sql = "SELECT * FROM student_placed WHERE s_by = '$x' AND year = '2019' ORDER BY createdate DESC";
                    $iv_run = mysqli_query($con, $iv_sql);

                    $c = 1;
                    while ( $iv_rows = mysqli_fetch_assoc($iv_run) ) {
                ?>
                                                                                                 
           <tr class="text_col">
            <td class="center"><?php echo $c; ?></td>
            <td align="left"><a href="" style="text-decoration:none;"><?php echo $iv_rows['company']; ?></a></td>
              <td class="center"><?php echo showDate($iv_rows['createdate']); ?></td>
              <td class="center"><?php echo $iv_rows['venue']; ?></td>
              <td class="center"><?php echo $iv_rows['dept']; ?></td>
              <td class="center"><?php echo $iv_rows['appeared']; ?></td>
              <td class="center"><?php echo $iv_rows['total_student']; ?> <br> <?php echo $iv_rows['dept_student']; ?></td>
              <td class="center"><?php echo $iv_rows['ctc']; ?></td>
           </tr>
           
           <?php 
              $c++;
                }
            ?>
           
          </table></p>



</div>

    </div>

  </div>
</div>

<?php include "include/footer.php"; ?>
<?php include "include/js.php"; ?>

</body>

</html>
<!-- // grids block 5 -->
<?php 

function showDate($dt) 
     {
          $date=date_create();
          date_timestamp_set($date,
          strtotime("$dt"));
          return date_format($date,"M j, Y");
    }
 ?>