Ejemplo n.º 1
0
 private void delTop()
 {
     int tid = Convert.ToInt32(theContext.Request.Params["tid"]);
     Hashtable thePost = new Hashtable();
     thePost = myGroup.topicGetById(tid);
     if (Convert.ToBoolean(thePost["isTop"]) == true && Convert.ToInt32(theContext.Session["power"]) > 5)
     {
         myGroup.topicSetTop(tid, false);
         moyu.User.Functions myFunction = new moyu.User.Functions();
         string comment = "该帖已被管理取消置顶";
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(thePost["uid"]), comment, -2, tid);//通知被置顶人
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(theContext.Session["id"]), comment, -2, tid);//通知操作管理
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), 1, comment, -2, tid);//通知大管理
         myGroup.commentNew(Convert.ToInt32(theContext.Session["id"]), tid, comment);
     }
     theContext.Response.Redirect("~/Mobile/robot-group-kewWordsShow.aspx?type=group&tag=-1");
 }
Ejemplo n.º 2
0
 private void delElite()
 {
     int tid = Convert.ToInt32(theContext.Request.Params["tid"]);
     Hashtable thePost = new Hashtable();
     thePost = myGroup.topicGetById(tid);
     if (Convert.ToBoolean(thePost["isElite"]) && Convert.ToInt32(theContext.Session["power"]) > 0)
     {
         myGroup.topicSetElite(tid, false);
         moyu.User.Functions myFunction = new moyu.User.Functions();
         string comment = "该帖已被管理取消精华,您扣除了一个贡献";
         myFunction.userPointChange(Convert.ToInt32(thePost["uid"]), -1, "帖子取消精华扣除贡献", 2);
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(thePost["uid"]), comment, -2, tid);//通知被删帖人
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(theContext.Session["id"]), comment, -2, tid);//通知操作管理
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), 1, comment, -2, tid);//通知大管理
         myGroup.commentNew(Convert.ToInt32(theContext.Session["id"]), tid, comment);
     }
     theContext.Response.Redirect("~/Mobile/robot-group-kewWordsShow.aspx?type=group&tag=-1");
 }
Ejemplo n.º 3
0
 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");
     }
 }
Ejemplo n.º 4
0
 private void del()
 {
     int tid = Convert .ToInt32(theContext.Request.Params["tid"]);
     Hashtable thePost = new Hashtable();
     thePost = myGroup.topicGetById(tid);
     if (Convert.ToInt32(thePost["gid"]) == -1 && Convert.ToInt32(theContext.Session["power"]) > 0)
     {
         string comment="您发表的帖子由于违反了贴吧发帖规范而被删除,为了给大家一个良好的社区环境,要自觉遵守贴吧发帖规范哦~如有疑问,请在本贴回复我。";
         moyu.User.Functions myFunction = new moyu.User.Functions();
         myFunction.userPointChange(Convert.ToInt32(thePost["uid"]), -2, "删帖回收积分", 3);
         myFunction.sendMessage(Convert .ToInt32(theContext.Session["id"]), Convert .ToInt32(thePost["uid"]), comment, -2, tid);//通知被删帖人
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(theContext.Session["id"]), comment, -2, tid);//通知操作管理
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), 1, comment, -2, tid);//通知大管理
         myGroup.commentNew(Convert.ToInt32(theContext.Session["id"]), tid,comment );
         myGroup.updatePost(tid, thePost["body"].ToString(), thePost["title"].ToString(), thePost["tag"].ToString(), -10);
     }
     theContext.Response.Redirect("~/Mobile/robot-group-kewWordsShow.aspx?type=group&tag=-1");
 }
Ejemplo n.º 5
0
 private void back()
 {
     int tid = Convert.ToInt32(theContext.Request.Params["tid"]);
     Hashtable thePost = new Hashtable();
     thePost = myGroup.topicGetById(tid);
     if (Convert.ToInt32(thePost["gid"]) == -10 && Convert.ToInt32(theContext.Session["power"]) > 0)
     {
         string comment = "您的帖子已于"+DateTime.Now.ToString()+"恢复。";
         moyu.User.Functions myFunction = new moyu.User.Functions();
         myFunction.userPointChange(Convert.ToInt32(thePost["uid"]), 2, "删帖恢复积分", 3);
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(thePost["uid"]), comment, -2, tid);//通知被删帖人
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), Convert.ToInt32(theContext.Session["id"]), comment, -2, tid);//通知操作管理
         myFunction.sendMessage(Convert.ToInt32(theContext.Session["id"]), 1, comment, -2, tid);//通知大管理
         myGroup.commentNew(Convert.ToInt32(theContext.Session["id"]), tid, comment);
         myGroup.updatePost(tid, thePost["body"].ToString(), thePost["title"].ToString(), thePost["tag"].ToString(), -1);
     }
     theContext.Response.Redirect("~/Mobile/robot-group-kewWordsShow.aspx?type=group&tag=-1");
 }