$signin_email = trim($_POST['signin_email']); $signin_password = trim($_POST['signin_password']); if (strlen(trim($signin_email)) <= 0) { $errors[] = 'Please enter your Email Address'; //$errors['email'] = 'Please enter your Email Address'; $errEmailClass = 'has-error'; } if (strlen(trim($signin_password)) <= 0) { $errors[] = 'Please enter a Password'; $errPwdClass = 'has-error'; } if (sizeof($errors) == 0) { $errEmailClass = ''; $errPwdClass = ''; try { $arrAuthUserResult = isAuthenticClient($signin_email, md5($signin_password), $objDataHelper); } catch (Exception $a) { throw new Exception("login.php : isAuthenticUser_API : Error in Authenticing User" . $a->getMessage(), 613); } if (is_array($arrAuthUserResult) && sizeof($arrAuthUserResult) > 0) { $db_client_id = $arrAuthUserResult[0]['client_id']; $db_partner_id = $arrAuthUserResult[0]['partner_id']; $db_client_username = $arrAuthUserResult[0]['client_username']; $db_client_name = $arrAuthUserResult[0]['client_name']; $db_client_email_address = $arrAuthUserResult[0]['client_email_address']; $strRandomID = md5(microtime()); $arrSessionVal = array($strRandomID, $db_client_username, $db_client_email_address, $db_client_id); //setClientSession($strRandomID, $db_client_username, $db_client_email_address); setClientSession($arrSessionVal); $arrUpdLastLoginDtls = updClientLastLoginDtls($db_client_id, $strRandomID, GM_DATE, $Login_IP_Address, $objDataHelper); $strReferer = "dashboard/";
} try { $arrUserSubList = getSubscriptionDetailsByUserId($db_userid, $objDataHelper); } catch (Exception $a) { throw new Exception("response.php : getSubscriptionDetailsByUserId : Error in getting User Details." . $a->getMessage(), 541); } //print_r($arrUserSubList); if (isset($_POST['userId']) && isset($_POST['txPassword']) && isset($_POST['txPlanId']) && isset($_POST['txPlanOrdId']) && isset($_POST['txPlanSucId'])) { $strUserId = trim($_REQUEST['userId']); $strPassword = trim($_REQUEST['txPassword']); $strPlanId = trim($_REQUEST['txPlanId']); $strPlanOrderId = trim($_REQUEST['txPlanOrdId']); $strPlanSubscriptionId = trim($_REQUEST['txPlanSucId']); if (strlen($strPassword) != 0) { try { $arrAuthUserResult = isAuthenticClient($strCK_Username, md5($strPassword), $objDataHelper); } catch (Exception $a) { throw new Exception("login.php : isAuthenticUser_API : Error in Authenticing User" . $a->getMessage(), 613); } if (is_array($arrAuthUserResult) && sizeof($arrAuthUserResult) <= 0) { $stat = "0"; $msg = "Incorrect Password, Please re-enter."; } else { // $db_usertimezone = $arrUserDetails[0]['timezones']; // $gmt_datetime = GM_DATE; // $Type = "N"; // $dateTime = timezoneConverter($Type, $gmt_datetime, $db_usertimezone); // $dtm = explode(SEPARATOR, $dateTime); // $local_datetime = $dtm[1]; try { $arrSubPlanDetails = getSubDtlsByClientIdnPlanId($strSetClient_ID, $strPlanId, $strPlanSubscriptionId, $strPlanOrderId, $objDataHelper);