打开网页(即点放大时)可以显示出来,但无法显示微缩图。请大家帮我看看代码。谢谢!显示页:poto.asp<!--#include file="commond.asp" -->
<!--#include file="include/function.asp" -->
<!--#include file="include/ubbcode.asp" -->
<%Dim siteText
siteText = "相册"
siteTitle = siteText&" - "
%>
<!--#include file="header.asp" -->
<table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<td align="right">
<%Dim Arr_phCates '写入下载分类
Dim ph_CateList
Set ph_CateList=Server.CreateObject("ADODB.RecordSet")
SQL="SELECT cate_ID,cate_Name,cate_Order,cate_Image,cate_Nums FROM photo_Cate ORDER BY cate_Order ASC"
ph_CateList.Open SQL,Conn,1,1
SQLQueryNums=SQLQueryNums+1
If ph_CateList.EOF And ph_CateList.BOF Then
Redim Arr_phCates(3,0)
Else
Arr_phCates=ph_CateList.GetRows
Dim Down_CateNums,Down_CateNumI
Down_CateNums=Ubound(Arr_phCates,2)
For Down_CateNumI=0 To Down_CateNums
Response.Write("<img src="""&Arr_phCates(3,Down_CateNumI)&""" border=""0"" align=""absmiddle"" /> <a href=""photo.asp?cateID="&Arr_phCates(0,Down_CateNumI)&""" title=""该分类收藏"&Arr_phCates(4,Down_CateNumI)&"张精彩图片"">"&Arr_phCates(1,Down_CateNumI)&"</a> ")
Next
End If
ph_CateList.Close
Set ph_CateList=Nothing%>
<td>
<tr>
</table>
<%Dim Url_Add,cateID,SQLFiltrate
cateID=CheckStr(Trim(Request.QueryString("cateID")))
SQLFiltrate="WHERE "
Url_Add="?"
IF IsInteger(cateID)=True Then
SQLFiltrate=SQLFiltrate&" ph_CateID="&CateID&" AND"
Url_Add=Url_Add&"CateID="&CateID&"&"
End IFDim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If%><table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<%Dim photos
Set photos=Server.CreateObject("Adodb.Recordset")
SQL="SELECT L.*,C.cate_Name,C.cate_Image FROM photo AS L,photo_Cate AS C "&SQLFiltrate&" C.cate_ID=L.ph_CateID ORDER BY ph_PostTime DESC"
photos.Open SQL,CONN,1,1
SQLQueryNums=SQLQueryNums+1
If photos.EOF AND photos.BOF Then
Response.Write("<td align='center'>暂时没有收藏图片</td>")
Else
photos.PageSize=12
photos.AbsolutePage=CurPage
coolsite_Num=photos.RecordCount
Dim coolsite_Num,MultiPages,PageCount
MultiPages=""&MultiPage(coolsite_Num,12,CurPage,Url_Add)&""
Dim n,m,photo_main
n = 1
m = 4 '定义一行显示de列
Do Until photos.EOF OR PageCount=12
Dim ph_ID,ph_Author,ph_Views,Ph_Images,ph_Comments
ph_ID=photos("ph_ID")
ph_Author=photos("ph_Author")
ph_Views=photos("ph_Views")
Dim ph_Img,ph_Image
ph_Img=photos("ph_Image")
ph_Image=split(ph_Img,vbcrlf)
Dim ph_Image0
ph_Image0=ph_Image(0)
If Not (Right(ph_Image0, 1) = "@") Then ph_Image0 = ph_Image0 & "@"
ph_Images=split(ph_Image0,"@")
ph_Comments=photos("ph_Comments")
If (n mod 2 = 1) then 'mod和% 取模远算符
photo_main = "photo_content_a"
else
photo_main = "photo_content_b"
end if
Response.Write("<a name=""photos"&ph_ID&"""></a>")%>
<td width="25%" valign="top" class="<%=""&photo_main&""%>">
<p align="center" style="padding-top: 20px;">
<a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>">
<%if photos("ph_Thumbnail")<>Empty Then
Response.Write("<img src="""&photos("ph_Thumbnail")&"?v=0"" border=0 width=120 height=120 />")
elseif photos("ph_Thumbnail")=Empty Then
Response.Write("<img src="""&Ph_Images(0)&"?v=0"" border=0 width=120 height=120 />")
else
Response.Write("<img src=""images/nonpreview.gif"" border=0 width=120 height=120 />")
end if%>
</a>
</p>
<p align="center">
<img src="images/icon_public.gif" border="0" align="absbottom" alt="" />
<strong><a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>" target="_blan"><%=""&photos("ph_Name")&""%></a></strong>
<%If memStatus="SupAdmin" then Response.Write(" <a href=""photoedit.asp?photoID="&photos("ph_ID")&""" title=""编辑"" target=""_blank""><img src=""images/icon_edit_02.gif"" border=""0"" align=""absmiddle"" /></a>")%>
</p>
<div class="photo_solidline"></div>
<p>摘要:</p>
<p style="text-indent: 20px;"><%=""&(UbbCode(HTMLEncode(cutStr(photos("ph_Re"),110)),0,0,1,1,0))&""%></p>
<p>浏览次数:<%=""&ph_Views&""%> 评论:<%=""&ph_Comments&""%></p>
<p>添加时间 :<%=""&photos("ph_PostTime")&""%></p>
</td>
<%If n = m then
Response.Write("<tr></tr>")
n = 1
Else
n = n + 1
End If
photos.MoveNext
PageCount=PageCount+1
Loop
End If%>
<tr>
<td colspan=4><%=""&MultiPages&""%></td>
</tr>
</table>
<%photos.Close
Set photos=Nothing%>
<!--#include file="include/function.asp" -->
<!--#include file="include/ubbcode.asp" -->
<%Dim siteText
siteText = "相册"
siteTitle = siteText&" - "
%>
<!--#include file="header.asp" -->
<table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<td align="right">
<%Dim Arr_phCates '写入下载分类
Dim ph_CateList
Set ph_CateList=Server.CreateObject("ADODB.RecordSet")
SQL="SELECT cate_ID,cate_Name,cate_Order,cate_Image,cate_Nums FROM photo_Cate ORDER BY cate_Order ASC"
ph_CateList.Open SQL,Conn,1,1
SQLQueryNums=SQLQueryNums+1
If ph_CateList.EOF And ph_CateList.BOF Then
Redim Arr_phCates(3,0)
Else
Arr_phCates=ph_CateList.GetRows
Dim Down_CateNums,Down_CateNumI
Down_CateNums=Ubound(Arr_phCates,2)
For Down_CateNumI=0 To Down_CateNums
Response.Write("<img src="""&Arr_phCates(3,Down_CateNumI)&""" border=""0"" align=""absmiddle"" /> <a href=""photo.asp?cateID="&Arr_phCates(0,Down_CateNumI)&""" title=""该分类收藏"&Arr_phCates(4,Down_CateNumI)&"张精彩图片"">"&Arr_phCates(1,Down_CateNumI)&"</a> ")
Next
End If
ph_CateList.Close
Set ph_CateList=Nothing%>
<td>
<tr>
</table>
<%Dim Url_Add,cateID,SQLFiltrate
cateID=CheckStr(Trim(Request.QueryString("cateID")))
SQLFiltrate="WHERE "
Url_Add="?"
IF IsInteger(cateID)=True Then
SQLFiltrate=SQLFiltrate&" ph_CateID="&CateID&" AND"
Url_Add=Url_Add&"CateID="&CateID&"&"
End IFDim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If%><table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<%Dim photos
Set photos=Server.CreateObject("Adodb.Recordset")
SQL="SELECT L.*,C.cate_Name,C.cate_Image FROM photo AS L,photo_Cate AS C "&SQLFiltrate&" C.cate_ID=L.ph_CateID ORDER BY ph_PostTime DESC"
photos.Open SQL,CONN,1,1
SQLQueryNums=SQLQueryNums+1
If photos.EOF AND photos.BOF Then
Response.Write("<td align='center'>暂时没有收藏图片</td>")
Else
photos.PageSize=12
photos.AbsolutePage=CurPage
coolsite_Num=photos.RecordCount
Dim coolsite_Num,MultiPages,PageCount
MultiPages=""&MultiPage(coolsite_Num,12,CurPage,Url_Add)&""
Dim n,m,photo_main
n = 1
m = 4 '定义一行显示de列
Do Until photos.EOF OR PageCount=12
Dim ph_ID,ph_Author,ph_Views,Ph_Images,ph_Comments
ph_ID=photos("ph_ID")
ph_Author=photos("ph_Author")
ph_Views=photos("ph_Views")
Dim ph_Img,ph_Image
ph_Img=photos("ph_Image")
ph_Image=split(ph_Img,vbcrlf)
Dim ph_Image0
ph_Image0=ph_Image(0)
If Not (Right(ph_Image0, 1) = "@") Then ph_Image0 = ph_Image0 & "@"
ph_Images=split(ph_Image0,"@")
ph_Comments=photos("ph_Comments")
If (n mod 2 = 1) then 'mod和% 取模远算符
photo_main = "photo_content_a"
else
photo_main = "photo_content_b"
end if
Response.Write("<a name=""photos"&ph_ID&"""></a>")%>
<td width="25%" valign="top" class="<%=""&photo_main&""%>">
<p align="center" style="padding-top: 20px;">
<a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>">
<%if photos("ph_Thumbnail")<>Empty Then
Response.Write("<img src="""&photos("ph_Thumbnail")&"?v=0"" border=0 width=120 height=120 />")
elseif photos("ph_Thumbnail")=Empty Then
Response.Write("<img src="""&Ph_Images(0)&"?v=0"" border=0 width=120 height=120 />")
else
Response.Write("<img src=""images/nonpreview.gif"" border=0 width=120 height=120 />")
end if%>
</a>
</p>
<p align="center">
<img src="images/icon_public.gif" border="0" align="absbottom" alt="" />
<strong><a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>" target="_blan"><%=""&photos("ph_Name")&""%></a></strong>
<%If memStatus="SupAdmin" then Response.Write(" <a href=""photoedit.asp?photoID="&photos("ph_ID")&""" title=""编辑"" target=""_blank""><img src=""images/icon_edit_02.gif"" border=""0"" align=""absmiddle"" /></a>")%>
</p>
<div class="photo_solidline"></div>
<p>摘要:</p>
<p style="text-indent: 20px;"><%=""&(UbbCode(HTMLEncode(cutStr(photos("ph_Re"),110)),0,0,1,1,0))&""%></p>
<p>浏览次数:<%=""&ph_Views&""%> 评论:<%=""&ph_Comments&""%></p>
<p>添加时间 :<%=""&photos("ph_PostTime")&""%></p>
</td>
<%If n = m then
Response.Write("<tr></tr>")
n = 1
Else
n = n + 1
End If
photos.MoveNext
PageCount=PageCount+1
Loop
End If%>
<tr>
<td colspan=4><%=""&MultiPages&""%></td>
</tr>
</table>
<%photos.Close
Set photos=Nothing%>
<!--#include file="include/function.asp" -->
<!--#include file="include/md5code.asp" -->
<!--#include file="header.asp" -->
<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#ffffff">
<tr>
<td>
<%IF memStatus<>"Admin" AND memStatus<>"SupAdmin" Then%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="wordbreak">
<tr>
<td height="120" align="center" valign="middle">
<h4>没有权限添加图片</h4>
<p> </p>
<a href="default.asp">点击返回主页面</a> 或者 <a href="login.asp">用管理员帐户重新登陆</a>
</td>
</tr>
</table>
<%Else
IF Request.Form("PhAdd")=Empty Then%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="photo_bg">
<tr align="center">
<td colspan="2">添加图片</td>
</tr>
<form name="inputform" method="post" action="" onSubmit="return CheckInputForm();">
<tr bgcolor="#FFFFFF">
<td align="right" nowrap><strong>图片分类:</strong></td>
<td>
<select name="ph_CateID" id="ph_CateID">
<option value="0">-- 请选择分类 --</option>
<%Dim Arr_phCates '写入下载分类
Dim ph_CateList
Set ph_CateList=Server.CreateObject("ADODB.RecordSet")
SQL="SELECT cate_ID,cate_Name FROM photo_Cate ORDER BY cate_Order ASC"
ph_CateList.Open SQL,Conn,1,1
SQLQueryNums=SQLQueryNums+1
If ph_CateList.EOF And ph_CateList.BOF Then
Redim Arr_phCates(3,0)
Else
Arr_phCates=ph_CateList.GetRows
Dim ph_CateNums,ph_CateNumI
ph_CateNums=Ubound(Arr_phCates,2)
For ph_CateNumI=0 To ph_CateNums%>
<option value="<%=""&Arr_phCates(0,ph_CateNumI)&""%>"><%=""&Arr_phCates(1,ph_CateNumI)&""%></option>
<%Next
End If
ph_CateList.Close
Set ph_CateList=Nothing%>
</select>
<font color=red>*</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="112" align="right" nowrap><strong>图片名称:</strong></td>
<td width="100%"><input name="ph_Name" type="text" class="input_bg" id="ph_Name" size="40"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right"><strong>设置属性:</strong></td>
<td>
<input name="Ph_DisVote" type="checkbox" id="Ph_DisVote" value="1">禁止打分
<input name="ph_DisComm" type="checkbox" id="ph_DisComm" value="1">禁止评论
</td>
</tr>
<script language="JavaScript" src="include/ubbcode.js"></script>
<tr bgcolor="#FFFFFF">
<td align="right"><strong>缩略图:</strong></td>
<td><input name="ph_Thumbnail" type="text" class="input_bg" id="ph_Thumbnail" value="" size="60" maxlength="200"> 推荐缩略图大小为100*100</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right" valign="top"><strong>图片地址:</strong></td>
<td>
<textarea name="ph_Image" style="width:99%" rows="8" wrap="VIRTUAL" id="ph_Image" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyDown="javascript: ctlent();" onKeyUp="javascript: storeCaret(this);"></textarea>
<div>1.您可以添加多个图片地址,每张图片用回车分隔。在添加多张图片的时候,请注意<font color=red>最后一张图片的后面不要加回车</font>!</div>
<div>2.您可以添加多张图片的简要说明,每张图片的简要说明之前用"<font color="blue">@</font>"隔开。而每一个简要说明都对应你所添加的图片。</div>
<div>3.例如: http://www.nmacw.com/1.jpg@这是一张测试图片</div>
<div style="text-indent: 42px;">http://www.nmacw.com/2.jpg@这是第二张测试图片</div>
<div style="text-indent: 42px;">http://www.nmacw.com/3.jpg 注: 此图不加说明</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right" valign="top"><strong>简要内容:</strong></td>
<td>
<textarea name="message" style="width:99%" rows="6" wrap="VIRTUAL" id="Message" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyDown="javascript: ctlent();" onKeyUp="javascript: storeCaret(this);"></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="right"><strong>上传图片:</strong></td>
<td>
<iframe border="0" frameborder="0" framespacing="0" height="23" marginheight="0" marginwidth="0" noresize"noResize" scrolling="No" width="100%" vspale="0" src="attachment_e.asp"></iframe>
<br>仅支持<font color=red>GIF,JPG,BMP,PNG</font>格式
</td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="2">
<input name="PhAdd" type="hidden" value="Post">
<input name="ph_Vote" type="hidden" value="0|0|0|0|0">
<input name="SubmitBtn" type="submit" value=" 提交 ">
<input name="L_Reset" type="reset" id="L_Reset" value="重置">
</td>
</tr>
</form>
</table>
<%Else%>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="photo_bg">
<tr>
<td align="center" nowrap><h4>保存</h4></td>
</tr>
<tr>
<td align="center" height="120" valign="middle" bgcolor="#FFFFFF">
<%IF Request.Form("message")=Empty OR Request.Form("ph_CateID")=0 OR Request.Form("ph_Name")=Empty OR Request.Form("ph_Image")=Empty Then
Response.Write("<p>1.必须选择图片分类</p><p>2.必须填写图片名称</p><p>3.必须填写图片地址</p><p>4.必须填写图片简介</p><p> </p><p><a href='javascript:history.go(-1);'>请返回重新填写</a></p>")
Else
Dim ph_CateID,ph_Name,ph_Re,ph_Thumbnail,ph_Image,Ph_DisVote,ph_DisComm,ph_Vote
ph_CateID=CheckStr(Request.Form("ph_CateID"))
ph_Name=CheckStr(Request.Form("ph_Name"))
ph_Re=CheckStr(Request.Form("message"))
ph_Thumbnail=CheckStr(Request.Form("ph_Thumbnail"))
ph_Image=CheckStr(Request.Form("ph_Image"))
IF Request.Form("Ph_DisVote")="1" Then
Ph_DisVote=True
Else
Ph_DisVote=False
End IF
IF Request.Form("ph_DisComm")="1" Then
ph_DisComm=True
Else
ph_DisComm=False
End IF
ph_Vote=CheckStr(Request.Form("ph_Vote"))
Conn.ExeCute("INSERT INTO photo(ph_CateID,ph_Name,ph_Author,ph_Thumbnail,ph_Image,ph_Re,ph_DisComm,Ph_DisVote,ph_Vote) VALUES ("&ph_CateID&",'"&ph_Name&"','"&memName&"','"&ph_Thumbnail&"','"&ph_Image&"','"&ph_Re&"',"&ph_DisComm&","&Ph_DisVote&",'"&ph_Vote&"')")
Conn.ExeCute("UPDATE photo_Cate SET cate_Nums=cate_Nums+1 WHERE cate_ID="&ph_CateID&"")
Conn.ExeCute("UPDATE blog_info SET blog_PhotoNums=blog_PhotoNums+1")
Dim PhID
PhID=Conn.ExeCute("SELECT TOP 1 ph_ID FROM photo ORDER BY ph_ID DESC")(0)
SQLQueryNums=SQLQueryNums+4
Response.Write("<p>提交成功</p><p> </p><p><a href=""default.asp"">点击返回首页</a></p><p> </p><p><a href='photoshow.asp?photoID="&PhID&"'>返回你所发表的图片</a></p><p> </p><p>或者等待3秒后自动返回你所发表的图片<meta http-equiv='refresh' content='3;url=photoshow.asp?photoID="&PhID&"'>")
End IF%>
</td>
</tr>
</table>
<%End IF
End IF%>
</td>
</tr>
</table>
<table width="710" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<td>
<%IF Request.QueryString("action")="postcomm" Then
Dim ph_commID,msg_Title,msg_Content
ph_commID=Request.Form("ph_commID")
dim server_v1,server_v2
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
Response.write"<script>alert(""你提交的路径有误,禁止从站点外部提交数据请不要乱该参数!"");history.go(-1);</script>"
Response.end
elseIf IsInteger(ph_commID)=False Then
Response.Write("<script>alert(""参数出现错误"");history.go(-1);</script>")
Response.End
ElseIf (memStatus<>"SupAdmin" And memStatus<>"Admin") And DateDiff("s",Request.Cookies(CookieName)("memLastPost"),Now())<10 Then
Response.Write("<script>alert(""你发表评论速度太快了,请10秒后再操作!"");history.go(-1);</script>")
Response.End
Else
Dim comm_LogQuery,comm_LogISOK
Set comm_LogQuery=Conn.ExeCute("SELECT ph_DisComm FROM Photo WHERE ph_ID="&ph_commID&"")
IF comm_LogQuery.EOF AND comm_LogQuery.BOF Then
comm_LogISOK=1
Else
IF comm_LogQuery(0)=True Then
comm_LogISOK=2
End IF
End IF
Set comm_LogQuery=Nothing
Dim comm_AllreadyMem,comm_AllreadyMemErr
Set comm_AllreadyMem=Server.CreateObject("ADODB.RecordSet")
SQL="SELECT mem_Name,mem_Password,mem_Status,mem_LastIP FROM blog_Member WHERE mem_Name='"&CheckStr(Request.Form("username"))&"'"
comm_AllreadyMem.Open SQL,Conn,1,3
SQLQueryNums=SQLQueryNums+1
IF comm_AllreadyMem.EOF AND comm_AllreadyMem.BOF Then
comm_AllreadyMemErr=0
ElseIF comm_AllreadyMem("mem_Password")=MD5(CheckStr(Request.Form("mem_Password"))) Then
Response.Cookies(CookieName)("memName")=comm_AllreadyMem("mem_Name")
Response.Cookies(CookieName)("memPassword")=comm_AllreadyMem("mem_Password")
Response.Cookies(CookieName)("memStatus")=comm_AllreadyMem("mem_Status")
memName=comm_AllreadyMem("mem_Name")
comm_AllreadyMem("mem_LastIP")=Guest_IP
comm_AllreadyMem.Update
comm_AllreadyMemErr=2
Else
comm_AllreadyMemErr=1
End IF
comm_AllreadyMem.Close
Set comm_AllreadyMem=Nothing
IF CheckStr(Request.Form("message"))=Empty OR CheckStr(Request.Form("username"))=Empty Then
Response.Write("<script>alert(""请将必须信息填写完整!"");history.go(-1);</script>")
Response.End
ElseIF Len(CheckStr(Request.Form("message")))>1008 OR Len(CheckStr(Request.Form("message")))<5 Then
Response.Write("<script>alert(""评论内容不能少于5个字符或超过1008个字符!"");history.go(-1);</script>")
Response.End
ElseIF Len(CheckStr(Request.Form("username")))>12 OR Len(CheckStr(Request.Form("username")))<2 Then
Response.Write("<script>alert(""用户名长度不能少于2或者大于10个字符,5个汉字!"");history.go(-1);</script>")
Response.End
ElseIF IsValidUserName(CheckStr(Request.Form("username")))=False Then
Response.Write("<script>alert(""用户名中含有非法字符!"");history.go(-1);</script>")
Response.End
ElseIF memName=Empty AND comm_AllreadyMemErr=1 Then
Response.Write("<script>alert(""很遗憾,你所使用的用户名已经注册!"");history.go(-1);</script>")
Response.End
ElseIF comm_LogISOK=1 Then
Response.Write("<script>alert(""对不起,你所要评论的不存在或已删除!"");history.go(-1);</script>")
Response.End
ElseIF Not(memStatus="SupAdmin" OR memStatus="Admin") AND comm_LogISOK=2 Then
Response.Write("<script>alert(""对不起,你所评论的日志不允许发表评论!"");history.go(-1);</script>")
Response.End
'屏蔽无聊链接(2002/03/17)
ElseIF Strurls(Request.Form("message"),"[url")>MaxUrl or Strurls(Request.Form("message"),"http://")>MaxHttp then
Response.Write("<script>alert(""您输入的内容有非法链接\n只能有两个连接\n请返回重新输入"");history.go(-1);</script>")
Response.End
Else
Dim comm_Content,comm_memName,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_AutoKEY,comm_memFace,comm_Hide
comm_Content=CheckStr(Request.Form("message"))
comm_memName=CheckStr(Request.Form("username"))
comm_Hide=Request.Form("hidden_message")
'comm_memFace=CheckStr(Request.Form("userface"))
IF comm_Hide=Empty Then comm_Hide=1
IF memName=Empty And comm_AllreadyMemErr<>2 Then
Dim SaveMem,comm_memPassword
SaveMem=Request.Form("SaveMem")
comm_memPassword=MD5(CheckStr(Request.Form("mem_Password")))
IF SaveMem=1 Then
Conn.ExeCute("INSERT INTO blog_Member(mem_Name,mem_Password,mem_LastIP) VALUES ('"&comm_memName&"','"&comm_memPassword&"','"&Guest_IP&"')")
Conn.ExeCute("UPDATE blog_Info SET blog_MemNums=blog_MemNums+1")
SQLQueryNums=SQLQueryNums+2
Response.Cookies(CookieName)("memName")=comm_memName
Response.Cookies(CookieName)("memPassword")=comm_memPassword
Response.Cookies(CookieName)("memStatus")="Member"
End IF
Conn.ExeCute("INSERT INTO photo_Comment(ph_ID,comm_Content,comm_Author,comm_Hide,comm_PostIP) VALUES ("&ph_commID&",'"&comm_Content&"','"&comm_memName&"',"&comm_Hide&",'"&Guest_IP&"')")
SQLQueryNums=SQLQueryNums+1
Else
Conn.ExeCute("INSERT INTO photo_Comment(ph_ID,comm_Content,comm_Author,comm_Hide,comm_PostIP) VALUES ("&ph_commID&",'"&comm_Content&"','"&memName&"',"&comm_Hide&",'"&Guest_IP&"')")
SQLQueryNums=SQLQueryNums+1
End IF
Application.Lock
'Application.Contents(CookieName&"_Photo_LastComm") = ""
Application.UnLock
Conn.ExeCute("UPDATE Photo SET ph_Comments=ph_Comments+1 WHERE ph_ID="&ph_commID&"")
SQLQueryNums=SQLQueryNums+1
Response.Cookies(CookieName)("memLastpost")=Now()
Response.Write("<script>alert(""发表成功,谢谢参与!"");document.location.href=""photoshow.asp?photoID="&ph_commID&"#comment"";</script>")
End If
End If
ElseIF Request.QueryString("action")="delecomm" Then
IF IsInteger(Request.QueryString("commID"))=False OR IsInteger(Request.QueryString("photoID"))=False Then
Response.Write("<script>alert(""参数出现错误"");history.go(-1);</script>")
Response.End
Else
Dim ph_AuthorQuery
Set ph_AuthorQuery=Conn.ExeCute("SELECT ph_Author FROM Photo WHERE ph_ID="&CheckStr(Request.QueryString("photoID")))
SQLQueryNums=SQLQueryNums+1
IF ph_AuthorQuery.EOF AND ph_AuthorQuery.BOF Then
Response.Write("<script>alert(""参数出现错误"");history.go(-1);</script>")
Response.End
Else
IF Not (memStatus="SupAdmin" OR (memStatus="Admin" And memName=ph_AuthorQuery(0))) Then
Response.Write("<script>alert(""你没有权限删除!"");history.go(-1);</script>")
Else
Dim dele_Comm
Set dele_Comm=Conn.ExeCute("SELECT ph_ID,comm_Author FROM photo_Comment WHERE comm_ID="&CheckStr(Request.QueryString("commID")))
SQLQueryNums=SQLQueryNums+1
IF dele_Comm.EOF AND dele_Comm.BOF Then
Response.Write("<script>alert(""没有找到指定数据!"");history.go(-1);</script>")
Else
Conn.ExeCute("UPDATE photo SET ph_Comments=ph_Comments-1 WHERE ph_ID="&dele_Comm("ph_ID"))
Conn.Execute("DELETE * FROM photo_Comment WHERE comm_ID="&CheckStr(Request.QueryString("commID")))
SQLQueryNums=SQLQueryNums+4
Application.Lock
'Application.Contents(CookieName&"_blog_DelPhComm") = ""
Application.UnLock
Response.Write("<script>alert(""删除成功!"");document.location.href=""photoshow.asp?photoID="&CheckStr(Request.QueryString("photoID"))&""";</script>")
End IF
Set dele_Comm=Nothing
End IF
End IF
Set ph_AuthorQuery=Nothing
End IF
ElseIf Request.QueryString("action")="postvote" Then
Dim voteNums,formV,VoteNum0,VoteNum1,VoteNum2,VoteNum3,VoteNum4
ph_commID=Request.Form("ph_commID")
voteNums=Request.Form("voteNums")
voteNum0=Request.Form("voteNum0")
voteNum1=Request.Form("voteNum1")
voteNum2=Request.Form("voteNum2")
voteNum3=Request.Form("voteNum3")
voteNum4=Request.Form("voteNum4")
Dim ph_Vote
select case voteNums
case "1"
voteNum0 = (cint(voteNum0)+1)
case "2"
voteNum1 = (cint(voteNum1)+1)
case "3"
voteNum2 = (cint(voteNum2)+1)
case "4"
voteNum3 = (cint(voteNum3)+1)
case "5"
voteNum4 = (cint(voteNum4)+1)
end select
ph_Vote = voteNum0 & "|" & voteNum1 & "|" & voteNum2 & "|" & voteNum3 & "|" & voteNum4
If voteNums=Empty Or voteNums=0 Then
Response.Write("<script>alert(""请点击分数选项!"");history.go(-1);</script>")
Response.End
ElseIf DateDiff("s",Request.Cookies(CookieName)("ph_Votepost"&ph_commID&""&ph_commID&""),Now())<43200 Then
Response.Write("<script>alert(""你已打过分了,谢谢关注!"");history.go(-1);</script>")
Response.End
Else
<!--#include file="include/function.asp" -->
<!--#include file="include/ubbcode.asp" -->
<%Dim siteText
siteText = "相册"
siteTitle = siteText&" - "
%>
<!--#include file="header.asp" -->
<table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<td align="right">
<%Dim Arr_phCates '写入下载分类
Dim ph_CateList
Set ph_CateList=Server.CreateObject("ADODB.RecordSet")
SQL="SELECT cate_ID,cate_Name,cate_Order,cate_Image,cate_Nums FROM photo_Cate ORDER BY cate_Order ASC"
ph_CateList.Open SQL,Conn,1,1
SQLQueryNums=SQLQueryNums+1
If ph_CateList.EOF And ph_CateList.BOF Then
Redim Arr_phCates(3,0)
Else
Arr_phCates=ph_CateList.GetRows
Dim Down_CateNums,Down_CateNumI
Down_CateNums=Ubound(Arr_phCates,2)
For Down_CateNumI=0 To Down_CateNums
Response.Write("<img src="""&Arr_phCates(3,Down_CateNumI)&""" border=""0"" align=""absmiddle"" /> <a href=""photo.asp?cateID="&Arr_phCates(0,Down_CateNumI)&""" title=""该分类收藏"&Arr_phCates(4,Down_CateNumI)&"张精彩图片"">"&Arr_phCates(1,Down_CateNumI)&"</a> ")
Next
End If
ph_CateList.Close
Set ph_CateList=Nothing%>
<td>
<tr>
</table>
<%Dim Url_Add,cateID,SQLFiltrate
cateID=CheckStr(Trim(Request.QueryString("cateID")))
SQLFiltrate="WHERE "
Url_Add="?"
IF IsInteger(cateID)=True Then
SQLFiltrate=SQLFiltrate&" ph_CateID="&CateID&" AND"
Url_Add=Url_Add&"CateID="&CateID&"&"
End IFDim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If%><table width="716" border="0" align="center" cellpadding="4" cellspacing="6" background="images/blog_main.gif" class="wordbreak">
<tr>
<%Dim photos
Set photos=Server.CreateObject("Adodb.Recordset")
SQL="SELECT L.*,C.cate_Name,C.cate_Image FROM photo AS L,photo_Cate AS C "&SQLFiltrate&" C.cate_ID=L.ph_CateID ORDER BY ph_PostTime DESC"
photos.Open SQL,CONN,1,1
SQLQueryNums=SQLQueryNums+1
If photos.EOF AND photos.BOF Then
Response.Write("<td align='center'>暂时没有收藏图片</td>")
Else
photos.PageSize=12
photos.AbsolutePage=CurPage
coolsite_Num=photos.RecordCount
Dim coolsite_Num,MultiPages,PageCount
MultiPages=""&MultiPage(coolsite_Num,12,CurPage,Url_Add)&""
Dim n,m,photo_main
n = 1
m = 4 '定义一行显示de列
Do Until photos.EOF OR PageCount=12
Dim ph_ID,ph_Author,ph_Views,Ph_Images,ph_Comments
ph_ID=photos("ph_ID")
ph_Author=photos("ph_Author")
ph_Views=photos("ph_Views")
Dim ph_Img,ph_Image
ph_Img=photos("ph_Image")
ph_Image=split(ph_Img,vbcrlf)
Dim ph_Image0
ph_Image0=ph_Image(0)
If Not (Right(ph_Image0, 1) = "@") Then ph_Image0 = ph_Image0 & "@"
ph_Images=split(ph_Image0,"@")
ph_Comments=photos("ph_Comments")
If (n mod 2 = 1) then 'mod和% 取模远算符
photo_main = "photo_content_a"
else
photo_main = "photo_content_b"
end if
Response.Write("<a name=""photos"&ph_ID&"""></a>")%>
<td width="25%" valign="top" class="<%=""&photo_main&""%>">
<p align="center" style="padding-top: 20px;">
<a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>">
<%if photos("ph_Thumbnail")<>Empty Then
Response.Write("<img src="""&photos("ph_Thumbnail")&"?v=0"" border=0 width=120 height=120 />")
elseif photos("ph_Thumbnail")=Empty Then
Response.Write("<img src="""&Ph_Images(0)&"?v=0"" border=0 width=120 height=120 />")
else
Response.Write("<img src=""images/nonpreview.gif"" border=0 width=120 height=120 />")
end if%>
</a>
</p>
<p align="center">
<img src="images/icon_public.gif" border="0" align="absbottom" alt="" />
<strong><a href="photoshow.asp?photoID=<%=""&photos("ph_ID")&""%>" target="_blan"><%=""&photos("ph_Name")&""%></a></strong>
<%If memStatus="SupAdmin" then Response.Write(" <a href=""photoedit.asp?photoID="&photos("ph_ID")&""" title=""编辑"" target=""_blank""><img src=""images/icon_edit_02.gif"" border=""0"" align=""absmiddle"" /></a>")%>
</p>
<div class="photo_solidline"></div>
<p>摘要:</p>
<p style="text-indent: 20px;"><%=""&(UbbCode(HTMLEncode(cutStr(photos("ph_Re"),110)),0,0,1,1,0))&""%></p>
<p>浏览次数:<%=""&ph_Views&""%> 评论:<%=""&ph_Comments&""%></p>
<p>添加时间 :<%=""&photos("ph_PostTime")&""%></p>
</td>
<%If n = m then
Response.Write("<tr></tr>")
n = 1
Else
n = n + 1
End If
photos.MoveNext
PageCount=PageCount+1
Loop
End If%>
<tr>
<td colspan=4><%=""&MultiPages&""%></td>
</tr>
</table>
<%photos.Close
Set photos=Nothing%>
Response.Write("<img src="""&photos("ph_Thumbnail")&"?v=0"" border=0 width=120 height=120 />")
elseif photos("ph_Thumbnail")=Empty Then
Response.Write("<img src="""&Ph_Images(0)&"?v=0"" border=0 width=120 height=120 />")
else
Response.Write("<img src=""images/nonpreview.gif"" border=0 width=120 height=120 />")
end if%
///////////////if sth<>emty
else if sth=emty
else 这个判断明显有问题。