Server IP : 103.6.199.200 / Your IP : 3.21.21.209 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 # $colname_DetailRS1 = "-1"; if (isset($_GET['recordID'])) { $colname_DetailRS1 = $_GET['recordID']; } mysqli_select_db($mentorpbs,$database_mentorpbs); $query_DetailRS1 = "SELECT * FROM pelan_strategik INNER JOIN bidang_sm ON pelan_strategik.bidang_id=bidang_sm.bidang_id WHERE program = '$colname_DetailRS1'"; $DetailRS1 = mysqli_query($mentorpbs,$query_DetailRS1) or die(mysql_error()); $row_DetailRS1 = mysqli_fetch_assoc($DetailRS1); $totalRows_DetailRS1 = mysqli_num_rows($DetailRS1); $myrek_id=$row_DetailRS1['pelan_id']; # echo $myrek_id; ?> <!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>Semak Program Strategik</title> <style type="text/css"> <!-- .style1 { font-size: 24px; color: #0000FF; } .style2 {color: #3352ff;} .header { padding: 0px 0px; } .content { padding: 16px; } .sticky { position: fixed; top: 0; width: 100%; } .sticky + .content { padding-top: 102px; } --> </style> <!-- *************************** --> <?php if (isset($_POST['btn_uploadpic'])) { if(isset($_FILES['myfile'])) { $errors = array(); $maxsize = 2097152; $acceptable = array( #'application/pdf', 'image/jpeg', 'image/jpg', 'image/gif', 'image/png' ); if(($_FILES['myfile']['size'] >= $maxsize) || ($_FILES["myfile"]["size"] == 0)) { $errors[] = 'File too large. File must be less than 2 megabytes.'; } if((!in_array($_FILES['myfile']['type'], $acceptable)) && (!empty($_FILES["myfile"]["type"]))) { $errors[] = 'Invalid file type. Only PDF, JPG, GIF and PNG types are accepted.'; } if(count($errors) === 0) { $id=$_POST['hf_nama']; $myid=strval($id); move_uploaded_file($_FILES["myfile"]["tmp_name"],"images/plcldp/".$myid.".jpg"); } else { foreach($errors as $error) { echo '<script>alert("'.$error.'"); </script>'; } echo "<script> window.location.back(); //Ensure no more processing is done </script>"; } } } ?> <!-- *************************** --> </head> <body> <!-- ***** bind header to freeze id --> <div class="header" id="myHeader"> <?php include('smheader02_tkl.php') ?> </div> <!-- ***** Kandungan akan skrol --> <div class="content"> <p align="center" class="style1">Program PLC-LDP</p> <p> </p> <p align="center"><img src="images/general_sm/Logo St Michael 02.jpg" width="99" height="98" /></p> <!-- *************************** --> <p align="center"> <img src="images/plcldp/<?php echo $myrek_id; ?>.jpg" alt="" width="500" height="350" /> </p> <table width="371" border="0" align="center"> <tr> <td> <div align="center"> <form action="" method="post" enctype="multipart/form-data" name="form2" id="form2"> <label> <input type="file" name="myfile" id="myfile" /> <input type="submit" name="btn_uploadpic" id="btn_uploadpic" value="Upload Gambar Saiz < 2M" /> </label> <input name="hf_nama" type="hidden" id="hf_nama" value="<?php echo $myrek_id; ?>" /> <?php # echo $myrek_id; ?> </form> </div> </td> </tr> </table> <!-- *************************** --> <table border="0" align="center" width="1000"> <tr> <!-- A <span> element used to color a part of a text --> <!-- A <colspan, rowspan> element used to merge col or row of a table --> <td class="style2" align="right" width="200">Bidang:</td> <td><span class="style2"> <?php echo $row_DetailRS1['bidang']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Sub_Bidang:</td> <td><span class="style2"> <?php echo $row_DetailRS1['sub_bidang']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Program:</td> <td><span class="style2"> <?php echo $row_DetailRS1['program']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Tarikh Mula:</td> <td><span class="style2"> <?php echo $row_DetailRS1['tarikh_dr']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Tarikh Tamat:</td> <td><span class="style2"> <?php echo $row_DetailRS1['tarikh_hg']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Masa Mula:</td> <td><span class="style2"> <?php echo $row_DetailRS1['masa_dr']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Masa Tamat:</td> <td><span class="style2"> <?php echo $row_DetailRS1['masa_hg']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Tempat:</td> <td><span class="style2"> <?php echo $row_DetailRS1['tempat']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Tempoh:</td> <td><span class="style2"> <?php echo $row_DetailRS1['tempoh']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Anjuran:</td> <td><span class="style2"> <?php echo $row_DetailRS1['anjuran']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Objektif:</td> <td><span class="style2"> <?php echo $row_DetailRS1['objektif']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Sasaran:</td> <td><span class="style2"> <?php echo $row_DetailRS1['sasaran']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Catatan:</td> <td><span class="style2"> <?php echo $row_DetailRS1['catatan']; ?> </span> </td> </tr> <tr> <td class="style2" align="right" width="200">Refleksi:</td> <td><span class="style2"> <?php echo $row_DetailRS1['refleksi']; ?> </span> </td> </tr> </table> <tr> <td> <div align="center"> <input type="submit" name="button_cetak" id="button_cetak" value="CETAK" onclick="window.print()" /> </div> </td> </tr> <p align="center"><a href="info_prog_strategik.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($DetailRS1); ?>