📄 user_photo_code.asp
字号:
Conn.Execute ("insert into PE_InfoS (ModuleType,ItemID,SpecialID) values (3," & PhotoID & "," & SpecialID & ")")
rsPhoto("ClassID") = ClassID
rsPhoto("PhotoName") = PhotoName
rsPhoto("Keyword") = Keyword
rsPhoto("Author") = Author
rsPhoto("CopyFrom") = CopyFrom
rsPhoto("PhotoIntro") = PhotoIntro
rsPhoto("PhotoThumb") = PhotoThumb
rsPhoto("PhotoUrl") = PhotoUrl
rsPhoto("Status") = Status
If Not (rsField.BOF And rsField.EOF) Then
rsField.MoveFirst
Do While Not rsField.EOF
If Trim(Request(rsField("FieldName"))) <> "" Or rsField("EnableNull") = True Then
rsPhoto(Trim(rsField("FieldName"))) = PE_HTMLEncode(Trim(Request(rsField("FieldName"))))
End If
rsField.MoveNext
Loop
End If
Set rsField = Nothing
rsPhoto.Update
End If
End If
End If
End If
rsPhoto.Close
Set rsPhoto = Nothing
If FoundErr = True Then Exit Sub
Response.Write "<br><br>"
Response.Write "<table class='border' align=center width='500' border='0' cellpadding='0' cellspacing='0' bordercolor='#999999'>"
Response.Write " <tr align=center>"
Response.Write " <td height='22' colspan='2' align='center' class='title'>"
If Action = "SaveAdd" Then
Response.Write "<b>添加" & ChannelShortName & "成功</b>"
Else
Response.Write "<b>修改" & ChannelShortName & "成功</b>"
End If
Response.Write " </td>"
Response.Write " </tr>"
If Status = 0 Then
Response.Write " <tr class='tdbg'> "
Response.Write " <td height='60' colspan='2'><font color='#0000FF'>注意:</font><br> 您的" & ChannelShortName & "尚未真正发表!只有等管理员审核并通过了您的" & ChannelShortName & "后,您所添加的" & ChannelShortName & "才会发表。</td>"
Response.Write " </tr>"
End If
Response.Write " <tr class='tdbg'> "
Response.Write " <td height='5' colspan='2'></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td width='150' align='center' valign='top'><img src='" & GetPhotoThumb(PhotoThumb) & "' width='150'></td>"
Response.Write " <td width='350' valign='top'><table width='100%' border='0' cellpadding='2' cellspacing='0'>"
Response.Write " <tr class='tdbg'>"
Response.Write " <td width='100' align='right'><strong>所属栏目:</strong></td>"
Response.Write " <td>" & ShowClassPath() & "</td>"
Response.Write " </tr>"
Response.Write " <tr> "
Response.Write " <td width='100' align='right'><strong>" & ChannelShortName & "名称:</strong></td>"
Response.Write " <td>" & PE_HTMLEncode(PhotoName) & "</td>"
Response.Write " </tr>"
Response.Write " <tr> "
Response.Write " <td width='100' align='right'><strong>" & ChannelShortName & "作者:</strong></td>"
Response.Write " <td>" & PE_HTMLEncode(Author) & "</td>"
Response.Write " </tr>"
Response.Write " <tr> "
Response.Write " <td width='100' align='right'><strong>关 键 字:</strong></td>"
Response.Write " <td>" & Mid(Keyword, 2, Len(Keyword) - 2) & "</td>"
Response.Write " </tr>"
Response.Write " </table></td>"
Response.Write " </tr>"
Response.Write " <tr class='tdbg'> "
Response.Write " <td height='40' colspan='2' align='center'>"
Response.Write "【<a href='User_Photo.asp?ChannelID=" & ChannelID & "&Action=Modify&PhotoID=" & PhotoID & "'>修改此" & ChannelShortName & "</a>】 "
Response.Write "【<a href='User_Photo.asp?ChannelID=" & ChannelID & "&Action=Add&ClassID=" & ClassID & "&SpecialID=" & SpecialID & "'>继续添加" & ChannelShortName & "</a>】 "
Response.Write "【<a href='User_Photo.asp?ChannelID=" & ChannelID & "&Action=Manage&ClassID=" & ClassID & "'>" & ChannelShortName & "管理</a>】 "
Response.Write "【<a href='User_Photo.asp?ChannelID=" & ChannelID & "&Action=Show&PhotoID=" & PhotoID & "'>预览" & ChannelShortName & "内容</a>】"
Response.Write " </td>"
Response.Write " </tr>"
Response.Write "</table>" & vbCrLf
Session("Keyword") = Trim(Request("Keyword"))
Session("Author") = Author
Session("CopyFrom") = CopyFrom
Call ClearSiteCache(0)
Call CreateAllJS_User
End Sub
Sub Del()
If PhotoID = "" Then
FoundErr = True
ErrMsg = ErrMsg & "<li>请先选定" & ChannelShortName & "!</li>"
Exit Sub
End If
Dim sqlDel, rsDel, NeedUpdateCache
NeedUpdateCache = False
sqlDel = "select * from PE_Photo where Inputer='" & UserName & "' and Deleted=" & PE_False & " and "
If InStr(PhotoID, ",") > 0 Then
sqlDel = sqlDel & " PhotoID in (" & PhotoID & ") order by PhotoID"
Else
sqlDel = sqlDel & " PhotoID=" & PhotoID
End If
Set rsDel = Server.CreateObject("ADODB.Recordset")
rsDel.Open sqlDel, Conn, 1, 3
Do While Not rsDel.EOF
If rsDel("Status") > 0 Then
If EnableModifyDelete = 0 Then
FoundErr = True
ErrMsg = ErrMsg & "<li>删除" & ChannelShortName & "“" & rsDel("PhotoName") & "”失败。原因:此" & ChannelShortName & "已经被审核通过,您不能再删除!</li>"
Else
Conn.Execute ("update PE_User set PostItems=PostItems-1,PassedItems=PassedItems-1,UserExp=UserExp-" & rsDel("PresentExp") & " where UserName='" & UserName & "'")
Conn.Execute ("update PE_Channel set ItemCount=ItemCount-1,ItemChecked=ItemChecked-1 where ChannelID=" & ChannelID & "")
Conn.Execute ("update PE_Class set ItemCount=ItemCount-1 where ClassID=" & rsDel("ClassID") & "")
rsDel("Deleted") = True
rsDel.Update
NeedUpdateCache = True
End If
Else
Conn.Execute ("update PE_Channel set ItemCount=ItemCount-1 where ChannelID=" & ChannelID & "")
Conn.Execute ("update PE_User set PostItems=PostItems-1 where UserName='" & UserName & "'")
rsDel("Deleted") = True
rsDel.Update
End If
rsDel.MoveNext
Loop
rsDel.Close
Set rsDel = Nothing
If NeedUpdateCache = True Then
Call ClearSiteCache(0)
Call CreateAllJS_User
End If
Call CloseConn
If FoundErr = False Then
Response.Redirect ComeUrl
Call Class_Terminate
End If
End Sub
Sub Show()
Dim rs, sql
PhotoID = PE_CLng(PhotoID)
sql = "select * from PE_Photo where Inputer='" & UserName & "' and Deleted=" & PE_False & " and PhotoID=" & PhotoID & ""
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1
If rs.BOF And rs.EOF Then
FoundErr = True
ErrMsg = ErrMsg & "<li>找不到" & ChannelShortName & "</li>"
Else
ClassID = rs("ClassID")
Call GetClass
End If
If FoundErr = True Then
rs.Close
Set rs = Nothing
Exit Sub
End If
Response.Write "<br><table width='100%' border=0 align=center cellPadding=2 cellSpacing=1 bgcolor='#FFFFFF' class='border' style='WORD-BREAK: break-all'>"
Response.Write "<tr class='title'>"
Response.Write " <td height='22' colspan='4'>"
Response.Write "您现在的位置: <a href='User_Photo.asp?ChannelID=" & ChannelID & "'>" & ChannelShortName & "管理</a> >> "
If ParentID > 0 Then
Dim sqlPath, rsPath
sqlPath = "select ClassID,ClassName from PE_Class where ClassID in (" & ParentPath & ") order by Depth"
Set rsPath = Server.CreateObject("adodb.recordset")
rsPath.Open sqlPath, Conn, 1, 1
Do While Not rsPath.EOF
Response.Write "<a href='User_Photo.asp?ChannelID=" & ChannelID & "&ClassID=" & rsPath(0) & "'>" & rsPath(1) & "</a> >> "
rsPath.MoveNext
Loop
rsPath.Close
Set rsPath = Nothing
End If
Response.Write "<a href='User_Photo.asp?ChannelID=" & ChannelID & "&ClassID=" & ClassID & "'>" & ClassName & "</a> >> "
Response.Write "<a href='User_Photo.asp?ChannelID=" & ChannelID & "&Action=Show&PhotoID=" & rs("PhotoID") & "'>" & PE_HTMLEncode(rs("PhotoName")) & "</a>"
Response.Write " </td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>" & ChannelShortName & "名称:</td>"
Response.Write " <td colspan='3'><strong>" & PE_HTMLEncode(rs("PhotoName")) & "</strong></td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>" & ChannelShortName & "作者:</td>"
Response.Write " <td width='200'>" & PE_HTMLEncode(rs("Author")) & "</td>"
Response.Write " <td colspan='2' rowspan='8' align=center valign='middle'>"
If rs("PhotoThumb") = "" Then
Response.Write "无缩略图"
Else
Response.Write "<img src='" & GetPhotoThumb(rs("PhotoThumb")) & "' width='150'>"
End If
Response.Write " </td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>添加时间:</td>"
Response.Write " <td width='200'>" & rs("UpdateTime") & "</td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>评分等级:</td>"
Response.Write " <td width='200'>" & String(rs("Stars"), "★") & "</td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>查看点数:</td>"
Response.Write " <td width='200'><font color=red> " & rs("InfoPoint") & "</font> 点</td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>软件添加:</td>"
Response.Write " <td width='200'>" & rs("Inputer") & "</td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>责任编辑:</td>"
Response.Write " <td width='200'>"
If rs("Status") > 0 Then
Response.Write rs("Editor")
Else
Response.Write "无"
End If
Response.Write " </td>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>查看次数:</td>"
Response.Write " <td colspan='3'>本日:" & rs("DayHits") & " 本周:" & rs("WeekHits") & " 本月:" & rs("MonthHits") & " 总计:" & rs("Hits")
Response.Write " </td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td width='100' align='right'>" & ChannelShortName & "地址:</td>"
Response.Write " <td colspan='3'>" & ShowPhotoUrls(rs("PhotoUrl")) & "</td>"
Response.Write "</tr>"
Response.Write "<tr class='tdbg'>"
Response.Write " <td align='right'> </td>"
Response.Write " <td colspan='3' align='right'>"
Response.Write "<strong>可用操作:</strong>"
If rs("Inputer") = UserName And (rs("Status") <= 0 Or UserSetting(2) = 1) Then
Response.Write "<a href='User_Photo.asp?ChannelID=" & Chann
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -