51 lines
700 B
C++
Executable File
51 lines
700 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "session.h"
|
|
#include "misc.h"
|
|
|
|
|
|
|
|
|
|
Session::Session()
|
|
{
|
|
SetTimeToNow();
|
|
Clear();
|
|
}
|
|
|
|
|
|
void Session::SetTimeToNow()
|
|
{
|
|
time = std::time(0);
|
|
tm_time = Time(time);
|
|
|
|
last_time = time;
|
|
tm_last_time = tm_time;
|
|
|
|
// the first request can be a POST (it doesn't matter)
|
|
last_time_get = time;
|
|
}
|
|
|
|
|
|
// this doesn't clear times
|
|
void Session::Clear()
|
|
{
|
|
id = 0;
|
|
time = 0;
|
|
puser = 0;
|
|
rebus_item = 0;
|
|
rebus_checked = false;
|
|
remember_me = false;
|
|
new_session = true;
|
|
spam_score = 0;
|
|
plugin_data.Resize(0);
|
|
}
|
|
|
|
|