Beispiel #1
0
        private static void ProcessCharge(IHttpRequest Request, IHttpResponse Response)
        {
            var dic = new SafeStringToStringDirectionary();

            dic.Add("UserID", Request.Uri.QueryString["UserID"].ToSafeString());
            dic.Add("money", Request.Uri.QueryString["money"].ToSafeString());
            Response.Write(Action("charge", dic.ToDictionary()));
        }
Beispiel #2
0
        private static void ProcessForbid(IHttpRequest Request, IHttpResponse Response)
        {
            var dic = new SafeStringToStringDirectionary();

            dic.Add("UserID", Request.Uri.QueryString["UserID"].ToSafeString());
            dic.Add("reason", Request.Uri.QueryString["reason"].ToSafeString());
            dic.Add("day", Request.Uri.QueryString["day"].ToSafeString());
            Response.Write(Action("forbid", dic.ToDictionary()));
        }
Beispiel #3
0
 private void ProcessForbid()
 {
     using (var a = new WebHelperClient())
     {
         var dic = new SafeStringToStringDirectionary();
         dic.Add("UserID", Request.QueryString["UserID"].ToSafeString());
         dic.Add("reason", Request.QueryString["reason"].ToSafeString());
         dic.Add("day", Request.QueryString["day"].ToSafeString());
         Response.Write(a.GMAction("forbid", dic.ToDictionary()));
     }
 }
Beispiel #4
0
 private void ProcessCharge()
 {
     if (this.usertype <= 2)
     {
         Response.Write("对不起,你的权限不足");
         return;
     }
     using (var a = new WebHelperClient())
     {
         var dic = new SafeStringToStringDirectionary();
         dic.Add("UserID", Request.QueryString["UserID"].ToSafeString());
         dic.Add("money", Request.QueryString["money"].ToSafeString());
         Response.Write(a.GMAction("charge", dic.ToDictionary()));
     }
 }
Beispiel #5
0
        private static void ProcessStart(IHttpRequest Request, IHttpResponse Response)
        {
            var dic = new SafeStringToStringDirectionary();

            dic.Add("type", Request.Uri.QueryString["type"].ToSafeString());
            Response.Write(Action("start", dic.ToDictionary()));
        }
Beispiel #6
0
        private static void ProcessNotice(IHttpRequest Request, IHttpResponse Response)
        {
            var postdata = Request.Content.ReadAll().ConvertFromBytes(Encoding.UTF8);
            var Form     = FormParser.Parse(postdata);
            var dic      = new SafeStringToStringDirectionary();

            dic.Add("str", Form["Tx_url"].ToSafeString());
            Response.Write(Action("notice", dic.ToDictionary()));
        }
Beispiel #7
0
 private void ProcessKitoff()
 {
     using (var a = new WebHelperClient())
     {
         var dic = new SafeStringToStringDirectionary();
         dic.Add("UserID", Request.QueryString["UserID"].ToSafeString());
         Response.Write(a.GMAction("kitoff", dic.ToDictionary()));
     }
 }
Beispiel #8
0
 private void ProcessNotice()
 {
     using (var a = new WebHelperClient())
     {
         var dic = new SafeStringToStringDirectionary();
         dic.Add("str", Request.Form["Tx_url"].ToSafeString());
         Response.Write(a.GMAction("notice", dic.ToDictionary()));
     }
 }
Beispiel #9
0
 /// <summary>
 /// Parse
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 public static SafeStringToStringDirectionary Parse(string str)
 {
     var form = new SafeStringToStringDirectionary();
     var a = str.Split('&');
     {
         foreach (var b in a)
         {
             var c = b.Split('=');
             if (c.Length >= 2)
             {
                 var name = c[0].Trim().UrlDecode();
                 var content = c[1].Trim().UrlDecode();
                 form.Add(name,content);
             }
         }
     }
     return form;
 }