Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


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

<?php
//this code would work if I was able to get the results page search to work too
//if(empty($_REQUEST["device_id"])){
//    echo "you cannot come to this page directly";
//    exit();
//}
$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 "db connection error : " . $mysql->connect_error;
    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>
<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
            //replaced all the hard coded infor here and a attempt to show the logic for the extra credit etc.
            echo "<td rowspan=\"5\" class=\"img\">
                    <img src='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQLSc5M0hh5A5s91IIVx16V05mno_XhawYhSZB1_wmlSpZHfbw2" .
//                        "if(!empty($_REQUEST["img_url"])){
//                            $currentrow['img_url']
//                        }else{
//                            https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQLSc5M0hh5A5s91IIVx16V05mno_XhawYhSZB1_wmlSpZHfbw2
//                        }"
                 . "' class=\"img\">
                </td>";
            echo "<td class='label'>Name: </td> <td class='data'>" . $currentrow['name'] . "</td> <tr></tr>" .
                "<td class='label'>Price: </td> <td class='data'>" . $currentrow['price'] . "</td><tr></tr>" .
                "<td class='label'>Manufacturer: </td> <td class='data'>" . $currentrow['manufacturer'] . "</td><tr></tr>" .
                "<td class='label'>Systems: </td> <td class='data'>" . $currentrow['systems'] . "</td><tr></tr>".
                "<td class='label'>Type: </td> <td class='data'>" . $currentrow['type'] . "</td><tr></tr>";



            ?>
<!--            <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>-->
<!--            </tr>-->
<!--            <tr>-->
<!--                <td class="label">Price:</td>-->
<!--                <td><strong>549.00</strong></td>-->
<!--            </tr>-->
<!--            <tr>-->
<!--                <td class="label">Manufacturer:</td>-->
<!--                <td>Apple</td>-->
<!--            </tr>-->
<!--            <tr>-->
<!--                <td class="label">System:</td>-->
<!--                <td>iOS</td>-->
<!--            </tr>-->
<!--            <tr>-->
<!--                <td class="label">Type:</td>-->
<!--                <td>Smartphone</td>-->
<!--            </tr>-->
        </table>
    </div>

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