<%@Page Language="C#" AutoEventWireup="true"  Inherits="Web.inherits.ViewPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%
    var InfoID=Dir.Count()>1?Convert.ToInt64(Dir[1]):0;
    var InfoRow=GetInfo(infoId:InfoID);
    var CurrentCategoryItem=GetCategory(id:Convert.ToInt32(InfoRow["CategoryID"]));
    %>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><%=InfoRow["Title"]%>-<%=CurrentCategoryItem["CategoryName"]%>-<%=WebSiteConfig.SiteTitle%></title>
    <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="content">
            <div class="sitemap">所在位置:<a href="/">首页</a> > <a href='/<%=CurrentCategoryItem["CategoryAliasName"]%>'><%=CurrentCategoryItem["CategoryName"]%></a> > 内容页</div>
            <div>
                <div class="left">
                    <div class="infohead">
                        <h1><%=InfoRow["Title"]%></h1>
                        <div class="infostatistics">
                            <ul>
                                <li title="发布日期"><%=InfoRow["UpdateDate"]%> 发布</li>
                                <li title="浏览次数">浏览<%=InfoRow["Views"]%>次</li>
                            </ul>
                            <ul class="rightmenu">
                                <li>
                                   <span onclick="addCollect('<%=InfoRow["InfoID"]%>','<%=InfoRow["Title"]%>');"><img src="<%path:%>images/content_collectico.png" title="收藏" />&nbsp;收藏</span></li>
                                <li>
                                    <span><img src="<%path:%>images/content_shareico.png" title="分享" />&nbsp;分享到:</span>
                                    <div class="sharewindow">
                                       <div class="bdsharebuttonbox"><a title="分享到QQ空间" class="bds_qzone" href="#" data-cmd="qzone"></a><a title="分享到新浪微博" class="bds_tsina" href="#" data-cmd="tsina"></a><a title="分享到网易微博" class="bds_t163" href="#" data-cmd="t163"></a><a class="bds_more" href="#" data-cmd="more"></a></div>
                                       <script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="infobody">
                        <div class="infoform">
                            <dl>
                                <dt>价格：</dt><dd><%=InfoRow["Price"]%> 元</dd>
                                <dt>交易方式：</dt><dd>
                                <%if(InfoRow["TransactionMethod"]==DBNull.Value || InfoRow["TransactionMethod"].ToString()=="1"){%>
                                      网上交易
                                <%}else if(InfoRow["TransactionMethod"].ToString()=="2"){%>
                                      支持快递
                                <%}else if(InfoRow["TransactionMethod"].ToString()=="2"){%>
                                      同城交易
                                <%}else if(InfoRow["TransactionMethod"].ToString()=="2"){%>
                                      当面交易
                                <%}else{%>
                                  &nbsp;
                                <%}%>
                                </dd>
                                <dt>供应数量：</dt><dd><%=InfoRow["Quantity"]%></dd>
                                <dt>公司名称：</dt><dd><%=InfoRow["CompanyName"]%></dd>
                            </dl>
                        </div>
                        <div class="infopicture">
                            <!--有图片时才显示-->
                            <%var picList=GetPropertyPicture(infoId:InfoID);
                               if(picList.Count()>1){%>
                              <!--批量-->
                            <div id="gallery" class="ad-gallery">
                                <!--大图片-->
                                <div class="ad-image-wrapper">
                                </div>
                                <div class="adpicsplit"></div>
                                <!--缩略图-->
                                <div class="img-nav">
                                  <div class="ad-nav">
                                    <div class="ad-thumbs">
                                        <ul class="ad-thumb-list">
                                            <%foreach(var picRow in picList){%>
                                            <li>
                                                <a href='<%=picRow["PictureLink"]%>'>
                                                    <img src='<%=picRow["PictureLink"]%>' />
                                                </a>
                                            </li>
                                            <%}%>
                                        </ul>
                                    </div>
                                </div>
                                </div>
                            </div>
                            <script type="text/javascript">
                                $(function () {
                                    var galleries = $('.ad-gallery').adGallery({ loader_image: '/plugin/Album/ADGallery/lib/loader.gif' });
                                    galleries[0].slideshow.toggle();
                                    galleries[0].settings.effect = "fade";
                                });
                            </script>
                            <%}else if(picList.Count()==1){%>
                              <!--单张-->
                              <div class="infoSinglePicture">
                                  <a href='<%=picList[0]["PictureLink"]%>' data-lightbox="img1">
                                      <img src='<%=picList[0]["PictureLink"]%>' />
                                  </a>   
                              </div>
                            <%}%>
                        </div>
                    </div>
                    <div class="infointroduce">
                        <div class="title"><span>详情介绍</span></div>
                        <div class="introduce">
                             <%=InfoRow["Detail"]%>
                        </div>
                    </div>
                    <div class="infocontact">
                        <div class="title"><span>联系方式</span></div>
                        <div>
                            <ul>
                                <li>联系人：<%=InfoRow["Contact"]%></li>
                                <!--是否允许登录才能查看电话号码-->
                                <li>联系电话：
                                <%if(TemplateConfig.ContainsKey("LoginVisit") && TemplateConfig["LoginVisit"].ToString()=="1"){%>
                                   <%if(UserIdentity.Success==false){%>
                                      <a href="/login/default">登录后查看</a>
                                   <%}else{%>
                                      <%=InfoRow["Tel"]%>
                                    <%}%>
                                <%}else{%>
                                    <%=InfoRow["Tel"]%>
                                <%}%>
                                </li>
                                <li>联系地址：<%=InfoRow["Address"]%></li>
                                <li>发布者IP：<span id="IPAddress"></span>
                                    <script type="text/javascript">getIpAddress('<%=InfoRow["IP"]%>', "IPAddress")</script>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="infocontact">
                        <div class="title"><span>地图.街景</span></div>
                        <div>
                            <div class="map">
                                <div class="map-menu">
                                    <ul>
                                        <li onclick="document.getElementById('mapContainer2').style.display = 'none'; document.getElementById('mapContainer1').style.display = '';">地图</li>
                                        <li onclick="document.getElementById('mapContainer1').style.display = 'none'; document.getElementById('mapContainer2').style.display = '';">街景</li>
                                    </ul>
                                </div>
                                <div id="mapContainer1" class="mapContainer">
                                </div>
                                <div id="mapContainer2" class="mapContainer" style="display:none;"> </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="right">
                    <!--右侧广告-->
                    <div class="rightad">
                        <iframe src="/Ad/?id=68" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" width="200" height="700"></iframe>
                    </div>
                </div>
            </div>

        </div>
        <div class="split">&nbsp;</div>
        <!--脚部横幅广告-->
        <div>
            <iframe src="/Ad/?id=69" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" width="979" height="87"></iframe>
        </div>
    </div>
    <!--foot-->
    <%template:_foot.html%>
    <link rel="stylesheet" type="text/css" href="/plugin/album/ADGallery/lib/jquery.ad-gallery.css" />
    <script type="text/javascript" src="/plugin/album/ADGallery/lib/jquery.ad-gallery.js"></script>
    <script src="/plugin/lightbox/js/lightbox.min.js"></script>
    <link href="/plugin/lightbox/css/lightbox.css" rel="stylesheet" />
    <script charset="utf-8" src='http://map.qq.com/api/js?v=2.exp&key=<%=TemplateConfig["QQMap"]%>'></script>
    <script type="text/javascript">
        window.onload=function(){
            LoadMap("mapContainer1","mapContainer2",'<%=InfoRow["Address"]%>');
        }
    </script>
</body>
</html>

