assign('regstatus',$_GET['Status']); if ($_SESSION['isma_vendor_member_code_int']=="" && $_SESSION['ismacontact_person']=="") { if (!$_POST) { $smarty->assign('clientarea','user.venderlogin.tpl'); $smarty->display('dash/user.mainpage.tpl'); } else { //get the authorization object and then check if the user name and password is correct if(isset($_POST['login'])) { $ovendorreg = new Cvendorreg(); $login= $ovendorreg->check_User($_POST["username"],$_POST["password"]); if ($login) { $ma_vendor_member_code_int = $login[0]["ma_vendor_member_code_int"]; $user_data=$ovendorreg->get_user($ma_vendor_member_code_int); $ma_vendor_member_statuschk = $user_data[0]['ma_vendor_member_status']; if($ma_vendor_member_statuschk=='Approved' OR $ma_vendor_member_statuschk=='Unapproved' OR $ma_vendor_member_statuschk=='UnapprovedButEdit') { $u_email = $user_data[0]['ma_email']; $ma_company_name = $user_data[0]['ma_company_name']; $ma_vendor_member_code_int = $user_data[0]['ma_vendor_member_code_int']; $smarty->assign('ma_vendor_member_status',$ma_vendor_member_statuschk); $_SESSION['ismacontact_person']=$ma_company_name; $smarty->assign('ismacontact_person',$_SESSION['ismacontact_person']); $_SESSION['isuseremail']=$u_email; $smarty->assign('uu_email',$_SESSION['isuseremail']); $_SESSION['isma_vendor_member_code_int']=$ma_vendor_member_code_int; $_SESSION['ma_vendor_member_statusz']=$ma_vendor_member_statuschk; $smarty->assign('ma_vendor_member_statusz',$_SESSION['ma_vendor_member_statusz']); $smarty->assign('uu_ma_vendor_member_code_int',$_SESSION['isma_vendor_member_code_int']); redirect("home.html"); } else { $smarty->assign('message1','Your Profile Rejected Or Blacklist By Admin'); $smarty->assign('clientarea','user.venderlogin.tpl'); $smarty->display('dash/user.mainpage.tpl'); } } else { $smarty->assign('message1','Wrong Username or password.!!'); $smarty->assign('clientarea','user.venderlogin.tpl'); $smarty->display('dash/user.mainpage.tpl'); } } } } else { redirect("home.html"); } ?>