-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendMsg.php
54 lines (49 loc) · 1.99 KB
/
sendMsg.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 // -*- mode:html; -*- ?>
<?php
require("sessionCheck.php");
require("config.php");
require_once('model/MP.php');
$order = isset($_GET['order']) ? $_GET['order'] : 'id';
$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 point control</title>
</head>
<body class="bthcss">
<div id="content">
<h1>Measurement points</h1>
<table border="0" cellspacing="0" width="100%">
<tr>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=id&asc=<?=$ascinv?>">ID</a></th>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=name&asc=<?=$ascinv?>">name</a></th>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=ip&asc=<?=$ascinv?>">ip:port</a></th>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=mac&asc=<?=$ascinv?>">mac</a></th>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=comment&asc=<?=$ascinv?>">comment</a></th>
<th><a href="sendMsg.php?SID=<?=$sid?>&order=MAMPid&asc=<?=$ascinv?>">MAMPid</a></th>
<th>Send to MP</th>
</tr>
<?php foreach ( $mps as $mp ){ ?>
<tr class="<?=($toggle++ % 2 == 0) ? "even" : "odd"?>">
<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->MAMPid?></td>
<td><a href="sndMsg2.php?SID=<?=$sid?>&id=<?=$mp->id?>">SendTo</a></td>
</tr>
<?php } /* foreach $mps */ ?>
</table>
</div>
</body>
</html>