首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

取得网址里的用户名-二级域名

2012-07-02 
获得网址里的用户名--二级域名?????? public static string GetSecondDomainName()??? {??????? string na

获得网址里的用户名--二级域名

?

?

?

??? public static string GetSecondDomainName()
??? {
??????? string name = "none";
??????? name = HttpContext.Current.Request.Url.AbsoluteUri.ToLower();
??????? int ii = name.IndexOf("localhost");
??????? if (ii == -1)
??????? {
??????????? name = name.Replace("http://www.", string.Empty).Replace("http://", string.Empty).Replace(".369b2b.com/regist.aspx", string.Empty);
??????????? if (name == "www")
??????????? {
??????????????? name = "none";
??????????? }
??????????? else
??????????? {
??????????????? //檢查會員是否存在
??????????????
??????????????? int exsits = DB.ExecuteSelectInt(" select Count(MemberID) from Member where Name='" + name.Trim() + "' and Status>1 ");
??????????????? if (exsits == 0)
??????????????? {
??????????????????? name = "err";
??????????????? }
??????????? }
??????? }
??????? else
??????? {
??????????? name = "none";
??????? }
??????? return name;
??? }

热点排行