private void CollecPage() { Master.Title = "输入地址上传"; int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } int leibie = int.Parse(Utils.GetRequest("leibie", "all", 1, @"^[1-4]\d*$", "1")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("输入地址上传" + BCW.User.AppCase.CaseAlbums(leibie).Replace("册", "片") + ""); builder.Append(Out.Tab("</div>", "<br />")); int max = Convert.ToInt32(ub.GetSub("UpaMaxFileNum", xmlPath)); string maxfile = ub.GetSub("UpaMaxFileSize", xmlPath); string fileExt = ub.GetSub("UpaFileExt", xmlPath); builder.Append(Out.Tab("<div>", "")); builder.Append("只允许格式:.gif,.jpg,.jpeg,.png,.bmp<br />"); builder.Append("每个文件限" + maxfile + "K"); builder.Append(Out.Tab("</div>", "")); string strUpgroup = string.Empty; DataSet ds = new BCW.BLL.Upgroup().GetList("ID,Title", "Leibie=" + leibie + " and UsID=" + meid + " Order BY Paixu ASC"); if (ds != null && ds.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strUpgroup += "|" + ds.Tables[0].Rows[i]["ID"] + "|" + ds.Tables[0].Rows[i]["Title"] + ""; } } strUpgroup = "0|默认分组" + strUpgroup; strText = "文件地址:/,附件描述(30字内):/," + BCW.User.AppCase.CaseAlbums(leibie).Replace("册", "片") + "分类:/,,"; strName = "FileName,Content,NodeId,leibie,act"; strType = "text,text,select,hidden,hidden"; strValu = "http://''0'" + leibie + "'collecload"; strEmpt = "false,true," + strUpgroup + ",false,false"; strIdea = "/"; strOthe = "我要上传|reset,addfile.aspx,post,2,red|blue|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + ReplaceWap(Utils.getUrl("/default.aspx")) + "\">首页</a>-"); builder.Append("<a href=\"" + ReplaceWap(Utils.getPage("albums.aspx?uid=" + meid + "leibie=" + leibie + "")) + "\">上级</a>-"); builder.Append("<a href=\"" + ReplaceWap(Utils.getUrl("albums.aspx")) + "\">相册</a>"); builder.Append(Out.Tab("</div>", "")); }
private void UpfilePage() { int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } Master.Title = "WAP2.0上传"; int leibie = int.Parse(Utils.GetRequest("leibie", "all", 1, @"^[1-4]\d*$", "1")); if (!Utils.Isie()) { string VE = ConfigHelper.GetConfigString("VE"); string SID = ConfigHelper.GetConfigString("SID"); builder.Append("<a href=\"addfile.aspx?leibie=" + leibie + "&backurl=" + Utils.getPage(0) + "&" + VE + "=20a&" + SID + "=" + Utils.getstrU() + "\">[切换2.0上传]</a>"); } else { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("WAP2.0上传" + BCW.User.AppCase.CaseAlbums(leibie).Replace("册", "片") + ""); builder.Append(Out.Tab("</div>", "")); int max = Convert.ToInt32(ub.GetSub("UpaMaxFileNum", xmlPath)); string maxfile = ub.GetSub("UpaMaxFileSize", xmlPath); string fileExt = ub.GetSub("UpaFileExt", xmlPath); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("上传允许格式:" + fileExt + "<br />"); builder.Append("每个文件限" + maxfile + "K"); builder.Append(Out.Tab("</div>", "<br />")); int num = int.Parse(Utils.GetRequest("num", "get", 1, @"^[1-9]\d*$", "1")); if (num > max) { num = max; } builder.Append(Out.Tab("<div>", "")); builder.Append("上传:"); for (int i = 1; i <= max; i++) { builder.Append("<a href=\"" + Utils.getUrl("addfile.aspx?leibie=" + leibie + "&num=" + i + "&backurl=" + Utils.getPage(0) + "") + "\"><b>" + i + "</b></a> "); } builder.Append("个"); builder.Append(Out.Tab("</div>", "")); string sUpType = string.Empty; string sText = string.Empty; string sName = string.Empty; string sType = string.Empty; string sValu = string.Empty; string sEmpt = string.Empty; for (int i = 0; i < num; i++) { string y = ","; if (num == 1) { strText = strText + y + "选择" + sUpType + "附件:/," + sUpType + "附件描述(30字内):/"; } else { strText = strText + y + "" + sUpType + "第" + (i + 1) + "个附件:/," + sUpType + "附件描述" + (i + 1) + ":/"; } strName = strName + y + "file" + (i + 1) + y + "stext" + (i + 1); strType = strType + y + "file" + y + "text"; strValu = strValu + "''"; strEmpt = strEmpt + y + y; } string strUpgroup = string.Empty; DataSet ds = new BCW.BLL.Upgroup().GetList("ID,Title", "Leibie=" + leibie + " and UsID=" + meid + " Order BY Paixu ASC"); if (ds != null && ds.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strUpgroup += "|" + ds.Tables[0].Rows[i]["ID"] + "|" + ds.Tables[0].Rows[i]["Title"] + ""; } } strUpgroup = "0|默认分组" + strUpgroup; strText = sText + Utils.Mid(strText, 1, strText.Length) + "," + BCW.User.AppCase.CaseAlbums(leibie).Replace("册", "片") + "分类:,,"; strName = sName + Utils.Mid(strName, 1, strName.Length) + ",NodeId,leibie,act"; strType = sType + Utils.Mid(strType, 1, strType.Length) + ",select,hidden,hidden"; strValu = sValu + Utils.Mid(strValu, 1, strValu.Length) + "'0'" + leibie + "'upload"; strEmpt = sEmpt + Utils.Mid(strEmpt, 1, strEmpt.Length) + "," + strUpgroup + ",,,";; strIdea = "/"; strOthe = "我要上传|reset,addfile.aspx,post,2,red|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + ReplaceWap(Utils.getUrl("/default.aspx")) + "\">首页</a>-"); builder.Append("<a href=\"" + ReplaceWap(Utils.getPage("albums.aspx?uid=" + meid + "leibie=" + leibie + "")) + "\">上级</a>-"); builder.Append("<a href=\"" + ReplaceWap(Utils.getUrl("albums.aspx")) + "\">相册</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReplySavePage(int leibie) { int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } BCW.User.Users.ShowVerifyRole("m", meid); //非验证会员提示 new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Comment, meid); //会员本身权限 int id = int.Parse(Utils.GetRequest("id", "post", 2, @"^[1-9]\d*$", "ID错误")); string Content = Utils.GetRequest("Content", "post", 2, @"^[^\^]{1,200}$", "评论限1-200字"); int NodeId = 0; string xmlPath = "/Controls/diary.xml"; string xmlPath2 = "/Controls/albums.xml"; int uid = 0; if (leibie == 0) { //是否刷屏 string appName = "LIGHT_DIARY"; int Expir = Convert.ToInt32(ub.GetSub("DiaryExpir", xmlPath)); BCW.User.Users.IsFresh(appName, Expir); NodeId = new BCW.BLL.Diary().GetNodeId(id); uid = new BCW.BLL.Diary().GetUsID(id); } else { //是否刷屏 string appName = "LIGHT_DIARY"; int Expir = Convert.ToInt32(ub.GetSub("AlbumsExpir", xmlPath2)); BCW.User.Users.IsFresh(appName, Expir); NodeId = new BCW.BLL.Upfile().GetNodeId(id); uid = new BCW.BLL.Upfile().GetUsID(id); } if (NodeId == -1) { Utils.Error("不存在的记录", ""); } //你是否是对方的黑名单 if (new BCW.BLL.Friend().Exists(uid, meid, 1)) { Utils.Error("对方已把您加入黑名单", ""); } int IsReview = new BCW.BLL.Upgroup().GetIsReview(NodeId); if (IsReview == 1) { Utils.Error("作者已设置不允许评论此分类", ""); } string strLeibie = BCW.User.AppCase.CaseAlbums(leibie); BCW.Model.FComment model = new BCW.Model.FComment(); model.Types = leibie; model.UsID = meid; model.UsName = new BCW.BLL.User().GetUsName(meid); model.DetailId = id; model.Content = Content; model.AddUsIP = Utils.GetUsIP(); model.AddTime = DateTime.Now; new BCW.BLL.FComment().Add(model); //更新回复数 if (leibie == 0) { new BCW.BLL.Diary().UpdateReplyNum(id, 1); } //内线通知主人 if (meid != uid) { new BCW.BLL.Guest().Add(0, uid, new BCW.BLL.User().GetUsName(uid), "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + new BCW.BLL.User().GetUsName(meid) + "[/url]在您的空间" + BCW.User.AppCase.CaseAlbums(leibie) + "[url=/bbs/fcomment.aspx?leibie=" + leibie + "&id=" + id + "]留言啦[/url]!"); } Utils.Success("评论" + strLeibie + "", "发表评论成功,正在返回..", Utils.getPage("fcomment.aspx?act=replylist&leibie=" + leibie + "&id=" + id + ""), "1"); }