Server IP : 103.6.199.200 / Your IP : 18.118.32.7 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 (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $updateSQL = sprintf("UPDATE robotik_kelas_jaw SET tahun_tk=%s, tingkatan=%s, kelas_id=%s WHERE id_ahli=%s", GetSQLValueString($_POST['list_tahun'], "text"), GetSQLValueString($_POST['list_tingkatan'], "int"), GetSQLValueString($_POST['list_kelas'], "int"), GetSQLValueString($_POST['id_ahli'], "int")); mysql_select_db($database_mentorpbs, $mentorpbs); $Result1 = mysql_query($updateSQL, $mentorpbs) or die(mysql_error()); $updateGoTo = "kemas_ahli_robotik_kelas.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); } $colname_Recordset_edit_robotik_kelas = "-1"; if (isset($_GET['recordID'])) { $colname_Recordset_edit_robotik_kelas = $_GET['recordID']; } mysql_select_db($database_mentorpbs, $mentorpbs); $query_Recordset_edit_robotik_kelas = sprintf("SELECT * FROM robotik_kelas_jaw INNER JOIN login_robotik ON login_robotik.my_nokp=robotik_kelas_jaw.nokp_ahli INNER JOIN kelas ON kelas.kelasid=robotik_kelas_jaw.kelas_id WHERE id_ahli = %s", GetSQLValueString($colname_Recordset_edit_robotik_kelas, "int")); $Recordset_edit_robotik_kelas = mysql_query($query_Recordset_edit_robotik_kelas, $mentorpbs) or die(mysql_error()); $row_Recordset_edit_robotik_kelas = mysql_fetch_assoc($Recordset_edit_robotik_kelas); $totalRows_Recordset_edit_robotik_kelas = mysql_num_rows($Recordset_edit_robotik_kelas); mysql_select_db($database_mentorpbs, $mentorpbs); $query_Recordset_kelas = "SELECT * FROM kelas"; $Recordset_kelas = mysql_query($query_Recordset_kelas, $mentorpbs) or die(mysql_error()); $row_Recordset_kelas = mysql_fetch_assoc($Recordset_kelas); $totalRows_Recordset_kelas = mysql_num_rows($Recordset_kelas); ?><!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>Untitled Document</title> <style type="text/css"> <!-- .style1 { font-size: 24px; color: #0000FF; } --> </style> </head> <body> <div align="center" class="style1">KEMAS KINI MAKLUMAT KELAS AHLI KELAB ROBOTIK (SENDIRI)</div> <p> </p> <p align="center"><img src="images/robotik/<?php echo $row_Recordset_edit_robotik_kelas['username']; ?>.jpg" alt="" width="138" height="169" /></p> <p> </p> <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right">Id_ahli:</td> <td><?php echo $row_Recordset_edit_robotik_kelas['id_ahli']; ?></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Nama:</td> <td><?php echo $row_Recordset_edit_robotik_kelas['username']; ?></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">No Kad Pengenalan Ahli:</td> <td><?php echo $row_Recordset_edit_robotik_kelas['my_nokp']; ?></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Tahun - Tingkatan::</td> <td><label> <select name="list_tahun" id="list_tahun"> <option value="0" selected="selected" <?php if (!(strcmp(0, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>-</option> <option value="2015" <?php if (!(strcmp(2015, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2015</option> <option value="2016" <?php if (!(strcmp(2016, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2016</option> <option value="2017" <?php if (!(strcmp(2017, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2017</option> <option value="2018" <?php if (!(strcmp(2018, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2018</option> <option value="2019" <?php if (!(strcmp(2019, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2019</option> <option value="2020" <?php if (!(strcmp(2020, $row_Recordset_edit_robotik_kelas['tahun_tk']))) {echo "selected=\"selected\"";} ?>>2020</option> </select> </label></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Tingkatan / Kelas:</td> <td> <label> <select name="list_tingkatan" id="list_tingkatan"> <option value="0" <?php if (!(strcmp(0, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>-</option> <option value="1" <?php if (!(strcmp(1, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>1</option> <option value="2" <?php if (!(strcmp(2, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>2</option> <option value="3" <?php if (!(strcmp(3, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>3</option> <option value="4" <?php if (!(strcmp(4, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>4</option> <option value="5" <?php if (!(strcmp(5, $row_Recordset_edit_robotik_kelas['tingkatan']))) {echo "selected=\"selected\"";} ?>>5</option> </select> </label> <select name="list_kelas" id="list_kelas"> <?php do { ?> <option value="<?php echo $row_Recordset_kelas['kelasid']?>"<?php if (!(strcmp($row_Recordset_kelas['kelasid'], $row_Recordset_edit_robotik_kelas['kelas_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset_kelas['namakelas']?></option> <?php } while ($row_Recordset_kelas = mysql_fetch_assoc($Recordset_kelas)); $rows = mysql_num_rows($Recordset_kelas); if($rows > 0) { mysql_data_seek($Recordset_kelas, 0); $row_Recordset_kelas = mysql_fetch_assoc($Recordset_kelas); } ?> </select></td> </tr> <tr valign="baseline"> <td colspan="2" align="right" nowrap="nowrap"> </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="MM_update" value="form1" /> <input type="hidden" name="id_ahli" value="<?php echo $row_Recordset_edit_robotik_kelas['id_ahli']; ?>" /> </form> <p> </p> <p> </p> </body> </html> <?php mysql_free_result($Recordset_edit_robotik_kelas); mysql_free_result($Recordset_kelas); ?>