<%@Page Language="C#" AutoEventWireup="true"  Inherits="Web.inherits.ViewPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%var CurrentCategoryItem=GetCategory(alias:Dir[0]);
        if(CurrentCategoryItem==null){
            LoadNotFound();
            return;
        }
      var CurrentPage=Dir.Count()>1?Convert.ToInt32(Dir[1]):1;
    %>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=CurrentCategoryItem["SEOTitle"]%>-<%=WebSiteConfig.SiteTitle%></title>
    <meta name="keywords" content="<%=CurrentCategoryItem["SEOKeywords"]%>" />
    <meta name="description" content="<%=CurrentCategoryItem["SEODescription"]%>" />
    <link href="<%path:%>Css/common.css" rel="stylesheet" />
    <link href="<%path:%>Css/web.css" rel="stylesheet" />
    <script src="/Js/jquery-1.8.2.min.js"></script>
    <script src="/Js/data.js"></script>
    <script src="/Js/bx.library.js"></script>
    <script src="<%path:%>js/web.js"></script>
</head>
<body>
    <!--head-->
    <%template:_head.html%>
    <!--body-->
    <div class="body main">
        <div class="split">&nbsp;</div>
        <div class="list">
            <div class="sitemap">所在位置:<a href="/">首页</a> > <%=CurrentCategoryItem["CategoryName"]%></div>
            <div class="category">
                <dl>
                    <dt><b>类别</b>:</dt>
                    <dd id="ddCurrentCategoryList">
                        <%var parentNode=Convert.ToInt32(CurrentCategoryItem["ParentNode"]);%>
                        <%if(parentNode==0){%>
                            <!--当前类-->
                            <a href="/<%=CurrentCategoryItem["CategoryAliasName"]%>/" matchstatus="<%=CurrentCategoryItem["CategoryAliasName"]%>"><%=CurrentCategoryItem["CategoryName"]%></a>
                            <!--当前类的子类-->
                            <%foreach(var row in GetCategoryList(alias:Dir[0])){%>
                            <a href="/<%=row["CategoryAliasName"]%>/" matchstatus="<%=row["CategoryAliasName"]%>"><%=row["CategoryName"]%></a>
                            <%}%>
                        <%}else{%>
                           <!--当前类的父类-->
                        <%var ParentCategory=GetCategory(id:parentNode);%>
                        <a href="/<%=ParentCategory["CategoryAliasName"]%>/" matchstatus="<%=ParentCategory["CategoryAliasName"]%>"><%=ParentCategory["CategoryName"]%></a>
                            <!--当前类的兄弟类-->
                            <%foreach(var row in GetCategoryList(alias:ParentCategory["CategoryAliasName"].ToString())){%>
                               <a href="/<%=row["CategoryAliasName"]%>/" matchstatus="<%=row["CategoryAliasName"]%>"><%=row["CategoryName"]%></a>
                            <%}%>
                        <%}%>
                    </dd>
                </dl>
                <script type="text/javascript">
                    UrlStatus.changeDomSelectStatus("ddCurrentCategoryList", 1);
                </script>
            </div>
            <div class="left">
                <div class="title"><span><%=CurrentCategoryItem["CategoryName"]%></span></div>
                <div class="content">
                    <table cellpadding="0" cellspacing="0">
                        <tbody>
                            <%if(CurrentPage==1){%>
                                <!--推荐信息列表(只在第一页显示)-->
                                <%foreach(var row in GetInfoList(categoryAlias:CurrentCategoryItem["CategoryAliasName"].ToString(),recommend:3)){%>
                                 <tr class="recommend">
                                    <td><div class="thumbnail"><img src='<%=row["Thumbnail"]!=""?row["Thumbnail"]:"<%path:%>images/list_nopic.png"%>' title="<%=row["Title"]%>" /></div></td>
                                    <td>
                                        <span class="infotitle"><a href="/Item/<%=row["InfoID"]%>"><%=row["Title"]%></a></span>
                                        <span class="infointroduce"><%=row["CompanyName"]%></span>
                                        <span class="infoother"><%=Convert.ToDateTime(row["UpdateDate"]).ToString("yyyy-MM-dd")%>  /  价格:<%=row["Price"]%></span>
                                    </td>
                                    <td><span class="infoview"><a href="/Item/<%=row["InfoID"]%>" target="_blank">查看详情</a></span></td>
                                </tr>
                                <%}%>
                            <%}%>
                            <!--正常发布信息列表-->
                            <%foreach(var row in GetInfoList(categoryAlias:CurrentCategoryItem["CategoryAliasName"].ToString(),recommend:2,page:CurrentPage)){%>
                             <tr>
                                <td><div class="thumbnail"><img src='<%=row["Thumbnail"]!=""?row["Thumbnail"]:"<%path:%>images/list_nopic.png"%>' title="<%=row["Title"]%>" /></div></td>
                                <td>
                                    <span class="infotitle"><a href="/Item/<%=row["InfoID"]%>" target="_blank"><%=row["Title"]%></a></span>
                                    <span class="infointroduce"><%=row["CompanyName"]%></span>
                                    <span class="infoother"><%=Convert.ToDateTime(row["UpdateDate"]).ToString("yyyy-MM-dd")%>  /  价格:<%=row["Price"]%></span>
                                </td>
                                <td><span class="infoview"><a href="/Item/<%=row["InfoID"]%>" target="_blank">查看详情</a></span></td>
                            </tr>
                            <%}%>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="3" class="pagination">
                                    <%var totalRows=GetInfoCount(categoryId:Convert.ToInt32(CurrentCategoryItem["CategoryID"]),recommend:2);%>
                                    <%=GetPaginationHtml(total:totalRows,link:String.Format("/{0}/@page", CurrentCategoryItem["CategoryAliasName"]),maxmumRows:10,page:CurrentPage)%>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
            <div class="right">
                <div class="listblock">
                    <div class="title">相关推荐</div>
                    <div class="item">
                        <ul>
                            <li><span class="contenttitle"><a href="#">阁楼安装招标，等您投标报价</a></span></li>
                            <li><span class="contenttitle"><a href="#">MLM038T4LC9冷冻涡旋压缩机</a></span></li>
                            <li><span class="contenttitle"><a href="#">安防线缆环境缓解 行业标准渐明晰</a></span></li>
                            <li><span class="contenttitle"><a href="#">牛仔裤批量采购，报名者从速</a></span></li>
                            <li><span class="contenttitle"><a href="#">儿童服装采购，寻求供应商中</a></span></li>
                        </ul>
                    </div>
                </div>
                <!--右侧广告-->
                <div class="rightad">
                    <iframe src="/Ad/?id=67" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" width="240"></iframe>
                    <iframe src="/Ad/?id=67" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" width="240"></iframe>
                </div>
            </div>
            <div class="split">&nbsp;</div>
        </div>
    </div>
    <!--foot-->
    <%template:_foot.html%>
</body>
</html>
