User_sys.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:4k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <%
  2. Sub User_GetParm()
  3. set GetUserParaObj  = server.CreateObject(G_FS_RS)
  4. UserSql = "select Top 1 Login_Style,UserNumberRule,RegisterNotice,RegisterTF,LoginLockNum,LoginPointmoney,Login_Style,AllowChineseName,LenUserName,isCheckCorp,RegisterCheck,MoneyName,RegPointmoney,ReturnUrl,isPrompt,LenPassword,isSendMail,isValidate,OnlyMemberLogin,LenLoginTime,LimitUserName,isPassCard,isYellowCheck,PointChange From FS_ME_SysPara"
  5. GetUserParaObj.open UserSql,User_Conn,1,3
  6. if Not GetUserParaObj.eof then
  7. if GetUserParaObj("RegisterTF")=0 then
  8. RegisterTF=false
  9. Else
  10. RegisterTF=true
  11. End if
  12. RegisterNotice = GetUserParaObj("RegisterNotice")
  13. UserDir = G_USERFILES_DIR
  14. p_UserNumberRule = GetUserParaObj("UserNumberRule")
  15. LoginLockNum = cint(GetUserParaObj("LoginLockNum"))
  16. p_LoginStyle = GetUserParaObj("Login_Style")
  17. p_AllowChineseName = GetUserParaObj("AllowChineseName")
  18. p_LenUserName = GetUserParaObj("LenUserName")
  19. strLenUserNameArr=split(p_LenUserName,",")
  20. p_NumLenMin = strLenUserNameArr(0)
  21. p_NumLenMax = strLenUserNameArr(1)
  22. p_isCheckCorp = cint(GetUserParaObj("isCheckCorp"))
  23. p_RegisterCheck =  cint(GetUserParaObj("RegisterCheck"))
  24. p_MoneyName =  GetUserParaObj("MoneyName")
  25. p_RegPointmoney = GetUserParaObj("RegPointmoney")
  26. strRegPointmoneyArr=split(p_RegPointmoney,",")
  27. p_NumGetPoint = trim(strRegPointmoneyArr(0))
  28. p_NumGetMoney =  trim(strRegPointmoneyArr(1))
  29. p_NumReturnUrl =  Cint(GetUserParaObj("ReturnUrl"))
  30. p_isPromptarr = split(GetUserParaObj("isPrompt"),",")
  31. p_strisPromptTF= cint(trim(p_isPromptarr(0)))
  32. p_strisPromptnNum=clng(trim( p_isPromptarr(1)))
  33. p_LenPasswordarr =  split(GetUserParaObj("LenPassword"),",")
  34. p_LenPassworMin = cint(trim(p_LenPasswordarr(0)))
  35. p_LenPassworMax = cint(trim(p_LenPasswordarr(1)))
  36. p_isSendMail = cint(GetUserParaObj("isSendMail"))
  37. p_isValidate =  cint(GetUserParaObj("isValidate"))
  38. p_OnlyMemberLogin = cint(GetUserParaObj("OnlyMemberLogin"))
  39. p_LenLoginTimearr =  split(GetUserParaObj("LenLoginTime"),",")
  40. p_LoginGetIntegral = Clng(p_LenLoginTimearr(0))
  41. p_LoginGetMoney = Cint(p_LenLoginTimearr(1))
  42. p_LoginPointmoneyarr =  split(GetUserParaObj("LoginPointmoney"),",")
  43. p_LoginPointmoneyarr_1 = Clng(p_LoginPointmoneyarr(0))
  44. p_LoginPointmoneyarr_2 = Cint(p_LoginPointmoneyarr(1))
  45. p_LimitUserName = GetUserParaObj("LimitUserName")
  46. p_isPassCard = GetUserParaObj("isPassCard")
  47. p_PointChange =  GetUserParaObj("PointChange")
  48. p_isYellowCheck = GetUserParaObj("isYellowCheck")
  49. GetUserParaObj.close:set GetUserParaObj = nothing
  50. Else
  51. strShowErr = "<li>参数错误</li><li>找不到会员系统配置</li>"
  52. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  53. Response.end
  54. End if
  55. Set GetConfigObj = server.CreateObject(G_FS_RS)
  56. GetConfigObj.open "select  Top  1 MF_Login_style,MF_Soft_Version From FS_MF_Config",Conn,1,3
  57. if Not GetConfigObj.eof then
  58. p_Soft_Version = "版本号:V" & GetConfigObj(1)
  59. Else
  60. p_Soft_Version = "<font color=""Red"">Err:Please configure Your Soft</font>"
  61. End if
  62. GetConfigObj.close
  63. Set GetConfigObj = nothing
  64. '获得天数字符串
  65. if Len(Cstr(month(now)))<2  then  
  66. strCard_month_1 = "0"&month(now)
  67. Else
  68. strCard_month_1 = month(now)
  69. End  if 
  70. if Len(Cstr(day(now)))<2  then  
  71. strCard_day_1 = "0"&day(now)
  72. Else
  73. strCard_day_1 = day(now)
  74. End  if 
  75. if Len(Cstr(hour(now)))<2  then  
  76. strCard_hour_1 = "0"&hour(now)
  77. Else
  78. strCard_hour_1 = hour(now)
  79. End  if 
  80. if Len(Cstr(minute(now)))<2  then  
  81. strCard_minute_1 = "0"&minute(now)
  82. Else
  83. strCard_minute_1 = minute(now)
  84. End  if 
  85. strTodaydate = right(year(now),2)&strCard_month_1&strCard_day_1
  86. strTodaydate_1 = right(year(now),2)&strCard_month_1&strCard_day_1&strCard_hour_1&strCard_minute_1
  87. End Sub
  88. Function GetRandstr()
  89.  Dim Randchar,Randchararr,RandLen,iR,Randomizecode
  90. Randomize
  91. Randchar="0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
  92. Randchararr=split(Randchar,",") 
  93. RandLen=8 '定义密码的长度或者是位数
  94. for iR=1 to RandLen
  95. Randomizecode=Randomizecode&Randchararr(Int((21*Rnd)))
  96. next 
  97. End Function   
  98.  
  99. Function  ReturnError(Str,strURL) 
  100. Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(Str)&"&ErrorUrl="& strURL &"")
  101. Response.end
  102. End Function
  103. %>