<%@ page language="C#" autoeventwireup="true" inherits="info, kfenlei" %><%@ Register Src="~/inc/top.ascx" TagPrefix="qth8" TagName="top" %><%@ Register Src="~/inc/foot.ascx" TagPrefix="qth8" TagName="foot" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" href="<%=sWapLink %>" media="handheld" type="application/vnd.wap.xhtml+xml">
<meta http-equiv="mobile-agent" content="format=html5; url=<%=sWapLink %>">
<meta http-equiv="mobile-agent" content="format=wml; url=<%=sWapLink %>">
<meta http-equiv="mobile-agent" content="format=xhtml; url=<%=sWapLink %>">
<meta name="Keywords" content="<%=sTitle%>" />
<meta name="Description" content="<%=sDescription %>" />
<title><%=sTitle1 %> - <%=sWebName %></title>
<link rel="stylesheet" href="/template/css.css" type="text/css" />
<link rel="stylesheet" href="/template/top.css" type="text/css" />
<link rel="stylesheet" href="/js/dist/photoswipe.css"> 
<link rel="stylesheet" href="/js/dist/default-skin/default-skin.css"> 
</head>
<body>
<div align="center">
<qth8:top ID="top" runat="server" />
<script src="/js/layer.js"></script>
<script src="/js/dist/photoswipe.min.js"></script>
<script src="/js/dist/photoswipe-ui-default.min.js"></script>
<div class="infoTop"><strong>当前位置：</strong><%=infolink %></div>
<div class="main">
<div class="clear"></div>
<div class="infobox" id="infobox">
<div class="infoLeft">
<div class="bt">
<h2 class="bt1"><%=sTitle %></h2>
<div class="price"><%=sPrice %></div>
<div class="clear"></div>
<div class="infoDate">发布日期：<%=sDate %>&nbsp;&nbsp;&nbsp;&nbsp;<%if(s23=="1"){ %>
浏览量：<%=sView %><%} %>
<div class="ctr">
<strong>操作：</strong> <a href="#p">评论(<%=sComment %>)</a>  <a href="/user/mInfo.aspx?id=<%=id.ToString()%>">管理</a>  <a href="javascript:fInfoFav('<%=id.ToString()%>')">收藏</a>
</div>
</div>
</div>
<div class="infoContent">
<div class="textwrap">
<%=sContent%>
</div>
<div class="clear10"></div>
<div class="picwrap" id="picwrap">
<%=sPic %>
</div>
<div class="clear"></div>
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="pswp__bg"></div>
		<div class="pswp__scroll-wrap">
			<div class="pswp__container">
				<div class="pswp__item"></div>
				<div class="pswp__item"></div>
				<div class="pswp__item"></div>
			</div>
			<div class="pswp__ui pswp__ui--hidden">
				<div class="pswp__top-bar">
					<div class="pswp__counter"></div>
					<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
					<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
					<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
					<div class="pswp__preloader">
						<div class="pswp__preloader__icn">
						  <div class="pswp__preloader__cut">
							<div class="pswp__preloader__donut"></div>
						  </div>
						</div>
					</div>
				</div>
				<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
					<div class="pswp__share-tooltip"></div> 
				</div>
				<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
				</button>
				<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
				</button>
				<div class="pswp__caption">
					<div class="pswp__caption__center"></div>
				</div>
			  </div>
			</div>
	</div>
<script type="text/javascript">
	(function() {

	var initPhotoSwipeFromDOM = function(gallerySelector) {
		var parseThumbnailElements = function(el) {
			var thumbElements = el.childNodes,
				numNodes = thumbElements.length,
				items = [],
				el,
				childElements,
				thumbnailEl,
				size,
				item;

			for(var i = 0; i < numNodes; i++) {
				el = thumbElements[i];
				// include only element nodes 
				if(el.nodeType !== 1) {
				  continue;
				}
				childElements = el.children;
				//size = el.getAttribute('data-size').split('x');
				var img = new Image();
　　				img.src = childElements[0].getAttribute('src');
　　				var rw = img.width;
　　				var rh = img.height;
				// create slide object
				item = {
					src: el.getAttribute('href'),
					w: parseInt(rw, 10),
					h: parseInt(rh, 10),
					author: el.getAttribute('data-author')
				};

				item.el = el; // save link to element for getThumbBoundsFn
				if(childElements.length > 0) {
				  item.msrc = childElements[0].getAttribute('src'); // thumbnail url
				  item.title = childElements[0].getAttribute('alt');
				  if(childElements.length > 1) {
					  //item.title = childElements[1].innerHTML; // caption (contents of figure)
				  }
				}
				var mediumSrc = el.getAttribute('href');
				if(mediumSrc) {
					//size = el.getAttribute('data-med-size').split('x');
					// "medium-sized" image
					item.m = {
						src: mediumSrc,
						w: parseInt(rw, 10),
						h: parseInt(rh, 10)
					};
				}
				// original image
				item.o = {
					src: item.src,
					w: item.w,
					h: item.h
				};
				items.push(item);
			}
			return items;
		};
		// find nearest parent element
		var closest = function closest(el, fn) {
			return el && ( fn(el) ? el : closest(el.parentNode, fn) );
		};
		var onThumbnailsClick = function(e) {
			e = e || window.event;
			e.preventDefault ? e.preventDefault() : e.returnValue = false;

			var eTarget = e.target || e.srcElement;

			var clickedListItem = closest(eTarget, function(el) {
				return el.tagName === 'A';
			});

			if(!clickedListItem) {
				return;
			}

			var clickedGallery = clickedListItem.parentNode;

			var childNodes = clickedListItem.parentNode.childNodes,
				numChildNodes = childNodes.length,
				nodeIndex = 0,
				index;

			for (var i = 0; i < numChildNodes; i++) {
				if(childNodes[i].nodeType !== 1) { 
					continue; 
				}

				if(childNodes[i] === clickedListItem) {
					index = nodeIndex;
					break;
				}
				nodeIndex++;
			}

			if(index >= 0) {
				openPhotoSwipe( index, clickedGallery );
			}
			return false;
		};

		var photoswipeParseHash = function() {
			var hash = window.location.hash.substring(1),
			params = {};

			if(hash.length < 5) { // pid=1
				return params;
			}

			var vars = hash.split('&');
			for (var i = 0; i < vars.length; i++) {
				if(!vars[i]) {
					continue;
				}
				var pair = vars[i].split('=');  
				if(pair.length < 2) {
					continue;
				}           
				params[pair[0]] = pair[1];
			}

			if(params.gid) {
				params.gid = parseInt(params.gid, 10);
			}

			return params;
		};

		var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
			var pswpElement = document.querySelectorAll('.pswp')[0],
				gallery,
				options,
				items;

			items = parseThumbnailElements(galleryElement);

			// define options (if needed)
			options = {

				galleryUID: galleryElement.getAttribute('data-pswp-uid'),

				getThumbBoundsFn: function(index) {
					// See Options->getThumbBoundsFn section of docs for more info
					var thumbnail = items[index].el.children[0],
						pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
						rect = thumbnail.getBoundingClientRect(); 

					return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
				},

				addCaptionHTMLFn: function(item, captionEl, isFake) {
					if(!item.title) {
						captionEl.children[0].innerText = '';
						return false;
					}
					captionEl.children[0].innerHTML = item.title;
					return true;
				}
				
			};


			if(fromURL) {
				if(options.galleryPIDs) {
					// parse real index when custom PIDs are used 
					// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
					for(var j = 0; j < items.length; j++) {
						if(items[j].pid == index) {
							options.index = j;
							break;
						}
					}
				} else {
					options.index = parseInt(index, 10) - 1;
				}
			} else {
				options.index = parseInt(index, 10);
			}

			// exit if index not found
			if( isNaN(options.index) ) {
				return;
			}



			var radios = document.getElementsByName('gallery-style');
			for (var i = 0, length = radios.length; i < length; i++) {
				if (radios[i].checked) {
					if(radios[i].id == 'radio-all-controls') {

					} else if(radios[i].id == 'radio-minimal-black') {
						options.mainClass = 'pswp--minimal--dark';
						options.barsSize = {top:0,bottom:0};
						options.captionEl = false;
						options.fullscreenEl = false;
						options.shareEl = false;
						options.bgOpacity = 0.85;
						options.tapToClose = true;
						options.tapToToggleControls = false;
					}
					break;
				}
			}

			if(disableAnimation) {
				options.showAnimationDuration = 0;
			}

			// Pass data to PhotoSwipe and initialize it
			gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);

			// see: http://photoswipe.com/documentation/responsive-images.html
			var realViewportWidth,
				useLargeImages = false,
				firstResize = true,
				imageSrcWillChange;

			gallery.listen('beforeResize', function() {

				var dpiRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
				dpiRatio = Math.min(dpiRatio, 2.5);
				realViewportWidth = gallery.viewportSize.x * dpiRatio;


				if(realViewportWidth >= 1200 || (!gallery.likelyTouchDevice && realViewportWidth > 800) || screen.width > 1200 ) {
					if(!useLargeImages) {
						useLargeImages = true;
						imageSrcWillChange = true;
					}
					
				} else {
					if(useLargeImages) {
						useLargeImages = false;
						imageSrcWillChange = true;
					}
				}

				if(imageSrcWillChange && !firstResize) {
					gallery.invalidateCurrItems();
				}

				if(firstResize) {
					firstResize = false;
				}

				imageSrcWillChange = false;

			});

			gallery.listen('gettingData', function(index, item) {
				if( useLargeImages ) {
					item.src = item.o.src;
					item.w = item.o.w;
					item.h = item.o.h;
				} else {
					item.src = item.m.src;
					item.w = item.m.w;
					item.h = item.m.h;
				}
			});

			gallery.init();
		};

		// select all gallery elements
		var galleryElements = document.querySelectorAll( gallerySelector );
		for(var i = 0, l = galleryElements.length; i < l; i++) {
			galleryElements[i].setAttribute('data-pswp-uid', i+1);
			galleryElements[i].onclick = onThumbnailsClick;
		}

		// Parse URL and open gallery if it contains #&pid=3&gid=1
		var hashData = photoswipeParseHash();
		if(hashData.pid && hashData.gid) {
			openPhotoSwipe( hashData.pid,  galleryElements[ hashData.gid - 1 ], true, true );
		}
	};

	initPhotoSwipeFromDOM('.picwrap');

})();
</script>
<div class="infoLxfs1"><div class="infostrong">联系方式</div><div class="infok1"><strong>提示：</strong>联系我时，请说明在<%=sWebName %>看到的，谢谢！</div></div>
<div class="infoContact"><%if (bState){ %>
<strong>联系人：</strong><%=sName%>（<%=sUserClass %>）<br />
<strong>所在地：</strong><%=sAddress%><%=sAddress1%><br />
<%=sTel%><%=sWeixin%><%=sQq%>
<%if(sShowTel=="1") {%>
<div class="btnShowTel" id="showContact">查看完整联系方式</div>
<script type="text/javascript">
var id="<%=id.ToString()%>";
var contactHtml="";
  $("#showContact").click(function(){
  if(contactHtml=="")
  {
  	$.get("/services/?s=showContact&id="+id,function(data,status){
	contactHtml='<div class="kfContactShowBox">'+data+'</div>';
    layer.open({
  		type: 1,
  		title:'联系方式',
  		skin: 'layui-layer-rim', //加上边框
  		area: ['420px', '240px'], //宽高
		shadeClose: true,
  		content: contactHtml
	});
	});
  }
  else
  {
  	layer.open({
  	type: 1,
  	title:'联系方式',
  	skin: 'layui-layer-rim', //加上边框
  	area: ['420px', '240px'], //宽高
	shadeClose: true,
 	content: contactHtml
	});
  }
  });
</script>
<%} %>
<%}else { %>此信息已过期！<%} %>
<div class="line"></div>
<script type="text/javascript">
var kfShareState="";
var kfShareUrl="";
var kfShareTitle="";
</script>
<script type="text/javascript" src="/js/share.js"></script>
</div>
</div>
<div class="infoContent">
<div class="kf_title_1"><em></em>快速导航：</div>
<div class="qlinkCon">
<ul>
<%=sQlink %>
</ul>
<div class="clear"></div>
</div>
</div>
<div class="infoContent"><a name="p" id="p">&nbsp;</a>
<div class="kf_title_1"><em></em>信息评论：</div>
<%=reviewStr %>
<div class="reviewpost">
<div class="title">发布评论：</div>
<div><form action="/action/?s=postReview" method="post" name="reviewpost">
<table width="665" class="formTable" border="0" cellpadding="5" cellspacing="0">
<tr><td width="80" class="head">评论内容：</td><td><textarea name="content" class="postTextarea" rows="3" cols="60"><%=reviewContent %></textarea></td></tr>
<%if(s11!="1"){ %><tr><td class="head">验证码：</td><td><div class="fl5"><input type="text" size="8" name="validate" class="textInputC" /></div><div class="fl5"><img src="/validate/?cache=<%=sRandom %>" id="valiPic" onclick="this.src='/validate/?cache='+Math.random()" alt="点击更换图片" style="cursor:pointer" align="middle" /></div><div class="fl5"><span class="freshVali" onclick="document.getElementById('valiPic').src='/validate/?cache='+Math.random()">看不清？换一张</span></div></td></tr><%} %>
<tr><td class="head"></td><td><input type="submit" class="postSubmit" value="发表评论" /></td></tr>
</table>
<input type="hidden" name="id" value="<%=id.ToString()%>" />
</form></div>
</div>
</div>
</div>
<div class="adcode">
<div class="kf_title_1"><em></em>相关信息：<a class="more" href="<%=aboutLink %>">更多&gt;&gt;</a></div>
<div class="xgxxc">
<ul><%=aboutMess %></ul>
<div class="clear"></div>
</div>
<div><%=sAd %></div>
</div>
<div class="clear"></div>
</div>
</div>
<script type="text/javascript">
var sMidList="<%=id.ToString()%>";
var sViewClass="1";
$.ajax({ url: "/services/?s=viewu",type:"POST",data:"c="+sViewClass+"&v="+sMidList});
</script>
<qth8:foot ID="foot" runat="server" /></div>
</div>
</body>
</html>
