var $company;
var $pos;
var $access;
+ var $timeout;
+ var $last_act;
var $logged;
var $ui_mode = 0;
function current_user()
{
- $this->loginname = $this->username = $this->name = $this->company = "";
+ global $def_coy;
+
+ $this->loginname = $this->username = $this->name = "";
+ $this->company = isset($def_coy)? $def_coy : 0;
$this->logged = false;
$this->prefs = new user_prefs();
$this->user = @$myrow["id"];
update_user_visitdate($this->username);
$this->logged = true;
+ $this->last_act = time();
+ $this->timeout = session_timeout();
}
}
return number_format2($number,
$_SESSION["wa_current_user"]->prefs->price_dec());
}
+
// 2008-06-15. Added extra parameter $stock_id and reference for $dec
//--------------------------------------------------------------------
function qty_format($number, $stock_id=null, &$dec) {
//--------------------------------------------------------------------------
+function session_timeout()
+{
+ return get_company_pref('login_tout');
+}
?>
\ No newline at end of file