-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbPorts.php
54 lines (51 loc) · 2.04 KB
/
dbPorts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
include_once 'functions.php';
function showPorts($id_servers){
$conn = connectDB();
$query = "select * from ports where fk_servers =".$id_servers.";";
$result = mysqli_query($conn, $query);
//$sql_result=$conn->query($conn,"select * from servers;"); //or die(mysqli_error());
//mysqli_query("SET NAMES 'utf8'");
//$sql_result= mysqli_query($query_string,$conn);// or die("displayTableSite:" . mysqli_error());
//$column_count = mysql_num_fields($sql_result);
echo"<div class='divScroll'>";
print("<table class='table table-striped'>");
print("<tbody>");
echo"<tr>";
echo"<th>Port</th>";
echo"<th>Name</th>";
echo"<th>Version</th>";
echo"<th>Type</th>";
echo"<th>Status</th>";
echo"<th>Last Seen</th>";
echo"<th>Actions</th>";
echo"</tr>";
while($row = mysqli_fetch_array($result,MYSQLI_BOTH)){
print("<tr >");
print("<td>".$row['port']."</td>");
print("<td>".$row['name']."</td>");
print("<td>".$row['version']."</td>");
print("<td>".$row['type']."</td>");
print("<td>".$row['status']."</td>");
print("<td>".$row['lastSeen']."</td>");
print("<td style='cursor:pointer;'>");
echo "<div style='width:30px; float:left;'>";
//<span class="oi oi-pencil"></span>
echo"<span class='oi oi-pencil' title='oi-pencil' onclick='editServer(".$row['id_servers'].")'></span>";
//echo"<span class='glyphicon glyphicon-pencil' onclick='editServer(".$row['id_servers'].")'/>";
echo "</div>";
//Eliminar id_paciente
/*echo "<div style='width:30px; float:left;'>";
echo"<span class='glyphicon glyphicon-trash' onclick='eliminarPaciente(".$row['id_paciente'].")'/>";
//print("<button id='test' type='button' class='btn btn-danger'>Eliminar</button>");
echo "</div>";
*/
print("</td>");
print("</tr>");
}
print("</tbody>");
print("</table>");
print("</div>");
cerrarConexion();
}
?>