 <?php

include ('../includes/connection.php'); 
if (isset($_POST['update'])){ 
$course = $_POST['course']; 
$Email = $user_row['student_email_id'];

  $update = mysqli_query($conn,"UPDATE `student_soes` SET `course`='$course' WHERE student_email_id='$Email'"); 
   if($update){ 
   $course2=$user_row['course']
         ?>
         <script type="text/javascript">
             alert("Successfully Enrolled to the course");
         </script>
        <?php 
         // header("Location:admin.php?page=fgtt5678532srr5567yfsszadt578jjhggfr443w2"); 
      }  
      else{
        ?>  
        <script type="text/javascript">
         alert("Failed to Enroll to the course Try Again");
        </script>
        <?php
    }
  }
  ?> 
 <div class="container">
  <div class="page-inner">
    <div
      class="d-flex align-items-left align-items-md-center flex-column flex-md-row pt-2 pb-4"
    >
      <div>
        <h3 class="fw-bold mb-3">Dashboard</h3>
        <h6 class="op-7 mb-2">Welcome to Cybercode Academy <?php echo date('Y'); ?></h6>
      </div>
      <div class="ms-md-auto py-2 py-md-0">  
        <a href="admin.php?page=fgtt5678532srr5568exMadt578jjhggfr448w2&Id_2=<?php echo $user_row['course']; ?>" class="btn btn-success btn-round">Take examination</a> 
      </div>
    </div>
    <div class="row">
      <div class="col-sm-6 col-md-3">
        <div class="card card-stats card-round">
          <div class="card-body">
            <div class="row align-items-center">
              <div class="col-icon">
                <a href="https://tms.cybershield.co.tz"> 
                <div  class="icon-big text-center icon-primary bubble-shadow-small"  >
                  <i class="fas fa-address-book"></i>
                </div>
              </a>
              </div>
              <div class="col col-stats ms-3 ms-sm-0">
                <div class="numbers"> 
                  <h4 class="card-title">eVUE</h4>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-sm-6 col-md-3">
        <div class="card card-stats card-round">
          <div class="card-body">
            <div class="row align-items-center">
              <div class="col-icon">
                <a href="http://simulations.h4k-it.com">
                <div class="icon-big text-center icon-info bubble-shadow-small"  >
                  <i class="fas fa-th-list"></i>
                </div>
              </a>
              </div>
              <div class="col col-stats ms-3 ms-sm-0">
                <div class="numbers"> 
                  <h4 class="card-title">Cybercode Lab</h4>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-sm-6 col-md-3">
        <div class="card card-stats card-round">
          <div class="card-body">
            <div class="row align-items-center">
              <div class="col-icon">
                <a href="#">
                <div class="icon-big text-center icon-success bubble-shadow-small"
                > 
                <i class="fas fa-unlock"></i>
                </div>
              </a>
              </div>
              <div class="col col-stats ms-3 ms-sm-0">
                <div class="numbers"> 
                  <h4 class="card-title">Phishing Simulator</h4>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-sm-6 col-md-3">
        <div class="card card-stats card-round">
          <div class="card-body">
            <div class="row align-items-center">
              <div class="col-icon">
                <a href="https://community.cybershield.co.tz">
                <div  class="icon-big text-center icon-secondary bubble-shadow-small"  >
                  <i class="fas fa-users"></i>
                </div>
              </a>
              </div>
              <div class="col col-stats ms-3 ms-sm-0">
                <div class="numbers"> 
                  <h4 class="card-title">Cybercode Community</h4>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
        
    <div class="row">
      <div class="col-md-12">
        <div class="card card-round">
          <div class="card-header">
            <div class="card-head-row">
              <div class="card-title">General Chapter</div> 
            </div>
          </div>
          <div class="card-body">
            <div class="chart-container" style="min-height: 375px">
             <div class="embed-responsive embed-responsive-16by9">
              <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/_VBuqGTbNzQ" style="height: 500px; width: 100%;" allowfullscreen></iframe>
              </div> 
            </div>
            <div id="myChartLegend"></div>
          </div>
        </div>
      </div> 
       </div> 
    </div>
</div>

  
                
                 