首页 > 开发 > 综合 > 正文

是不是这个?

2024-07-21 02:28:04
字体:
来源:转载
供稿:网友
        /// <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("");
        }


注册会员,创建你的web开发资料库,
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表