Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/esuporta/fts/SDO/
Upload File :
Current File : C:/xampp/htdocs/esuporta/fts/SDO/edit_training.php

<?php 

@include '../database.php';


session_start();

//Checking User Logged or Not
if(!isset($_SESSION['username_ao'])){ 

 header('location:../index.php');
}



include('header.php');
include('script.php');
include('conn.php');
include('index1.php');
?>
<link rel="stylesheet" type="text/css" href="css/style2.css">
<body style="background-color: #FFFFFF">
   <div class="dashboard-top" style="background-color: #FFFFFF">
   <div class="content" style="background-color: #FFFFFF">
    <?php

     $id=$_GET['id'];
         $result =$con->prepare("SELECT * FROM trainings where  id='{$_GET['id']}'");
                         $result->execute();
$fetch = $result->fetchall(); 

foreach ($fetch as $key => $row) {
         $id = $row['id'];
    $program_title = $row['program_title'];
    $start_date = $row['start_date'];
    $end_date = $row['end_date'];
    $hr = $row['hr'];
    $learning_developement = $row['learning_developement'];
    $program_proponents = $row['program_proponents'];
   
    ?>
<div class="container pt-3">
     <form action="train_edit.php" method="POST" enctype="multipart/form-data" name="form1" id="form1">
            <div class="row clearfix">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="card">
                        <div class = "panel panel-primary">
                            <div class = "panel-heading">
                                <h4>LEARNING AND DEVELOPMENT (L&D) INTERVENTIONS/TRAINING PROGRAMS ATTENDED</h4>
                            </div>
                        </div>
                        <div class="body">
                        <div  class="container-fluid" style="background-color: #ddd;">
                            <div class="demo-masked-input">
                                <div class="row clearfix">
                                    <div class="col-md-12">
                                    </div>
                                   
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                             Training TItlke :       
                                            </span>
                                            <div class="form-line">
                                                <input type="hidden" class="form-control" name="id" placeholder="" hidden ="true" value="<?php echo $row['id']; ?>" >
                                                <input type="text" class="form-control" name="program_title" placeholder="" value="<?php echo $row['program_title']; ?>" >
                                            </div>
                                        </div>
                                    </div>
                                   
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                From
                                            </span>
                                            <div class="form-line">
                                                <input type="text" class="form-control" name="start_date" placeholder="" value="<?php echo $row['start_date']; ?>" >
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                               TO:
                                            </span>
                                                <div class="form-line">
                                                    <input type="text" class="form-control" name="end_date" value="<?php echo $row['end_date']; ?>">
                                                </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                               Number of Hours:
                                            </span>
                                                <div class="form-line">
                                                    <input type="text" class="form-control" name="hr" value="<?php echo $row['hr']; ?>">
                                                </div>
                                        </div>
                                    </div>
                                   <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                               Type of LD
                                            </span>
                                                <div class="form-line">
                                                    <input type="text" class="form-control" name="learning_developement" value="<?php echo $row['learning_developement']; ?>">
                                                </div>
                                        </div>
                                    </div>
                                 
                                   
                                    <div class="col-md-4">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                Conducted by:
                                            </span>
                                                 <div class="form-line">
                                                    <input type="text" class="form-control" name="program_proponents" value="<?php echo $row['program_proponents']; ?>">
                                                </div>
                                        </div>
                                    </div>
                                       
                                        </div>
                                    </div>
                                </div>
                                    <input type="submit" name="update" value="SAVE" class="btn btn-success" style ="float:right; margin-top: -30px;">                   
                                </div>
                            </div>
                        </div>
                    </div>
                    </div>
</div>
                </div>
  

        </form>
<?php } ?>
 </div>
</div>
 <div class="pie-report" style="float: right;">
        <script src="js/jquery.min.js"></script>
        <?php include('script.php'); ?> 

        <!-- Educational Qualification -->
        <!-- Talisay -->
        <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qosds = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'OSDS'") or die(mysqli_error());
          $qosds->execute();
          $osds = $qosds->fetchAll();
          foreach($osds as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>


        <!-- Alijis -->
          <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'SGOD'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>



        <!-- Binalbagan -->
          <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'CID'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>



        <!-- Fortune Towne -->
           <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'Elementary'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>

         <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'Junior High School'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>

 <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `employee` WHERE `PLANTILLA` = 'Senior High Shcool'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>
   
    <div id = "content" style="margin-bottom: 15px !important;">
        <br />
        <br />
        <br />
        <div class = "">
        <div id="chartContainer" style="height: 400px; width: 75%; float: right; margin-right: 10px; margin-top: 43px;"></div> 
        </div>
        
        <div id="bar2chartContainer" style="height: 300px; width: 75%; float: right; margin-top: 20px; margin-right: 10px;">
        </div>
    </div>
        </body>
</html>