-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlistMPs.php
More file actions
68 lines (62 loc) · 2.62 KB
/
Copy pathlistMPs.php
File metadata and controls
68 lines (62 loc) · 2.62 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
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php // -*- mode:html; -*- ?>
<?php
require("sessionCheck.php");
require("config.php");
require_once('model/MP.php');
$order = isset($_GET['order']) ? $_GET['order'] : 'name';
$asc = isset($_GET['asc']) ? (int)$_GET['asc'] : 1;
$ascinv = 1 - $asc;
$toggle=0;
$mps = MP::selection(array(
'@order' => "$order" . ($asc ? '' : ':desc')
));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon" type="image/x-icon" href="http://www.bth.se/favicon.ico" />
<title>MArC :: Measurement points</title>
</head>
<body class="bthcss">
<div id="content">
<h1>Measurement points</h1>
<table border="0" cellspacing="0" width="100%">
<tr>
<th align="left" valign="bottom">Status</th>
<th align="left" valign="bottom"><a href="listMPs.php?order=id&asc=<?=$ascinv?>">ID</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=name&asc=<?=$ascinv?>">name</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=ip&asc=<?=$ascinv?>">ip:port</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=mac&asc=<?=$ascinv?>">mac</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=comment&asc=<?=$ascinv?>">comment</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=time&asc=<?=$ascinv?>">time</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=MAMPid&asc=<?=$ascinv?>">MAMPid</a></th>
<th align="left" valign="bottom"><a href="listMPs.php?order=maxFilters&asc=<?=$ascinv?>">max<br/>filters</a></th>
<th align="left" valign="bottom">Control</th>
</tr>
<?php foreach ( $mps as $mp ){ ?>
<tr class="<?=($toggle++ % 2 == 0) ? "even" : "odd"?>">
<td><?=$mp->status()?></td>
<td><?=$mp->id?></td>
<td><?=$mp->name?></td>
<td><?=$mp->ip?>:<?=$mp->port?></td>
<td><?=$mp->mac?></td>
<td><?=strlen($mp->comment) > 0 ? $mp->comment : " " ?></td>
<td><?=$mp->time?></td>
<td><?=$mp->MAMPid?></td>
<td><?=$mp->maxFilters?></td>
<td>
<?php if ( $mp->is_authorized() ){ ?>
<a href="control.php?id=<?=$mp->id?>&action=stop">Stop</a>
<?php } else { ?>
<a href="authMP.php?id=<?=$mp->id?>">Auth</a>
<?php } ?>
<a href="control.php?id=<?=$mp->id?>&action=remove">Remove</a>
</td>
</tr>
<?php } /* foreach $mps */ ?>
</table>
</div>
</body>
</html>