Hidistro.UI.Web/API/Hi_Ajax_Game.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Web;
using ControlPanel.Promotions;
using Hidistro.ControlPanel.Promotions;
using Hidistro.Entities.Members;
using Hidistro.Entities.Promotions;
using Hidistro.SaleSystem.Vshop;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Hidistro.UI.Web.API
{
public class Hi_Ajax_Game : IHttpHandler
{
private void CheckCanVote(HttpContext context)
{
context.Response.ContentType = "application/json";
StringBuilder builder = new StringBuilder("{");
int voteId = 0;
try
{
voteId = int.Parse(context.Request["voteId"]);
}
catch (Exception)
{
builder.Append("\"status\":\"0\",\"Desciption\":\"参数错误!\"}");
context.Response.Write(builder.ToString());
return;
}
VoteInfo vote = VoteHelper.GetVote((long)voteId);
if (vote == null)
{
builder.Append("\"status\":\"2\",\"Desciption\":\"不存在该投票!\"}");
context.Response.Write(builder.ToString());
}
else
{
string memberGrades = vote.MemberGrades;
if (memberGrades != "0")
{
MemberInfo currentMember = MemberProcessor.GetCurrentMember();
if ((currentMember != null) && !("," + memberGrades + ",").Contains("," + currentMember.GradeId.ToString() + ","))
{
builder.Append("\"status\":\"2\",\"Desciption\":\"该投票不适应您的会员,谢谢!\"}");
context.Response.Write(builder.ToString());
return;
}
}
if (!VoteHelper.IsVote(voteId))
{
builder.Append("\"status\":\"1\",\"Desciption\":\"可以投票!\"}");
context.Response.Write(builder.ToString());
}
else
{
builder.Append("\"status\":\"2\",\"Desciption\":\"已投过票!\"}");
后面还有 448 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
