Server IP : 103.6.199.200 / Your IP : 3.142.212.153 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 (!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 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; } } $colname_Recordset_alumni = "-1"; if (isset($_POST['textbox_alpha_nama'])) { $colname_Recordset_alumni = $_POST['textbox_alpha_nama']; } mysql_select_db($database_mentorpbs, $mentorpbs); $query_Recordset_alumni = sprintf("SELECT * FROM ahli_robotik INNER JOIN bangsa ON bangsa.id_bangsa=ahli_robotik.bangsa_id INNER JOIN agama ON agama.id_agama=ahli_robotik.agama_id INNER JOIN jantina ON jantina.id_jantina=ahli_robotik.jantina_id WHERE nama_ahli LIKE %s ORDER BY ahli_robotik.nama_ahli", GetSQLValueString("%" . $colname_Recordset_alumni . "%", "text")); $Recordset_alumni = mysql_query($query_Recordset_alumni, $mentorpbs) or die(mysql_error()); $row_Recordset_alumni = mysql_fetch_assoc($Recordset_alumni); $totalRows_Recordset_alumni = mysql_num_rows($Recordset_alumni); 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); ?> <!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} --> </style> </head> <body> <div align="center" class="style1">CARIAN ALUMNI KELAB ROBOTIK</div> <p> </p> <form id="form1" name="form1" method="post" action=""> <label> <div align="center"> Nama Ahli / Sebahagian Nama Ahli: <input name="textbox_alpha_nama" type="text" id="textbox_alpha_nama" size="50" maxlength="50" /> <br /> <br /> <input type="submit" name="button_cari" id="button_cari" value="CARI" /> </div> </label> </form> <p align="center"><a href="logout_robotik_ahli_cari.php">KEMBALI</a></p> <table border="1" align="center"> <tr> <td><div align="center"><span class="style2">No Rujukan</span></div></td> <td><span class="style2">Gambar</span></td> <td><div align="center"><span class="style2">Nama Ahli</span></div></td> <td><div align="center"><span class="style2">Jantina</span></div></td> <td><div align="center"><span class="style2">Tahun - Ahli</span></div></td> <td><div align="center"><span class="style2">Bangsa</span></div></td> <td><div align="center"><span class="style2">Agama</span></div></td> <td><div align="center"><span class="style2">No Hand Phone</span></div></td> <td><div align="center"><span class="style2">Gmail</span></div></td> </tr> <?php do { ?> <tr> <td><div align="center"><a href="detail_alumni.php?recordID=<?php echo $row_Recordset_alumni['id_ahli']; ?>"> <?php echo $row_Recordset_alumni['id_ahli']; ?> </a> </div></td> <td><img src="images/robotik/<?php echo $row_Recordset_alumni['nama_ahli']; ?>.jpg" alt="" width="67" height="81" /></td> <td><?php echo $row_Recordset_alumni['nama_ahli']; ?> </td> <td><div align="center"> <label></label> <?php echo $row_Recordset_alumni['jantina']; ?> </div></td> <td><div align="center"><?php echo $row_Recordset_alumni['tahun_ahli']; ?> </div></td> <td><div align="center"><?php echo $row_Recordset_alumni['bangsa']; ?> </div></td> <td><div align="center"><?php echo $row_Recordset_alumni['agama']; ?> </div></td> <td><div align="center"><?php echo $row_Recordset_alumni['nohp_ahli']; ?> </div></td> <td><div align="center"><?php echo $row_Recordset_alumni['gmail_ahli']; ?> </div></td> </tr> <?php } while ($row_Recordset_alumni = mysql_fetch_assoc($Recordset_alumni)); ?> </table> <div align="center"><br /> <?php echo $totalRows_Recordset_alumni ?> Records Total </div> </body> </html> <?php mysql_free_result($Recordset_alumni); mysql_free_result($Recordset_bangsa); mysql_free_result($Recordset_agama); ?>