function login($company, $loginname, $password)
{
$this->set_company($company);
function login($company, $loginname, $password)
{
$this->set_company($company);
$Auth_Result = get_user_for_login($loginname, $password);
if (db_num_rows($Auth_Result) > 0)
{
$Auth_Result = get_user_for_login($loginname, $password);
if (db_num_rows($Auth_Result) > 0)
{
$this->access = $myrow["full_access"];
$this->name = $myrow["real_name"];
$this->pos = $myrow["pos"];
$this->loginname = $loginname;
$this->username = $this->loginname;
$this->prefs = new user_prefs($myrow);
$this->access = $myrow["full_access"];
$this->name = $myrow["real_name"];
$this->pos = $myrow["pos"];
$this->loginname = $loginname;
$this->username = $this->loginname;
$this->prefs = new user_prefs($myrow);
-
- update_user_visitdate($loginname);
- $this->logged = true;
-
- }
- else
- {
- $this->logged = false;
+ $this->user = @$myrow["id"];
+ update_user_visitdate($this->username);
+ $this->logged = true;
+ $this->last_act = time();
+ $this->timeout = session_timeout();
+ }
$showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep,
$theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size,
$graphic_links, $lang, $stickydate) {
$showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep,
$theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size,
$graphic_links, $lang, $stickydate) {
$qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
$date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize,
$show_hints, $profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate);
// re-read the prefs
$qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
$date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize,
$show_hints, $profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate);
// re-read the prefs
return number_format2($number,
$_SESSION["wa_current_user"]->prefs->price_dec());
}
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) {
// 2008-06-15. Added extra parameter $stock_id and reference for $dec
//--------------------------------------------------------------------
function qty_format($number, $stock_id=null, &$dec) {
- global $path_to_root, $thoseps, $decseps;
+ global $path_to_root, $thoseps, $decseps, $date_system, $dateseps;
- . "date: '".Today()."',\n"
+ . "date: '".Today()."',\n" // server date
+ . "datesys: ".$date_system.",\n"
+ . "datefmt: ".user_date_format().",\n"
+ . "datesep: '".$dateseps[user_date_sep()]."',\n"