Dim strAdminEmail As String = S_Tools.GetWebSetting("AdminEmail")Dim strAdminPassword As String = S_Tools.GetWebSetting("AdminPassword")Dim strTitle As String = "MathFan注册Email"Dim strContent As String = strName & "你好,
" & vbCrLf & _"你的注册密码是:
" & strPassword & vbCrLf & _"登陆地址为:http://point.mathfan.com/Question/List.aspx"Dim pGmail As C_Gmail = New C_Gmail( _strAdminEmail, strAdminPassword, _strEmail, strTitle, strContent)pGmail.addEmail("happyli.net@gmail.com")pGmail.start()
FunnyAsk.Post
Login/{0}
Dim strAdminEmail As String = S_Tools.GetWebSetting("AdminEmail")Dim strAdminPassword As String = S_Tools.GetWebSetting("AdminPassword")Dim strTitle As String = "MathFan注册Email"Dim strContent As String = strName & "你好,
" & vbCrLf & _"你的注册密码是:
" & strPassword & vbCrLf & _"登陆地址为:http://point.mathfan.com/Question/List.aspx"Dim pGmail As C_Gmail = New C_Gmail( _strAdminEmail, strAdminPassword, _strEmail, strTitle, strContent)pGmail.addEmail("happyli.net@gmail.com")pGmail.start()
Dim iLoginCount As Int32 = Val(Session.Item("LoginCount"))Session.Item("LoginCount") = Str(iLoginCount + 1)If iLoginCount > 10 Then Response.Write("登录次数太多,请稍后重试") Exit SubEnd IfDim strName As String = Request("Name")Dim strPassword As String = Request("Password")Dim strPassword_MD5 As String = C_MD5.MD5(strPassword, 32, True)Dim iUserID As Int32If InStr(strName, "@") > 0 Then iUserID = S_Mathfan.getIDfromMail(pConnect, strName) strName = S_Mathfan.getNameFromID(pConnect, iUserID)Else iUserID = S_Mathfan.GetUserID(Session, pConnect, strName)End IfIf S_Right.CheckLogin(pConnect, Request, Session, strName, strPassword_MD5, True) Then Session.Item("LoginName") = strName Session.Item("LoginMD5") = strPassword_MD5 Dim pCookie As HttpCookie = New HttpCookie("LoginCookie") pCookie.Path = "/" pCookie.Expires = DateTime.Now.AddDays(100) pCookie.Value = S_Strings.EnCrypt_Unicode(strName, S_Mathfan.EncryptKey) & "|" & _ S_Strings.EnCrypt_Unicode(strPassword_MD5, S_Mathfan.EncryptKey) Response.Cookies.Add(pCookie) strBody = "登录成功" strURL = "http://point.mathfan.com/Flash/FunnyJabber/FunnyJabber.swf?userid=" & iUserID & "&" _ & "name=" & S_Strings.UrlEncode(strName) & "&md5=" & strPassword_MD5 strMoney = ReadMoney(pConnect, strName) bLogin = TrueElse strBody = "登录失败" strURL = "" strMoney = "" bLogin = FalseEnd IfResponse.Write(strBody)
Public strBody As String = ""Public strURL As String = ""Public strMoney As String = ""Public bLogin As Boolean = False
LoginPost.aspx
{0}.vb
Imports B_String.FunnyImports System.Data.OdbcImports B_Net.FunnyNet
Login/{0}
FunnyAskPost