コード例 #1
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck("", context.Session, context.Response);

            ParamMaxBetLimit param = new ParamMaxBetLimit();

            param.m_gameId = Convert.ToInt32(context.Request.Form["gameId"]);
            if (param.m_gameId == (int)GameId.fishpark)
            {
                param.m_rateList = context.Request.Form["newValue"];
            }
            else
            {
                param.m_newValue = Convert.ToInt32(context.Request.Form["newValue"]);
            }
            param.m_areaId = Convert.ToInt32(context.Request.Form["areaId"]);
            param.m_op     = Convert.ToInt32(context.Request.Form["op"]);

            GMUser user = (GMUser)context.Session["user"];
            OpRes  res  = user.doDyop(param, DyOpType.opTypeModifyMaxBetLimit);
            string ret  = "";

            if (param.isModify())
            {
                ret  = ((int)res).ToString();
                ret += "@" + OpResMgr.getInstance().getResultString(res);
                ret += "@" + param.m_gameId.ToString();
                ret += "@" + param.m_areaId.ToString();
                if (param.m_gameId == (int)GameId.fishpark)
                {
                    ret += "@" + param.m_rateList;
                }
                else
                {
                    ret += "@" + param.m_newValue.ToString();
                }
            }
            else if (param.isQuery())
            {
                Dictionary <string, object> qresult =
                    (Dictionary <string, object>)user.getSys <DyOpMgr>(SysType.sysTypeDyOp).getDyOp(DyOpType.opTypeModifyMaxBetLimit).getResult();
                ret = BaseJsonSerializer.genJsonStr(qresult);
            }
            else
            {
                ret = OpResMgr.getInstance().getResultString(res);
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(ret);
        }
コード例 #2
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RIGHT.SCORE, context.Session, context.Response);

            GMUser     user  = (GMUser)context.Session["user"];
            ParamScore param = new ParamScore();

            param.m_op    = Convert.ToInt32(context.Request.Form["op"]);
            param.m_toAcc = context.Request.Form["acc"];
            param.m_score = context.Request.Form["param"];
            int targetType = Convert.ToInt32(context.Request.Form["targetType"]);

            if (targetType == AccType.ACC_PLAYER)
            {
                param.scoreToPlayer();
            }
            else
            {
                param.scoreToMgr();
            }

            OpRes  res = user.doDyop(param, DyOpType.opTypeDyOpScore);
            string str = OpResMgr.getInstance().getResultString(res);

            long remainScoreFixBug = -1;

            if (targetType == AccType.ACC_SUPER_ADMIN || targetType == AccType.ACC_SUPER_ADMIN_SUB)
            {
                remainScoreFixBug = 0;
            }
            else
            {
                remainScoreFixBug = ItemHelp.getRemainMoney(param.m_toAcc, targetType == AccType.ACC_PLAYER, user);
            }

            Dictionary <string, object> ret = new Dictionary <string, object>();

            ret.Add("result", (int)res);
            ret.Add("resultInfo", str);

            string rs = (user.m_accType == AccType.ACC_SUPER_ADMIN ||
                         user.m_accType == AccType.ACC_SUPER_ADMIN_SUB) ? "0" : ItemHelp.toStrByComma(ItemHelp.showMoneyValue(user.m_money));

            ret.Add("remainScoreStr", rs);
            ret.Add("remainScore", ItemHelp.showMoneyValue(user.m_money));
            ret.Add("remainScoreFixBug", ItemHelp.showMoneyValue(remainScoreFixBug));
            str = BaseJsonSerializer.genJsonStr(ret);
            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }
コード例 #3
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck("", context.Session, context.Response);

            ParamAPISetLimit param = new ParamAPISetLimit();

            param.m_gameId   = Convert.ToInt32(context.Request.Form["gameId"]);
            param.m_apiAcc   = Convert.ToString(context.Request.Form["acc"]);
            param.m_setLimit = Convert.ToInt32(context.Request.Form["value"]);
            param.m_roomId   = Convert.ToInt32(context.Request.Form["roomId"]);
            param.m_op       = Convert.ToInt32(context.Request.Form["op"]);

            GMUser user = (GMUser)context.Session["user"];
            OpRes  res  = user.doDyop(param, DyOpType.opTypeModifyAPISetLimit);
            string ret  = OpResMgr.getInstance().getResultString(res);

            switch (param.m_op)
            {
            case 0:
            {
                Dictionary <string, object> data = new Dictionary <string, object>();
                data.Add("gameId", param.m_gameId);
                data.Add("roomId", param.m_roomId);
                data.Add("value", param.m_setLimit);
                data.Add("result", (int)res);
                data.Add("resStr", OpResMgr.getInstance().getResultString(res));

                ret = BaseJsonSerializer.genJsonStr(data);
            }
            break;

            case 1:
            {
                List <Dictionary <string, object> > dataList =
                    (List <Dictionary <string, object> >)user.getSys <DyOpMgr>(SysType.sysTypeDyOp).getResult(DyOpType.opTypeModifyAPISetLimit);

                Dictionary <string, object> data = new Dictionary <string, object>();
                data.Add("limitList", dataList);
                data.Add("base", DefCC.MONEY_BASE);
                ret = BaseJsonSerializer.genJsonStr(data);
            }
            break;
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(ret);
        }
コード例 #4
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck(RIGHT.APPROVE_API, context.Session, context.Response);

            string op  = context.Request.Form["op"];
            string acc = context.Request.Form["acc"];

            Dictionary <string, object> ret = new Dictionary <string, object>();

            GMUser          user  = (GMUser)context.Session["user"];
            ParamApiApprove param = new ParamApiApprove();

            param.m_apiAcc = acc;
            param.m_isPass = (op == "pass");
            OpRes res = user.doDyop(param, DyOpType.opTypeDyOpApiApprove);

            ret.Add("result", (int)res);
            ret.Add("op", op);
            ret.Add("acc", acc);

            if (res == OpRes.opres_success && param.m_isPass)
            {
                string str = "审批成功," +
                             OpResMgr.getInstance().getResultString(OpRes.op_res_account_info, param.m_resultAcc, param.m_validatedCode);

                ret.Add("resultMsg", str);
            }
            else
            {
                ret.Add("resultMsg", OpResMgr.getInstance().getResultString(res));
            }

            string retStr = BaseJsonSerializer.genJsonStr(ret);

            context.Response.ContentType = "text/plain";
            context.Response.Write(retStr);
        }
コード例 #5
0
        public void ProcessRequest(HttpContext context)
        {
            RightMgr.getInstance().opCheck("", context.Session, context.Response);

            GMUser       user = (GMUser)context.Session["user"];
            DyOpPlayerOp dyop =
                (DyOpPlayerOp)user.getSys <DyOpMgr>(SysType.sysTypeDyOp).getDyOp(DyOpType.opTypePlayerOp);

            Dictionary <string, object> ret = new Dictionary <string, object>();

            string op  = context.Request.Form["op"];
            string acc = context.Request.Form["acc"];

            switch (op)
            {
            case "modifyName":     // 修改别名
            {
                string newName = context.Request.Form["param"];
                OpRes  res     = dyop.modifyPlayerAliasName(acc, newName, user);
                ret.Add("resultMsg", OpResMgr.getInstance().getResultString(res));
            }
            break;

            case "resetPwd":     // 重置密码
            {
                string newPwd = context.Request.Form["param"];
                OpRes  res    = dyop.resetPlayerPwd(acc, newPwd, user);
                ret.Add("resultMsg", OpResMgr.getInstance().getResultString(res));
            }
            break;

            case "blockAcc":     // 停封解封账号
            {
                bool  isBlock = Convert.ToBoolean(context.Request.Form["param"]);
                OpRes res     = dyop.blockPlayerAcc(acc, isBlock, user);
                ret.Add("resultMsg", OpResMgr.getInstance().getResultString(res));
            }
            break;

            case "kick":     // 踢玩家
            {
                OpRes  res    = dyop.kickPlayerAcc(acc, user);
                string tmpStr = OpResMgr.getInstance().getResultString(res);
                if (res == OpRes.opres_success)
                {
                    tmpStr += ",该玩家10分钟以内不能重新登录";
                }
                ret.Add("resultMsg", tmpStr);
            }
            break;

            case "unlock":     // 解锁玩家
            {
                OpRes  res    = dyop.unlockPlayer(acc, user);
                string tmpStr = OpResMgr.getInstance().getResultString(res);
                ret.Add("resultMsg", tmpStr);
            }
            break;

            case "clearFail":     // 清理登录失败次数
            {
                OpRes  res    = dyop.clearPlayerFailCount(acc, user);
                string tmpStr = OpResMgr.getInstance().getResultString(res);
                ret.Add("resultMsg", tmpStr);
            }
            break;

            case "affectRate":     // 影响盈利率
            {
                bool   isAffect = Convert.ToBoolean(context.Request.Form["param"]);
                OpRes  res      = dyop.playerAffectEarnRate(acc, isAffect, user);
                string tmpStr   = "";
                if (res == OpRes.op_res_player_in_game)
                {
                    tmpStr = "需要先下线,再点击才会生效";
                }
                else
                {
                    tmpStr = OpResMgr.getInstance().getResultString(res);
                }
                ret.Add("resultMsg", tmpStr);
            }
            break;
            }

            string str = BaseJsonSerializer.genJsonStr(ret);

            context.Response.ContentType = "text/plain";
            context.Response.Write(str);
        }