Medical/Html/ajax/zt.ashx.cs

(完整代码) 2KB

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace WebApplication.Html.ajax
{
    /// <summary>
    /// zt 的摘要说明
    /// </summary>
    public class zt : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (context.Request["infoid"] != null) 
            {
                DataTable dt = new BLL.Models.GZXX_Model().GetDataTable("*","GZXX_U_ZTInfo"," where ztinfoid = " + context.Request["infoid"].ToString(), null," order by infoid ");
                string html = "";
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    html += "<div class=\"mo\"><h2 style=\"font-size:20px\">" + dt.Rows[i]["Title"].ToString() + "</h2></div>";
                    html += "<p>" + dt.Rows[i]["Intro"].ToString() + "</p>";
                    if (dt.Rows[i]["FoodInfoID"].ToString() != "")
                    {
                        html += "<div class=\"big4_list clear mt10\"><ul class=\"on\">";
                        DataTable dinfo = new BLL.Models.GZXX_Model().GetDataTable("*", "GZXX_U_Meishi", " where infoid in (" + dt.Rows[i]["FoodInfoID"].ToString().Substring(1) + ")", null, "");
                        for (int j = 0; j < dinfo.Rows.Count; j++) 
                        {
                            string usertitle = new BLL.Models.GZXX_Model().GetContentInfo(int.Parse(dinfo.Rows[j]["UserInfoID"].ToString()), "GZXX_U_UserTable").Rows[0]["Title"].ToString();
                            html += "<li><a title=\"" + dinfo.Rows[j]["Title"].ToString() + "\" href=\"" + dinfo.Rows[j]["InfoID"].ToString() + ".html\" target=\"_blank\"><i><img alt=\"" + dinfo.Rows[j]["Title"].ToString() + "\" class=\"imgLoad\" src=\"" + dinfo.Rows[j]["Pic"].ToString() + "\" style=\"display: block;\"></i><p>" + dinfo.Rows[j]["Title"].ToString() + "</p></a><a title=\"" + usertitle + "\" href=\"c135.html?id=" + dinfo.Rows[j]["UserInfoID"].ToString() + "\" target=\"_blank\" class=\"u\">" + usertitle + "</a></li>";
                        }
                        html += "</ul></div><div style=\"clear:both\"></div>";
                    }
                }
                context.Response.Write(html);
            }
            else 
            {
                context.Response.Write("");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

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

AI 解读

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

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