Ejemplo n.º 1
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.º 2
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");
 }
Ejemplo n.º 3
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.º 4
0
 private void changeName()
 {
     string newName = theContext.Request.Form["newName"].ToString().Trim();
     int rst = 0;//服务器内部错误
     if (newName.Length > 1)
     {
         if (myUser.isNameUsed(newName))
         {
             rst = -1;//用户名已经使用
         }
         else
         {
             int uid=Convert.ToInt32(theContext.Session["id"]);
             moyu.User.Functions myUserFun = new moyu.User.Functions();
             if (myUserFun.changeUserName(uid, newName))
             {
                 myUserFun.userPointChange(uid, -36, "修改用户名消耗积分", 36);
                 rst = 1;//修改成功
                 theContext.Session["niceName"] = newName;
             }
         }
     }
     else
     {
         rst = -2;//用户名长度不合法
     }
     theContext.Response.Write(rst);
 }