微信幸运九宫格抽奖源码/51wsb_wxjgg/duijiang.ashx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.SqlClient;
namespace wxjgg
{
/// <summary>
/// $codebehindclassname$ 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class duijiang : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.Buffer = true;
context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
context.Response.AddHeader("pragma", "no-cache");
context.Response.AddHeader("cache-control", "");
context.Response.CacheControl = "no-cache";
context.Response.ContentType = "text/plain";
string djpwd = context.Request["djpwd"];
int zjid = Convert.ToInt32(context.Request["zjid"]);
int hdid = Convert.ToInt32(context.Request["hdid"]);
string openid = context.Request.Cookies["9gg"]["openid"].ToString();
if (djpwd == djpwd_sy(hdid))
{
upzj(zjid, openid, hdid);
context.Response.Write("{\"success\":\"true\",\"msg\":\"兑奖成功,请商家放发奖品!\"}");
}
else
{
context.Response.Write("{\"success\":\"false\",\"msg\":\"兑奖密码不正确!\"}");
}
}
public void upzj(int zjid,string openid,int hdid)
{
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["sqldb"].ToString());
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "update zjlist set flage=1 where id=@id and openid=@openid and hdid=@hdid";
cmd.Parameters.Add("@id",SqlDbType.Int);
cmd.Parameters.Add("@openid",SqlDbType.NVarChar);
cmd.Parameters.Add("@hdid",SqlDbType.Int);
cmd.Parameters["@id"].Value = zjid;
cmd.Parameters["@openid"].Value = openid;
cmd.Parameters["@hdid"].Value = hdid;
try
{
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
后面还有 37 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
