private void commentNew() { int uid =theContext.Session["id"]!=null? Convert.ToInt32(theContext.Session["id"]):0; int tid = Convert.ToInt32(theContext.Request.Form["tid"]); string comment = theContext.Request.Form["comment"]; Hashtable thePost = new Hashtable(); moyu.User.Functions myFunction = new moyu.User.Functions(); thePost = myGroup.topicGetById(tid); int atUid = Convert.ToInt32(theContext.Request.Form["atUid"]); if (Convert.ToInt32(thePost["uid"]) != atUid && atUid != 0) { myFunction.sendMessage(uid, atUid, comment, -2, tid); } if (Convert.ToInt32(thePost["uid"]) != 0 && uid != Convert.ToInt32(thePost["uid"])) { myFunction.sendMessage(uid, Convert.ToInt32(thePost["uid"]), comment, -2, tid); } myGroup.commentNew(uid, tid, comment); if (Convert.ToInt32(thePost["gid"]) == -1 && uid!=0) { myFunction.givePostPoint(uid, "回复积分", 1); } if ( Convert.ToInt32( thePost["gid"]) == -1 && theContext.Cache["mobilePostHome"] != null) { theContext.Cache.Remove("mobilePostHome"); } }
private void addPicPostIntroduce() { int tid = Convert.ToInt32(theContext.Request.Form["tid"]); int pid = Convert.ToInt32(theContext.Request.Form["pid"]); Hashtable thePost = myGroup.topicGetById(tid); string introduce = theContext.Request.Form["introduce"]; if (Convert.ToInt32(thePost["uid"]) == Convert.ToInt32(theContext.Session["id"])) { string body = ""; if (pid == 0) { body = "<span style=\"color:#F78000;font-weight:bold;\">" + DateTime.Now.ToShortDateString() + "</span>:<br/>" + introduce ; if (Convert.ToInt32(thePost["gid"]) == -2) { moyu.User.Functions myFunctions = new moyu.User.Functions(); myFunctions.givePostPoint(Convert.ToInt32(thePost["uid"]), "签到心情奖励积分", 2); } } else { body = thePost["body"].ToString() + "<p>" + introduce + "</p>"; } myGroup.updatePost(tid,body, thePost["title"].ToString(), thePost["tag"].ToString(),-1); } theContext.Response.Redirect("~/Mobile/robot-group-kewWordsShow.aspx?type=group&tag=-1"); }