-
Notifications
You must be signed in to change notification settings - Fork 1
/
getoutputs.php
143 lines (119 loc) · 3.96 KB
/
getoutputs.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
/*
IM - Infrastructure Manager
Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (!isset($_SESSION)) {
session_start();
}
require_once 'user.php';
if (!check_session_user()) {
invalid_user_error();
} else {
if (isset($_GET['id'])) {
include_once 'im.php';
include 'config.php';
$id = $_GET['id'];
$outputs = GetIM()->GetOutputs($id);
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" >
<title>Infrastructure Manager | GRyCAP | UPV</title>
<link rel="shortcut icon" href="images/favicon.ico">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
<link rel="stylesheet" href="css/style_login2.css">
<link rel="stylesheet" href="css/style_intro2.css">
<link rel="stylesheet" href="css/style_menu2.css">
<link rel="stylesheet" href="css/style_menutab.css">
</head>
<body>
<?php include_once 'radl.php'?>
<div id="caja_total_blanca">
<?php include 'header.php'?>
<?php $menu="Infrastructures";include 'menu.php';?>
<?php include 'footer.php'?>
<div id="caja_titulo">
<div id="texto_titulo">
Infrastructure Manager > Infrastructures   <img class="imagentitulo" src="images/icon_infra_gran.png">
</div>
</div>
<div id="caja_contenido_menutab">
<div id='cssmenutab'>
<ul>
<li><a href='list.php'><span>List</span></a></li>
<li class='active'><a><span>Inf id: <?php echo htmlspecialchars($id);?></span></a></li>
</ul>
</div>
</div>
<div id="caja_contenido_tab">
<div id="main">
<div class='h1'>:: TOSCA outputs::</div>
<br>
<div id='log'>
<table class="list" style="width:100%;margin-left: 0px;">
<tbody>
<tr>
<td style="width:10px;background:#a27c3b;"><img src="images/icon_info.png"></td>
<td style="width:90px;">Outputs</td>
<td style="text-align:left;background:#e9d6b5;">
<table>
<?php
if (is_null($outputs)) {
echo "No Outputs";
} else {
foreach ($outputs as $key => $value) {
?>
<tr>
<td>
<?php echo htmlspecialchars($key);?>
</td>
<td>
<?php
if (is_array($value)) {
$new_value = "";
foreach ($value as $k => $v) {
$new_value = $new_value . "<strong>" . htmlspecialchars($k) . "</strong>" . " = " . htmlspecialchars($v) . "<br><br>\n";
}
$value = $new_value;
} else {
$value = htmlspecialchars($value);
}
if (preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $value)) {
echo '<a href="', $value, '" target="_blank">', $value, '</a>';
} else {
echo $value;
}
?>
</td>
</tr>
<?php
}
}
?>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
</body>
</html>
<?php
}
?>