Beispiel #1
0
        /// <summary>
        /// 回复站内信
        /// </summary>
        public void Message_Reply()
        {
            if (!EX_Admin.Power("message_reply", "回复站内信"))
            {
                AjaxNoPower();
                return;
            }
            int          id      = RequestTool.RequestInt("id", 0);
            string       Title   = RequestTool.RequestString("Title");
            string       Content = RequestTool.RequestString("Content");
            Lebi_Message mes     = B_Lebi_Message.GetModel(id);
            Lebi_Message model   = new Lebi_Message();

            if (mes == null)
            {
                Response.Write("{\"msg\":\"" + Tag("回复信息不存在") + "\"}");
                return;
            }
            else
            {
                model.Message_Type_id = mes.Message_Type_id;
            }
            model.Title          = Title;
            model.Content        = Content;
            model.User_id_From   = 0;
            model.User_Name_From = "管理员";
            model.User_id_To     = mes.User_id_From;
            model.User_Name_To   = mes.User_Name_From;
            model.IsRead         = 0;
            model.IsSystem       = 0;
            model.Time_Add       = System.DateTime.Now;
            model.Language       = mes.Language;
            model.IP             = RequestTool.GetClientIP();
            model.Supplier_id    = mes.Supplier_id;
            B_Lebi_Message.Add(model);
            Log.Add("回复站内信", "Message", "", CurrentAdmin, mes.User_Name_From);
            //发送短信
            SMS.SendSMS_messagereply(model);
            //APP推送
            APP.Push_messagereply(model);
            Response.Write("{\"msg\":\"OK\"}");
        }