コード例 #1
0
    private void userInfo()
    {
        #region "MSISDN"
        try
        {
            if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error"))
            {
                throw new Exception();
            }
            else
            {
                sMsisdn = oUAProfile.GetMSISDN();
                if (sMsisdn.StartsWith("88018"))
                {
                    OPERATOR = "Robi";
                }

                if (sMsisdn.StartsWith("88016"))
                {
                    OPERATOR = "Airtel";
                }

                if (sMsisdn.StartsWith("88019"))
                {
                    OPERATOR = "Banglalink";
                }

                if (sMsisdn.StartsWith("88015"))
                {
                    OPERATOR = "Teletalk";
                }
            }
        }
        catch //(Exception ex)
        {
            sMsisdn = 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;
        }
        catch
        {
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Image3.ImageUrl = "~/Images/baaad.jpg";

        string UAPROF_URL = oUAProfile.GetUserAgent();

        try
        {
            SOURCE_URL = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;
            HSProfiling.Service Profile = new HSProfiling.Service();
            var HSProfiling             = Profile.HansetDetection(UAPROF_URL, oUAProfile.GetUAProfileXWap());

            HS_MANUFAC = HSProfiling.Manufacturer;
            HS_MOD     = HSProfiling.Model;
            HS_DIM     = HSProfiling.Dimension;
            HS_OS      = HSProfiling.OS;
            UAPROF_URL = HSProfiling.UAXML;
        }
        catch { }
    }
コード例 #3
0
    private void subscribeuser(string types, string autos)
    {
        string  msisdnN = ms.GetMSISDN();
        DataSet DNDMno  = CA.GetDataSet("EXEC [WapPortal_CMS].dbo.spCheckDNDMno '" + msisdnN + "','Fitnss','6624'",
                                        "WAPDB");
        string DNDMobileNo = string.Empty;

        try
        {
            DNDMobileNo = DNDMno.Tables[0].Rows[0].ItemArray[0].ToString();
        }
        catch
        {
        }
        try
        {
            string UAPROF_URL = oUAProfile.GetUserAgent();
            SOURCE_URL = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;
            HSProfiling.Service Profile = new HSProfiling.Service();
            var HSProfiling             = Profile.HansetDetection(UAPROF_URL, oUAProfile.GetUAProfileXWap());

            HS_MANUFAC = HSProfiling.Manufacturer;
            HS_MOD     = HSProfiling.Model;
            HS_DIM     = HSProfiling.Dimension;
            HS_OS      = HSProfiling.OS;
            UAPROF_URL = HSProfiling.UAXML;

            if (HS_OS == "Desktop")
            {
                Response.Redirect("http://wap.shabox.mobi/Error/Default.aspx?id=OS");
            }
            else if (HS_MANUFAC == "Generic" || HS_MOD == "Generic")
            {
                Response.Redirect("http://wap.shabox.mobi/Error/Default.aspx?id=Mobile");
            }
        }
        catch
        {
            Response.Redirect("http://wap.shabox.mobi/Error/Default.aspx?id=OS");
        }

        if (DNDMobileNo == "Y")
        {
            Response.Redirect("~/ErrorMessage.aspx?type=dnd");
        }
        if (types == "d" && autos == "t")
        {
            string msisdn = ms.GetMSISDN();
            //string Package = "FC";
            //CA.ExecuteNonQuery("EXEC [Partner_API].[dbo].[spProcessRequestOnlineAdvertisement] '" + msisdn + "','" + Package + "'", "WAPDB");
            RobiDoubleConfirm rs = new RobiDoubleConfirm();
            Response.Redirect(rs.GetLink(msisdn, "http://amarfitness.com/", "0300407908"), true);
        }
        else if (types == "w" && autos == "t")
        {
            string msisdn = ms.GetMSISDN();
            //string Package = "FCW";
            //CA.ExecuteNonQuery("EXEC [Partner_API].[dbo].[spProcessRequestOnlineAdvertisement] '" + msisdn + "','" + Package + "'", "WAPDB");
            RobiDoubleConfirm rs = new RobiDoubleConfirm();
            Response.Redirect(rs.GetLink(msisdn, "http://amarfitness.com/", "0300407910"), true);
        }
        else if (types == "d" && autos == "f")
        {
            string msisdn = ms.GetMSISDN();
            //string Package = "FCDN";
            //CA.ExecuteNonQuery("EXEC [Partner_API].[dbo].[spProcessRequestOnlineAdvertisement] '" + msisdn + "','" + Package + "'", "WAPDB");
            RobiDoubleConfirm rs = new RobiDoubleConfirm();
            Response.Redirect(rs.GetLink(msisdn, "http://amarfitness.com/", "0300407912"), true);
        }
        else if (types == "w" && autos == "f")
        {
            string msisdn = ms.GetMSISDN();
            //string Package = "FCWN";
            //CA.ExecuteNonQuery("EXEC [Partner_API].[dbo].[spProcessRequestOnlineAdvertisement] '" + msisdn + "','" + Package + "'", "WAPDB");
            RobiDoubleConfirm rs = new RobiDoubleConfirm();
            Response.Redirect(rs.GetLink(msisdn, "http://amarfitness.com/", "0300407914"), true);
        }
    }