<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%var CurrentCategoryItem=GetCategory(alias:Dir[0]);
    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"]%>" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link href="<%path:%>css/base.css" rel="stylesheet" />
</head>
<body>
    <!--head-->
    <%template:_head.html%>
    <!--body-->
    <div class="body">
        <div class="split">&nbsp;</div>
        <div class="list">
            <div class="sitemap">所在位置:<a href="/">首页</a> > <%=CurrentCategoryItem["CategoryName"]%></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 class="td-left">
                                <span class="infotitle"><a href="/Item/<%=row["InfoID"]%>"><%=row["Title"]%></a></span>
                            </td>
                            <td class="td-right">
                                <span class="infoview"><a href="/Item/<%=row["InfoID"]%>" target="_blank">查看详情</a></span>
                            </td>
                        </tr>
                        <tr class="recommend">
                            <td colspan="2"> 
                                <span class="infoother"><%=Convert.ToDateTime(row["UpdateDate"]).ToString("yyyy-MM-dd")%>  /  价格:<%=row["Price"]%></span>
                            </td>
                        </tr>
                        <%}%>
                        <%}%>
                        <!--正常发布信息列表-->
                        <%foreach(var row in GetInfoList(categoryAlias:CurrentCategoryItem["CategoryAliasName"].ToString(),recommend:2,page:CurrentPage)){%>
                        <tr>
                            <td class="td-left">
                                <span class="infotitle"><a href="/Item/<%=row["InfoID"]%>" target="_blank"><%=row["Title"]%></a></span>
                            </td>
                            <td class="td-right">
                                <span class="infoview"><a href="/Item/<%=row["InfoID"]%>" target="_blank">查看详情</a></span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <span class="infoother"><%=Convert.ToDateTime(row["UpdateDate"]).ToString("yyyy-MM-dd")%>  /  价格:<%=row["Price"]%></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>
    <!--foot-->
    <%template:_foot.html%>
</body>
</html>
