FmcmsUi/comment.aspx.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

//源码下载 www.51aspx.com
public partial class comment : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //ajax提交新评论
        if (Request.Form["type"] != null)
        {
            string type=Request.Form["type"].ToString();
            Response.ContentType = "text/html";
            if ( type== "0")
            {
                if (Request.Form["username"] != null && Request.Form["content"] != null)
                {
                    Response.Write(CommentAdd(Request.Form["username"].ToString(), Request.Form["content"].ToString()));
                }
                else
                {
                    Response.Write("参数传递失败!");
                }
            }
            else
            {
                Response.Write(GetCommentCount(int.Parse(Request.Form["docid"].ToString())));
            }
          
            Response.Flush();
            Response.Close();
        }
    
        if (Request.Form["comid"] != null&Request.Form["sa"]!=null)
        {
            Response.ContentType = "text/html";
            int comid = int.Parse(Request.Form["comid"].ToString());
            string sa=Request.Form["sa"].ToString();
            Fm.Bussiness.public_select ps = new Fm.Bussiness.public_select();
            if (sa == "s")
            {
                ps.Queryps("update Fm_comment set support=support+1 where comid=" + comid + "");
                Response.Write(ps.Getps("Fm_comment", "support", "comid=" + comid + "")[0]["support"].ToString());
            }
            else
            {
                ps.Queryps("update Fm_comment set against=against+1 where comid=" + comid + "");
                Response.Write(ps.Getps("Fm_comment", "against", "comid=" + comid + "")[0]["against"].ToString());
            }

            Response.Flush();
            Response.Close();
后面还有 119 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。