<?php function member_login($dbconn,$login,$passwd) { $memberbasic=db_member_basic_by_auth($dbconn,$login,password_hash($passwd)); if ($memberbasic['mb_id']) { $_SESSION['uniwits.memberbasic']=$memberbasic; $_SESSION['uniwits.status']['login.timestamp']=uniwits_time(); return true; } return false; } function member_refresh_login($dbconn) { $mb_id=current_mb_id(); if (!$mb_id) logout(); else { $memberbasic=db_member_basic_by_id($dbconn,$mb_id); $_SESSION['uniwits.status']['login.timestamp']=uniwits_time(); if ($memberbasic) { foreach ($memberbasic as $k=>$v) $_SESSION['uniwits.memberbasic'][$k]=$v; return true; } } return false; } function logout() { service_logout('uniwits.'); } function format_unilar_amount($amount) { return sprintf("%0.2f",$amount); } ?>