📄 admin_shop.asp
字号:
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(rsProduct("OnTop").value, "<span class=bluetext title='固顶"& EL_Channel.ItemName &"'>顶</span>", "<span class=graytext>顶</span>") &" "
Response.Write EL_Common.ShowBoolean(rsProduct("Commended").value, "<span class=greentext title='推荐"& EL_Channel.ItemName &"'>荐</span>", "<span class=graytext>荐</span>") &" "
If rsProduct("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, i
Call EL_Common.InitCommonCmd(CommentCmd, rsComment, "EL_Comment", "Top 10 CommentID,Content,UserName,Content,UpdateTime", "ChannelID="& EL_Channel.ChannelID &" And InfoID="& ProductID)
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=<%=ProductID%>" 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=<%=ProductID%>">回复</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
rsProduct.Close()
Set rsProduct = Nothing
Set ProductCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub ModifyProduct()
On Error Resume Next
Dim ProductCmd, rsProduct
Dim ProductID
ProductID = EL_Common.ELRequest("ProductID", 2)
Call EL_Common.InitCommonCmd(ProductCmd, rsProduct, "EL_Shop", "*", "ChannelID="& EL_Channel.ChannelID &" AND ProductID="& ProductID)
rsProduct.Close()
If ProductCmd(0) <> 1 Then
Set rsProduct = Nothing
Set ProductCmd = Nothing
EL_Common.ShowErrorMsg("指定"& EL_Channel.ItemName &"不存在")
Exit Sub
End If
rsProduct.Open()
%>
<script language="javascript">
function AddItem(strFileName){
var arrName = strFileName.split('.');
var FileExt = arrName[1];
if (FileExt == 'gif' || FileExt == 'jpg' || FileExt == 'jpeg' || FileExt == 'jpe' || FileExt == 'bmp' || FileExt == 'png'){
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;
}
if(document.myform.Uploadfiles.value.trim() == ''){
document.myform.Uploadfiles.value = strFileName;
}else{
document.myform.Uploadfiles.value += '|'+ strFileName;
}
}
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;
}else{
alert('<%=EL_Channel.ItemName%>内容处于预览状态不能保存');
Editor.HtmlEdit.focus();
return false;
}
if(frm.ClassID.value.trim()=="" || frm.ClassID.selectedIndex == -1){
alert("请选择所属<%=EL_Channel.ClassItemName%>");
frm.ClassID.focus();
return false;
}
if(frm.ProductName.value.trim()==''){
alert('请输入<%=EL_Channel.ItemName%>名称');
frm.ProductName.focus();
return false;
}
if(frm.Content.value.trim()==''){
alert('请输入<%=EL_Channel.ItemName%>介绍');
Editor.HtmlEdit.focus();
return false;
}
<%=EL_Common.ShowDefinedField_Js(EL_Channel.ChannelID, "frm")%>
SubmitOnce(frm);
return;
}
</script>
<form name="myform" action="Admin_Shop.asp" method="post" onSubmit="return Check(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="4" class="top_25"><strong>修改<%=EL_Channel.ItemName%></strong></td>
</tr>
<tr>
<td width="19%" class="td_ItemName"><strong>所属<%=EL_Channel.ClassItemName%></strong></td>
<td colspan="3" class="td_25"><select name="ClassID" id="ClassID">
<%=EL_Common.ShowClassTree(EL_Channel.ChannelID, 0, rsProduct("ClassID"), "")%>
</select>
<%If EL_Admin.Purview = 3 Then Response.Write "<span class=redtext>注:您只能在<span class=greentext>绿色</span>的"& EL_Channel.ClassItemName &"中操作</span>"%></td>
</tr>
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>名称</strong></td>
<td colspan="3" class="td_25"><input name="ProductName" type="text" class="RulerInput" id="ProductName" value="<%=EL_Common.HTMLEncode(rsProduct("ProductName"))%>" size="65"></td>
</tr>
<tr>
<td class="td_ItemName"><strong class="BlueText">积分设置</strong><br>
购买本<%=EL_Channel.ItemName%>所需要的积分</td>
<td width="19%" class="td_25"><input name="Points" type="text" id="Points" value="<%=rsProduct("Points")%>" size="10"></td>
<td width="9%" align="center" class="td_ItemName"><strong>库存量</strong></td>
<td width="53%" class="td_25"><input name="Num" type="text" id="Num" value="<%=rsProduct("Num")%>" size="10"></td>
</tr>
<tr>
<td class="td_ItemName"><strong><%=EL_Channel.ItemName%>介绍</strong><br>
<div style="height:50%">
<input name="IsSaveRemoteImages" type="checkbox" class="nomargin" id="IsSaveRemoteImages" value="<%=EL_True%>" checked>
<span class="BlueText">是否保存编辑器中包含的远程图片到本地文件,当远程图片较多时保存速度较慢</span><br>
<span class="redText">在使用此功能之前必须在网站基本信息配置中打开“自动保存远程图片”功能</span> </div>
<table width="100%" height="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<%
Response.Write "<img src="""& EL_Common.PictrueURL(rsProduct("DefaultPictrue"), EL_Channel.FilePath) &""" name=""PictruePreview"" width=""140"" height=""100"" id=""PictruePreview"">"
%>
</td>
</tr>
<tr>
<td height="10"> </td>
</tr>
</table> </td>
<td colspan="3" class="td_25">
<textarea name='Content' id="Content" style='display:none'><%=EL_Common.ServerHTMLEncode(rsProduct("Content"))%></textarea>
<iframe id='Editor' src='../editor.asp?ChannelID=<%=EL_Channel.ChannelID%>&ShowType=0&tContentid=Content' frameborder='1' scrolling='no' width='650' height='300' ></iframe> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>默认缩略图</strong></td>
<td colspan="3" class="td_25"><input name="DefaultPictrue" type="text" id="DefaultPictrue" onChange="PictruePreview.src=(this.value.trim()=='' || this.value.trim().toLowerCase=='http://')?'../images/nopic.gif':( (this.value.indexOf('http://')==0 || this.value.indexOf('/')==0)?this.value:'<%=EL_Channel.FilePath%>'+this.value);" value="<%=rsProduct("DefaultPictrue")%>" size="50">
<select name='PictrueList' id='PictrueList' onChange="DefaultPictrue.value=this.value;PictruePreview.src=((this.value == '')?'../images/nopic.gif':'<%=EL_Channel.FilePath%>'+this.value);">
<option selected>----------------</option>
<%
Dim TempArrPictrue, k
TempArrPictrue = Split(rsProduct("Uploadfiles"), "|")
For k = 0 To UBound(TempArrPictrue)
If EL_Common.CheckIsPictrue(TempArrPictrue(k)) = True Then
If TempArrPictrue(k) = rsProduct("DefaultPictrue") Then
Response.Write "<option value='"& TempArrPictrue(k) &"' selected>"& TempArrPictrue(k) &"</option>"
Else
Response.Write "<option value='"& TempArrPictrue(k) &"'>"& TempArrPictrue(k) &"</option>"
End If
End If
Next
%>
</select>
<input name="Uploadfiles" type="hidden" id="Uploadfiles" value="<%=rsProduct("Uploadfiles")%>"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>属性设置</strong></td>
<td colspan="3" class="td_25"><input name="OnTop" type="checkbox" class="nomargin" id="OnTop" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsProduct("OnTop"))%>>
固顶
<input name="Commended" type="checkbox" class="nomargin" id="Commended" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsProduct("Commended"))%>>
推荐</td>
</tr>
<tr>
<td class="td_ItemName"><strong>配色风格</strong></td>
<td colspan="3" class="td_25"><select name="SkinID" id="SkinID">
<option value="0">使用系统默认</option>
<%=EL_Common.SkinList(rsProduct("SkinID"))%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>页面模板</strong></td>
<td colspan="3" class="td_25"><select name="TemplateID" id="TemplateID">
<option value="0">使用系统默认</option>
<%=EL_Common.TemplateList(EL_Channel.ChannelID, 3, rsProduct("TemplateID"))%>
</select></td>
</tr>
<tr>
<td class="td_ItemName"><strong>更新日期</strong></td>
<td colspan="3" class="td_25"><input name="UpdateTime" type="text" id="UpdateTime" value="<%=rsProduct("UpdateTime")%>">
<span class="BlueText"><= 【<span class="GreenText" onClick="getObject('UpdateTime').innerText=NowTime()" style="cursor:hand; ">现在时间</span>】</span></td>
</tr>
<tr>
<td class="td_ItemName"><strong>是否立即发布</strong></td>
<td colspan="3" class="td_25"><input name="Passed" type="radio" class="nomargin" value="<%=EL_True%>" <%=EL_Common.SetObjectChecked("True", rsProduct("Passed"))%>>
是
<input name="Passed" type="radio" class="nomargin" value="<%=EL_False%>" <%=EL_Common.SetObjectChecked("False", rsProduct("Passed"))%>>
否</td>
</tr>
<%=EL_Common.ShowDefinedField(EL_Channel.ChannelID, EL_Channel.ChannelModule, ProductID, 3)%>
<tr>
<td class="td_ItemName"> </td>
<td colspan="3" class="td_50"><input type="submit" name="Submit" value="保存修改">
<input type="button" name="Submit2" value="返回上页" onClick="history.back()">
<input name="ChannelID" type="hidden" id="ChannelID" value="<%=EL_Channel.ChannelID%>">
<input name="Action" type="hidden" id="Action" value="SaveModify">
<input name="ProductID" type="hidden" id="ProductID" value="<%=ProductID%>"></td>
</tr>
</table>
</form>
<%
rsProduct.Close()
Set rsProduct = Nothing
Set ProductCmd = Nothing
EL_Common.ShowScriptError()
End Sub
Sub ManageProduct()
On Error Resume Next
Dim ManageCmd, rsManage, StrFields, StrCondition, TempString
Dim PageCounts, RowCount, TotalRowCount
TempString = ""
StrFields = "EL_Shop.ProductID,EL_Shop.ClassID,EL_Shop.ProductName,EL_Shop.Points,EL_Shop.Num,"
StrFields = StrFields &"EL_Shop.OnTop,EL_Shop.Commended,"
StrFields = StrFields &"EL_Shop.Passed,EL_Shop.UpdateTime,EL_Shop.Inputer,EL_Class.ClassName"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -