예제 #1
0
파일: login.php 프로젝트: alienfault/ossim
}
/* Logout */
$action = REQUEST('action');
ossim_valid($action, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _('Action'));
if ($action == 'logout') {
    $c_user = Session::get_session_user();
    if (!empty($c_user)) {
        $infolog = array($c_user, intval(REQUEST('timeout')) == 1 ? _('- Timeout expired') : '');
        Log_action::log(2, $infolog);
        /* Logout from API
               - If there are more than one user with the same login in the system,
                 we don't remove API cookie ()
           */
        //Update admin info
        list($db, $conn) = Ossim_db::get_conn_db();
        $sa_list = Session_activity::get_list($conn, "WHERE login = '******'");
        $db->close();
        if (count($sa_list) == 1) {
            $client = new Alienvault_client();
            $client->auth()->logout();
        }
    }
    Session::logout();
    exit;
}
/****************************************************
 **************** Configuration Data ****************
 ****************************************************/
$conf = $GLOBALS['CONF'];
if (!$conf) {
    $conf = new Ossim_conf();
예제 #2
0
if (Session::am_i_admin() || $pro && Acl::am_i_proadmin()) {
    if (Session::am_i_admin()) {
        $users_list = Session::get_list($conn, 'ORDER BY login');
    } else {
        $users_list = Acl::get_my_users($conn, Session::get_session_user());
    }
    if (is_array($users_list) && !empty($users_list)) {
        foreach ($users_list as $v) {
            $users[] = is_object($v) ? $v->get_login() : $v['login'];
        }
        $where = "WHERE login in ('" . implode("','", $users) . "')";
    }
} else {
    $where = "WHERE login = '******'";
}
$allowed_users = Session_activity::get_list($conn, $where . ' ORDER BY activity DESC');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title><?php 
echo _('Opened Sessions');
?>
 </title>
		<meta http-equiv="Pragma" content="no-cache"/>
	    <link rel="stylesheet" type="text/css" href="/ossim/style/jquery-ui-1.7.custom.css"/>
	    <link rel="stylesheet" type="text/css" href="/ossim/style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
		
예제 #3
0
if (Session::am_i_admin() || $pro && Acl::am_i_proadmin()) {
    if (Session::am_i_admin()) {
        $users_list = Session::get_list($dbconn, "ORDER BY login");
    } else {
        $users_list = Acl::get_my_users($dbconn, Session::get_session_user());
    }
    if (is_array($users_list) && !empty($users_list)) {
        foreach ($users_list as $k => $v) {
            $users[] = is_object($v) ? $v->get_login() : $v["login"];
        }
        $where = "WHERE login in ('" . implode("','", $users) . "')";
    }
} else {
    $where = "WHERE login = '******'";
}
$allowed_users = Session_activity::get_list($dbconn, $where . " ORDER BY activity desc");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title> <?php 
echo _("Opened Sessions");
?>
 </title>
		<META HTTP-EQUIV="Pragma" content="no-cache"/>
		<link rel="stylesheet" href="../style/style.css"/>
		<script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
		<script type="text/javascript" src="../js/jquery.simpletip.js"></script>
		
		<script type="text/javascript">