Subversion Repositories ALCASAR

Rev

Rev 2401 | Rev 2883 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2401 Rev 2841
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
// store user @IP who can join this page (still have their status.php tab open) in a file.
3
// store user @IP who can join this page (still have their status.php tab open) in a file.
4
$filename = '/var/tmp/havp/current_users.txt';
4
$filename = '/tmp/current_users.txt';
5
$user_ip = $_SERVER['REMOTE_ADDR'];
5
$user_ip = $_SERVER['REMOTE_ADDR'];
6
 
6
 
7
$isConnected = exec('sudo /usr/sbin/chilli_query list | awk '.escapeshellarg('($2 == "'.$user_ip.'") {print $5}'));
7
$isConnected = exec('sudo /usr/sbin/chilli_query list | awk '.escapeshellarg('($2 == "'.$user_ip.'") {print $5}'));
8
if ($isConnected === '0') {
8
if ($isConnected === '0') {
9
	exit();
9
	exit();