<!DOCTYPE html>
<html>
<head>
<title>Mitigation Template summary</title>
<meta charset="utf-8" />
<meta name="author" content="Shashender Kumar" />
<meta name="description" content="" />
<style>
.container{
margin:0 auto;
width:85%;
overflow:auto;
}
table.gridtable {
margin:0 auto;
width:95%;
overflow:auto;
font-family: helvetica,arial,sans-serif;
font-size:14px;
color:#333333;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
text-align: left;
}
table.gridtable th {
border-width: 1px;
padding: 6px;
background-color: #D4E6F1;
border-style: solid;
border-color: #666666;
}
table.gridtable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
}
.error {
color: white;
background-color: red;
}
</style>
</head>
<body>
<div class="container" id="container">
<table class="gridtable">
<form action="mtSummary.php" method="post">
<h2 style="text-align:center"> Mitigation Template : <?php echo $_GET["mitigationValue"]; ?> </h2>
<thead>
<tr>
<!-- comment out <th>Mitigation Template</th> -->
<th style="text-align:center">Counter Measures Enabled</th>
</tr>
</thead>
</form>
<?php
$mitigVal = $_GET["mitigationValue"];
if (($csvfile = fopen("/home/testice/mt_summary.csv", "r")) !== FALSE) {
while (($csvdata = fgetcsv($csvfile, 1000, ",")) !== FALSE) {
if ($csvdata[0] == 'Mitigation Template' && $csvdata[1] == 'Countermeasures Enabled') {
while (($csvdata = fgetcsv($csvfile, 1000, ",")) !== FALSE) {
if($csvdata[0] !== $mitigVal ){
continue;
}
else {
$string1 = $csvdata[1];
$str_arr = explode(" ",$string1);
foreach ($str_arr as $value) {
echo '<tr>';
echo '<td>' . $value . '</td>';
echo '</tr>';
}
}
}
}
}
fclose($csvfile);
}
?>
</table>
</div>
</body>
</html>
preferences:
56.96 ms | 402 KiB | 5 Q