Server IP : 103.6.199.200 / Your IP : 18.219.253.199 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/smsmalor/smsmalorsetar.com/wwwroot/ |
Upload File : |
<?php require_once('Connections/mentorpbs.php'); date_default_timezone_set("Asia/Kuala_Lumpur") ?> <?php $colname_Recordset_cpw = "-1"; if (isset($_SESSION['MM_Password'])) { $colname_Recordset_bid = $_SESSION['MM_Password']; } mysqli_select_db($mentorpbs, $database_mentorpbs); $query_Recordset_bidang = "SELECT * FROM login_kp INNER JOIN bidang_sm ON login_kp.bidang_id=bidang_sm.bidang_id WHERE password='$colname_Recordset_bid'"; $Recordset_bidang = mysqli_query($mentorpbs,$query_Recordset_bidang) or die(mysqli_error()); $row_Recordset_bidang = mysqli_fetch_assoc($Recordset_bidang); $totalRows_Recordset_bidang = mysqli_num_rows($Recordset_bidang); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Program Perancangan Strategik</title> <style type="text/css"> <!-- .style1 { font-size: 24px; color: #0000FF; } .header { padding: 0px 0px; } .content { padding: 16px; } .sticky { position: fixed; top: 0; width: 100%; } .sticky + .content { padding-top: 102px; } --> </style> </head> <body> <!-- ***** bind header to freeze id --> <div class="header" id="myHeader"> <?php include('smheader02_strategik.php') ?> </div> <!-- ***** Kandungan akan skrol --> <div class="content"> <div align="center" class="style1">KEMAS KINI PROGRAM PLC-LDP</div> <form action="" method="post" name="form1" id="form1"> <table width="893" align="center"> <tr valign="baseline"> <td colspan="2" align="right" nowrap="nowrap"> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Bidang:</td> <td><?php echo $row_Recordset_bidang['bidang']; ?></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Sub Bidang:</td> <td><?php echo $row_Recordset_bidang['sub_bidang']; ?></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Program:</td> <td><textarea maxlength="300" name="program" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Tarikh Mula:</td> <td> <label> <input name="tarikh_dr" type="date" id="tarikh_dr" size="10" style="background-color:#ebedef" /> </label> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Tarikh Akhir:</td> <td> <label> <input name="tarikh_hg" type="date" id="tarikh_hg" size="10" style="background-color:#ebedef" /> </label> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Masa Mula: (cth 08:30 AM) </td> <td> <label> <input name="masa_dr" type="time" id="masa_dr" min="07:00" max="20:00" size="10" style="background-color:#ebedef" /> </label> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Masa Tamat: (cth 04:30 PM)</td> <td> <label> <input name="masa_hg" type="time" id="masa_hg" min="07:00" max="20:00" size="10" style="background-color:#ebedef" /> </label> </td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Tempat:</td> <td><textarea maxlength="100" name="tempat" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Tempoh:</td> <td> <label> <input name="tempoh" type="text" id="tempoh" size="50" style="background-color:#ebedef" /> </label> </td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Anjuran:</td> <td><textarea maxlength="100" name="anjuran" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Objektif:</td> <td><textarea maxlength="200" name="objektif" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Sasaran:</td> <td><textarea maxlength="200" name="sasaran" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Catatan:</td> <td><textarea maxlength="500" name="catatan" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap="nowrap">Refleksi:</td> <td><textarea maxlength="300" name="refleksi" cols="100" style="background-color:#ebedef"></textarea></td> </tr> <tr valign="baseline"> <td colspan="2" align="right" nowrap="nowrap"> <div align="center"> <input type="submit" value="KEMAS KINI" /> </div> </td> </tr> </table> <input type="hidden" name="bidang_id" value="<?php echo $row_Recordset_bidang['bidang_id']; ?>" /> <input type="hidden" name="lai_id" value="" /> <input type="hidden" name="MM_insert" value="form1" /> </form> <p> </p> </div> <!-- Skrol kandungan --> </body> <!-- Script to execute freeze --> <script> window.onscroll = function() {myFunction()}; var header = document.getElementById("myHeader"); var sticky = header.offsetTop; function myFunction() { if (window.pageYOffset > sticky) { header.classList.add("sticky"); } else { header.classList.remove("sticky"); } } </script> </html> <?php # menyemak kewujudan data post if (!empty($_POST)) { # mengambil data post $bidang_id=$_POST['bidang_id']; $program=$_POST['program']; $tarikh_dr=$_POST['tarikh_dr']; $tarikh_hg=$_POST['tarikh_hg']; $masa_dr=$_POST['masa_dr']; $masa_hg=$_POST['masa_hg']; $tempat=$_POST['tempat']; $tempoh=$_POST['tempoh']; $anjuran=$_POST['anjuran']; $objektif=$_POST['objektif']; $sasaran=$_POST['sasaran']; $catatan=$_POST['catatan']; $refleksi=$_POST['refleksi']; # data validation if(empty($program) or empty($tarikh_dr) or empty($tarikh_hg) or empty($masa_dr) or empty($masa_hg) or empty($tempat) or empty($tempoh) or empty($anjuran) or empty($objektif) or empty($sasaran) or empty($catatan) or empty($refleksi)) { echo "<script>alert('Lengkapkan maklumat yang dikehendaki.'); window.history.back(); </script>"; die(mysqli_error()); } # arahan sql untuk menyimpan data include('Connections/mentorpbs.php'); mysqli_select_db($mentorpbs,$database_mentorpbs); $insertSQL = "INSERT INTO pelan_strategik (bidang_id, program, tarikh_dr, tarikh_hg, masa_dr, masa_hg, tempat, tempoh, anjuran, objektif, sasaran, catatan, refleksi) VALUES ('$bidang_id','$program','$tarikh_dr','$tarikh_hg','$masa_dr','$masa_hg','$tempat','$tempoh','$anjuran','$objektif','$sasaran','$catatan','$refleksi')"; # melaksanakan proses menyimpan bersyarat #melaksanakan proses kemaskini bersyarat if(mysqli_query($mentorpbs,$insertSQL)) { # proses kemaskini berjaya echo "<script>alert('Kemaskini Berjaya'); window.location.href='papar_prog_strategik.php'; </script>"; $kodbid = $row_Recordset_bidang['bidang_id']; $_SESSION['kodbid'] = $kodbid; } else { # proses kemaskini gagal echo "<script>alert('Kemaskini gagal'); window.location.href='logout_tkl.php'; </script>"; } } ?>