$ses_var = getLoginSessionVar();
$ses_username = $ses_var['user_name'];
$ses_userid = $ses_var['user_id'];
if(isset($_POST['sm_login']) && $_POST['username'] != 'Tên đăng nhập' && $_POST['username'] != ''){
if( CheckLoginInDB($_POST['username'], $_POST['passwd']) ){
$_SESSION[$ses_username] = strtolower(trim($_POST['username']));
$_SESSION[$ses_userid] = getUserID($_POST['username'], $_POST['passwd']);
if(is_singular()){
?>
}else{
?>
}
}
else{
$thongbao="Thông tin đăng nhập chưa chính xác";
}
}else{
$thongbao="Vui lòng điền đẩy đủ thông tin";
}
?>