| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <%@ WebHandler Language="C#" Class="ServerTime" %>
- using System;
- using System.Web;
- using System.Web.SessionState;
- using System.Configuration;
- using System.Data;
- using Curtain.DataAccess;
- using Curtain.Log;
- using DK.XuWei.WebMes;
- using Newtonsoft.Json.Linq;
- using System.Collections.Generic;
- public class ServerTime : IHttpHandler {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- using (IDataAccess conn = DataAccess.Create())
- {
- if (context.Request["m"].ToString() == "fwq")
- {
- string time = DateTime.Now.ToString("yyyy年MM月dd日 HH:mm ");
- Dictionary<string, string> d = new Dictionary<string, string>();
- JObject json = new JObject(
- new JProperty("success", true),
- new JProperty("sj", time)
- );
- context.Response.Write(json.ToString());
- }
- }
- }
- public bool IsReusable {
- get {
- return false;
- }
- }
- }
|