Example #1
0
function send_sessions()
{
    global $H, $I, $U;
    $lines = parse_sessions();
    print_start('sessions');
    echo "<div style=\"text-align:center;\"><h1>{$I['sessact']}</h1><table style=\"margin-left:auto;margin-right:auto;\">";
    echo "<tr><th style=\"padding:5px;\">{$I['sessnick']}</th><th style=\"padding:5px\">{$I['sesstimeout']}</th><th style=\"padding:5px;\">{$I['sessua']}</th>";
    $trackip = (bool) get_setting('trackip');
    $memexpire = (int) get_setting('memberexpire');
    $guestexpire = (int) get_setting('guestexpire');
    if ($trackip) {
        echo "<th style=\"padding:5px;\">{$I['sesip']}</th>";
    }
    echo "<th style=\"padding:5px;\">{$I['actions']}</th></tr>";
    foreach ($lines as $temp) {
        if ($temp['status'] != 0 && $temp['entry'] != 0 && (!$temp['incognito'] || $temp['status'] < $U['status'])) {
            if ($temp['status'] <= 2) {
                $s = '&nbsp;(G)';
            } elseif ($temp['status'] == 3) {
                $s = '';
            } elseif ($temp['status'] == 5) {
                $s = '&nbsp;(M)';
            } elseif ($temp['status'] == 6) {
                $s = '&nbsp;(SM)';
            } elseif ($temp['status'] == 7) {
                $s = '&nbsp;(A)';
            } elseif ($temp['status'] == 8) {
                $s = '&nbsp;(SA)';
            }
            echo '<tr style="text-align:left;"><td style="padding:5px;">' . style_this($temp['nickname'] . $s, $temp['style']) . '</td><td style="padding:5px,">';
            if ($temp['status'] > 2) {
                get_timeout($temp['lastpost'], $memexpire);
            } else {
                get_timeout($temp['lastpost'], $guestexpire);
            }
            echo '</td>';
            if ($U['status'] > $temp['status'] || $U['session'] === $temp['session']) {
                echo "<td style=\"padding:5px;\">{$temp['useragent']}</td>";
                if ($trackip) {
                    echo "<td style=\"padding:5px;\">{$temp['ip']}</td>";
                }
                echo '<td style="padding:5px;">';
                frmadm('sessions');
                echo hidden('nick', $temp['nickname']) . submit($I['kick']) . '</form></td></tr>';
            } else {
                echo '<td style="padding:5px;">-</td>';
                if ($trackip) {
                    echo '<td style="padding:5px;">-</td>';
                }
                echo '<td style="padding:5px;">-</td></tr>';
            }
        }
    }
    echo "</table><br>{$H['backtochat']}</div>";
    print_end();
}
Example #2
0
function modify_annotations($plfile, $newannfile, $annotations, $filters)
{
    global $backend_dir;
    return run_process_with_input("{$backend_dir}/manual_annotate", get_timeout('modify_anns'), "{$annotations}\n{$filters}\n", $plfile, $newannfile);
}
Example #3
0
 *
 * Rewrite/Makeover to update the interface and add dlr support
 * Alejandro Guerrieri <aguerrieri at kannel dot org>
 *
 * Copyright (c) 2003-2009 Kannel Group.
 *
 */
require_once "config.php";
require_once "xmlfunc.php";
require_once "xmltoarray.php";
$depth = array();
$status = array();
/* set php internal error reporting level */
error_reporting(0);
/* Refresh variables */
$timeout = get_timeout();
$t_down = ceil($timeout / 2);
$t_up = ceil($timeout * 2);
$purl = parse_url($_SERVER['REQUEST_URI']);
$base_uri = $purl[path];
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <meta http-equiv="refresh" content="<?php 
echo $timeout;
?>
; URL=<?php 
echo $_SERVER[REQUEST_URI];
?>