[go: up one dir, main page]

Menu

[r1]: / index.php  Maximize  Restore  History

Download this file

56 lines (54 with data), 2.2 kB

 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
<?php
include_once 'functions.php';
#include_once 'config.php';
$machines=get_machine_from_db(1);
$js="";
$out="";
?>
<html>
<head>
<script type="text/javascript" src="site.js"></script>
<link rel="stylesheet" href="site.css" type="text/css" />
</head>
<body>
<table class="main" align="center" rules="rows" >
<tr>
<td class='thead'>Machine</td>
<td class='thead'>Protocol</td>
<td class='thead'>Port</td>
<td class='thead'>Status</td>
<td class='thead'>Action</td>
<td class='thead'>Connect</td>
<tr>
<? foreach($machines as $machine): ?>
<tr style="border-bottom:solid thin black">
<td rowspan="<?php echo count($machine['services']); ?>" style="text-align:left;font-weight:bold;font-size:small">
<? echo $machine['display']."<br/> ".$machine['host']; ?>
</td>
<?php if(isset($machine['services'])): ?>
<?php foreach ($machine['services'] as $name=>$service): ?>
<? $id=$service['id']; ?>
<? $js .= "var xmlhttp".$service['id']."=GetXmlHttpObject()\n"; ?>
<? $js .= "var xmlhttp_a".$service['id']."=GetXmlHttpObject()\n"; ?>
<? $js .= "checkService(".$service['id'].",false)\n"; ?>
<td class='display-proto'><?php echo $service['protocol']; ?></td>
<td class='display'><?php echo $service['port']; ?></td>
<td class='status' id='<?php echo $id."-status";?>'><img src='processing.gif' width='100' height='30'></img></td>
<td class='status' id='<?php echo $id."-action";?>'></img></td>
<td class='status' style='text-align:left'>
<a href="scp://<?php echo $machine['user']."@".$machine['host'].":".$machine['ssh_port']; ?>"><img src='winscp.jpg' width='30' heigth='30' /></a>
<a href="ssh://<?php echo $machine['user']."@".$machine['host'].":".$machine['ssh_port']; ?>"><img src='putty.png' width='30' heigth='30' /></a>
<?php if($service['protocol']=='html'): ?>
<a href="http://<?php echo $machine['host'].":".$service['port'];?>" target="_blank"><img src='text_html.png' width='30' heigth='30' /></a>
<?php endif ?>
</td>
</tr>
<?php endforeach ?>
<?php endif ?>
<?php endforeach ?>
</table>
<script type="text/javascript">
<?php echo $js;?>
</script>
</body>
</html>