Hidistro.UI.Web/Admin/promotion/SaveVoteHandler.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using ControlPanel.Promotions;
using Hidistro.Entities;
using Hidistro.Entities.Promotions;
namespace Hidistro.UI.Web.Admin.promotion
{
public class SaveVoteHandler : IHttpHandler
{
private string IntToChar(int i)
{
char ch = (char)(i + 0x43);
return ch.ToString();
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
int num = int.Parse(context.Request["id"].ToString());
string str = context.Request["name"].ToString();
string val = context.Request["begin"].ToString();
string str3 = context.Request["end"].ToString();
string str4 = context.Request["memberlvl"].ToString();
string str5 = context.Request["img"].ToString();
string str6 = context.Request["des"].ToString();
bool flag = bool.Parse(context.Request["ismulti"].ToString());
int num2 = int.Parse(context.Request["maxcheck"].ToString());
string str7 = context.Request["items"].ToString();
DateTime now = DateTime.Now;
DateTime i = DateTime.Now;
if (string.IsNullOrEmpty(str))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"投票标题不能为空\"}");
}
else if (str.Length > 60)
{
context.Response.Write("{\"type\":\"error\",\"data\":\"投票标题不能超过60个字符\"}");
}
else if (string.IsNullOrEmpty(str7))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"投票选项不能为空\"}");
}
else if (string.IsNullOrEmpty(str5))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"没有上传活动封面\"}");
}
else if (!val.bDate(ref now))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请输入正确的开始时间\"}");
}
else if (!str3.bDate(ref i))
{
context.Response.Write("{\"type\":\"error\",\"data\":\"请输入正确的结束时间\"}");
}
else if (i <= now)
{
后面还有 89 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
