Server IP : 103.6.199.200 / Your IP : 3.145.59.244 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 if (!isset($_SESSION)) { session_start(); require_once('Connections/mentorpbs.php'); } $MM_authorizedUsers = ""; $MM_donotCheckaccess = "true"; ?> <?php # kod lkf mula if (isset($_SESSION['MM_Password'])) { } $colname_Recordset_combobid = "-1"; if (isset($_POST['combobid'])) { $colname_Recordset_combobid = $_POST['combobid']; # successful call echo $colname_Recordset_combobid; } mysqli_select_db($mentorpbs,$database_mentorpbs); $query_Recordset_combobid = "SELECT * FROM bidang_sm WHERE sub_bidang='$colname_Recordset_combobid'"; $Recordset_combobid = mysqli_query($mentorpbs,$query_Recordset_combobid) or die(mysqli_error()); $row_Recordset_combobid = mysqli_fetch_assoc($Recordset_combobid); $totalRows_Recordset_combobid = mysqli_num_rows($Recordset_combobid); $colname_bid_id = "-1"; $colname_bid_id=$row_Recordset_combobid['bidang_id']; # successful call echo $colname_bid_id; # kod lkf tamat include('Connections/mentorpbs.php'); mysqli_select_db($mentorpbs,$database_mentorpbs); # green note will NOT work # $query_Recordset_papar = "SELECT * FROM pelan_strategik INNER JOIN bidang_sm ON pelan_strategik.bidang_id=bidang_sm.bidang_id WHERE bidang_id='$colname_Recordset_papar'"; $query_Recordset_papar = "SELECT * FROM pelan_strategik WHERE bidang_id='$colname_bid_id'"; $Recordset_papar = mysqli_query($mentorpbs,$query_Recordset_papar) or die(mysqli_error()); $row_Recordset_papar = mysqli_fetch_assoc($Recordset_papar); $totalRows_Recordset_papar = mysqli_num_rows($Recordset_papar); $query_Recordset_bid = "SELECT * FROM pelan_strategik INNER JOIN bidang_sm ON pelan_strategik.bidang_id=bidang_sm.bidang_id"; $Recordset_bid = mysqli_query($mentorpbs,$query_Recordset_bid); $row_Recordset_bid = mysqli_fetch_assoc($Recordset_bid); $totalRows_Recordset_bid = mysqli_num_rows($Recordset_bid); # to check if no record from pelan_strategik # blok di bawah perlu untuk mengelakkan error query gagal if($Recordset_bid = mysqli_query($mentorpbs,$query_Recordset_papar)){ if(mysqli_num_rows($Recordset_papar) == 0) { #echo "<script>alert('Tiada rekod dijumpai!'); # </script>"; $my_subbid='Tiada rekod'; } else { $my_subbid=$row_Recordset_bid['sub_bidang']; } } ?> <!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>Program Perancangan Strategik</title> <style type="text/css"> <!-- .style1 { font-size: 24px; color: #0000FF; } .style2 { font-size: 16px } .style3 {color: #0000FF; } select{ width: 350px !important; font-size: 12px; 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_tkl.php') ?> </div> <!-- ***** Kandungan akan skrol --> <div class="content"> <div align="center" class="style1"> <?php echo $_SESSION['MM_Username']; ?> </div> <p></p> <!-- kod lkf mula --> <div align="center" class="style1">Semak Program PLC-LDP Mengikut Bidang</div> <p></p> <form method="post" action="<?= $_SERVER['PHP_SELF']; ?>"> <div align="center" class="style2"> <select name="combobid" id="combobid" size=10> <?php mysqli_select_db($mentorpbs,$database_mentorpbs); $sql_qrybid = "SELECT sub_bidang FROM bidang_sm"; $result_qrybid = mysqli_query($mentorpbs, $sql_qrybid); ?> <?php while ($row_qrybid = mysqli_fetch_array($result_qrybid,MYSQLI_ASSOC)): ?> <option value="<?= $row_qrybid['sub_bidang']; ?>"><?= $row_qrybid['sub_bidang']; ?></option> <?php endwhile; ?> </select> </div> <p align="center"> <label> <input type="submit" name="button_cari" id="button_cari" value="CARI" class="style2" /> </label> </p> </form> <!-- kod lkf tamat --> <table width="1200" border="1" align="center"> <tr> <td width="50"> <div align="center" class="style3">Bil</div> </td> <td width="300"> <div align="center" class="style3">Bidang</div> </td> <td width="500"> <div align="center" class="style3">Program</div> </td> <td width="175"> <div align="center" class="style3">Tarikh Mula</div> </td> <td width="175"> <div align="center" class="style3">Tarikh Tamat</div> </td> </tr> <?php do { ?> <tr> <td> <div align="center"><?php echo $row_Recordset_papar['pelan_id']; ?></div> </td> <td> <div align="center"><?php echo $my_subbid; ?></div> </td> <td><a href="detail_program_strategik_semak_tadbir.php?recordID=<?php echo $row_Recordset_papar['program']; ?>"> <?php echo $row_Recordset_papar['program']; ?> </a> </td> <td> <div align="center"><?php echo $row_Recordset_papar['tarikh_dr']; ?></div> </td> <td> <div align="center"><?php echo $row_Recordset_papar['tarikh_hg']; ?></div> </td> </tr> <?php } while ($row_Recordset_papar = mysqli_fetch_assoc($Recordset_papar)); ?> </table> <div align="center"><br /> <?php echo $totalRows_Recordset_papar ?> Records Total </div> <p align="center"><a href="logout_tkl.php">KEMBALI</a></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 mysqli_free_result($Recordset_papar); ?>