发布于 2016-05-31 04:28:51 | 82 次阅读 | 评论: 0 | 来源: 网友投递
Discuz!社区论坛系统
Crossday Discuz! Board(简称 Discuz!)是北京康盛新创科技有限责任公司推出的一套通用的社区论坛软件系统。自2001年6月面世以来,Discuz!已拥有13年以上的应用历史和200多万网站用户案例,是全球成熟度最高、覆盖率最大的论坛软件系统之一。
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower().Substring(8, 16);
Response.Cookies("dnt")("userid") = rs("uid")
Response.Cookies("dnt")("password") = DESCode
Response.Cookies("dnt")("tpp") = rs("tpp")
Response.Cookies("dnt")("ppp") = rs("ppp")
Response.Cookies("dnt")("pmsound") = rs("pmsound")
Response.Cookies("dnt")("invisible") = rs("invisible")
Response.Cookies("dnt")("referer") = "index.aspx"
Response.Cookies("dnt")("sigstatus") = rs("sigstatus")
Response.Cookies("dnt")("expires") = 0
Response.Cookies("dnt").Domain = ".xxxx.com" //修改为你的域名,注意前面带.(点)
Response.Cookies("dnt").Secure = False
//if (Context.Request.Cookies["dntadmin"] == null || Context.Request.Cookies["dntadmin"]["key"] == null ||ForumUtils.GetCookiePassword(Context.Request.Cookies["dntadmin"]["key"].ToString(), config.Passwordkey) != (oluserinfo.Password + secques + oluserinfo.Userid.ToString()))
if (Context.Request.Cookies["dntadmin"] == null || Context.Request.Cookies["dntadmin"]["key"] == null)
<%@ Page Language="C#" %>
<%@ Import Namespace="Discuz.Forum" %>
<%@ Import Namespace="Discuz.Common" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["userName"] != null && Request.QueryString["passWord"] != null)
{
string userName = Request.QueryString["userName"].ToString().Replace("'", "''");
string passWord = Request.QueryString["passWord"].ToString().Replace("'", "''");
int uid = Discuz.Forum.Users.CheckPassword(userName, passWord, false);
if (uid != -1)
{
LoginLogs.DeleteLoginLog(Discuz.Common.DNTRequest.GetIP());
UserCredits.UpdateUserCredits(uid);
ForumUtils.WriteUserCookie(uid, Discuz.Common.Utils.StrToInt(DNTRequest.GetString("expires"), 500),userName, DNTRequest.GetInt("templateid", 0), DNTRequest.GetInt("loginmode", -1));
Users.UpdateUserLastvisit(uid, Discuz.Common.DNTRequest.GetIP());
}
}
}
</script>