* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<?php
if(!$_REQUEST['id']){
exit("ERROR LEAVE PAGE VALUES MISSING");
};
$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();
};
$sql = "SELECT img_url, manufacturer, price, name, system, type FROM manufacturers, devices, systems, types WHERE devices.system_id = systems.system_id AND devices.manufacturer_id = manufacturers.manufacturer_id AND devices.type_id = types.type_id AND device_id=" . $_REQUEST['id'] ;
$results = $mysql->query($sql);
if(!$results){
echo "ERROR ERROR ERROR";
};
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Acad276 Practical Exam: Details</title>
<style>
.container {
width: 800px;
margin: auto;
}
h1 {
margin: auto;
text-align: center;
background-color: #900;
color: #FC0;
height: 60px;
line-height: 60px;
}
.details {
border: 1px solid #990000;
width: 600px;
margin: auto;
margin-top: 20px;
padding: 20px;
}
table {
height: 300px;
width: 100%;
}
table img {
height: 300px;
}
img {
width: 300px;
}
.label {
text-align: right;
width: 20%;
padding: 3px 10px 3px;
}
.data {
width: 40%;
}
.input>input, .input>select {
width: 100%;
}
.nav-link{
margin: 10px 0px;
font-size: 14px;
}
</style>
</head>
<body>
<div class="container">
<h1>Mobile Device Database: Details Page</h1>
<div class="nav-link">
<a href="search.php"><< Back to Search Page</a>
</div>
<div class="details">
<table>
<?php
while($currentrow = $results-> fetch_assoc()){
$html = "<tr>
<td rowspan='5' class='img'>
<img src='";
if($currentrow['img_url'] == ""){
$html2 = "https://upload.wikimedia.org/wikipedia/commons/e/e0/SNice.svg";
} else {
$html2 = $currentrow['img_url'];
}
$html3 = "' class='img'>
</td>
<td class='label'>Name:</td>
<td class='data'><strong><em>". $currentrow['name'] ."</em></strong></td>
</tr>
<tr>
<td class='label'>Price:</td>
<td><strong>". $currentrow['price'] ."</strong></td>
</tr>
<tr>
<td class='label'>Manufacturer:</td>
<td>". $currentrow['manufacturer'] ."</td>
</tr>
<tr>
<td class='label'>System:</td>
<td>". $currentrow['system'] ."</td>
</tr>
<tr>
<td class='label'>Type:</td>
<td>". $currentrow['type'] ."</td>
</tr>";
$html .= $html2 . $html3;
echo $html;
}
?>
</table>
</div>
</div>
</body>
</html>