예제 #1
0
    private void EditSavePage()
    {
        int id   = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误"));
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_NetWork, meid);//会员本身权限
        string mename = new BCW.BLL.User().GetUsName(meid);

        string Title = Utils.GetRequest("Title", "post", 2, @"^[^\^]{" + ub.GetSub("NetworksLength", xmlPath) + "," + ub.GetSub("NetworkbLength", xmlPath) + "}$", "内容限" + ub.GetSub("NetworksLength", xmlPath) + "-" + ub.GetSub("NetworkbLength", xmlPath) + "字");
        int    Types = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[0-9]\d*$", "允许其它用户延时选择出错"));

        BCW.Model.Network model = new BCW.Model.Network();
        model.ID     = id;
        model.Title  = Title;
        model.Types  = Types;
        model.UsID   = meid;
        model.UsName = mename;
        new BCW.BLL.Network().UpdateBasic(model);

        Utils.Success("修改广播", "修改广播成功,正在返回..", Utils.getPage("network.aspx"), "1");
    }
예제 #2
0
    private void getphone()
    {
        string info  = Utils.GetRequest("info", "all", 1, "", "");
        string phone = string.Empty;
        int    meid  = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("/bbs/pwd/MyPhone.aspx?act=reset") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", "<br/>"));
        phone = new BCW.BLL.User().GetMobile(meid);
        //builder.Append(Out.Tab("<div class=\"text\">", ""));
        //builder.Append("你的手机号码是" + phone+"<br />");
        //builder.Append(Out.Tab("</div>", "<br/>"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("查询手机号码时需要先回答你的问题答案" + "<br />");
        builder.Append("密保问题:" + new BCW.BLL.tb_Question().GetQuestion(meid));
        builder.Append(Out.Tab("</div>", ""));
        strText = "你的问题答案是:/,输入验证码:/,,,";
        strName = "Myanswer,code,info,hid,act";
        strType = "text,text,hidden,hidden,hidden";
        strValu = "''ok'" + 1 + "'phone";
        strEmpt = "false,false,false,false,false";
        strIdea = "'<img src=\"Code.aspx\"/>'''|/";
        strOthe = "确定提交|刷新验证码,MyPhone.aspx,post,0,red|blue";
        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div class=\"title\">", "<br/>"));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("/bbs/pwd/MyPhone.aspx?act=reset") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", "<br/>"));
    }
예제 #3
0
    /// <summary>
    /// 填写推荐人ID
    /// </summary>
    private void recommended()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info == "")
        {
            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>");
            //   builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
            //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
            builder.Append(Out.Tab("</div>", ""));

            string strText = "*请填写推荐人ID:/,,,";
            string strName = "recomID,info,act,backurl";
            string strType = "text,hidden,hidden,hidden";
            string strValu = "'ok'recommended'" + Utils.getPage(0) + "";
            string strEmpt = "false,false,false,false";
            string strIdea = "/";
            string strOthe = "确认,reg.aspx,post,0,red";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>");
            //   builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
            //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            int InviteNum = new BCW.BLL.User().GetInviteNum(meid); //得到推荐自己的ID
            if (InviteNum == 0)
            {
                //处理推荐人ID
                string recomID = Utils.GetRequest("recomID", "all", 3, @"^[0-9]\d+$", "");
                // Utils.Error("recomID:" + recomID, "");
                int rd = int.Parse(recomID);
                if (rd > 0)
                {
                    if (!new BCW.BLL.User().Exists(rd))
                    {
                        Utils.Error("很抱歉,推荐ID不存在", "");
                    }
                }
                new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_RecomUser, rd);
                //   Utils.Error("meid+"+ meid, "");
                new BCW.BLL.User().UpdateInviteNum(meid, rd);
                Utils.Success("填写推荐人ID成功", "填写推荐人ID成功", Utils.getUrl("default.aspx"), "3");
            }
            else
            {
                Utils.Error("你已经填写过推荐人ID啦!", "");
            }
        }
    }
예제 #4
0
    private void AddSavePage()
    {
        string info = Utils.GetRequest("info", "post", 1, "", "");

        string Title = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{1,400}$", "内容限400字内");
        int    Times = int.Parse(Utils.GetRequest("Times", "post", 2, @"^[0-9]\d*$", "显示时长填写错误"));
        int    uid   = int.Parse(Utils.GetRequest("uid", "post", 2, @"^[0-9]\d*$", "会员ID填写错误"));
        int    IsUbb = int.Parse(Utils.GetRequest("IsUbb", "post", 2, @"^[0-1]$", "是否支持UBB选择错误"));

        string mename = new BCW.BLL.User().GetUsName(uid);

        if (!new BCW.BLL.User().Exists(uid))
        {
            Utils.Error("不存在的会员ID", "");
        }
        if (info != "ok")
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定发布");
            builder.Append(Out.Tab("</div>", "<br />"));

            builder.Append(Out.Tab("<div>", ""));
            builder.Append("发布会员:" + mename + "(" + uid + ")");
            builder.Append("<br />内容:" + Title + "");
            builder.Append("<br />时长:" + Times + "分钟");
            if (IsUbb == 1)
            {
                builder.Append("<br />UBB语法:支持");
            }
            else
            {
                builder.Append("<br />BB语法:不支持");
            }

            builder.Append(Out.Tab("</div>", "<br />"));

            string strName = "Title,Times,uid,IsUbb,info,act";
            string strValu = "" + Title + "'" + Times + "'" + uid + "'" + IsUbb + "'ok'addsave";
            string strOthe = "确定发布,network.aspx,post,0,red";
            builder.Append(Out.wapform(strName, strValu, strOthe));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(" <a href=\"" + Utils.getUrl("network.aspx") + "\">取消</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            BCW.Model.Network model = new BCW.Model.Network();
            model.Title    = Title;
            model.Types    = 0;
            model.UsID     = uid;
            model.UsName   = mename;
            model.OverTime = DateTime.Now.AddMinutes(Times);
            model.AddTime  = DateTime.Now;
            model.OnIDs    = "";
            model.IsUbb    = IsUbb;
            new BCW.BLL.Network().Add(model);
            Utils.Success("发布广播", "发布成功,正在返回..", Utils.getUrl("network.aspx"), "1");
        }
    }
예제 #5
0
    private void ReloadPage(int uid)
    {
        string VisitHy = new BCW.BLL.User().GetVisitHy(uid);

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("我的历史足迹..");
        builder.Append(Out.Tab("</div>", ""));
        if (!string.IsNullOrEmpty(VisitHy))
        {
            string[] sName = Regex.Split(VisitHy, "##");

            int      pageIndex;
            int      recordCount;
            int      pageSize   = Convert.ToInt32(ub.Get("SiteListNo"));
            string[] pageValUrl = { };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }

            //总记录数
            recordCount = sName.Length;

            int stratIndex = (pageIndex - 1) * pageSize;
            int endIndex   = pageIndex * pageSize;
            int k          = 0;
            for (int i = 0; i < sName.Length; i++)
            {
                if (k >= stratIndex && k < endIndex)
                {
                    if ((k + 1) % 2 == 0)
                    {
                        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", "<br />"));
                    }

                    builder.Append("" + (i + 1) + "." + Out.SysUBB(sName[i].ToString()) + "");
                    builder.Append(Out.Tab("</div>", ""));
                }
                if (k == endIndex)
                {
                    break;
                }
                k++;
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
예제 #6
0
    private void ReEmailOkPage()
    {
        string mobile = Utils.GetRequest("mobile", "post", 2, @"^(?:13|14|15|18)\d{9}$", "请正确输入十一位数的手机号码");
        string Email  = Utils.GetRequest("Email", "post", 2, @"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", "请输入正确的邮箱地址");

        if (!new BCW.BLL.User().Exists(mobile, Email))
        {
            Utils.Error("重发验证失败,请检查手机号和邮箱是否填写正确", "");
        }
        BCW.Model.User model = new BCW.BLL.User().GetPwdBasic(mobile);
        //设置keys
        string keys = "";

        keys = BCW.User.Users.SetUserKeys(model.ID, model.UsPwd, model.UsKey);
        string VE      = ConfigHelper.GetConfigString("VE");
        string SID     = ConfigHelper.GetConfigString("SID");
        string strUrl  = "http://" + Utils.GetDomain() + "/bbs/myedit.aspx?act=regyz&postId=" + DESEncrypt.Encrypt(model.UsKey, "ct201200108") + "&" + VE + "=2a&" + SID + "=" + keys;
        string strUrl2 = "http://" + Utils.GetDomain() + "/bbs/myedit.aspx?act=checkpwd&postId=" + DESEncrypt.Encrypt(model.UsKey, "ct201200108") + "&" + VE + "=2a&" + SID + "=" + keys;

        //设定参数
        string EmailFrom     = "*****@*****.**";
        string EmailFromUser = "******";
        string EmailFromPwd  = "bichengwei";
        string EmailFromHost = "smtp.gmail.com";
        string EmailFromPort = "587";

        if (ub.GetSub("EmailFrom", xmlPath) != "" && ub.GetSub("EmailFromUser", xmlPath) != "" && ub.GetSub("EmailFromPwd", xmlPath) != "" && ub.GetSub("EmailFromHost", xmlPath) != "" && ub.GetSub("EmailFromPort", xmlPath) != "")
        {
            EmailFrom     = ub.GetSub("EmailFrom", xmlPath);
            EmailFromUser = ub.GetSub("EmailFromUser", xmlPath);
            EmailFromPwd  = ub.GetSub("EmailFromPwd", xmlPath);
            EmailFromHost = ub.GetSub("EmailFromHost", xmlPath);
            EmailFromPort = ub.GetSub("EmailFromPort", xmlPath);
        }
        // 发件人地址
        string From = EmailFrom;
        // 收件人地址
        string To = Email;
        // 邮件主题
        string Subject = "来自" + ub.Get("SiteName").ToString() + "-注册系统";
        // 邮件正文
        string Body = "尊敬的" + model.UsName + "您好:<br>你的手机号:" + mobile + "<br>会员ID号:" + model.ID + "<br>点击以下链接马上完成本次注册:<br><a href=\"" + strUrl + "\">" + strUrl + "</a><br>如忘记密码请验证后点击以下链接找回:<br><a href=\"" + strUrl2 + "\">" + strUrl2 + "</a><br>如果无法点击链接,请复制进地址栏再进入即可<br>此信件属系统自动发送,请勿回复";
        // 邮件主机地址
        string Host = EmailFromHost;
        // 邮件主机端口
        int Port = Utils.ParseInt(EmailFromPort);
        // 登录帐号
        string UserName = EmailFromUser;
        // 登录密码
        string Password = EmailFromPwd;
        //附件地址
        string FilePath = "";

        new SendMail().Send(From, To, Subject, Body, Host, Port, UserName, Password, FilePath);

        Utils.Success("重发验证邮件", "重发验证邮件成功,请登录您的邮箱进行相关操作", "login.aspx", "3");
    }
예제 #7
0
    private void SavePage()   //第一次设置密码保护问题保存到数据库的
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        string Mypmobile = new BCW.BLL.User().GetMobile(meid);

        string mobile   = Utils.GetRequest("Mymobile", "post", 2, @"^[\d]+$", "请输入正确的手机号码");
        string Myanswer = Utils.GetRequest("Myanswer", "post", 2, @"^[\s\S]+$", "请输入问题答案");

        if (Mypmobile.Equals(mobile))
        {
            Master.Title = "密保管理问题成功";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("密码保护设置" + "<br />");
            builder.Append(Out.Tab("</div>", ""));

            string Myquestion = Utils.GetRequest("Myquestion", "post", 2, @"^[\s\S]{1,50}$", "请输入问题");
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("  恭喜!你的密码保护设置成功" + "<br/>");
            builder.Append("你的问题是:" + Myquestion + "<br />");
            //}

            //  string Myanswer = Utils.GetRequest("Myanswer", "post", 2, @"^[\s\S]{1,20}$", "问题答案限1-20字");
            builder.Append("你的答案是:" + Myanswer + "<br />");
            builder.Append(Out.Tab("</div>", ""));
            BCW.Model.tb_Question model = new BCW.Model.tb_Question();


            model.Mobile      = Mypmobile;
            model.Question    = Myquestion;
            model.Answer      = Myanswer;
            model.state       = 1;
            model.ID          = meid;
            model.lastchange  = 0;
            model.changecount = 0;
            model.code        = string.Empty;
            new BCW.BLL.tb_Question().Add(model);   //添加一条数据进入数据库
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("5秒后自动跳转到主页<br />");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("请您牢记答案.当您忘记密码或ID被盗,可使用本答案取回密码!" + "<br />");
            builder.Append(Out.Tab("</div>", ""));
            Master.Refresh = 5;                                //5秒后跳转到以下地址(可缺省)
            Master.Gourl   = Utils.getUrl("SetQuestion.aspx"); //跳到的地址(可缺省)
            builder.Append("<a href=\"" + Utils.getUrl("SetQuestion.aspx") + "\">如果还没有跳转,请点击该链接返回主页</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            Utils.Success("温馨提示", "抱歉,验证手机号码失败,请重新输入..", Utils.getUrl("SetQuestion.aspx"), "3");
        }
    }
예제 #8
0
    public string getPhoto(int usId)
    {
        string _imgPath = new BCW.BLL.User().GetPhoto(usId);

        if (_imgPath == "")
        {
            _imgPath = "/images/weixi.png";
        }
        return("http://" + Utils.GetDomain() + _imgPath);
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //得到在线的小号集合
        DataSet ds = new BCW.BLL.User().GetList("ID", "IsSpier=1 and EndTime>='" + DateTime.Now.AddMinutes(-Convert.ToInt32(ub.Get("SiteExTime"))) + "' ");

        try
        {
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                int      max      = ds.Tables[0].Rows.Count;
                string[] maxArray = new string[max];
                for (int i = 0; i < max; i++)
                {
                    maxArray[i] = ds.Tables[0].Rows[i]["ID"].ToString();
                }

                //新手22/交易2/足篮3/游戏15/音乐11/图吧8/笑话7/财经12/彩票28/杂谈6/灌水101/电脑30/心灵栖息10/幽兰雅轩9
                //奋斗人生21/蓝雨之恋19/天山情缘102/小说专区103


                string[] ForumStrID = { "22", "2", "3", "15", "11", "8", "7", "12", "28", "6", "101", "30", "10", "9", "21", "19", "102", "103", "4", "23" };

                string[] ForumCount = { "60", "140", "140", "60", "40", "100", "100", "50", "16", "120", "176", "10", "60", "30", "16", "16", "16", "16", "32", "30" };

                for (int k = 0; k < ForumStrID.Length; k++)
                {
                    int forumid = Utils.ParseInt(ForumStrID[k]);
                    //执行前先去掉之前的小号在线
                    BCW.Data.SqlHelper.ExecuteSql("update tb_user set EndForumID=0 where EndForumID=" + forumid + " and IsSpier=1");

                    int count = Utils.ParseInt(ForumCount[k]) * 2;
                    if (count > max)
                    {
                        count = max;
                    }
                    int hour = DateTime.Now.Hour;
                    if (hour > 2 && hour < 7)
                    {
                        count = Utils.ParseInt((count / 2).ToString());
                    }
                    string[] arrayStr = Utils.GetRandom(maxArray, count);
                    for (int i = 0; i < arrayStr.Length; i++)
                    {
                        int uid = Utils.ParseInt(arrayStr[i]);
                        BCW.Data.SqlHelper.ExecuteSql("update tb_user set EndForumID=" + forumid + " where id=" + uid + "");
                    }
                }
            }
        }
        catch { }

        Response.Write("ok!");
    }
예제 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "认证手机号列表";
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1)
        {
            Utils.Error("权限不足", "");
        }
        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-3]$", "0"));

        if (ptype > 0)
        {
            DataSet ds = new BCW.BLL.User().GetList("mobile", "IsVerify=1 and mobile<>'15107583999' and mobile<>'15107583888' and mobile<>'15107582999' order by regtime desc");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    string Mobile = ds.Tables[0].Rows[i]["mobile"].ToString();

                    if (ptype == 1)
                    {
                        builder.Append(Mobile + "<br />");
                    }
                    else if (ptype == 2)
                    {
                        builder.Append(Mobile + "#");
                    }
                    else if (ptype == 3)
                    {
                        builder.Append(Mobile + ",");
                    }
                }
            }
        }
        else
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("使用IE浏览器查看才可以浏览完全");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("rzmobile.aspx?ptype=1") + "\">换行查看</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("rzmobile.aspx?ptype=2") + "\">#分开查看</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("rzmobile.aspx?ptype=3") + "\">,分开查看</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">系统服务中心</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #11
0
    private void AddPage(int meid, int hid)
    {
        string UsName = new BCW.BLL.User().GetUsName(hid);

        if (UsName == "")
        {
            Utils.Error("不存在的会员ID", "");
        }
        Master.Title = "" + UsName + "的留言本";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("我要留言");
        builder.Append(Out.Tab("</div>", ""));

        int copy = int.Parse(Utils.GetRequest("copy", "get", 1, @"^[0-1]$", "0"));
        int ff   = int.Parse(Utils.GetRequest("ff", "get", 1, @"^[0-9]\d*$", "-1"));
        int dd   = int.Parse(Utils.GetRequest("dd", "get", 1, @"^[0-9]\d*$", "0"));
        //复制内容
        string Copytemp = string.Empty;

        if (ff >= 0)
        {
            Copytemp += "[F]" + ff + "[/F]";
        }

        if (dd > 0)
        {
            Copytemp += new BCW.BLL.Submit().GetContent(dd, meid);
        }

        if (copy == 1)
        {
            Copytemp += new BCW.BLL.User().GetCopytemp(meid);
        }

        strText = ",,,";
        strName = "Content,hid,act";
        strType = "text,hidden,hidden";
        strValu = "" + Copytemp + "'" + hid + "'save";
        strEmpt = "true,false,false";
        strIdea = "/";
        strOthe = "提交留言,mebook.aspx,post,1,red";
        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div>", "<br />"));
        builder.Append("插入:<a href=\"" + Utils.getUrl("function.aspx?act=admsub&amp;backurl=" + Utils.PostPage(1) + "") + "\">常用短语</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("function.aspx?act=face&amp;backurl=" + Utils.PostPage(1) + "") + "\">表情</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("mebook.aspx?act=add&amp;hid=" + hid + "&amp;ff=" + ff + "&amp;dd=" + dd + "&amp;copy=1") + "\">[粘贴]</a>");
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("mebook.aspx?hid=" + hid + "") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
예제 #12
0
    private void delPage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1 && ManageId != 26 && ManageId != 9)
        {
            Utils.Error("只有系统管理员1号、9号、26号才可以进行此操作", "");
        }
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info == "")
        {
            int ID = int.Parse(Utils.GetRequest("ID", "all", 2, @"^[1-9]\d*$", "ID错误"));
            if (new BCW.BLL.User().Exists(ID))
            {
                DataSet ds = new BCW.BLL.User().GetList("IsSpier", "ID=" + ID + "");
                if (int.Parse(ds.Tables[0].Rows[0]["IsSpier"].ToString()) == 0)
                {
                    Utils.Error("该ID已不是系统号,不用重复操作.", "");
                }
                else
                {
                    Master.Title = "删除该ID为系统号吗";
                    builder.Append(Out.Tab("<div class=\"title\">", ""));
                    builder.Append("删除该ID为系统号吗");
                    builder.Append(Out.Tab("</div>", "<br />"));
                    builder.Append(Out.Tab("<div>", ""));
                    builder.Append("<a href=\"" + Utils.getUrl("robotset.aspx?info=ok&amp;act=del&amp;id=" + ID + "") + "\">确定删除</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("robotset.aspx?act=select&amp;id=" + ID + "") + "\">先留着吧..</a>");
                    builder.Append(Out.Tab("</div>", "<br />"));
                }
            }
            else
            {
                Utils.Error("不存在的会员.操作失败.", "");
            }
        }
        else
        {
            int ID = int.Parse(Utils.GetRequest("ID", "get", 2, @"^[1-9]\d*$", "ID错误"));
            new BCW.BLL.User().update_ziduan("IsSpier=0", "ID=" + ID + "");
            BCW.Model.xitonghao aa = new BCW.Model.xitonghao();
            aa.UsID    = ManageId;
            aa.caoID   = ID;
            aa.AddTime = DateTime.Now;
            aa.IP      = Utils.GetUsIP();
            aa.type    = 1;
            new BCW.BLL.xitonghao().Add(aa);
            Utils.Success("删除", "删除系统号成功..", Utils.getPage("robotset.aspx?act=select&amp;ID=" + ID + ""), "1");
        }
    }
예제 #13
0
    private void PayPage()
    {
        if (IsOpen() == false)
        {
            Utils.Error("游戏开放时间:" + ub.GetSub("BallOnTime", xmlPath) + "", "");
        }

        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        Master.Title = "我要下注";
        BCW.Model.Game.Balllist ball = new BCW.BLL.Game.Balllist().GetBalllist();
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("疯狂彩球 第" + ball.ID + "期");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        if (ball.EndTime < DateTime.Now)
        {
            builder.Append("系统正在开奖。。。");
        }
        else
        {
            builder.Append("距离开奖还有" + DT.DateDiff(DateTime.Now, ball.EndTime) + "");
        }

        long gold = new BCW.BLL.User().GetGold(meid);

        builder.Append("<br />您目前自带" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "");
        builder.Append(Out.Tab("</div>", ""));
        strText = "下注数字(1-" + ub.GetSub("BallSysNum", xmlPath) + "):/,押多少份:/,";
        strName = "BuyNum,BuyCount,act";
        strType = "num,num,hidden";
        strValu = "''payok";
        strEmpt = "false,false,false";
        strIdea = "/每份" + ball.iCent + "" + ub.Get("SiteBz") + ",每人限购" + ub.GetSub("BallOutIDNum", xmlPath) + "份/";
        strOthe = "确定下注,ball.aspx,post,1,red";
        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx") + "\">返回疯狂彩球</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx") + "\">彩球</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
예제 #14
0
    private void ChangePage(int uid)
    {
        string info    = Utils.GetRequest("info", "get", 1, "", "");
        string ichange = "0";

        if (info == "on")
        {
            ichange = "1";
        }
        string ForumSet    = new BCW.BLL.User().GetForumSet(uid);
        string GetForumSet = BCW.User.Users.GetForumSetData(ForumSet, ichange, 8);

        new BCW.BLL.User().UpdateForumSet(uid, GetForumSet);
        Utils.Success("更新设置", "更新设置成功,正在返回..", Utils.getPage(1), "1");
    }
예제 #15
0
    private void CleanByID()
    {
        string uid  = Utils.GetRequest("uid", "all", 2, @"^[\d]{1,11}$", "请输入正确ID或手机号码");
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (uid.Length != 11)
        {
            uid = new BCW.BLL.User().GetMobile(Convert.ToInt32(uid)); //转换手机号码
        }
        int id = new BCW.BLL.User().GetID(uid);                       //得到ID号

        if (new BCW.BLL.User().Exists(id))
        {
            if (info == "")
            {
                if (new BCW.BLL.tb_Question().Exists(uid))
                {
                    builder.Append(Out.Tab("<div class=\"title\">", ""));
                    builder.Append("确定删除该密保吗?");
                    builder.Append(Out.Tab("</div>", "<br />"));
                    builder.Append(Out.Tab("<div>", ""));
                    builder.Append("<a href=\"" + Utils.getUrl("BackMoreQuestion.aspx?act=cleanbyid&amp;info=ok&amp;uid=" + uid + "") + "\">确定删除</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx") + "\">先留着吧..</a>");  //需要修改链接
                    builder.Append(Out.Tab("</div>", "<br />"));
                }
                else
                {
                    Utils.Success("温馨提示", "该用户没有设置密码保护问题!", Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + id + ""), "3");
                }
            }
            else
            {
                //string str = uid.Substring(5, 6);
                //new BCW.BLL.tb_Question().UpdateAnswer(str, uid);
                //builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                //Utils.Success("温馨提示", "重置密码保护问题答案成功!ID是" + id + "..手机号是:" + uid + "..新问题密码是:" + str, Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + id + ""), "3");
                //builder.Append(Out.Tab("</div>", "<br />"));
                new BCW.BLL.tb_Question().Delete(uid);
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                Utils.Success("温馨提示", "成功清除该ID:" + id + "..手机号是:" + uid + "的密保数据,用户可以自行重新设置密码保护问题!", Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + id + ""), "3");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
        }
        else
        {
            Utils.Success("温馨提示", "不存在该账号", Utils.getUrl("uinfo.aspx"), "3");
        }
    }
예제 #16
0
    private void OkPage()
    {
        //会员发表权限
        int meid = new BCW.User.Users().GetUsId();

        if (ub.GetSub("VBookIsUser", xmlPath) == "1")
        {
            if (meid == 0)
            {
                Utils.Login();
            }
        }
        string mename = string.Empty;

        if (meid == 0)
        {
            mename = Utils.GetRequest("UsName", "post", 2, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,7}$", "请输入不超过7个字的昵称,不能有特殊符号");
        }
        else
        {
            mename = new BCW.BLL.User().GetUsName(meid);
        }
        string Title   = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{1,30}$", "请输入1-30字的标题");
        string Content = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{0,500}$", "请输入不超过500字的内容");
        string SyText  = Utils.GetRequest("SyText", "post", 3, @"^[\s\S]{0,200}$", "请输入不超过200字的保密内容,可以留空");
        string VPwd    = Utils.GetRequest("VPwd", "post", 3, @"^[A-Za-z0-9]{6,20}$", "查看密码由6-20位数字或字母组成,可以留空");

        //是否刷屏
        string appName = "LIGHT_VBOOK";
        int    Expir   = Convert.ToInt32(ub.GetSub("VBookExpir", xmlPath));

        BCW.User.Users.IsFresh(appName, Expir);

        BCW.Model.Vbook model = new BCW.Model.Vbook();
        model.Types   = 0;
        model.Title   = Title;
        model.Content = Content;
        model.SyText  = SyText;
        model.Face    = 0;
        model.UsID    = meid;
        model.UsName  = mename;
        model.AddUsIP = Utils.GetUsIP();
        model.AddTime = DateTime.Now;
        model.VPwd    = VPwd;
        new BCW.BLL.Vbook().Add(model);
        Utils.Success("发表留言", "发表留言成功,正在返回..", Utils.getUrl("vbook.aspx?backurl=" + Utils.getPage(0) + ""), "2");
    }
예제 #17
0
    private void AddSavePage(int meid, int hid)
    {
        BCW.User.Users.ShowVerifyRole("k", meid);                                         //非验证会员提示
        new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_UsBook, meid); //会员本身权限
        string Content = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{1,500}$", "留言内容限1-500字");
        //是否刷屏
        string appName = "LIGHT_MEBOOK";
        int    Expir   = Convert.ToInt32(ub.GetSub("BbsMebookExpir", "/Controls/bbs.xml"));

        BCW.User.Users.IsFresh(appName, Expir);

        //你是否是对方的黑名单
        if (new BCW.BLL.Friend().Exists(hid, meid, 1))
        {
            Utils.Error("对方已把您加入黑名单", "");
        }
        //限制性
        string ForumSet   = new BCW.BLL.User().GetForumSet(hid);
        int    addBookSet = BCW.User.Users.GetForumSet(ForumSet, 19);

        if (addBookSet == 1 && meid != hid)
        {
            if (!new BCW.BLL.Friend().Exists(hid, meid, 0))
            {
                Utils.Error("您不在对方的好友里,对方已设置拒绝非好友留言", "");
            }
        }
        else if (addBookSet == 2)
        {
            Utils.Error("此留言本已禁止任何人留言", "");
        }

        BCW.Model.Mebook model = new BCW.Model.Mebook();
        model.UsID     = hid;
        model.MID      = meid;
        model.MName    = new BCW.BLL.User().GetUsName(meid);
        model.MContent = Content;
        model.IsTop    = 0;
        model.AddTime  = DateTime.Now;
        new BCW.BLL.Mebook().Add(model);
        //内线通知主人
        if (meid != hid)
        {
            new BCW.BLL.Guest().Add(3, hid, new BCW.BLL.User().GetUsName(hid), "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + new BCW.BLL.User().GetUsName(meid) + "[/url]在您的空间[url=/bbs/mebook.aspx?hid=" + hid + "]留言啦[/url]!");
        }
        Utils.Success("发表留言", "发表留言成功,正在返回..", Utils.getUrl("mebook.aspx?hid=" + hid + ""), "1");
    }
예제 #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int UsId = meid;

        BCW.Model.User model = new BCW.Model.User();
        model = new BCW.BLL.User().GetKey(UsId);

        string UsKey = model.UsKey;
        string UsPwd = model.UsPwd;

        //加密用户密码
        string strPwd = Utils.MD5Str(UsPwd.Trim());
        //设置keys
        string keys = "";

        keys = BCW.User.Users.SetUserKeys(UsId, UsPwd, UsKey);
        string bUrl = string.Empty;

        if (Utils.getPage(1) != "")
        {
            bUrl = Utils.getUrl(Utils.removeUVe(Utils.getPage(1)));
        }
        else
        {
            bUrl = Utils.getUrl("/default.aspx");
        }
        //更新识别串
        string SID = ConfigHelper.GetConfigString("SID");

        bUrl = UrlOper.UpdateParam(bUrl, SID, keys);


        Master.Title = "登录成功";
        builder.Append(Out.Tab("<div class=\"title\">登录成功</div>", ""));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("保存以下书签即可<br />");
        builder.Append("<a href=\"" + Utils.getUrl("" + bUrl + "") + "\">进可保存书签</a>-");

        builder.Append(Out.Tab("</div>", ""));
    }
예제 #19
0
    private void SavePage()
    {
        string UsName = string.Empty;
        int    UsID   = int.Parse(Utils.GetRequest("UsID", "post", 2, @"^[0-9]\d*$", "用户ID填写错误,非会员请填写0"));

        if (UsID > 0)
        {
            UsName = Utils.GetRequest("UsName", "post", 3, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,7}$", "请输入不超过7个字的昵称,不能有特殊符号");
            if (UsName == "")
            {
                UsName = new BCW.BLL.User().GetUsName(UsID);
                if (UsName == "")
                {
                    Utils.Error("用户ID不存在", "");
                }
            }
        }
        else
        {
            UsName = Utils.GetRequest("UsName", "post", 1, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,7}$", "请输入不超过7个字的昵称,不能有特殊符号");
        }
        string   Title   = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{2,20}$", "请输入2-20位的标题");
        string   Content = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{0,500}$", "请输入不超过500字的内容");
        string   SyText  = Utils.GetRequest("SyText", "post", 3, @"^[\s\S]{0,200}$", "请输入不超过200字的保密内容,可以留空");
        string   ReName  = Utils.GetRequest("ReName", "post", 1, @"^[\s\S]{1,20}$", "管理员");
        string   VPwd    = Utils.GetRequest("VPwd", "post", 3, @"^[A-Za-z0-9]{6,20}$", "查看密码由6-20位数字或字母组成,可以留空");
        string   ReText  = Utils.GetRequest("ReText", "post", 3, @"^[\s\S]{0,200}$", "请输入不超过200字的回复内容,可以留空");
        DateTime ReTime  = Utils.ParseTime(Utils.GetRequest("ReTime", "post", 1, DT.RegexTime, DateTime.Now.ToString()));

        BCW.Model.Vbook model = new BCW.Model.Vbook();
        model.Types   = 0;
        model.UsName  = UsName;
        model.UsID    = UsID;
        model.Title   = Title;
        model.Content = Content;
        model.SyText  = SyText;
        model.Face    = 0;
        model.VPwd    = VPwd;
        model.ReName  = ReName;
        model.ReText  = ReText;
        model.ReTime  = ReTime;
        model.AddUsIP = Utils.GetUsIP();
        model.AddTime = DateTime.Now;
        new BCW.BLL.Vbook().Add2(model);
        Utils.Success("添加留言", "添加留言成功,正在返回..", Utils.getPage("vbook.aspx"), "2");
    }
예제 #20
0
    private void RecomAdminSavePage(int uid)
    {
        if (!new BCW.BLL.Role().IsSumMode(uid))
        {
            Utils.Error("你的权限不足", "");
        }
        int forumid = int.Parse(Utils.GetRequest("forumid", "all", 2, @"^[0-9]\d*$", "论坛ID错误"));
        int bid     = int.Parse(Utils.GetRequest("bid", "all", 2, @"^[0-9]\d*$", "帖子ID错误"));

        if (!new BCW.BLL.Forum().Exists2(forumid))
        {
            Utils.Success("访问论坛", "该论坛不存在或已暂停使用", Utils.getUrl("forum.aspx"), "1");
        }
        if (!new BCW.BLL.Text().Exists2(bid, forumid))
        {
            Utils.Error("帖子不存在或已被删除", "");
        }
        string Content = Utils.GetRequest("Content", "post", 3, @"^[\s\S]{1,50}$", "附言限50字内,可以留空");

        string strWhere = "Status=0 and (OverTime>='" + DateTime.Now + "' OR OverTime='1990-1-1 00:00:00')";

        string usname = new BCW.BLL.User().GetUsName(uid);

        if (Content != "")
        {
            Content = ",附言:" + Content + "";
        }

        string strContent = "[url=/bbs/uinfo.aspx?uid=" + uid + "]" + usname + "[/url]向全体管理员/版主推荐帖子:[url=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + new BCW.BLL.Text().GetTitle(bid) + "[/url]" + Content + "";

        DataSet ds = new BCW.BLL.Role().GetList("UsID,UsName", strWhere);

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                int    ihid   = int.Parse(ds.Tables[0].Rows[i]["UsID"].ToString());
                string mename = ds.Tables[0].Rows[i]["UsName"].ToString();
                new BCW.BLL.Guest().Add(ihid, mename, strContent);
            }
        }
        Utils.Success("推荐给管理员/版主", "恭喜,推荐管理员/版主成功,正在返回..", Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + ""), "2");
    }
예제 #21
0
    private void VerifyPage()
    {
        Master.Title = "审核文件";
        int    id   = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "页面ID错误"));
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info != "ok")
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定审核文件吗");
            builder.Append(Out.Tab("</div>", ""));
            string strText = "奖励" + ub.Get("SiteBz") + "/,,,";
            string strName = "cent,id,act,info";
            string strType = "num,hidden,hidden,hidden";
            string strValu = "0'" + id + "'verify'ok";
            string strEmpt = "false,false,false,false";
            string strIdea = "/";
            string strOthe = "确定审核并内线,filepass.aspx,post,1,red";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("filepass.aspx") + "\">再看看吧..</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("filepass.aspx") + "\">返回上一级</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            long cent = int.Parse(Utils.GetRequest("cent", "post", 4, @"^[1-9]\d*$", "奖励金额填写错误"));
            new BCW.BLL.Detail().UpdateHidden(id, 0);
            int UsID = new BCW.BLL.Detail().GetUsID(id);
            if (cent > 0)
            {
                string mename = new BCW.BLL.User().GetUsName(UsID);
                new BCW.BLL.User().UpdateiGold(UsID, mename, cent, "上传文件通过审核奖币");
                //发信给上传会员
                new BCW.BLL.Guest().Add(UsID, mename, "您的上传的[url=/detail.aspx?id=" + id + "]" + new BCW.BLL.Detail().GetTitle(id) + "[/url]已通过审核,恭喜你获得" + cent + "" + ub.Get("SiteBz") + "奖励!");
            }
            Utils.Success("审核文件", "审核文件成功,正在返回..", Utils.getUrl("filepass.aspx"), "1");
        }
    }
예제 #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "超级竞猜兑奖";
        //会员身份页面取会员实体
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        long   gold = new BCW.BLL.User().GetGold(meid);
        string act  = "";

        act = Utils.GetRequest("act", "all", 1, "", "");

        switch (act)
        {
        case "get":
            GetCase(meid);
            break;

        case "post":
            PostCase(meid);
            break;

        default:
            ReloadPage(meid, gold);
            break;
        }

        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append(Out.waplink(Utils.getUrl("betsuper.aspx"), "超级竞猜") + " ");
        builder.Append(Out.waplink(Utils.getUrl("betsuper.aspx?act=list"), "下注记录") + "<br />");
        builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + "");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-");
        builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-");
        builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "球彩") + "");
        builder.Append(Out.Tab("</div>", ""));
    }
예제 #23
0
    private void SavePageAgain()     //修改密码保护问题,再次保存到数据库
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        string Mypmobile = new BCW.BLL.User().GetMobile(meid);

        Master.Title = "密保管理问题成功";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("密码保护设置" + "<br />");
        builder.Append(Out.Tab("</div>", ""));
        string Myquestion = Utils.GetRequest("Myquestion", "post", 2, @"^[\s\S]{1,20}$", "请输入问题!");
        string Myanswer   = Utils.GetRequest("Myanswer", "post", 2, @"^[\s\S]{1,20}$", "请输入问题答案");

        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("  恭喜!你的密码保护设置成功" + "<br/>");
        builder.Append("你的问题是:" + Myquestion + "<br />");
        builder.Append("你的答案是:" + Myanswer + "<br />");
        builder.Append(Out.Tab("</div>", ""));
        BCW.Model.tb_Question model = new BCW.Model.tb_Question();


        model.Mobile      = Mypmobile;
        model.Question    = Myquestion;
        model.Answer      = Myanswer;
        model.state       = 1;
        model.ID          = meid;
        model.lastchange  = new BCW.BLL.tb_Question().GetLastChange(meid);
        model.changecount = new BCW.BLL.tb_Question().GetChangeCount(meid);
        model.code        = string.Empty;
        new BCW.BLL.tb_Question().Update(model);   //更新一条数据进入数据库
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("请您牢记答案.当您忘记密码或ID被盗,可使用本答案取回密码!" + "<br />");
        builder.Append(Out.Tab("</div>", ""));
        builder.Append("5秒后自动跳转到主页<br />");
        Master.Refresh = 5;                           //5秒后跳转到以下地址(可缺省)
        Master.Gourl   = Utils.getUrl("GetPwd.aspx"); //跳到的地址(可缺省)
        builder.Append("<a href=\"" + Utils.getUrl("SetQuestion.aspx") + "\">如果还没有跳转,请点击该链接返回主页</a>");
    }
예제 #24
0
파일: reg.aspx.cs 프로젝트: radtek/GitKB288
    public static int GetRandId()
    {
        int    num2    = 0;
        string xmlPath = "/Controls/reg.xml";
        //起始ID
        int num3 = int.Parse(ub.GetSub("RegStartID", xmlPath));
        //保留ID
        string sub = ub.GetSub("RegKeepID", xmlPath);
        //随机分配或递增分配
        bool flag    = !(ub.GetSub("RegTypes", xmlPath) == "0");
        int  usCount = new BCW.BLL.User().GetCount();

        if (flag)
        {
            usCount = new BCW.BLL.User().GetCount();
            num2    = new BCW.BLL.User().GetMaxId();
        }
        else
        {
            int num6 = int.Parse(new Rand().RandNumer(7));
            num2 = num6 % 4000 - usCount / 10;
            num2 = Math.Abs(usCount + num2);
            if (num2 < num3)
            {
                num2 += num3;
            }                                 //原num2 > num3

            while (num2 != 0)
            {
                if (("#" + sub + "#").IndexOf("#" + num2.ToString() + "#") == -1)
                {
                    if (!new BCW.BLL.User().Exists(num2))
                    {
                        break;
                    }
                }
                num2++;
            }
        }
        return(num2);
    }
예제 #25
0
    private void HonorNoPage(int uid)
    {
        string info = Utils.GetRequest("info", "all", 1, "", "");
        int    hid  = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[1-9]\d*$", "会员ID错误"));

        if (info != "ok")
        {
            Master.Title = "撤销荣誉版主";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定撤销" + new BCW.BLL.User().GetUsName(hid) + "(" + hid + ")的荣誉版主吗");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?info=ok&amp;act=honorno&amp;hid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">确定撤销</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=position&amp;hid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">先留着吧..</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            if (!new BCW.BLL.User().Exists(hid))
            {
                Utils.Error("不存在的会员ID", "");
            }
            string Limit = new BCW.BLL.User().GetLimit(hid);
            if (!Limit.Contains("honor"))
            {
                Utils.Error("该会员不是荣誉版主", "");
            }

            Limit = Limit.Replace("honor", "");
            new BCW.BLL.User().UpdateLimit(hid, Limit);

            //记录日志
            string UsName = new BCW.BLL.User().GetUsName(hid);
            string strLog = string.Empty;
            strLog = "系统管理员将[url=/bbs/uinfo.aspx?uid=" + hid + "]" + UsName + "[/url]撤销荣誉版主身份";
            new BCW.BLL.Forumlog().Add(0, 0, strLog);
            //发送内线给新版主
            new BCW.BLL.Guest().Add(hid, UsName, strLog.Replace("[url=/bbs/uinfo.aspx?uid=" + hid + "]" + UsName + "[/url]", "您"));
            Utils.Success("撤销荣誉版主", "撤销荣誉版主成功..", Utils.getUrl("usermanage.aspx?act=position&amp;hid=" + hid + "&amp;backurl=" + Utils.getPage(0) + ""), "1");
        }
    }
예제 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string IDs = ub.GetSub("XiaoHao", "/Controls/xiaohao.xml");

        if (IDs != "")
        {
            int maxNum = 6000;//取小号在线人数

            //按时间段抽取在线
            int hour = DateTime.Now.Hour;
            if (hour > 2 && hour < 7)
            {
                maxNum = new Random().Next(2200, 2500);
            }
            else
            {
                maxNum = new Random().Next(3800, 4100);
            }

            maxNum = maxNum * 2;
            int OnLineNum = new BCW.BLL.User().GetNum(3);
            if (OnLineNum < maxNum)
            {
                int      cNum  = maxNum - OnLineNum;
                string[] array = IDs.Split("#".ToCharArray());

                string[] arrayStr = Utils.GetRandom(array, cNum);
                for (int i = 0; i < arrayStr.Length; i++)
                {
                    int uid = Utils.ParseInt(arrayStr[i]);
                    //if (BCW.User.Users.UserOnline(uid) == "离线")
                    //{
                    new BCW.BLL.User().UpdateTime(Utils.ParseInt(arrayStr[i]), 5);
                    //}
                }
            }

            Response.Write("ok!");
        }
    }
예제 #27
0
    private void ResetQuestion()
    {
        string meid = Utils.GetRequest("hid", "all", 2, "", "");
        string info = Utils.GetRequest("info", "all", 0, "", "");

        meid = new BCW.BLL.User().GetMobile(int.Parse(meid)); //转换手机号码
        int id = new BCW.BLL.User().GetID(meid);              //得到ID号

        if (info == "")
        {
            if (new BCW.BLL.tb_Question().Exists(meid))
            {
                string str = meid.Substring(5, 6);
                new BCW.BLL.tb_Question().UpdateAnswer(str, meid);
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                Utils.Success("温馨提示", "重置密码保护问题答案成功! ID是" + id + "..手机号是:" + meid + "..新问题密码是:" + str, Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + id + ""), "3");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                Utils.Success("温馨提示", "不存在该账号密码保护问题数据", Utils.getUrl("uinfo.aspx"), "3");
            }
        }
        else
        {
            if (new BCW.BLL.tb_Question().Exists(meid))
            {
                new BCW.BLL.tb_Question().Delete(meid);
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                Utils.Success("温馨提示", "成功清除该ID:" + id + "..手机号是:" + meid + "的密保数据,用户可以自行重新设置密码保护问题!", Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + id + ""), "3");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                Utils.Success("温馨提示", "不存在该账号密码保护问题数据", Utils.getUrl("uinfo.aspx"), "3");
            }
        }
    }
예제 #28
0
    private void DelPage()
    {
        string info = Utils.GetRequest("info", "all", 1, "", "");
        int    id   = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误"));

        if (info == "")
        {
            Master.Title = "删除" + ub.GetSub("GroupName", xmlPath) + "";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定删除此" + ub.GetSub("GroupName", xmlPath) + "吗.删除同时将会删除此" + ub.GetSub("GroupName", xmlPath) + "的日志和加入的成员记录.");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?info=ok&amp;act=del&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">确定删除</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?act=edit&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">先留着吧..</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            if (!new BCW.BLL.Group().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            new BCW.BLL.Group().Delete(id);
            new BCW.BLL.Grouplog().DeleteStr(id);
            //删除会员的加入记录
            DataSet ds = new BCW.BLL.User().GetList("ID,GroupId", "GroupId LIKE '%#" + id + "#%'");
            if (ds != null && ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int    uid     = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());
                    string GroupId = ds.Tables[0].Rows[i]["GroupId"].ToString();
                    new BCW.BLL.User().UpdateGroupId(uid, GroupId.Replace("#" + id + "#", ""));
                }
            }
            Utils.Success("删除" + ub.GetSub("GroupName", xmlPath) + "", "删除" + ub.GetSub("GroupName", xmlPath) + "成功..", Utils.getPage("group.aspx"), "1");
        }
    }
예제 #29
0
    //删除页面
    private void DelHb()
    {
        string info = Utils.GetRequest("info", "all", 1, "", "");
        int    id   = int.Parse(Utils.GetRequest("hbid", "get", 2, @"^[1-9]\d*$", "ID错误"));

        if (info == "")
        {
            Master.Title = "删除红包";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定删除该红包吗");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("chat.aspx?info=ok&amp;act=delhb&amp;hbid=" + id) + "\">确定删除</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("chat.aspx?act=hb&amp;ptyge=0") + "\">先留着吧..</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            if (!new BCW.HB.BLL.HbPost().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            BCW.HB.Model.HbPost           modell = new BCW.HB.BLL.HbPost().GetModel(id);
            List <BCW.HB.Model.HbGetNote> hbnote = new BCW.HB.BLL.HbGetNote().GetModelList("HbID=" + id);
            long symoney = 0;
            for (int iso = 0; iso < hbnote.Count; iso++)
            {
                new BCW.HB.BLL.HbGetNote().Delete(hbnote[iso].ID);
                symoney = symoney + hbnote[iso].GetMoney;
            }
            new BCW.HB.BLL.HbPost().Delete(id);
            string postname = new BCW.BLL.User().GetUsName(modell.UserID);
            new BCW.BLL.User().UpdateiGold(modell.UserID, symoney, "错误红包返还");
            new BCW.BLL.Guest().Add(1, modell.UserID, postname, "您的错误红包剩余酷币已返还,获得了" + symoney + "酷币。");
            Utils.Success("删除红包", "删除成功..", Utils.getPage("chat.aspx?act=hb"), "1");
        }
    }
예제 #30
0
    private void selectPage()
    {
        int ID = Utils.ParseInt(Utils.GetRequest("ID", "all", 2, @"^[1-9]\d*$", "输入用户ID无效"));

        if (new BCW.BLL.User().Exists(ID))
        {
            Master.Title = "系统号ID设置";
            builder.Append(Out.Div("title", "系统号ID查询"));

            builder.Append(Out.Tab("<div>", "<br/>"));
            builder.Append("ID:" + ID + "<br/>");
            builder.Append("用户名:" + new BCW.BLL.User().GetUsName(ID) + "<br/>");
            builder.Append("手机:" + new BCW.BLL.User().GetMobile(ID) + "<br/>");
            DataSet ds = new BCW.BLL.User().GetList("IsSpier", "ID=" + ID + "");
            if (int.Parse(ds.Tables[0].Rows[0]["IsSpier"].ToString()) == 0)
            {
                builder.Append("是否为系统号:不是<br/>");
            }
            else
            {
                builder.Append("是否为系统号:是<br/>");
            }
            builder.Append("操作:<a href=\"" + Utils.getUrl("robotset.aspx?act=del&amp;id=" + ID + "") + "\">删除</a>");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("robotset.aspx") + "\">返回上级</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            Utils.Error("不存在的会员.查询失败.", "");
        }
    }