admin/admin_DelDayHot.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class admin_admin_DelDayHot : System.Web.UI.Page
{
protected int id = 0;
protected string action = null;
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["userName"] == null)
{
Response.Redirect("login.aspx");
}
id = Convert.ToInt32(Request.QueryString["CaiId"]);
action = Request.QueryString["action"];
if (action=="del")
{
del(id);
}
else
{
Response.Redirect("admin_DayHot.aspx");
}
}
//public static void ShowMessage(string strMsg, string Url)
//{
// System.Web.HttpContext.Current.Response.Write("<Script Language='JavaScript'>window.alert('" + strMsg + "');window.location.href ='" + Url + "'</script>");
//}
public void del(int id)
{
string sql = "update CaiInfo set isDayHot=0 where CaiInfo.ID=" + id;
int res = DAL.ExecuteNonQuery(sql);
if (res > 0)
{
//Response.Write(" <script type=\"text/javascript\">alert('删除成功!')</script>");
//删除确认框
Response.Write("<script type=\"text/javascript\">alert('删除成功!');window.location.href ='admin_DayHot.aspx'</script>");
//Response.Write("<Script Language='JavaScript'>window.alert(" 删除成功!");</script>");
//ShowMessage("删除成功!", "admin_DayHot.aspx");
//Response.Redirect("admin_DayHot.aspx");
}
else {
Response.Write("<script type=\"text/javascript\">alert('删除失败!');window.location.href ='admin_DayHot.aspx'</script>");
}
//Response.Redirect("admin_DayHot.aspx");//注意逻辑判断
}
后面还有 2 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
