* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<?php
if(empty($_REQUEST['type'])) {
echo "Please go through search page. (or redirect)";
header('Location: search.php');
exit();
}
include '../pdloginvariables.php';
$mysql = new mysqli(
"webdev.iyaclasses.com",
"dent_guest",
"Acad276_Ttrojan_Dev2Ex@m",
"dent_exam"
);
if($mysql->connect_errno) {
echo "db connection error : " . $mysql->connect_error;
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Acad276 Practical Exam: Results</title>
<style>
.container {
width: 600px;
margin: auto;
}
h1 {
margin: auto;
text-align: center;
background-color: #900;
color: #FC0;
height: 60px;
line-height: 60px;
}
.num-results {
margin: 20px 10px;
}
table {
margin: auto;
margin-bottom: 20px;
width: 80%;
border-collapse: collapse;
}
th, td {
border: 1px solid #900;
border-collapse: collapse;
padding: 10px;
text-align: center;
}
img {
width: 100px;
}
.nav-link{
margin: 10px 0px;
font-size: 14px;
}
</style>
</head>s
<body>
<div id="container">
<h1> Search results<hr></h1>
<?php
$sql = "SELECT * FROM devices WHERE 1=1";
$sql .= " AND manufacturer_id LIKE '%" .
$_REQUEST['manufacturer'] . "%'";
$sql .= " AND system_id LIKE '%" .
$_REQUEST['system'] . "%'";
$sql .= " AND type_id LIKE '%" .
$_REQUEST['type'] . "%'";
// $sql .= " ORDER BY ". $_REQUEST['orderby'];
$results = $mysql->query($sql);
if(!$results) {
echo "<hr>Your SQL:<br> " . $sql . "<br><br>";
echo "SQL Error: " . $mysql->error . "<hr>";
exit();
}
echo "<em>Your results returned <strong>" .
$results->num_rows .
"</strong> results.</em>";
echo "<br><br>";
while($currentrow = $results->fetch_assoc()) {
echo "<div class='name'><strong>" .
$currentrow['manufacturer'] . "</strong> <em> (" .
$currentrow['system'] . ")</em> <strong>" .
$currentrow['type'] . "</strong> " .
"</a>" .
"<div class='name''>" .
"<a href='details.php?recordid=".
$currentrow["device_id"]."'>" .
"View" . "<br>" .
"</a>" .
"</a>" .
"</div> <br><br>" .
"<br style='clear:both;'>";
}
?>
</div>
</body>
</html><?php