Server IP : 103.6.199.200 / Your IP : 18.117.105.230 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'); ?> <?php if (!isset($_SESSION)) { session_start(); } $MM_authorizedUsers = ""; $MM_donotCheckaccess = "true"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && true) { $isValid = true; } } return $isValid; } $MM_restrictGoTo = "../login_yuran.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) $MM_referrer .= "?" . $QUERY_STRING; $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); exit; } ?> <?php # $colname_DetailRS1 = "-1"; if (isset($_GET['recordID'])) { $colname_DetailRS1 = $_GET['recordID']; } mysqli_select_db($mentorpbs,$database_mentorpbs); $query_DetailRS1 = "SELECT * FROM yuran_murid WHERE idmurid = '$colname_DetailRS1'"; $DetailRS1 = mysqli_query($mentorpbs,$query_DetailRS1) or die(mysql_error()); $row_DetailRS1 = mysqli_fetch_assoc($DetailRS1); $totalRows_DetailRS1 = mysqli_num_rows($DetailRS1); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Maklumat Pembayaran Yuran</title> <style type="text/css"> <!-- .style1 { font-size: 24px; color: #0000FF; } .style2 {color: #0000FF} .header { padding: 0px 0px; } .content { padding: 16px; } .sticky { position: fixed; top: 0; width: 100%; } .sticky + .content { padding-top: 102px; } div{ width:100%; height:auto; } --> </style> </head> <body> <!-- ***** bind header to freeze id --> <div class="header" id="myHeader"> <?php include('smheader03_yuran_murid.php') ?> </div> <!-- ***** Kandungan akan skrol --> <div class="content"> <p align="center" class="style1">MAKLUMAT PEMBAYARAN YURAN MURID</p> <p> </p> <!-- ****** Mula baru 0408 2023 ---> <p align="center"></p> <form action='' method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right">Nama Murid:</td> <td><?php echo $row_DetailRS1['namamurid']; ?></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Kelas:</td> <td><?php echo $row_DetailRS1['namakelas']; ?></td> </tr> <!-- input kemaskini --> <tr valign="baseline"> <td nowrap="nowrap" align="right"> Nombor Resit Yuran PIBG: </td> <td> <input type="text" name="noresitpibg" size="18" value='<?php echo $row_DetailRS1['noresitpibg']; ?>' > </td> </tr> <tr> <td nowrap="nowrap" align="right"> Tarikh Resit Yuran PIBG: </td> <td> <input type="text" name="tarikhresitpibg" size="18" value='<?php echo $row_DetailRS1['tarikhresitpibg']; ?>'> </td> </tr> <tr> <td nowrap="nowrap" align="right"> Nombor Resit Majalah: </td> <td> <input type="text" name="noresitmajalah" size="18" value='<?php echo $row_DetailRS1['noresitmajalah']; ?>'> </td> </tr> <tr> <td nowrap="nowrap" align="right"> Tarikh Resit Majalah: </td> <td> <input type="text" name="tarikhresitmajalah" size="18" value='<?php echo $row_DetailRS1['tarikhresitmajalah']; ?>'> </td> </tr> <tr> <td nowrap="nowrap" align="right"> Catatan: </td> <td> <input type="text" name="catatan" size="50" value='<?php echo $row_DetailRS1['catatan']; ?>'> </td> </tr> <!-- input kemaskini --> <tr valign="baseline"> <td colspan="2" align="right" nowrap="nowrap"> <div align="center"> <input type="submit" name="btn_upd_pw" value="KEMAS KINI" /> </div> </td> </tr> </table> <input type="hidden" name="myid" value="<?php echo $row_DetailRS1['idmurid']; ?>" /> <input type="hidden" name="MM_update" value="form1" /> <!-- ambiguious code repeat for guna_id hidden textbox --> </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 pada butang update if(!empty($_POST['btn_upd_pw'])) { # mengambil data POST $idsaya=$_POST['myid']; $noresitpibg=$_POST['noresitpibg']; $tarikhresitpibg=$_POST['tarikhresitpibg']; $noresitmajalah=$_POST['noresitmajalah']; $tarikhresitmajalah=$_POST['tarikhresitmajalah']; $catatan=$_POST['catatan']; # arahan untuk kemaskini mysqli_select_db($mentorpbs,$database_mentorpbs); $arahan_sql_update="update yuran_murid SET noresitpibg='$noresitpibg', tarikhresitpibg='$tarikhresitpibg', noresitmajalah='$noresitmajalah', tarikhresitmajalah='$tarikhresitmajalah', catatan='$catatan' where idmurid='$idsaya'"; #melaksanakan proses kemaskini bersyarat if(mysqli_query($mentorpbs,$arahan_sql_update)) { # proses kemaskini berjaya echo "<script>alert('Kemaskini Berjaya'); window.location.href='data_yuran.php'; </script>"; } else { # proses kemaskini gagal echo "<script>alert('Kemaskini gagal'); window.location.href='logout_yuran.php'; </script>"; } } ?>