<?php
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/config/config.php");
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/base/recruit.php");
require_once($_SERVER['DOCUMENT_ROOT']."/hrm/base/payroll.php");
//require_once($_SERVER['DOCUMENT_ROOT']."/coms/stat.php");

if(isset($_POST['add'])){

    //echo"<script>alert('demo1')</script";
    $_SESSION['fname'] = $_POST['fname'];
    $_SESSION['mname'] = $_POST['mname'];
    $_SESSION['lname'] = $_POST['lname'];
    $_SESSION['email'] = $_POST['email'];
    $_SESSION['tell'] = $_POST['tell'];
    $_SESSION['idNo'] = $_POST['idNo'];
    $_SESSION['dob'] = $_POST['dob'];
    $_SESSION['nationality'] = $_POST['nationality'];
    $_SESSION['county'] = $_POST['county'];
    $_SESSION['disabilty'] = $_POST['disabilty'];
    $_SESSION['gender'] = $_POST['gender'];
    $_SESSION['division'] = $_POST['division'];
    $_SESSION['location'] = $_POST['location'];
    $_SESSION['sublocation'] = $_POST['sublocation'];
    $_SESSION['village'] = $_POST['village'];
    $_SESSION['license'] = $_POST['licence'];
    $_SESSION['nhif'] = $_POST['nhif'];
    $_SESSION['nssf'] = $_POST['nssf'];
    $_SESSION['kra'] = $_POST['kra'];
  
       addBio($_POST['fname'], $_POST['mname'], $_POST['lname'], $_POST['email'], $_POST['tell'], 
       $_POST['dob'], $_POST['idNo'], $_POST['nationality'], $_POST['county'], $_POST['disabilty'], 
       $_POST['gender'], $_POST['division'], $_POST['location'], $_POST['sublocation'], $_POST['village'],$_POST['licence'], null ,
       $_POST['nhif'], $_POST['nssf'], $_POST['kra']);
    //$succcess = $_POST['name'];
   // echo 'alert("profile Updated Successfully");';
  
    $succcess = "PROFILE UPDATED SUCCESSFULLY";
  
   //header("Refresh:0");
//   $_SESSION['state'] = "acc";
  }
  if(isset($_POST['config'])){
    updadeConfig($_POST['department'], $_POST['jobGroup'],$_POST['region'],$_POST['positions'], $_SESSION['idNo']);
    
  }
  if(isset($_POST['finance'])){
    updadeFinance($_POST['bank'], $_POST['branch'],$_POST['account'],$_POST['swift'], $_SESSION['idNo']);
    
  }
?>
<!DOCTYPE html>
<html 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, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <link href="logo.png" rel="icon">
  <title>HRM - applicants</title>
  <link href="/hrm/views/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="/hrm/views/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
  <link href="/hrm/views/css/ruang-admin.min.css" rel="stylesheet">
  <link href="/hrm/views/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
</head>

<body id="page-top">
  <div id="wrapper">
    <!-- Sidebar -->
    <?php
      include( $_SERVER['DOCUMENT_ROOT'].'/hrm/views/admin/sidebar.php');
    ?>
    <!-- Sidebar -->
    <div id="content-wrapper" class="d-flex flex-column">
      <div id="content">
        <!-- TopBar -->
        <?php
          include($_SERVER['DOCUMENT_ROOT'].'/hrm/views/admin/topbar.php');
        ?>
        <!-- Topbar -->

        <!-- Container Fluid-->
        <div class="container-fluid" id="container-wrapper">
          <div class="d-sm-flex align-items-center justify-content-between mb-4">
            <h1 class="h3 mb-0 font-weight-bold text-primary">Add Staff</h1>
            <ol class="breadcrumb">
              <li class="breadcrumb-item"><a href="./">Home</a></li>
              <li class="breadcrumb-item active" aria-current="page">Dashboard</li>
            </ol>
          </div>

          <?php
            errorsP($errors);
            success($succcess);

          ?>

          <div class="row mb-3">
            <!-- Start Here -->
           
            <div id="addE" style="display: block">

                <hr>
                <div class="form-group col-lg-14 mb-4">
                <h5 class="btn btn-primary btn-block">PERSONAL INFOMATION</h5> 
                </div>

                <div class="d-flex justify-content-start">
                        <div class=" " style="border-style:solid; margin: 10px; width: 184px; height: 184px;">
                                    <img src="<?php echo $attachments ;?>"  alt="add photo" style="width: 180px; height: 180px; padding: 2px;"/>
                                
                            </div>
                            <i class="fa fa-edit" style="margin-top: 5px" onclick="photo()"></i>
                        </div>
                                    <form method="POST" action="" enctype="multipart/form-data" style="display: none" id="photo">
                                    <div class="form-group col-lg-2 mb-4 " >
                                            
                                            <input type="file" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                                            placeholder="upload photo" name = "attach1" >
                                            <button type="submit" class="form-control" name="pic" style="margin-top: 25px">SAVE</button>
                                        </div>
                    </form>
            

                <form action="" method="POST" class = "row">
                    <!-- <div style="display: flex;"> -->
                        <div class="form-group col-lg-4 mb-4">
                            <label>First Name</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="fname"  value="<?php echo $_SESSION['fname'] ?>">
                        </div>
                        
                        <div class="form-group col-lg-4 mb-4">
                            <label>Middle Name</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="mname" value="<?php echo $_SESSION['mname'] ?>">
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>Last Name</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="lname" value="<?php echo $_SESSION['lname'] ?>">
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>Email</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "email" value="<?php echo $_SESSION['email'] ?>">
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>Telephone</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "tell" value="<?php echo $_SESSION['tell'] ?>">
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>Date of bith</label>
                            <input type="date" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "dob" value="<?php echo $_SESSION['dob'] ?>">
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>ID/PASSPORT</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "idNo" value="<?php echo $_SESSION['idNo'] ?>" >
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>Nationality</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "nationality"  value="<?php echo $_SESSION['nationality'] ?>">
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>County Of Origin</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "county" value="<?php echo $_SESSION['county'] ?>">
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>Division</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "division" value="<?php echo $_SESSION['division'] ?>">
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>Location</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "location" value="<?php echo $_SESSION['location'] ?>">
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>Sublocation</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "sublocation" value="<?php echo $_SESSION['sublocation'] ?>">
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>Village</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "village" value="<?php echo $_SESSION['village'] ?>">
                        </div>


                        <div class="form-group col-lg-3 mb-4">
                            <label>Gender</label>
                            <select name="gender" class="form-control" id="channel" >
                            
                            <option value="male">Male</option>
                                <option value="female">Female</option>
                            </select>
                        </div>
                        <div class="form-group col-lg-4 mb-4">
                            <label>KRA PIN</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "kra" value="<?php echo $_SESSION['kra'] ?>" >
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>NHIF</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "nhif" value="<?php echo $_SESSION['nhif'] ?>">
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>NSSF</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "nssf" value="<?php echo $_SESSION['nssf'] ?>">
                        </div>
                        <div class="form-group col-lg-3 mb-4">
                            <label>Are You Living With Disability?</label>
                            <select name="disabilty" class="form-control" id="channel" >
                            
                            <option value="no">No</option>
                            <option value="yes">Yes</option>
                            
                            </select>
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>Driving License Number</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "licence" value="<?php echo $_SESSION['license'] ?>">
                        </div>

                        <div class="form-group col-lg-3" >
                            <button type="submit" class="btn btn-primary btn-block" name="add" style="margin-top: 25px">SAVE</button>
                        </div>
                        </form>

                        <div class="form-group col-lg-12 mb-4">
                        <h5 class="btn btn-primary btn-block">NEXT OF KIN</h5> 
                        </div>

                        <label>First Next of kin</label>
                        <hr>

                    <form action="" method="POST" class = "row">
                        <div class="form-group col-lg-3 mb-4">
                            <label>First Name</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="name" >
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>LAST NAME</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="lastname" >
                        </div>

                        <div class="form-group col-lg-2 mb-4">
                            <label>ID NO</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="idNo" >
                        </div>
                        
                        <div class="form-group col-lg-2 mb-4">
                            <label>Email</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "email" >
                        </div>

                        <div class="form-group col-lg-2 mb-4">
                            <label>Telephone</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "tell" >
                        </div>
                        <div class="form-group col-lg-12 mb-4">
                        <label>Second Next of kin</label>
                         <hr>
                        </div>

                         <div class="form-group col-lg-3 mb-4">
                            <label>First Name</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="name" >
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>LAST NAME</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="lastname" >
                        </div>

                        <div class="form-group col-lg-2 mb-4">
                            <label>ID NO</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="idNo" >
                        </div>
                        
                        <div class="form-group col-lg-2 mb-4">
                            <label>Email</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "email" >
                        </div>

                        <div class="form-group col-lg-2 mb-4">
                            <label>Telephone</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "tell" >
                        </div>
                        
                        
                        <div class="form-group col-lg-3" >
                            <button type="submit" class="btn btn-primary btn-block" name="add" style="margin-top: 25px">SAVE</button>
                        </div>
                        

                        <hr> 
                    </form>


                    <div class="form-group col-lg-12">
                        <h5 class="btn btn-primary btn-block">FINANCIAL DETAILS</h5> 
                        </div>

                    <form action="" method="POST" class = "row">
                        <div class="form-group col-lg-3 mb-4">
                            <label>BANK</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="bank" >
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>ACCOUNT NO</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="account" >
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>BRANCH</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "branch" >
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>SWIFT CODE</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "swift" >
                        </div>
                       
                        
                        <div class="form-group col-lg-3" >
                            <button type="submit" class="btn btn-primary btn-block" name="finance" style="margin-top: 25px">SAVE</button>
                        </div>
                        

                        <hr> 
                    </form>


                    <div class="form-group col-lg-12">
                        <h5 class="btn btn-primary btn-block">ACADEMIC DETAILS</h5> 
                        </div>
                      <!-- tab 2 -->
            <div  style="display: block;" id="accademic">

                        <!-- Datatables -->
                        <div class="col-lg-12">
                        <div class="card col-xl-12 col-md-12 mb-4 p-3">
                        <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                        <h6 class="m-0 font-weight-bold text-primary">Academic</h6>
                        </div>

                        <!-- inputs -->

                        <div class="form-group col-lg-4" style = "align-items:right" id="add">
                            <button type="button" class="btn btn-primary btn-block" name="add"  onclick="add()">+ ADD</button>
                        </div>
                        <div id="form1" style="display:none">
                        <form action="" method="POST" class = "row" >
                        <!-- <div style="display: flex;"> -->
                        <div class="form-group col-lg-4 mb-4">
                            <label>Institution</label>
                            <input type="text" class="form-control" id="exampleInputLastName"
                            placeholder="" name="institution">
                        </div>
                        
                        
                        <div class="form-group col-lg-4 mb-4">
                            <label>Level</label>
                            <select name="level" class="form-control" id="channel" >
                                <option value="certificate">certificate</option>
                                <option value="diploma">diploma</option>
                                <option value="bachelor">bachelor</option>
                                <option value="masters">master</option>
                                <option value="phd">phd</option>
                            </select>
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>Program</label>
                            <input type="text" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "program" >
                        </div>
                        
                        <div class="form-group col-lg-4 mb-4">
                            <label>Start Date</label>
                            <input type="date" class="form-control" id="exampleInputEmail" aria-describedby="emailHelp"
                            placeholder="" name = "from" >
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>End Date</label>
                            <input type="date" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "to" >
                        </div>

                        <div class="form-group col-lg-4 mb-4">
                            <label>Score</label>
                            <input type="text" class="form-control" id="su" aria-describedby="emailHelp"
                            placeholder=""  name = "score" >
                        </div>

                        
                        <div class="form-group col-lg-4" >
                            <button type="submit" class="btn btn-primary btn-block" name="acc" style="margin-top: 25px">SAVE</button>
                        </div>
                        

                        <hr> 
                        </form>
                        </div>
                        <!-- inputs -->
                        <div class="table-responsive p-3">
                        <table class="table align-items-center table-flush" id="dataTable">
                        <thead class="thead-dark tfoot-dark">
                            <tr>
                            <th>#</th>
                            <th>INSTITUTION</th>
                            <th>LEVEL</th>
                            <th>PROGRAM</th>
                            <th>FROM</th>
                            <th>TO</th>
                            <th>SCORE</th>
                            <th>EDIT</th>
                            
                            </tr>
                        </thead>
                        <tfoot>
                            <tr>
                            <th>#</th>
                            <th>INSTITUTION</th>
                            <th>LEVEL</th>
                            <th>PROGRAM</th>
                            <th>FROM</th>
                            <th>TO</th>
                            <th>SCORE</th>
                            <th>EDIT</th>
                            </tr>
                        </tfoot>
                        <tbody>
                                <?php
                                $vacancies = getAccademicById($_SESSION['candidate']);
                                    foreach($vacancies as $row){
                                                            
                                    print " <tr> ";
                                    print "<td>" . $row['id'] . "</td>";
                                    print "<td>" . $row['institution']. "</td>";
                                    print "<td>" . $row['level']. "</td>";
                                    print "<td>" . $row['program']. "</td>";
                                    print "<td>" . $row['start']. "</td>";
                                    print "<td>" . $row['end']. "</td>";
                                    print "<td>" . $row['score']. "</td>";
                                    print("<td>");
                                    print('<a class="btn btn-danger" href="/hrm/views/candidate/editAcc.php?accid='.$row['id'].'"><i class="fa fa-edit"></i></a>');
                                    print("</td>");
                                    
                                }
                            ?>

                            
                        </tbody>
                        </table>
                        </div>

                        </div>
                        </div>



                    <div class="form-group col-lg-12">
                        <h5 class="btn btn-primary btn-block">EMLOYMENT CONFIGURATIONS </h5> 
                        </div>

                    <form action="" method="POST" class = "row">
                        <div class="form-group col-lg-3 mb-4">
                            <label>DEPARTMENT/DIVISION</label>
                            <select name="department" class="form-control" id="channel" >

                        <?php
                            $departments = getDepartments();
                            foreach ($departments as $department){
                                print '<option value="'.$department['name'].'">'.$department['name'].'</option>';
                            }

                        ?>
                            
                        </select>
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>JOB GROUP</label>
                            <select name="jobGroup" class="form-control" id="channel" >
                            <?php
                            $jobgroups = getJobGroup();
                            foreach ($jobgroups as $jobgroup){
                                print '<option value="'.$jobgroup['id'].'">'.$jobgroup['name'].'</option>';
                            }
                        ?>

                         </select>
                        </div>
                        
                        <div class="form-group col-lg-3 mb-4">
                            <label>BRANCH/REGION</label>
                            <select name="region" class="form-control" id="channel" >
                            <?php
                            $regions = getRegions();
                            foreach ($regions as $region){
                                print '<option value="'.$region['name'].'">'.$region['name'].'</option>';
                            }
                        ?>

                         </select>
                        </div>

                        <div class="form-group col-lg-3 mb-4">
                            <label>POSITION</label>
                               <select name="positions" class="form-control" id="channel" >

                        <?php
                            $positions = getPositions();

                            foreach ($positions as $position){
                                print '<option value="'.$position['name'].'">'.$position['name'].'</option>';
                            }

                        ?>
                            
                        </select>
                        </div>
                       
                        
                        <div class="form-group col-lg-3" >
                            <button type="submit" class="btn btn-primary btn-block" name="config" style="margin-top: 25px">SAVE</button>
                        </div>
                        

                        <hr> 
                    </form>


                </div>

          


          <!-- end Here -->

          <!-- <div class="row">
            <div class="col-lg-12 text-center">
              <p>Do you like this template ? you can download from <a href="https://github.com/indrijunanda/RuangAdmin"
                  class="btn btn-primary btn-sm" target="_blank"><i class="fab fa-fw fa-github"></i>&nbsp;GitHub</a></p>
            </div>
          </div> -->

          <!-- Modal Logout -->
          <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabelLogout"
            aria-hidden="true">
            <div class="modal-dialog" role="document">
              <div class="modal-content">
                <div class="modal-header">
                  <h5 class="modal-title" id="exampleModalLabelLogout">Ohh No!</h5>
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                  </button>
                </div>
                <div class="modal-body">
                  <p>Are you sure you want to logout?</p>
                </div>
                <div class="modal-footer">
                  <button type="button" class="btn btn-outline-primary" data-dismiss="modal">Cancel</button>
                  <a href="login.html" class="btn btn-primary">Logout</a>
                </div>
              </div>
            </div>
          </div>

        </div>
        <!---Container Fluid-->
      </div>
      <!-- Footer -->
      <footer class="sticky-footer bg-white">
        <div class="container my-auto">
          <div class="copyright text-center my-auto">
            <span>copyright &copy; <script> document.write(new Date().getFullYear()); </script> - developed by
              <b><a href="https://wintec.co.ke" target="_blank">wintec</a></b>
            </span>
          </div>
        </div>
      </footer>
      <!-- Footer -->
    </div>
  </div>

  <!-- Scroll to top -->
  <a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
  </a>

  <script src="/hrm/views/vendor/jquery/jquery.min.js"></script>
  <script src="/hrm/views/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="/hrm/views/vendor/jquery-easing/jquery.easing.min.js"></script>
  <script src="/hrm/views/js/ruang-admin.min.js"></script>
  <script src="/hrm/views/vendor/chart.js/Chart.min.js"></script>
  <script src="/hrm/views/js/demo/chart-area-demo.js"></script>  
  <script type="text/javascript" src="/hrm/views/ckeditor/ckeditor.js"></script>
  <script src="/hrm/views/vendor/datatables/jquery.dataTables.min.js"></script>
  <script src="/hrm/views/vendor/datatables/dataTables.bootstrap4.min.js"></script>

  <script>
    $(document).ready(function () {
      $('#dataTable').DataTable(); // ID From dataTable 
      $('#dataTableHover').DataTable(); // ID From dataTable with Hover
    });

    function sSustomer(){
      var target = document.getElementById('target').value;
      if( target == "specify"){
        document.getElementById("customer").style.display = "block";
        //alert("nimefikiwa");
      }else{
        document.getElementById("customer").style.display = "none";
      }
    }

    function add(){
      document.getElementById("form1").style.display = "block";
      document.getElementById("add").style.display = "none";

    }

    function photo(){
      document.getElementById("photo").style.display = "block";
    }


    function tab(){
      document.getElementById("create").style.display = "none";
      document.getElementById("publish").style.display = "";
    }

    function tab1(){
      document.getElementById("create").style.display = "";
      document.getElementById("publish").style.display = "none";
    }

    CKEDITOR.replace( 'superA' );
    CKEDITOR.replace( 'superB' );
    CKEDITOR.replace( 'superC' );

    

    
  </script>
</body>

</html>