Code: Alles auswählen
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------
# around line 270
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $thispage_id
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
#-----Wenn Prillian NICHT benutzt wird--------------------------
#-----If Prillian is not used-----------------------------------
#
if ($thispage_id != PAGE_PLAYING_SCORE) {
$user_session_update = ", user_session_page = ".$thispage_id;
} ELSE {
$user_session_update = "";
}
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time".$user_session_update."
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
}
Code: Alles auswählen
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql =
SET
#
#-----[ IN-LINE FIND ]----------------------------------------
#
if
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//
#
#-----[ IN-LINE FIND ]----------------------------------------
#
$thispage_id
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time'].")
Code: Alles auswählen
if ($thispage_id != PAGE_PLAYING_SCORE) {
$user_session_update = ", user_session_page = ".$thispage_id;
} ELSE {
$user_session_update = "";
}
//if ( $userdata['user_id'] != ANONYMOUS )
//{
$sql = "UPDATE " . USERS_TABLE . "
SET user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time']."),user_session_time = $current_time".$user_session_update."
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
//}
Vielleicht guckt mal jemand und sagt seine Meinung.
Gruß
X-Box
Edit (11.8.04):
Funktioniert doch nicht so ganz. Der letzte Besuch wird nicht registriert.
Außerdem zählt er die Besucher nicht hoch. Hatte heute morgen schon sieben Gäste. Jetzt sind es auf einmal nur noch 2 Gäste gewesen.
Wird das auch über die Sessions.php gesteuert?