Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/studentexams/baerenst/
File Upload :
Current File : /home/dent/studentexams/baerenst/details.php

<!DOCTYPE html>
<?php

if(empty($_REQUEST['manufacturer'])) {
    echo "Please go through search page. (or redirect)";
    exit();
}

$host = "webdev.iyaclasses.com";
$userid = "dent_guest";
$userpw = "Acad276_Ttrojan_Dev2Ex@m";
$db = "dent_exam";

include '../pdloginvariables.php';

$mysql = new mysqli(
    $host,
    $userid,
    $userpw,
    $db
);

if($mysql->connect_errno) {
    echo "db connection error : " . $mysql->connect_error;
    exit();
}
?>
<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">
    <?php

    $sql = 		"SELECT devices.*,
                    manufacturers.manufacturer,
                    systems.system,
                    types.type
            FROM devices, manufacturers, systems, types 
            WHERE devices.manufacturer_id = manufacturers.manufacturer_id
            AND devices.system_id = systems.system_id
            AND devices.type_id = types.type_id";

    $results = $mysql->query($sql);

    if(!$results) {
        echo "<hr>Your SQL:<br> " . $sql . "<br><br>";
        echo "SQL Error: " . $mysql->error . "<hr>";
        exit();
    }


    while($currentrow = $results->fetch_assoc()) {
        ?>
        <stong>Details:</stong>
        <em>Name:</em>
        <?php echo $currentrow['name']; ?>
        <br>
        <em>Price:</em>
        <?php echo $currentrow['price']; ?>
        <br>
        <em>Manufacturer:</em>
        <?php echo $currentrow['manufacturer']; ?>
        <br>
        <em>System:</em>
        <?php echo $currentrow['system']; ?>
        <br>
        <em>Type:</em>
        <?php echo $currentrow['type']; ?>
        <br>
        <?php
    } // end loop
    ?>
    </div>

</div>
</body>
</html>