📄 admin_photo.asp
字号:
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>属性</strong></td>
<td class="td_25" style="padding-left:5px;">
<%
Response.Write EL_Common.ShowBoolean(rsPhoto("OnTop").value, "<span class=bluetext>顶</span>", "<span class=graytext>顶</span>") &" "
Response.Write EL_Common.ShowBoolean(rsPhoto("Commended").value, "<span class=greentext>荐</span>", "<span class=graytext>荐</span>")
%> </td>
<td class="td_ItemName"><strong>录入者</strong></td>
<td class="td_25" style="padding-left:5px;"><%=rsPhoto("Inputer")%></td>
</tr>
<tr>
<td class="td_ItemName"><strong>更新日期</strong></td>
<td width="30%" class="td_25" style="padding-left:5px;"><%=rsPhoto("UpdateTime")%></td>
<td width="7%" nowrap class="td_ItemName"><strong>点击数</strong></td>
<td width="21%" class="td_25" style="padding-left:5px;"><%=rsPhoto("Hits")%> 次 </td>
</tr>
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>简介</strong></td>
<td colspan="4" class="td_25"><fieldset style="width:100%; height:100%; padding-top:5px;">
<%=rsPhoto("Content")%>
</fieldset> </td>
</tr>
<tr>
<td colspan="5" align="center" class="td_ItemName"><strong><%=EL_Channel.ItemName%>集</strong></td>
</tr>
<tr>
<td colspan="5" class="td_25">
<table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<%
Dim i, j, arrPictrue
arrPictrue = Split(rsPhoto("Uploadfiles"), "|")
For i = 0 To UBound(arrPictrue)
Response.Write "<td class='td_25' width='20%' align='center' onmouseover=""this.className='MouseOver_25'"" onmouseout=""this.className='td_25'"">"
Response.Write "<img src='"& EL_Common.PictrueURL(arrPictrue(i), EL_Channel.FilePath)&"' onclick=""window.open(this.src)"" width='140' height='100' style='margin:4px; cursor:hand;'><br>"
If arrPictrue(i) = rsPhoto("DefaultPictrue") Then
Response.Write "<span class=graytext>[设为默认缩略图]</span>"
Else
Response.Write "[<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetDefaultPictrue&PhotoID="& rsPhoto("PhotoID") &"&Pic="& arrPictrue(i) &"' style='color:blue'>设为默认缩略图</a>]"
End If
Response.Write "</td>"
If (i Mod 5) = 0 And i<UBound(arrPictrue) And i>0 Then Response.Write "</tr><tr>"
Next
For j = 1 To 5-(i Mod 5)
Response.Write "<td class='td_25' width='20%'></td>"
Next
%>
</tr>
</table> </td>
</tr>
<tr>
<td colspan="5" class="td_50">
<%=EL_Common.ShowNearInfo("EL_Photo", "PhotoID", "PhotoName", "ChannelID="& EL_Channel.ChannelID &" AND ClassID="& rsPhoto("ClassID"), "PhotoID", rsPhoto("PhotoID"), EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=Show&PhotoID=")%>
</td>
</tr>
<tr>
<td colspan="5" class="td_25"><div class="rightdiv"><a href="<%=EL_CurrentScriptName%>?ChannelID=<%=EL_Channel.ChannelID%>"><< 返回管理</a> | <a href="#">返回顶部</a></div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="td_ItemName">
<div class="rightdiv">相关操作:
<%
If EL_Admin.Purview = 1 Or EL_Admin.Purview = 2 Or EL_Admin.CheckAdminPurview(rsPhoto("ClassID"), 2)=True Or rsPhoto("Inputer")=EL_Admin.AdminName Then
If rsPhoto("Deleted") = False Then
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=Modify&PhotoID="& rsPhoto("PhotoID") &"'>修改</a> | "
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=Delete&PhotoID="& rsPhoto("PhotoID") &"' onClick=""return confirm('本次操作将该"& EL_Channel.ItemUnit & EL_Channel.ItemName &"删除至回收站,以后可以从回收站中恢复\n确认要执行删除吗?')"">删除</a> | "
If rsPhoto("OnTop") = True Then
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetOnTop&PhotoID="& rsPhoto("PhotoID") &"'>解固</a> | "
Else
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetOnTop&PhotoID="& rsPhoto("PhotoID") &"'>固顶</a> | "
End If
If rsPhoto("Commended") = True Then
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetCommended&PhotoID="& rsPhoto("PhotoID") &"&SetValue="& EL_False &"'>取消推荐</a> | "
Else
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetCommended&PhotoID="& rsPhoto("PhotoID") &"&SetValue="& EL_True &"'>设为推荐</a> | "
End If
If rsPhoto("Passed") = True Then
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetPassed&PhotoID="& rsPhoto("PhotoID") &"'>取消发布</a>"
Else
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=SetPassed&PhotoID="& rsPhoto("PhotoID") &"'>立即发布</a>"
End If
Else
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=DeleteTrue&PhotoID="& rsPhoto("PhotoID") &"' onClick=""return confirm('本次操作将彻底删除该"& EL_Channel.ItemUnit & EL_Channel.ItemName &",并不能恢复\n确认要执行彻底删除吗?')"">彻底删除</a> | "
Response.Write "<a href='"& EL_CurrentScriptName &"?ChannelID="& EL_Channel.ChannelID &"&Action=Restore&PhotoID="& rsPhoto("PhotoID") &"'>还原</a>"
End If
Else
If rsPhoto("Deleted") = False Then
Response.Write "<span class=graytext>修改</span> | "
Response.Write "<span class=graytext>删除</span> | "
If rsPhoto("OnTop") = True Then
Response.Write "<span class=graytext>解固</span> | "
Else
Response.Write "<span class=graytext>固顶</span> | "
End If
If rsPhoto("Commended") = True Then
Response.Write "<span class=graytext>取消推荐</span> | "
Else
Response.Write "<span class=graytext>设为推荐</span> | "
End If
If rsPhoto("Passed") = True Then
Response.Write "<span class=graytext>取消发布</span>"
Else
Response.Write "<span class=graytext>立即发布</span>"
End If
Else
Response.Write "<span class=graytext>彻底删除</span> | "
Response.Write "<span class=graytext>还原</span>"
End If
End If
%>
</div>
<div class="leftdiv">状态:
<%
Response.Write EL_Common.ShowBoolean(rsPhoto("OnTop").value, "<span class=bluetext title='固顶"& EL_Channel.ItemName &"'>顶</span>", "<span class=graytext>顶</span>") &" "
Response.Write EL_Common.ShowBoolean(rsPhoto("Commended").value, "<span class=greentext title='推荐"& EL_Channel.ItemName &"'>荐</span>", "<span class=graytext>荐</span>") &" "
If rsPhoto("Passed") Then
Response.Write "<span class=greentext>已发布</span> "
Else
Response.Write "<span class=redtext>未发布</span> "
End If
%>
</div></td>
</tr>
</table>
<br>
<%
Dim CommentCmd, rsComment, RowCount
Call EL_Common.InitCommonCmd(CommentCmd, rsComment, "EL_Comment", "Top 10 CommentID,Content,UserName,Content,UpdateTime", "ChannelID="& EL_Channel.ChannelID &" And InfoID="& PhotoID)
rsComment.Close()
RowCount = CommentCmd(0)
If RowCount>0 Then
rsComment.Open()
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="94%"><strong>·最近10条评论:</strong></td>
<td width="6%" nowrap><a href="Admin_Comment.asp?ChannelID=<%=EL_Channel.ChannelID%>&Action=ShowAll&InfoID=<%=PhotoID%>" style="color:blue;">查看所有评论</a></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td width="5%" align="center" class="top_item"><strong>ID</strong></td>
<td width="50%" align="center" class="top_item"><strong>评论内容</strong></td>
<td width="12%" align="center" class="top_item"><strong>评论人</strong></td>
<td width="17%" align="center" class="top_item"><strong>评论时间</strong></td>
<td width="16%" align="center" class="top_item"><strong>操作</strong></td>
</tr>
<%
For i = 1 To RowCount
%>
<tr class='td_25' onMouseOut=this.className='td_25' onMouseOver=this.className='MouseOver_25'>
<td align="center"><%=rsComment("CommentID")%></td>
<td style="padding-left:5px;" title="<%=EL_Common.ServerHTMLEncode(rsComment("Content"))%>"><%=EL_Common.GetTopic(rsComment("Content"), 60)%></td>
<td align="center"><%=EL_Common.ServerHTMLEncode(rsComment("UserName"))%></td>
<td align="center"><%=rsComment("UpdateTime")%></td>
<td align="center" nowrap><a href="Admin_Comment.asp?ChannelID=<%=EL_Channel.ChannelID%>&Action=Reply&InfoID=<%=PhotoID%>">回复</a> | <a href="Admin_Comment.asp?ChannelID=<%=EL_Channel.ChannelID%>&Action=Modify&CommentID=<%=rsComment("CommentID")%>">修改</a> | <a href="Admin_Comment.asp?ChannelID=<%=EL_Channel.ChannelID%>&Action=Delete&CommentID=<%=rsComment("CommentID")%>">删除</a></td>
</tr>
<%
If i<RowCount Then rsComment.MoveNext
Next
%>
</table>
<%
rsComment.Close()
End If
Set rsComment = Nothing
Set CommentCmd = Nothing
rsPhoto.Close()
Set rsPhoto = Nothing
Set PhotoCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub ModifyPhoto()
On Error Resume Next
Dim PhotoCmd, rsPhoto
Dim PhotoID
PhotoID = EL_Common.ELRequest("PhotoID", 2)
Call EL_Common.InitCommonCmd(PhotoCmd, rsPhoto, "EL_Photo", "*", "ChannelID="& EL_Channel.ChannelID &" AND PhotoID="& PhotoID)
rsPhoto.Close()
If PhotoCmd(0)<>1 Then
Set rsPhoto = Nothing
Set PhotoCmd = Nothing
EL_Common.ShowErrorMsg("指定"& EL_Channel.ItemName &"不存在")
Exit Sub
End If
rsPhoto.Open()
If rsPhoto("Deleted") = True Then
rsPhoto.Close()
Set rsPhoto = Nothing
Set PhotoCmd = Nothing
EL_Common.ShowErrorMsg("指定"& EL_Channel.ItemName &"已被删除,请从回收站恢复后再做修改")
Exit Sub
End If
%>
<script language="javascript">
function SelectFile(){
var arr=showModalDialog('Admin_SelectFile.asp?DialogType=pic&ChannelID=<%=EL_Channel.ChannelID%>', '', 'dialogWidth:820px; dialogHeight:600px; help: no; scroll: yes; status: no');
if(arr!=null){
var ss=arr.split('|');
var strFileName = ss[0].replace("<%=EL_Channel.FilePath%>", "");
document.all.PictruePreview.src = '<%=EL_Channel.FilePath%>'+strFileName;
document.myform.DefaultPictrue.value = strFileName;
document.myform.PictrueList.options[document.myform.PictrueList.length] = new Option(strFileName, strFileName);
document.myform.PictrueList.selectedIndex += 1;
}
}
function SelectThumb(){
var arr=showModalDialog('Admin_SelectFile.asp?DialogType=pic&ChannelID=<%=EL_Channel.ChannelID%>', '', 'dialogWidth:820px; dialogHeight:600px; help: no; scroll: yes; status: no');
if(arr!=null){
var ss=arr.split('|');
var strFileName = ss[0].replace("<%=EL_Channel.FilePath%>", "");
document.all.PictruePreview.src = '<%=EL_Channel.FilePath%>'+strFileName;
document.myform.DefaultPictrue.value = strFileName;
}
}
function AddPicture(strFileName){
var arrName = strFileName.split('.');
var FileExt = arrName[1];
if (FileExt == 'gif' || FileExt == 'jpg' || FileExt == 'jpeg' || FileExt == 'jpe' || FileExt == 'bmp' || FileExt == 'png'){
if(strFileName.indexOf('$$$')>-1){
var arr = strFileName.split('$$$')
document.all.PictruePreview.src = '<%=EL_Channel.FilePath%>'+ arr[1];
document.myform.DefaultPictrue.value = arr[1];
document.myform.PictrueList.options[document.myform.PictrueList.length] = new Option(arr[0], arr[0]);
}else{
document.all.PictruePreview.src = '<%=EL_Channel.FilePath%>'+strFileName;
document.myform.DefaultPictrue.value = strFileName;
document.myform.PictrueList.options[document.myform.PictrueList.length] = new Option(strFileName, strFileName);
}
document.myform.PictrueList.selectedIndex += 1;
}
}
function DeleteItem(){
var obj = getObject("PictrueList");
if(obj.selectedIndex == -1){
alert("请至少选择一<%=EL_Channel.ItemUnit & EL_Channel.ItemName%>");
obj.focus();
return false;
}
obj.options.remove(obj.selectedIndex);
}
function Check(frm){
var CurrentMode = Editor.CurrentMode;
if (CurrentMode == 0){
frm.Content.value = Editor.HtmlEdit.document.body.innerHTML;
}else if(CurrentMode==1){
frm.Content.value = Editor.HtmlEdit.document.body.innerText;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -