微信幸运九宫格抽奖源码/51wsb_wxjgg/getopenid.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
namespace wxjgg
{
public partial class getopenid : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string hdid = Request.QueryString["hdid"].ToString();
string tplcurl = Tplcurl(Convert.ToInt32(hdid));
if (Request.QueryString["openid"] != null)
{
string openid = Request.QueryString["openid"].ToString();
//将openid记录到数据库中
if (openBool(openid,Convert.ToInt32(hdid)) == false)
{
//openid存在不操作
Response.Redirect(tplcurl);
}
else
{
}
if (Request.Cookies["9gg"] == null)
{
//写入cookie
HttpCookie cookie = new HttpCookie("9gg");
DateTime dt = DateTime.Now;
TimeSpan ts = new TimeSpan(1, 0, 0, 0, 0);//设置过期时间1天过期
cookie.Expires = dt.Add(ts);//设置过期时间
cookie.Values.Add("openid", openid);
System.Web.HttpContext.Current.Response.AppendCookie(cookie);
}
else
{
HttpCookie cookie = Request.Cookies["9gg"];
//如果cookie存在修改cookie
cookie.Values.Set("openid", openid);
Response.AppendCookie(cookie);
}
Response.Redirect("index.aspx?hdid=" + hdid);
}
else
{
后面还有 59 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
