<?php
include "common.php";
head();
?>
                <!--/span-->
                <div class="span9" id="content">

                    <div class="row-fluid">
                        <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <div class="muted pull-left">Hacker Attack - Details</div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
<?php
$id = (int) $_GET['id'];
if (empty($id)) {
    echo '<meta http-equiv="refresh" content="0; url=dashboard.php">';
}
$sql = mysql_query("SELECT * FROM `hacker-attacks` WHERE id = '$id'");
if (mysql_num_rows($sql) == 0) {
    echo 'No such hacking attack<meta http-equiv="refresh" content="3; url=dashboard.php">';
} else {
    $row  = mysql_fetch_assoc($sql);
    $type = $row['type'];
?>
                                <h4>Information about the hacker</h4>
  								<b>IP:</b> <?php
    echo $row['ip'];
?><br />
								<b>Date:</b> <?php
    echo $row['date'];
?><br />
								<b>Type:</b> <?php
    echo $row['type'];
?><br />
								<b>Broswer and Operation System:</b> <?php
    echo $row['browseros'];
?><br />
						        <b>Operation system language:</b> <?php
    echo $row['oslanguage'];
?><br />
<?php
    if ($type == "SQL Injection") {
        echo '                          <hr />
								<h4>Attacked file</h4>
								' . $row['file'] . '<br />';
    }
?>
								<hr />
								<a href="dashboard.php?delete-id=<?php echo $row['id']; ?>" class="btn btn-danger"><i class="icon-remove icon-white"></i> Delete</a>
                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>
   
<?php
}
footer();
?>