Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


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

<?php

if(empty($_REQUEST['device_name'])AND empty($_REQUEST['system_id'])AND empty($_REQUEST['manufacturer_id']) AND empty($_REQUEST['type_id'])) {
    echo "value missing";
    exit();
}

?>
<!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>
<?php
$host = "webdev.iyaclasses.com";
$user = "dent_guest";
$userpw = "Acad276_Ttrojan_Dev2Ex@m";
$db = "dent_exam";

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

if($mysql->connect_errno){
    echo "ERROR in Database connection:";
    echo $mysql -> connect_error;
    exit();
}

$sql = "SELECT * from devices WHERE device_id='". $_REQUEST["device_name"] ."'";

//echo $sql;

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

echo "<hr>". $results->num_rows;
if(!$results) {
    echo "ERROR: " . $mysql->error;
    echo "<hr>" . $sql;

}
$currentrow = $results -> fetch_assoc();


//echo "<hr><h1>";
//echo "Name:".$currentrow["device_name"];
//echo "<br>";
//echo "Price:". $currentrow["price"];
//echo "<br>";
//echo "Manufacturer:". $currentrow["manufacturer_id"];
//echo "<br>";
//echo "System:". $currentrow["system_id"];
//echo "<br>";
//echo "Type:". $currentrow["type_id"];
//echo "<br>";


?>
<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>
            <tr>
                <td rowspan="5" class="img">
                    <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQLSc5M0hh5A5s91IIVx16V05mno_XhawYhSZB1_wmlSpZHfbw2" class="img">
                </td>
                <td class="label">Name:</td>
<!--                <td class="data"><strong><em>Pixel</em></strong></td>-->
                <?php
                echo "<td class=\"data\"><strong><em>".$currentrow["device_name"]."</em></strong></td>";
                ?>
            </tr>
            <tr>
                <td class="label">Price:</td>
                <?php
                echo "<td class=\"data\"><strong><em>".$currentrow["price"]."</em></strong></td>";
                ?>            </tr>
            <tr>
                <td class="label">Manufacturer:</td>
<!--                <td>Apple</td>-->
                <?php
                "<td>".$currentrow["manufacturer_id"]."</td>"
                ?>
            </tr>
            <tr>
                <td class="label">System:</td>
<!--                <td>iOS</td>-->
                <?php
                "<td>".$currentrow["system_id"]."</td>"
                ?>
            </tr>
            <tr>
                <td class="label">Type:</td>
<!--                <td>Smartphone</td>-->
                <?php
                "<td>".$currentrow["device_id"]."</td>"
                ?>
            </tr>
        </table>
    </div>

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