📄 photoview.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %><%@ page import="jasp.buildin.*, jasp.vbs.*, jasp.util.*" %><%@ page extends="jasp.servlet.JspBase" %><% try { jspinit(request,response,application,out,"jasp0");%><% Session.setCodePage(936); variant username = new variant(); String photoid = ""; String groupid = ""; jasp.adodb.Recordset rs = null; String sql = ""; jasp.adodb.Recordset rs_comment = null; int i = 0; jasp.adodb.Recordset prephoto = null; String prephoto_str = ""; jasp.adodb.Recordset nextphoto = null; String nextphoto_str = "";%><%@ include file="../include/connect.jsp" %><html><head><META http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="../CSS/Hompy/hompy.css" type=text/css rel=stylesheet><title></title><script language="JavaScript"><!--function showPersonacon(persona_view_id) { var span_name = "persona"+persona_view_id; var open = document.getElementById(span_name).style.display; if(open == "none") { document.getElementById(span_name).style.display = ''; } else { document.getElementById(span_name).style.display = 'none'; }}function setPersona(frmName, cid, rid, pid, pimg) { var srcName = "personasrc" + cid; var span_name = "persona" + cid; document.getElementById(srcName).src = pimg; document.forms[frmName].personaconid.value = pid; if(document.getElementById(span_name).style.display == "") { document.getElementById(span_name).style.display = 'none'; }}function formcheck(frmName) { if(frmName.comment.value.length ==0) { alert("评论不能为空!"); frmName.comment.focus(); return false; }}function ask(msg) { if( msg=='' ) { msg='真的要这样做吗?'; } if (confirm(msg)) { return true; } else { return false; }}//--></script><script language="JavaScript"><!--//图片按比例缩放var flag=false;function DrawImage(ImgD,iwidth,iheight){ //参数(图片,允许的宽度,允许的高度) var image=new Image(); image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height+"点击察看原始尺寸"; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height+"点击察看原始尺寸"; } }} //--></script></head><body oncontextmenu="window.event.returnValue=false" onselectstart="return false"><TABLE cellSpacing=0 cellPadding=0 width=473 border=0> <TBODY> <TR> <TD height=27 align="center"><table width="97%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td align="right"><a href="photolist.jsp?username=<%= Request.QueryString("username").getValue() %>&viewmode=1&groupid=<%= Request.QueryString("groupid").getValue() %>"><img src="../Images/Hompy/btn_list.gif" width="87" height="19" border="0" align="absmiddle"></a> </td> </tr> </table> </TD> </TR> <TR> <TD height=24><div align="center"><% username.set(checkstr(new variant(Request.QueryString("Username")))); photoid = checkstr(new variant(Request.QueryString("PhotoID"))); groupid = checkstr(new variant(Request.QueryString("GroupID"))); if (photoid.equals("") || username.equals(new variant("")) || groupid.equals("")) {%><table width="97%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="HEIGHT: 3px;BORDER-TOP: #cecfce 1px solid; BORDER-BOTTOM: #cecfce 1px dotted; BACKGROUND-COLOR: #f7f7f7"><img src="" width="3" height="3" alt=""></td> </tr> <tr> <td></td> </tr> <tr> <td height="108" align="center">缺少参数!</td> </tr> <tr> <td height="1" style="BORDER-BOTTOM: #cecfce 1px solid;"><img name="" src="" width="1" height="1" alt=""> </td> </tr></table><% Response.End(); } else { rs = new jasp.adodb.Recordset(); sql = "select * from iisALLPhoto where PhotoID=" + photoid + ""; rs.Open(sql, cn, 1, 3); rs.setItem("Hit", rs.getItem("Hit").getValue().add(new variant(1))); rs.Update(); rs.Close(); rs = (jasp.adodb.Recordset)null; rs = new jasp.adodb.Recordset(); sql = "select * from iisALLPhoto where PhotoID=" + photoid + ""; rs.Open(sql, cn, 1, 1);%> <table width="97%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center" style="HEIGHT: 24px;BORDER-TOP: #cecfce 1px solid; BORDER-BOTTOM: #cecfce 1px dotted; BACKGROUND-COLOR: #f7f7f7"><b><%= rs.getItem("Topic").getValue() %></b></td> </tr> <tr> <td width="37%">作者:<a class=popmenu href="hompy.jsp?username=<%= rs.getItem("Username").getValue() %>" target="_blank"><%= rs.getItem("Username").getValue() %></a></td> <td width="49%">发表日期:<SPAN style="FONT-SIZE: 11px; COLOR: #9c9a9c"><SPAN><%= rs.getItem("Posttime").getValue() %></span></span></td> <td width="14%">点击:<SPAN style="FONT-SIZE: 11px; COLOR: #ff6600"><SPAN><%= rs.getItem("Hit").getValue() %></span></span></td> </tr> <tr> <td colspan="3" align=middle style="PADDING-TOP: 10px;PADDING-BOTTOM: 10px"><A href="../UploadPhoto/<%= username %>/<%= rs.getItem("Filename").getValue() %>" target="blank"><img src="../UploadPhoto/<%= username %>/<%= rs.getItem("Filename").getValue() %>" border="0" align="absmiddle" onload="javascript:DrawImage(this,300,500)"></a></td> </tr> <tr> <td height="24" colspan="3" valign="top">转贴:<SPAN style="FONT-SIZE: 11px; WIDTH: 420px; COLOR: #9c9a9c"><SPAN>http://www.goshow8.com/photoview.jsp?id=<%= rs.getItem("PhotoID").getValue() %> <a href=javascript: onclick=alert('复制成功!');clipboardData.setData('Text','http://www.goshow8.com/photoview.jsp?id=<%= rs.getItem("PhotoID").getValue() %>') ><img src="../Images/Hompy/copy_s.gif" width="32" height="13" border="0" align="absmiddle"></a> <% if (Session.getItem("username").equals(username)) {%> <a class="orange" href="photoedit.jsp?photoid=<%= rs.getItem("PhotoID").getValue() %>">编辑</a> | <a class="orange" href="javascript:if(ask('真的要删除吗?')) location.href='photodel.jsp?photoid=<%= rs.getItem("PhotoID").getValue() %>';">删除</a> <% }%> </SPAN></SPAN></td> </tr> <tr> <td height="37" colspan="3" valign="top" style="BACKGROUND-COLOR: #f7f7f7"> <A name=comment></A> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD style="BACKGROUND-IMAGE: url(../Images/Hompy/li_x_02.gif)" height=1></TD> </TR><% rs_comment = new jasp.adodb.Recordset(); sql = "select * from iisPhotocomment where PhotoID=" + rs.getItem("PhotoID").getValue() + ""; rs_comment.Open(sql, cn, 1, 1); if (!(rs_comment.getEOF()) || rs_comment.getBOF()) { i = 0; while (!(rs_comment.getEOF())) {%> <TR> <TD style="PADDING-RIGHT: 0px; PADDING-LEFT: 11px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" bgColor=#f0f0f0 height=27> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -