-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
62 lines (39 loc) · 1.63 KB
/
index.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
<meta http-equiv="refresh" content="10">
<?php
$conn=mysql_connect ('localhost','rautor','\\pass');
$db_selected = mysql_select_db('rautor', $conn);
$ip = $_SERVER['REMOTE_ADDR'];
$user= $_SERVER['PHP_AUTH_USER'];
mysql_query("insert into admin_logins (username,ip,lastreview) values('$user','$ip',now())");
mysql_query("update admin_logins set username='$user',lastreview=now() where ip='$ip'");
?>
<?php /* session display stuff */
require_once('TableEditor.php');
$editor = new TableEditor($conn, 'sesview');
$editor->setConfig('allowCSV', false);
$editor->setConfig('allowView', false);
$editor->setConfig('allowAdd', false);
$editor->setConfig('allowEdit', false);
$editor->setConfig('allowCopy', false);
$editor->setConfig('allowDelete', false);
$editor->setConfig('title', 'Live Sessions Monitor');
$editor->setConfig('footerfile','footer.html');
$editor->setConfig('perPage', 30);
$editor->setDisplayNames(array(
'node' => 'Domain:Terminal',
'username' => 'Login Name',
'timestamp' => 'Sess. Start Time',
'Screen' => 'Live',
));
$editor->setSearchableFields( 'username' , 'node' , 'timestamp' );
$editor->setRequiredFields( 'username' , 'node' , 'domain' , 'timestamp' ,
'status', 'clearedtime', 'sessionid' , 'ipadress' , 'port' );
$editor->noDisplay('sessionid');
$editor->noDisplay('ipaddress');
$editor->noDisplay('port');
$editor->noDisplay('clearedtime');
$editor->noDisplay('lastping');
#$editor->noDisplay('status');
$editor->setDefaultOrderby('username');
$editor->display();
?>