mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
Added the session_action field, so admin can watch what users are working on. Just your basic big brother stuff ...
This commit is contained in:
parent
57e2b9408c
commit
d5e4f4b587
@ -40,6 +40,8 @@
|
|||||||
"currentusers.php",lang("IP")));
|
"currentusers.php",lang("IP")));
|
||||||
$phpgw->template->set_var("sort_login_time",$phpgw->nextmatchs->show_sort_order($sort,"session_logintime",$order,
|
$phpgw->template->set_var("sort_login_time",$phpgw->nextmatchs->show_sort_order($sort,"session_logintime",$order,
|
||||||
"currentusers.php",lang("Login Time")));
|
"currentusers.php",lang("Login Time")));
|
||||||
|
$phpgw->template->set_var("sort_action",$phpgw->nextmatchs->show_sort_order($sort,"session_action",$order,
|
||||||
|
"currentusers.php",lang("Action")));
|
||||||
$phpgw->template->set_var("sort_idle",$phpgw->nextmatchs->show_sort_order($sort,"session_dla",$order,
|
$phpgw->template->set_var("sort_idle",$phpgw->nextmatchs->show_sort_order($sort,"session_dla",$order,
|
||||||
"currentusers.php",lang("idle")));
|
"currentusers.php",lang("idle")));
|
||||||
$phpgw->template->set_var("lang_kill",lang("Kill"));
|
$phpgw->template->set_var("lang_kill",lang("Kill"));
|
||||||
@ -67,6 +69,7 @@
|
|||||||
$phpgw->template->set_var("row_loginid",$loginid);
|
$phpgw->template->set_var("row_loginid",$loginid);
|
||||||
$phpgw->template->set_var("row_ip",$phpgw->db->f("session_ip"));
|
$phpgw->template->set_var("row_ip",$phpgw->db->f("session_ip"));
|
||||||
$phpgw->template->set_var("row_logintime",$phpgw->common->show_date($phpgw->db->f("session_logintime")));
|
$phpgw->template->set_var("row_logintime",$phpgw->common->show_date($phpgw->db->f("session_logintime")));
|
||||||
|
$phpgw->template->set_var("row_action",$phpgw->strip_html($phpgw->db->f("session_action")));
|
||||||
$phpgw->template->set_var("row_idle",gmdate("G:i:s",(time() - $phpgw->db->f("session_dla"))));
|
$phpgw->template->set_var("row_idle",gmdate("G:i:s",(time() - $phpgw->db->f("session_dla"))));
|
||||||
|
|
||||||
if ($phpgw->db->f("session_id") != $phpgw_info["user"]["sessionid"]) {
|
if ($phpgw->db->f("session_id") != $phpgw_info["user"]["sessionid"]) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!-- BEGIN list -->
|
<!-- BEGIN list -->
|
||||||
<center>
|
<center>
|
||||||
{lang_current_users}:
|
{lang_current_users}:
|
||||||
<table border="0" width="50%">
|
<table border="0" width="95%">
|
||||||
<tr bgcolor="{bg_color}">
|
<tr bgcolor="{bg_color}">
|
||||||
{left_next_matchs}
|
{left_next_matchs}
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@ -12,6 +12,7 @@
|
|||||||
<td>{sort_loginid}</td>
|
<td>{sort_loginid}</td>
|
||||||
<td>{sort_ip}</td>
|
<td>{sort_ip}</td>
|
||||||
<td>{sort_login_time}</td>
|
<td>{sort_login_time}</td>
|
||||||
|
<td>{sort_action}</td>
|
||||||
<td>{sort_idle}</td>
|
<td>{sort_idle}</td>
|
||||||
<td>{lang_kill}</td>
|
<td>{lang_kill}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<td>{row_loginid}</td>
|
<td>{row_loginid}</td>
|
||||||
<td>{row_ip}</td>
|
<td>{row_ip}</td>
|
||||||
<td>{row_logintime}</td>
|
<td>{row_logintime}</td>
|
||||||
|
<td>{row_action}</td>
|
||||||
<td>{row_idle}</td>
|
<td>{row_idle}</td>
|
||||||
<td>{row_kill}</td>
|
<td>{row_kill}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!-- BEGIN list -->
|
<!-- BEGIN list -->
|
||||||
<center>
|
<center>
|
||||||
{lang_current_users}:
|
{lang_current_users}:
|
||||||
<table border="0" width="50%">
|
<table border="0" width="95%">
|
||||||
<tr bgcolor="{bg_color}">
|
<tr bgcolor="{bg_color}">
|
||||||
{left_next_matchs}
|
{left_next_matchs}
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@ -12,6 +12,7 @@
|
|||||||
<td>{sort_loginid}</td>
|
<td>{sort_loginid}</td>
|
||||||
<td>{sort_ip}</td>
|
<td>{sort_ip}</td>
|
||||||
<td>{sort_login_time}</td>
|
<td>{sort_login_time}</td>
|
||||||
|
<td>{sort_action}</td>
|
||||||
<td>{sort_idle}</td>
|
<td>{sort_idle}</td>
|
||||||
<td>{lang_kill}</td>
|
<td>{lang_kill}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<td>{row_loginid}</td>
|
<td>{row_loginid}</td>
|
||||||
<td>{row_ip}</td>
|
<td>{row_ip}</td>
|
||||||
<td>{row_logintime}</td>
|
<td>{row_logintime}</td>
|
||||||
|
<td>{row_action}</td>
|
||||||
<td>{row_idle}</td>
|
<td>{row_idle}</td>
|
||||||
<td>{row_kill}</td>
|
<td>{row_kill}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -238,10 +238,10 @@
|
|||||||
// This will update the DateLastActive column, so the login does not expire
|
// This will update the DateLastActive column, so the login does not expire
|
||||||
function update_dla()
|
function update_dla()
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
global $phpgw_info, $phpgw, $PHP_SELF;
|
||||||
|
|
||||||
$phpgw->db->query("update phpgw_sessions set session_dla='" . time() . "' where session_id='"
|
$phpgw->db->query("update phpgw_sessions set session_dla='" . time() . "', session_action='$PHP_SELF'"
|
||||||
. $this->sessionid."'",__LINE__,__FILE__);
|
. " where session_id='" . $this->sessionid."'",__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroy()
|
function destroy()
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
session_ip varchar(255),
|
session_ip varchar(255),
|
||||||
session_logintime int(11),
|
session_logintime int(11),
|
||||||
session_dla int(11),
|
session_dla int(11),
|
||||||
session_info text,
|
session_action varchar(255),
|
||||||
UNIQUE sessionid (session_id)
|
UNIQUE sessionid (session_id)
|
||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
@ -298,7 +298,7 @@
|
|||||||
);";
|
);";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre8";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
// $phpgw_setup->update_version_table();
|
// $phpgw_setup->update_version_table();
|
||||||
|
@ -980,6 +980,16 @@
|
|||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre8";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre8";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = "0.9.10pre8";
|
||||||
|
function upgrade0_9_10pre8()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("alter table phpgw_sessions change session_info session_action varchar(255)",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
|
}
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
session_ip varchar(255),
|
session_ip varchar(255),
|
||||||
session_logintime int,
|
session_logintime int,
|
||||||
session_dla int,
|
session_dla int,
|
||||||
session_info text,
|
session_action varchar(255),
|
||||||
unique(session_id)
|
unique(session_id)
|
||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
@ -271,7 +271,7 @@
|
|||||||
);";
|
);";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.9";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
$phpgw_info["setup"]["oldver"]["phpgwapi"] = $phpgw_info["setup"]["currentver"]["phpgwapi"];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
?>
|
?>
|
@ -1034,6 +1034,27 @@
|
|||||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre8";
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre8";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = "0.9.10pre8";
|
||||||
|
function upgrade0_9_10pre8()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
// Just temp data anyway
|
||||||
|
$phpgw_setup->db->query("drop table phpgw_sessions",__LINE__,__FILE__);
|
||||||
|
$sql = "create table phpgw_sessions (
|
||||||
|
session_id varchar(255),
|
||||||
|
session_lid varchar(255),
|
||||||
|
session_ip varchar(255),
|
||||||
|
session_logintime int,
|
||||||
|
session_dla int,
|
||||||
|
session_action varchar(255),
|
||||||
|
unique(session_id)
|
||||||
|
)";
|
||||||
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre9";
|
||||||
|
}
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre8";
|
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre9";
|
||||||
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
||||||
|
Loading…
Reference in New Issue
Block a user