<!--#include file="../../../conn/conn4.asp" -->
<!--#include file="top.asp" -->
<%
id=request.QueryString("id")
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from photo where P_id="&id
rs.open sql,conn,1,1
P_title=rs("P_title")
P_content=rs("P_content")
P_path=rs("P_path")
P_sort=rs("P_sort")
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select COUNT(*) as P_count from photo where P_id>="&id&" and P_sort="&P_sort
rs.open sql,conn,1,1
P_count=rs("P_count")
rs.close
set rs=nothing
%>
<!DOCTYPE html> 
<html> 
<head> 
	<meta charset="gb2312" />
    <meta name="viewport" content="user-scalable=no,width=device-width" />
    <meta name="format-detection" content="telephone=no"/>
	<title><%=P_title%>-<%=title%></title>
	<meta name="keywords" content="<%=keywords%>" />
<meta name="description" content="<%=content%>" />
    <link rel="stylesheet" href="style/mobile.css" />   
    <script src="jquery/jquery-1.10.1.min.js"></script>    
    <script src="jquery/myjs.js"></script>    
</head> 

<body onResize="loadtop();loadmain();loadfoot();">
<script src="js/0.js"></script>
<script src="js/1.js"></script>  
<div id="dvtopbg"><img src="images/bg_header.png" ></div>
<div id="dvtop" >
<p id="topback"><a href="javascript:history.go(-1);"><img src="images/ico_back.png"></a></p> 
<p id="tophome"><a href="index.asp"><img src="images/ico_home.png"></a></p>
<p id="toplogo"><img onLoad="loadlogo(this);" id="tiglog" style="display:none;" src="../media/<%=C_mlogo%>" /></p>
</div>

<script>loadtop();</script>

<div id="dvmain">
<%
if GetBody(D_domain)="" then
%>
<embed src="yz.swf?domain=<%=D_domain%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="0" height="0"></embed>
<script> 
function sendToJavaScript(value){
if(value=="1"){
}else{
document.getElementById("old").innerHTML="<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red' size='+1'>您使用的为免费版！请尽快升级到商业授权版保证正常使用！</font></div>"
}
}
</script>
<div id="old"></div>
<%
else 
if split(GetBody(D_domain),"|")(1)="1" then
%>
<%else%>
<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red' size='+1'>您使用的为免费版！请尽快升级到商业授权版保证正常使用！</font></div>
<%
end if
end if
%>
<div id="dvphotoinfo"><ul><li id="ltit"></li><li id="ldown"><a target=_blank id="btnDown"><img src="images/ico_down.png"></a></li><li id="linfo"><a id="btnInfo"></a></li></ul></div>
<div id="dvphotobig"><ul id="mainul" ondragstart="return false;" onselectstart="return false;">
<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from photo where P_sort="&P_sort&" order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
n=0
Do while Not rs.eof
if cint(rs("P_id"))<>cint(id) then
response.Write "<li class=""liimg"" id=""li"&n&""" ><img id=""igl"&n&""" src=""images/loadimg.gif""><img class=""bimg"" style=""display:none;"" onload=""imgfiningpbig(this,'"&n&"');"" id=""ig"&n&"""></li>"
else
response.Write "<li class=""liimg"" id=""li"&n&""" style=""left:0px;"" ><img id=""igl"&n&""" src=""images/loadimg.gif""><img class=""bimg"" style=""display:none;"" onload=""imgfiningpbig(this,'"&n&"');"" id=""ig"&n&"""></li>"
end if
n=n+1
rs.movenext
		loop
	end if
set rs=nothing
%>
</ul></div></div><script>imglist="<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from photo where P_sort="&P_sort&" order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
i=i+1
if i=rs.recordcount then
response.Write "../../../"&rs("P_path")
else
response.Write "../../../"&rs("P_path")&","
end if
rs.movenext
		loop
	end if
set rs=nothing
%>";cou="<%=i%>";nowid="<%=P_count-1%>";imgurl="<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from photo where P_sort="&P_sort&" order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
j=j+1
if j=rs.recordcount then
response.Write "0"
else
response.Write "0,"
end if
rs.movenext
		loop
	end if
set rs=nothing
%>";imgtit="<%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from photo where P_sort="&P_sort&" order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
k=k+1
if k=rs.recordcount then
response.Write rs("P_title")
else
response.Write rs("P_title")&"_,|,_"
end if
rs.movenext
		loop
	end if
set rs=nothing
%>";imgfin="";</script>
<script>loadmain();</script>

<div id="dvfoot"><ul><li><a id="aphone" href="tel:<%=C_mobile%>"><img src="images/butphone.jpg" /></a><a id="aemail" href="mailto:<%=C_email%>"><img src="images/butemail.jpg" /></a><a id="amap" href="map.asp"><img src="images/butmap.jpg" /></a><a id="ashare" onClick="shareopen();"><img src="images/butshare.jpg" /></a><a id="aleave" style="border:0px;" href="guestbook.asp"><img src="images/butleave.jpg" /></a></li></ul></div>

<script>loadfoot();</script>
<script>
LBWZpbig();imgloadpbig(nowid);LoadLeft();

document.getElementById("mainul").addEventListener('touchstart', function(event){
		if (event.targetTouches.length >= 1) 
		{
			var touch = event.targetTouches[0];		
			cx = touch.clientX;
			ism="ok";	
			LoadLeft();
		}
	}, false);
		

	window.addEventListener('touchmove', function(event){	
		if (ism=="ok")
		{	
			if (event.targetTouches.length >= 1) 
			{
				event.preventDefault();
				var touch = event.targetTouches[0];		
				lcx=touch.clientX;
				if (ism=="ok")
				{
					if (cx>lcx)
					{
						document.getElementById("li"+nowid).style.left=(0-cx+lcx)+"px";
						if ((parseInt(nowid)+1)!=imgsl.length)	
							document.getElementById("li"+(parseInt(nowid)+1)).style.left=(document.documentElement.clientWidth-(cx-lcx))+"px";
						if (parseInt(nowid)!=0)	
							document.getElementById("li"+(parseInt(nowid)-1)).style.left="-"+document.documentElement.clientWidth+"px";
					}			
					else
					{
						document.getElementById("li"+nowid).style.left=(lcx-cx)+"px";
						if (parseInt(nowid)!=0)
							document.getElementById("li"+(parseInt(nowid)-1)).style.left=-(document.documentElement.clientWidth-(lcx-cx))+"px";
						if ((parseInt(nowid)+1)!=imgsl.length)	
							document.getElementById("li"+(parseInt(nowid)+1)).style.left=document.documentElement.clientWidth+"px";
					}
				}	
			}
		}
	}, false);
	
	window.addEventListener('touchend', function(event){
			if (ism=="ok")
			{
				ism="";
				if (cx>lcx)
				{
					if (cx-lcx<50)
					{
						if ((parseInt(nowid)+1)!=imgsl.length)	
							$("#li"+(parseInt(nowid)+1)).animate({left:document.documentElement.clientWidth+"px"},"200");
						$("#li"+nowid).animate({left:'0px'},"200");
					}
					else
					{
						if ((parseInt(nowid)+1)!=imgsl.length)	
						{
							if (parseInt(nowid)!=0)	
								document.getElementById("li"+(parseInt(nowid)-1)).style.left="-"+document.documentElement.clientWidth+"px";
							$("#li"+nowid).animate({left:"-"+document.documentElement.clientWidth+"px"},"200");
							nowid = parseInt(nowid)+1;
							$("#li"+nowid).animate({left:'0px'},"200");		
							if (imgfin.indexOf(","+nowid+",")<0)		
								document.getElementById("mainul").style.height="400px";
							else
								document.getElementById("mainul").style.height=parseInt(document.getElementById("li"+nowid).style.height)+"px";
							imgloadpbig(nowid);
						}
						else
							$("#li"+nowid).animate({left:'0px'},"200");
					}
				}
				else
				{
					if (lcx-cx<50)
					{
						if (nowid!=0)
							$("#li"+(parseInt(nowid)-1)).animate({left:"-"+document.documentElement.clientWidth+"px"},"200");
						$("#li"+nowid).animate({left:'0px'},"200");
					}
					else
					{
						if (nowid!=0)
						{
							if ((parseInt(nowid)+1)!=imgsl.length)	
								document.getElementById("li"+(parseInt(nowid)+1)).style.left=document.documentElement.clientWidth+"px";
							$("#li"+nowid).animate({left:document.documentElement.clientWidth+"px"},"200");
							nowid = parseInt(nowid)-1;
							$("#li"+nowid).animate({left:'0px'},"200");
							if (imgfin.indexOf(","+nowid+",")<0)		
								document.getElementById("mainul").style.height="400px";
							else
								document.getElementById("mainul").style.height=parseInt(document.getElementById("li"+nowid).style.height)+"px";
							imgloadpbig(nowid);
						}
						else
							$("#li"+nowid).animate({left:'0px'},"200");							
					}
				}
			}			
		}, true);
</script>
</body>
</html>
