- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections.Generic;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class BBS_BBSMain : System.Web.UI.Page
- {
- /// <summary>
- /// 大分类模板
- /// </summary>
- Model.BBSBigTYPE MBBSTYPE = new Model.BBSBigTYPE();
- /// <summary>
- /// 大分类逻辑
- /// </summary>
- BLL.BBSBigTYPE BBBSTYPE = new BLL.BBSBigTYPE();
- /// <summary>
- /// 小分类模板
- /// </summary>
- Model.BBSSmailTYPE MsmailType = new Model.BBSSmailTYPE();
- /// <summary>
- /// 小分类业务
- /// </summary>
- BLL.BBSSmailTYPE BsmailType = new BLL.BBSSmailTYPE();
- public string AllTheStr = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "BBS_BBSMain");
- List<Model.BBSBigTYPE> LMB = BBBSTYPE.GetList();
- foreach (Model.BBSBigTYPE MB in LMB)
- {
- AllTheStr += BigTypeString(MB);
- }
- }
- public string BigTypeString(Model.BBSBigTYPE _MBBSTYPE)
- {
- string Content=@" <table class=""usertableborder"" cellspacing=""1"" cellpadding=""3"" width=""96%"" align=""center""
- border=""0"">
- <tr>
- <th colspan=""3"" style=""height: 25px"">
- " + _MBBSTYPE.FLMC + @"</th>
- </tr>
- <tr>
- <td class=""usertablerow2"" align=""left"" style=""height: 32px; width: 100%;"" colspan=""2"">
- <table border=""1"" cellpadding=""0"" cellspacing=""1"" style=""width: 100%"">
- <tr>
- <th style=""width: 72px; height: 19px"">
- </th>
- <th style=""width: 461px; height: 19px"">
- 论坛</th>
- <th style=""width: 100px; height: 19px"">
- 主题</th>
- <th style=""width: 100px; height: 19px"">
- 最后更新</th>
- </tr>
- " + GetContent(_MBBSTYPE.ID) + @"
- </table>
- </td>
- </tr>
- </table>";
- return Content;
- }
- public string GetContent(int _MBBSID)
- {
- string ContentStr = "";
- BLL.BBSSmailTYPE BB=new BLL.BBSSmailTYPE();
- int Count=BB.GetCount("DFLID='"+_MBBSID.ToString()+"'");
- List<Model.BBSSmailTYPE> MsmailTypes = BB.GetPageList(Count, 1, "ID", false, "DFLID='" + _MBBSID.ToString() + "'");
- foreach (Model.BBSSmailTYPE MBBS in MsmailTypes)
- {
- ContentStr += SmallType(MBBS);
- }
- return ContentStr;
- }
- public string SmallType(Model.BBSSmailTYPE _MsmailType)
- {
- int Count = new BLL.BBS().GetCount("FL='" + _MsmailType.ID + "'");
- string Content = @"
- <tr>
- <td style=""width: 72px; height: 84px"" align=""center"" valign=""middle"">
- <img src=""" + _MsmailType.TPPath+ @""" style=""width: 100%; height: 57px"" /></td>
- <td style=""width: 461px; height: 84px"">
- <a href='BBSNews.aspx?type=" + _MsmailType.ID+ "'>" + _MsmailType.MC + @"</a></td>
- <td style=""width: 100px; height: 84px"" align=""center"" valign=""middle"">
- " + Count.ToString() + @"</td>
- <td style=""width: 100px; height: 84px"" align=""center"">
- " + DateTime.Now.ToString("yyyy-MM-dd")+@"
- </td>
- </tr>
- ";
- return Content;
- }
- }
- //<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center"
- // border="0">
- // <tr>
- // <th colspan="3" style="height: 25px">
- // ☆学习园地☆</th>
- // </tr>
- // <tr>
- // <td class="usertablerow2" align="left" style="height: 32px; width: 100%;" colspan="2">
- // <table border="1" cellpadding="0" cellspacing="1" style="width: 100%">
- // <tr>
- // <th style="width: 72px; height: 19px">
- // </th>
- // <th style="width: 461px; height: 19px">
- // 论坛</th>
- // <th style="width: 100px; height: 19px">
- // 主题</th>
- // <th style="width: 100px; height: 19px">
- // 回复</th>
- // <th style="width: 100px; height: 19px">
- // 最后更新</th>
- // </tr>
- // <tr>
- // <td style="width: 72px; height: 84px" align="center" valign="middle">
- // <img src="Images/user_login_03.gif" style="width: 100%; height: 57px" /></td>
- // <td style="width: 461px; height: 84px">
- // ☆本论坛板块专门进行计算机技术方面内容☆</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 12</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 66</td>
- // <td style="width: 100px; height: 84px">
- // 2009-10-11
- // <br />
- // 10:10:10</td>
- // </tr>
- // <tr>
- // <td style="width: 72px; height: 84px" align="center" valign="middle">
- // <img src="Images/user_suc.gif" style="width: 52px; height: 57px" /></td>
- // <td style="width: 461px; height: 84px">
- // ☆本论坛板块专门进行工作技术方面内容☆</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 12</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 66</td>
- // <td style="width: 100px; height: 84px">
- // 2009-10-11
- // <br />
- // 10:10:10</td>
- // </tr>
- // </table>
- // </td>
- // </tr>
- //</table>
- //<table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
- // border="0">
- // <tr>
- // <th colspan="3" style="height: 25px">
- // ☆业务交流☆</th>
- // </tr>
- // <tr>
- // <td class="usertablerow2" align="center" style="height: 32px; width: 100%;" colspan="2">
- // <table border="1" cellpadding="0" cellspacing="1" style="width: 100%">
- // <tr>
- // <th style="width: 72px; height: 19px">
- // </th>
- // <th style="width: 461px; height: 19px">
- // 论坛</th>
- // <th style="width: 100px; height: 19px">
- // 主题</th>
- // <th style="width: 100px; height: 19px">
- // 回复</th>
- // <th style="width: 100px; height: 19px">
- // 最后更新</th>
- // </tr>
- // <tr>
- // <td style="width: 72px; height: 84px" align="center" valign="middle">
- // <img src="Images/login-welcome.gif" style="width: 52px; height: 57px" /></td>
- // <td style="width: 461px; height: 84px">
- // ☆本论坛板块专门进行营销技术方面内容☆</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 12</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 66</td>
- // <td style="width: 100px; height: 84px">
- // 2009-10-11
- // <br />
- // 10:10:10</td>
- // </tr>
- // <tr>
- // <td style="width: 72px; height: 84px" align="center" valign="middle">
- // <img src="Images/user_err.gif" style="width: 52px; height: 57px" /></td>
- // <td style="width: 461px; height: 84px">
- // ☆本论坛板块专门进行培训技术方面内容☆</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 12</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 66</td>
- // <td style="width: 100px; height: 84px">
- // 2009-10-11
- // <br />
- // 10:10:10</td>
- // </tr>
- // <tr>
- // <td style="width: 72px; height: 84px" align="center" valign="middle">
- // <img src="Images/worldmap.jpg" style="width: 52px; height: 57px" /></td>
- // <td style="width: 461px; height: 84px">
- // ☆本论坛板块专门进行培训技术方面内容☆</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 12</td>
- // <td style="width: 100px; height: 84px" align="center" valign="middle">
- // 66</td>
- // <td style="width: 100px; height: 84px">
- // 2009-10-11
- // <br />
- // 10:10:10</td>
- // </tr>
- // </table>
- // </td>
- // </tr>
- //</table>