/// <summary>
/// 贴子列表
/// </summary>
/// <author>jackson</author>
/// <date>2001-07-01 15:14</date>
/// <param name="cool">是否为Cool贴。</param>
/// <param name="id">贴子的id号。</param>
/// <param name="layer">贴子的层次顺序号。</param>
/// <param name="emote">表情图标索引号。</param>
/// <param name="title">贴子的标题。</param>
/// <param name="author">作者。</param>
/// <param name="y">年。</param>
/// <param name="m">月。</param>
/// <param name="d">日。</param>
/// <param name="t">时间。</param>
/// <param name="h">贴子的点击数。</param>
/// <param name="l">贴子的长度。</param>
/// <param name="c">回复数(子贴数)。</param>
/// <param name="n">是否为新贴,如果为true则加入图像new.gif:)。</param>
public void BBSList(bool cool, int id, int layer, int emote, string title, string author, int y, int m, int d, string t, int h, int l, int c, bool n)
{
if ( layer != 1 ) //定制主题贴及一般贴背景,等于“1”为主题贴!
{
Response.Write("<tr BGCOLOR=#f0f0f0>");
}
else
{
Response.Write("<tr BGCOLOR=#d8d3cd>");
}
Response.Write(" <td align=center>" + (c>0?"<font color=red>+" + c.ToString()+"</font>":id.ToString())+"</td>"); //如果有子贴,则显示所有子贴数量,否则显示此贴ID
Response.Write(" <td >");
/*************缩进子贴**************/
Response.Write("<li " + ((layer>1)?"type=square;": "") + " style='" + ((layer == 1)?"color:navy;":"")+ "text-indent:0; margin-left:"+(layer*20)+"; margin-top:0'>" );
Response.Write("<img src=images/mood" + emote + ".gif>");
Response.Write(" <a class=title href=showAnnounce.aspx?id="+id+">" + title + "</a>");
if(l == 0)
{
Response.Write("<font color=black>(空");
}
else
{
Response.Write("<font color=black>(" + l + "字节");
}
Response.Write(",读" + (h>=50?"<font color=red>":"<font color=black>") + h + "</font>" + "次)</font>");
if(cool)
{
Response.Write("<img src=http://edu.cnzz.cn/NewsInfo/images/cool.gif border=0>");
}
else
{
Response.Write(" ");
}
if(n) Response.Write("<img src=http://edu.cnzz.cn/NewsInfo/images/new.gif>");
Response.Write("</li></td><td nowrap >");
Response.Write(" <a class=author target=_blank href="+author+">" + username(author) + "</a>");
Response.Write(" </td>");
Response.Write(" <td nowrap>");
DateTime nowDate = DateTime.Now;
if( y== nowDate.Year && m == nowDate.Month && d == nowDate.Day)
{
Response.Write("今天 ");
}
else
{
if(y==nowDate.Year && m==nowDate.Month && d==nowDate.Day - 1)
{
Response.Write("昨天 ");
}
else
{
Response.Write(y + "-" + m + "-" + d);
}
}
Response.Write(" " + t);
Response.Write(" </td>");
Response.Write("</tr>");
Response.Write("");
}