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

 

Command :


[ HOME SHELL ]     

Current File : C:/Domains/smsmalor/smsmalorsetar.com/wwwroot/kemas_ahli_robotik_ahli.php
<?php 
if (!isset($_SESSION)) {
  session_start();
}
?>


<?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 = "gagal.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 require_once('Connections/mentorpbs.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;
}
}

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;
}
}

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 ahli_robotik SET jantina_id=%s, tahun_ahli=%s, bangsa_id=%s, agama_id=%s, alamat1=%s, alamat2=%s, alamat3=%s, poskod=%s, bandar=%s, negeri=%s, nohp_ahli=%s, gmail_ahli=%s, hubungan_penjaga_id=%s, nama_penjaga=%s, nohp_penjaga=%s WHERE id_ahli=%s",
                       GetSQLValueString($_POST['list_jantina'], "int"),
                       GetSQLValueString($_POST['list_tahun_ahli'], "text"),
                       GetSQLValueString($_POST['list_bangsa'], "int"),
                       GetSQLValueString($_POST['list_agama'], "int"),
                       GetSQLValueString($_POST['alamat1'], "text"),
                       GetSQLValueString($_POST['alamat2'], "text"),
                       GetSQLValueString($_POST['alamat3'], "text"),
                       GetSQLValueString($_POST['poskod'], "text"),
                       GetSQLValueString($_POST['bandar'], "text"),
                       GetSQLValueString($_POST['negeri'], "text"),
                       GetSQLValueString($_POST['nohp_ahli'], "text"),
                       GetSQLValueString($_POST['gmail_ahli'], "text"),
                       GetSQLValueString($_POST['list_hubungan'], "int"),
                       GetSQLValueString($_POST['nama_penjaga'], "text"),
                       GetSQLValueString($_POST['nohp_penjaga'], "text"),
                       GetSQLValueString($_POST['id_ahli'], "int"));

  mysql_select_db($database_mentorpbs, $mentorpbs);
  $Result1 = mysql_query($updateSQL, $mentorpbs) or die(mysql_error());

  $updateGoTo = "logout_robotik_ahli.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $updateGoTo));
}

$colname_Recordset_ahli = "-1";
if (isset($_SESSION['MM_Password'])) {
  $colname_Recordset_ahli = $_SESSION['MM_Password'];
}
mysql_select_db($database_mentorpbs, $mentorpbs);
$query_Recordset_ahli = sprintf("SELECT * FROM ahli_robotik WHERE kata_laluan = %s", GetSQLValueString($colname_Recordset_ahli, "text"));
$Recordset_ahli = mysql_query($query_Recordset_ahli, $mentorpbs) or die(mysql_error());
$row_Recordset_ahli = mysql_fetch_assoc($Recordset_ahli);
$totalRows_Recordset_ahli = mysql_num_rows($Recordset_ahli);

mysql_select_db($database_mentorpbs, $mentorpbs);
$query_Recordset_bangsa = "SELECT * FROM bangsa";
$Recordset_bangsa = mysql_query($query_Recordset_bangsa, $mentorpbs) or die(mysql_error());
$row_Recordset_bangsa = mysql_fetch_assoc($Recordset_bangsa);
$totalRows_Recordset_bangsa = mysql_num_rows($Recordset_bangsa);

mysql_select_db($database_mentorpbs, $mentorpbs);
$query_Recordset_agama = "SELECT * FROM agama";
$Recordset_agama = mysql_query($query_Recordset_agama, $mentorpbs) or die(mysql_error());
$row_Recordset_agama = mysql_fetch_assoc($Recordset_agama);
$totalRows_Recordset_agama = mysql_num_rows($Recordset_agama);

mysql_select_db($database_mentorpbs, $mentorpbs);
$query_Recordset_hubungan = "SELECT * FROM hubungan_penjaga";
$Recordset_hubungan = mysql_query($query_Recordset_hubungan, $mentorpbs) or die(mysql_error());
$row_Recordset_hubungan = mysql_fetch_assoc($Recordset_hubungan);
$totalRows_Recordset_hubungan = mysql_num_rows($Recordset_hubungan);
?>

<!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;
}
.style2 {color: #009900}
.style3 {color: #0000FF}
.style4 {color: #FF0000}
-->
</style>
</head>

<?php
if (isset($_POST['btn_uploadpic']))
{
	$id=$_POST['hf_nama'];
	move_uploaded_file($_FILES["file"]["tmp_name"],"images/robotik/".$id.".jpg");
	
}

?>

<body>
<div align="center" class="style1">KEMASKINI MAKLUMAT KEAHLIAN KELAB ROBOTIK (SENDIRI)</div>
<p align="center"><?php echo $_SESSION['MM_Username']; ?></p>
<p align="center"><?php echo $row_Recordset_ahli['nokp_ahli']; ?></p>
<p align="center"><img src="images/robotik/<?php echo $_SESSION['MM_Username']; ?>.jpg" alt="" width="138" height="169" /></p>
<p align="center" class="style3">(Pastikan saiz gambar tidak melebihi 300 kb)</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="file" id="file" />
          <input type="submit" name="btn_uploadpic" id="btn_uploadpic" value="Upload Gambar" />
          </label>
        <input name="hf_nama" type="hidden" id="hf_nama" value="<?php echo $_SESSION['MM_Username']; ?>" />
      </form>
    </div></td>
  </tr>
</table>
<p align="center" class="style4">ISI MAKLUMAT DENGAN HURUF BESAR</p>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
  <table width="826" align="center">
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Nama Ahli:</span></td>
      <td><?php echo $row_Recordset_ahli['nama_ahli']; ?></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">No Kad Pengenalan Ahli:</span></td>
      <td><?php echo $row_Recordset_ahli['nokp_ahli']; ?></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Jantina:</span></td>
      <td><label>
        <select name="list_jantina" id="list_jantina">
          <option value="0" <?php if (!(strcmp(0, $row_Recordset_ahli['jantina_id']))) {echo "selected=\"selected\"";} ?>>-</option>
          <option value="1" <?php if (!(strcmp(1, $row_Recordset_ahli['jantina_id']))) {echo "selected=\"selected\"";} ?>>Lelaki</option>
          <option value="2" <?php if (!(strcmp(2, $row_Recordset_ahli['jantina_id']))) {echo "selected=\"selected\"";} ?>>Perempuan</option>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Tahun Ahli:</span></td>
      <td><label>
        <select name="list_tahun_ahli" id="list_tahun_ahli">
          <option value="0" selected="selected" <?php if (!(strcmp(0, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>-</option><option value="2015" <?php if (!(strcmp(2015, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2015</option>
          <option value="2016" <?php if (!(strcmp(2016, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2016</option>
          <option value="2017" <?php if (!(strcmp(2017, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2017</option>
          <option value="2018" <?php if (!(strcmp(2018, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2018</option>
          <option value="2019" <?php if (!(strcmp(2019, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2019</option>
          <option value="2020" <?php if (!(strcmp(2020, $row_Recordset_ahli['tahun_ahli']))) {echo "selected=\"selected\"";} ?>>2020</option>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Bangsa:</span></td>
      <td><label>
        <select name="list_bangsa" id="list_bangsa">
          <?php
do {  
?>
          <option value="<?php echo $row_Recordset_bangsa['id_bangsa']?>"<?php if (!(strcmp($row_Recordset_bangsa['id_bangsa'], $row_Recordset_ahli['bangsa_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset_bangsa['bangsa']?></option>
          <?php
} while ($row_Recordset_bangsa = mysql_fetch_assoc($Recordset_bangsa));
  $rows = mysql_num_rows($Recordset_bangsa);
  if($rows > 0) {
      mysql_data_seek($Recordset_bangsa, 0);
	  $row_Recordset_bangsa = mysql_fetch_assoc($Recordset_bangsa);
  }
?>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Agama:</span></td>
      <td><label>
        <select name="list_agama" id="list_agama">
          <?php
do {  
?>
          <option value="<?php echo $row_Recordset_agama['id_agama']?>"<?php if (!(strcmp($row_Recordset_agama['id_agama'], $row_Recordset_ahli['agama_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset_agama['agama']?></option>
          <?php
} while ($row_Recordset_agama = mysql_fetch_assoc($Recordset_agama));
  $rows = mysql_num_rows($Recordset_agama);
  if($rows > 0) {
      mysql_data_seek($Recordset_agama, 0);
	  $row_Recordset_agama = mysql_fetch_assoc($Recordset_agama);
  }
?>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Alamat 1:</span></td>
      <td><input name="alamat1" type="text" value="<?php echo htmlentities($row_Recordset_ahli['alamat1'], ENT_COMPAT, 'utf-8'); ?>" size="100" maxlength="100" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Alamat 2:</span></td>
      <td><input name="alamat2" type="text" value="<?php echo htmlentities($row_Recordset_ahli['alamat2'], ENT_COMPAT, 'utf-8'); ?>" size="100" maxlength="100" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Alamat 3:</span></td>
      <td><input name="alamat3" type="text" value="<?php echo htmlentities($row_Recordset_ahli['alamat3'], ENT_COMPAT, 'utf-8'); ?>" size="100" maxlength="100" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Poskod:</span></td>
      <td><input name="poskod" type="text" value="<?php echo htmlentities($row_Recordset_ahli['poskod'], ENT_COMPAT, 'utf-8'); ?>" size="10" maxlength="10" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Bandar:</span></td>
      <td><input name="bandar" type="text" value="<?php echo htmlentities($row_Recordset_ahli['bandar'], ENT_COMPAT, 'utf-8'); ?>" size="50" maxlength="50" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Negeri:</span></td>
      <td><input name="negeri" type="text" value="<?php echo htmlentities($row_Recordset_ahli['negeri'], ENT_COMPAT, 'utf-8'); ?>" size="50" maxlength="50" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">No Hand Phone Ahli:</span></td>
      <td><input name="nohp_ahli" type="text" value="<?php echo htmlentities($row_Recordset_ahli['nohp_ahli'], ENT_COMPAT, 'utf-8'); ?>" size="10" maxlength="10" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Gmail Ahli:</span></td>
      <td><input name="gmail_ahli" type="text" value="<?php echo htmlentities($row_Recordset_ahli['gmail_ahli'], ENT_COMPAT, 'utf-8'); ?>" size="50" maxlength="50" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Hubungan Dengan Penjaga:</span></td>
      <td><label>
        <select name="list_hubungan" id="list_hubungan">
          <?php
do {  
?>
          <option value="<?php echo $row_Recordset_hubungan['id_hubungan']?>"<?php if (!(strcmp($row_Recordset_hubungan['id_hubungan'], $row_Recordset_ahli['hubungan_penjaga_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset_hubungan['hubungan']?></option>
          <?php
} while ($row_Recordset_hubungan = mysql_fetch_assoc($Recordset_hubungan));
  $rows = mysql_num_rows($Recordset_hubungan);
  if($rows > 0) {
      mysql_data_seek($Recordset_hubungan, 0);
	  $row_Recordset_hubungan = mysql_fetch_assoc($Recordset_hubungan);
  }
?>
        </select>
      </label></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">Nama Penjaga:</span></td>
      <td><input name="nama_penjaga" type="text" value="<?php echo htmlentities($row_Recordset_ahli['nama_penjaga'], ENT_COMPAT, 'utf-8'); ?>" size="100" maxlength="100" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right"><span class="style2">No Hand Phone Penjaga:</span></td>
      <td><input name="nohp_penjaga" type="text" value="<?php echo htmlentities($row_Recordset_ahli['nohp_penjaga'], ENT_COMPAT, 'utf-8'); ?>" size="10" maxlength="10" /></td>
    </tr>
    <tr valign="baseline">
      <td colspan="2" align="right" nowrap="nowrap"><div align="center"><span class="style2"></span>        
          <input type="submit" value="KEMAS KINI" />
      </div></td>
    </tr>
  </table>
  <input type="hidden" name="id_ahli" value="<?php echo $row_Recordset_ahli['id_ahli']; ?>" />
  <input type="hidden" name="MM_update" value="form1" />
  <input type="hidden" name="id_ahli" value="<?php echo $row_Recordset_ahli['id_ahli']; ?>" />
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<?php
mysql_free_result($Recordset_ahli);

mysql_free_result($Recordset_bangsa);

mysql_free_result($Recordset_agama);

mysql_free_result($Recordset_hubungan);
?>

Anon7 - 2022
AnonSec Team