//==============================ADDED===================================== private void GpSubUnsubConfig() { //original=========================================== string ip = oUAProfile.GetUserIP(); //string ip = "119.30.39.251"; //original=========================================== //string ip = "119.30.39.251"; WebClient client = new WebClient(); string downloadString = client.DownloadString("http://192.168.14.16/dpdpclient/api/RecognizeGPSubscribes?Ip=" + ip); if (!downloadString.Contains("True")) { Response.Redirect("ErrorMessage.aspx"); } else { BaseCheck(); } }
//===================================ADDED===================================== protected void btnSubscription_OnClick(object sender, EventArgs e) { //============ORIGINAL string ip = oUAProfile.GetUserIP(); //string ip = "119.30.39.251"; //ORIGINAL============================== //string ip = "119.30.39.251"; WebClient client = new WebClient(); string downloadString = client.DownloadString("http://192.168.14.16/dpdpclient/api/RecognizeGPSubscribes?Ip=" + ip); if (!downloadString.Contains("True")) { //Response.Redirect("~/Nomsisdn1.aspx?sid=57"); Response.Redirect("~/ErrorMessage.aspx"); } //else //{ // Response.Redirect("~/Nomsisdn1.aspx?sid=57"); //} string referenceCode = string.Empty; try { referenceCode = referenceCode = DateTime.Now.ToString("yyyyMMddHHmmssffffff"); //Request.QueryString["referenceCode"].ToString(); } catch (Exception exception) { referenceCode = ""; } SendService sendService = new SendService(); string json = new JavaScriptSerializer().Serialize(new { code = "SUB00035204569183201251" , amount = "2" , taxAmount = "0.55" , description = "Joss Body" , servicekey = "afef69c7cbbe4b55bb10d47dd5969677" , productId = "6610" , type = "WAP" , title = "Subscription" , thumbnailUrl = "http://www.jossbody.com" , successUrl = "http://182.160.119.238/jbtest", failureUrl = "http://www.jossbody.com", cancelUrl = "http://www.jossbody.com" , notifyUrl = "http://funkhobor.com/NotifyUrl.aspx" , downloadUrl = "http://www.jossbody.com" , referenceCode = referenceCode }); ApiResult apiResult = sendService.Send("http://192.168.14.16/DPDPClient/api/GetChargingURL", json); string res = apiResult.Result.Replace("\"", ""); if (!string.IsNullOrWhiteSpace(res)) { Response.Redirect(res); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { #region "MSISDN" try { if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error")) { throw new Exception(); } else { sMsisdn = oUAProfile.GetMSISDN(); subSmsisdn = sMsisdn.Substring(0, 5); ViewState["msisdn"] = sMsisdn; } } catch //(Exception ex) { sMsisdn = string.Empty; subSmsisdn = string.Empty; } //sMsisdn = "8801955279938"; #endregion "MSISDN" string UAPROF_URL = Request.UserAgent; try { HSProfiling.Service test = new HSProfiling.Service(); UAProfile ua = new UAProfile(); var HSProfiling = test.HansetDetection(UAPROF_URL, ua.GetUAProfileXWap()); HS_MANUFAC = HSProfiling.Manufacturer; HS_MOD = HSProfiling.Model; HS_DIM = HSProfiling.Dimension; HS_OS = HSProfiling.OS; UAPROF_URL = HSProfiling.UAXML; Session["HSOS"] = HS_OS; } catch { } string scriptForBl = @" $(document).ready(function() { $('.robititle').css('background-color','#F16521'); });"; string scriptForTT = @" $(document).ready(function() { $('.robititle').css('background-color','#71BD44'); });"; if (sMsisdn.StartsWith("88015")) { cssTemplate.Attributes.Add("href", "~/Css/StyleSheetTT.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForTT, true); } else if (sMsisdn.StartsWith("88019")) { cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); if (isSubscribe(sMsisdn)) { cancelSubscriptionBlink.Visible = true; } } else if (sMsisdn.StartsWith("88016")) { cssTemplate.Attributes.Add("href", "~/Css/StyleSheet.css"); // ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); } else if (sMsisdn.StartsWith("88018")) { Response.Redirect("Restricted.aspx"); } else { cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); } string key = String.Empty; if (Request.Params["key"] != null) { key = Request.Params["key"].ToString(); Session["KEY"] = key; } string flagAccess = "0"; if (Session["flagAccess"] != null) { flagAccess = Session["flagAccess"].ToString(); } CA.ExecuteNonQuery("EXEC [Partner_Basket].[dbo].[sp_SetPortalAccess]'" + SOURCE_URL + "','" + sMsisdn + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + APN + "','VDOPortal','','" + oUAProfile.GetUserIP() + "','" + HS_OS + "'", "WAPDB"); if (!String.IsNullOrEmpty(key) && flagAccess == "0") { string accessKey = CA.getSingleValue("Exec spGET_OA_ACCESS'" + SOURCE_URL + "','BDTube','" + sMsisdn + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + APN + "','VDOPortal','" + key + "','" + oUAProfile.GetUserIP() + "','" + HS_OS + "'", "WAPDB").ToString(); Session["Accesskey"] = accessKey; Session["flagAccess"] = "1"; } Slider(); Fullvideo(); Shortvideo(); Fullmovie(); Newvideo(); BanglaNatok(); if (string.IsNullOrEmpty((sMsisdn))) { Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", " function callFunction() { $('#myModal').modal('hide');$('#myModal2').modal('hide'); $('#myModal3').modal('show'); }", true); } if (!string.IsNullOrEmpty((sMsisdn))) { lblNumber.Text = sMsisdn; lblNumber.Visible = true; lblNumber2.Visible = true; lblNumber2.Text = sMsisdn; } } //Session.Clear(); // Session.RemoveAll(); //Session.Abandon(); }
protected void Page_Load(object sender, EventArgs e) { #region "MSISDN" if (Session["MSISDN"] == null) { try { if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error")) { throw new Exception(); } else { sMsisdn = oUAProfile.GetMSISDN(); } } catch //(Exception ex) { sMsisdn = string.Empty; } } else { sMsisdn = Session["MSISDN"].ToString(); } if (sMsisdn.StartsWith("88018")) { Response.Redirect("Restricted.aspx"); } #endregion "MSISDN" string scriptForBl = @" $(document).ready(function() { $('.vdtitle').css('background-color','#58C1E6'); });"; cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); if (!IsPostBack) { userInfo(); dsPage = CA.GetDataSet("Exec [sp_PerPageAccessLog] '" + "fitness.mobi" + "','" + "FitnessSecrets" + "','" + sMsisdn + "','" + UAPROF_URL + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + HS_OS + "','" + oUAProfile.GetUserIP() + "'", "WAPDB"); loadFitnessSecrets(); } }
protected void Page_Load(object sender, EventArgs e) { string msisdn = ms.GetMSISDN(); if (!msisdn.StartsWith("8801")) { // Response.Redirect("CheckOperator.aspx"); } #region "MSISDN" if (Session["MSISDN"] == null) { try { if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error")) { throw new Exception(); } else { sMsisdn = oUAProfile.GetMSISDN(); } } catch //(Exception ex) { sMsisdn = string.Empty; } } else { sMsisdn = Session["MSISDN"].ToString(); } #endregion "MSISDN" #region Profiling if (Session["HSOS"] == null) { HS_OS = "Android"; //pavel //string UAPROF_URL = oUAProfile.GetUserAgent(); //HSProfiling.Service profile = new HSProfiling.Service(); //var HSProfiling = profile.HansetDetection(UAPROF_URL, oUAProfile.GetUAProfileXWap()); //HS_OS = HSProfiling.OS; //UAPROF_URL = HSProfiling.UAXML; //pavel } else { HS_OS = Session["HSOS"].ToString(); } #endregion Profiling if (!isSubscribe(sMsisdn) && !sMsisdn.StartsWith("88018")) { //pavel Response.Redirect("Default.aspx"); } else if (!isSubscribe(sMsisdn) && sMsisdn.StartsWith("88018")) { //pavel Response.Redirect("~/Confirmation.aspx"); } if (HS_OS == "iOS") { smartphone = true; } else if (HS_OS == "Firefox") { smartphone = true; } else if (HS_OS == "Android") { smartphone = true; } else if (HS_OS == "Windows Phone") { smartphone = true; } else if (HS_OS == "Desktop") { smartphone = true; } if (smartphone) { } else { smartphone1.Style.Add("display", "none"); fphone.Style.Add("display", "block"); } string scriptForBl = @" $(document).ready(function() { $('.vdtitle').css('background-color','#58c1e6'); });"; cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); imgMore.ImageUrl = "~/images/more.png"; CategoryCode = Request.QueryString["CategoryCode"].ToString().Trim(); if (CategoryCode.Equals("E564F048-1AD7-450A-BA81-47409FC58BFE") || CategoryCode.Equals("7E8B1C80-EB99-402C-BE1E-00E7F7C99A3F")) { lblten.Visible = true; if (sMsisdn.StartsWith("88019") || sMsisdn.StartsWith("88016")) { lblten.Text = "<b>Price:</b> Tk 20(+VAT, SD and SC)"; } else { lblten.Text = "<b>Price:</b> Tk 10(+VAT, SD and SC)"; } lblten.ForeColor = Color.Red; } if ((Request.QueryString["CategoryCode"].ToString() == "01A332B2-A207-44B9-9D3C-F85A1563571A") || (Request.QueryString["CategoryCode"].ToString() == "873E3EA9-3A28-484B-B74B-68C107DDD800")) { imgMore.Visible = false; } if (!IsPostBack) { if (Session["endUserId"] != null) { sMsisdn = Session["endUserId"].ToString(); } GpSubUnsubConfig(); Loadcontent(); //pavel loadAudioInfo(); LoadRelatedvideo(); sMobNo = ms.GetMSISDN(); bool subs = isSubscribe(sMobNo); cancelSubscriptionBlink.Visible = subs; // HS_MANUFAC = Session["HS_MANUFAC"].ToString(); //HS_MOD = Session["HS_MOD"].ToString(); //HS_DIM = Session["HS_DIM"].ToString(); //HS_OS = Session["HS_OS"].ToString(); //SOURCE_URL = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; //UAPROF_URL = Session["UAPROF_URL"].ToString(); string PORTAL_N_SHORT = "JossBody/JB"; CA.ExecuteNonQuery("EXEC [AurkoCRM].[dbo].[spInsertPortalVisitLog]'" + SOURCE_URL + "','" + "JossBody:Home" + "','" + oUAProfile.Decode(sMsisdn) + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + APN + "','" + PORTAL_N_SHORT + "','" + HS_OS + "','" + Request.UserAgent + "','" + oUAProfile.GetUserIP() + "','13'", "Aurko"); } }
protected void Page_Load(object sender, EventArgs e) { #region "MSISDN" if (Session["MSISDN"] == null) { try { if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error")) { throw new Exception(); } else { sMsisdn = oUAProfile.GetMSISDN(); } } catch //(Exception ex) { sMsisdn = string.Empty; } } else { sMsisdn = Session["MSISDN"].ToString(); } if (sMsisdn.StartsWith("88018")) { // Response.Redirect("Restricted.aspx"); } #endregion "MSISDN" if (!isSubscribe(sMsisdn)) { if (sMsisdn.StartsWith("88018")) { Response.Redirect("Confirmation.aspx"); } else { Response.Redirect("Default.aspx"); } } string scriptForBl = @" $(document).ready(function() { $('.vdtitle').css('background-color','#58C1E6'); });"; cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css"); ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true); if (!IsPostBack) { string type = String.Empty; try { type = Request.QueryString["type"]; userInfo(); UAPROF_URL = Request.UserAgent; if (type == null) { Response.Redirect("Default.aspx"); } } catch { Response.Redirect("Default.aspx"); } if (type == "zumba") { dsPage = CA.GetDataSet("Exec [sp_PerPageAccessLog] '" + "fitness.mobi" + "','" + "Zumba" + "','" + sMsisdn + "','" + UAPROF_URL + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + HS_OS + "','" + oUAProfile.GetUserIP() + "'", "WAPDB"); loadZumbaDetails(); } else if (type == "yoga") { dsPage = CA.GetDataSet("Exec [sp_PerPageAccessLog] '" + "fitness.mobi" + "','" + "Yoga" + "','" + sMsisdn + "','" + UAPROF_URL + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + HS_OS + "','" + oUAProfile.GetUserIP() + "'", "WAPDB"); loadYogaDetails(); } else if (type == "easy") { dsPage = CA.GetDataSet("Exec [sp_PerPageAccessLog] '" + "fitness.mobi" + "','" + "EasyWorkOut" + "','" + sMsisdn + "','" + UAPROF_URL + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + HS_OS + "','" + oUAProfile.GetUserIP() + "'", "WAPDB"); loadEasyDetails(); } else if (type == "fitnessSecrets") { dsPage = CA.GetDataSet("Exec [sp_PerPageAccessLog] '" + "fitness.mobi" + "','" + "FitnessSecrets" + "','" + sMsisdn + "','" + UAPROF_URL + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + HS_OS + "','" + oUAProfile.GetUserIP() + "'", "WAPDB"); loadFitnessSecrets(); } } }