login($_POST);
if(isset($user['email']) && $user['email'] == $username){
$password = $user['password'];
$common = ripcord::client($url."xmlrpc/2/common");
$user['ext_id'] = $common->authenticate($db, $username, $password, array());
$models = ripcord::client($url."xmlrpc/2/object");
$user['erp'] = $models->execute_kw($db, $user['ext_id'], $password, 'res.users', 'search_read', array(array(array('id', '=', $user['ext_id']))), array('fields'=>array())); //, 'limit'=>5
$_SESSION['translations'] = $oTrans->listTranslations($user['lang_code']);
$_SESSION['user'] = $user;
$_SESSION['features'] = $oFeat->getFeaturesOfUser($user['id'], $user['lang_code']);
header("Location:".$oConf->getURLRoot());
} else {
$_SESSION['user'] = $user;
$_SESSION['message']['status'] = "orange";
$_SESSION['message']['content'] = "Bad login or password";
}
}
$session_lifetime = 60*60*8;
if(isset($_SESSION['user']) and isset($_SESSION['user']['stay_connected']) and $_SESSION['user']['stay_connected'] == true){
$session_lifetime = 60*60*24*365*5;
}
setcookie(session_name(),session_id(),time() + $session_lifetime);
$lang_code = (isset($_SESSION['user']['lang_code']))?$_SESSION['user']['lang_code']:$_SESSION['config']['default_lang_code'];
?>
Code & Make CASH
'.$oTrans->getTranslation('display_cookie_message', $_SESSION['config']['default_lang_code']).'';
unset($display_cookie_message);
}
?>
getPage("materialize", $lang_code); ?>