918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/2cfdeb0f/aecb9789/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/2cfdeb0f/aecb9789/App_Web_sm48rqal.2.cs
?#pragma checksum "D:\wwwroot\kryihaiequip\wwwroot\Message\ashx\message.ashx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E571AD9E71CE3398DB06B0A753AD16E4"

#line 1 "D:\wwwroot\kryihaiequip\wwwroot\Message\ashx\message.ashx"


using System;
using System.Data;
using System.Text;
using System.Web;
using Udows.Web.BusinessRules;
using Udows.Web.Utility;

public class message : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        context.Request.ContentEncoding = Encoding.GetEncoding("GB2312");
        int result = 0;
        string sql = "<Forms needitem=\"*\"/>";
        DataSet set = (DataSet)CFactory.CGetData(sql);
        if (set != null && set.Tables[0].Rows.Count > 0)
        {
            set.Tables[0].Columns.Add("currvalue", typeof (string));
            foreach (DataRow row in set.Tables[0].Rows)
            {
                if (row["ftype"].ToString() == "2")
                {
                    row["currvalue"] = context.Request.Form[row["groupname"].ToString()];
                }
                else
                {
                    row["currvalue"] = context.Request.Form[row["id"].ToString()];
                }
            }
            result = Insert(set.Tables[0]);
        }

        if (result == 1)
        {
            context.Response.Redirect("/");
        }
        else
        {
            context.Response.Write("抱愧,未能留言成功");
        }
    }


    private static int Insert(DataTable dt)
    {
        string cmdText = "Insert into Ud_GS_ZC_Defined (";
        foreach (DataRow row in dt.Rows)
        {
            cmdText += row["fname"] +",";
        }
        cmdText = cmdText.Substring(0, cmdText.Length - 1);
        cmdText += " ) VALUES (";
        foreach (DataRow row in dt.Rows)
        {
            cmdText +="'"+ row["currvalue"]+ "',";
        }
        cmdText = cmdText.Substring(0, cmdText.Length - 1);
        cmdText += " )";
        return LuckShopDB.ExecuteNonQuery(LuckShopDB.ConnectionString, CommandType.Text, cmdText, null);
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}

#line default
#line hidden