📄 admin_res.asp
字号:
<input type="checkbox" name="isgood" id="isgood" value="true"><label style="cursor:hand;" for="isgood">设为推荐</label>
<input type="checkbox" name="istop" id="istop" value="true"><label style="cursor:hand;" for="istop">置顶资源</label>
<input type="checkbox" name="allowPl" id="allowPl" value="true" checked><label for="allowPl" style="cursor:hand;">允许评论</label> <input type="checkbox" name="picres" id="picres" value="1"><label for="picres" style="cursor:hand;">图片资源</label> <br><span style="color:#3D3D3D;">[说明:选中为有效,如果选定为图片资源,请填上图片地址。]</span></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">申请地址:</td>
<td valign="middle"><input name="apply_url" type="text" class="wenbenkang" id="apply_url" size=40></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">演示地址:</td>
<td valign="middle"><input name="demo_url" type="text" class="wenbenkang" id="demo_url" size=40></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">图片上传:</td>
<td valign="middle"><iframe height="25" width="100%" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="myup.asp?cat=res&uptype=pic&urlname=imgurl&content=oblog_Composition" name="upimg"></iframe></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">图片地址:</td>
<td valign="middle"><input name="imgurl" type="text" class="wenbenkang" id="imgurl" size=40></td>
</tr>
<tr class="td_bgcolor">
<td align="right" valign="top">资源内容:</td>
<td valign="top"><input type="hidden" name="content" id="edit"><!--#include file="../editor/edit.asp"-->
<div style="margin-top:4px;color:#3D3D3D;">换行请按Shift+Enter,直接按Enter为起一段</div></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">分页方式:</td>
<td valign="top">
<select name="showpage">
<option value="0" selected>不分页</option>
<option value="1">自动分页</option>
<option value="2">手动分页</option>
</select>
注意:手动方式要在分页处输入:[NextPage] 字符</td>
</tr>
<tr valign="middle" class="td_titleB">
<td height="25" colspan="2" align="center">
<input type="checkbox" name="pass" id="pass1" value="true" checked><label for="pass1" style="cursor:hand;">通过审核</label>
<input name="addres" type="submit" id="addres" value="发布资源">
</td>
</tr>
</form>
</table>
<%End Sub
Sub editRes()
sql="Select * from ms_res where id="&Request.QueryString("id")
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,1
dim editpath:editpath="../editor/"
%>
<script language="javascript">
function mych(){
submits();
if(document.form.resclass.options[document.form.resclass.selectedIndex].value==""){
alert("请选择所属分类");
return false;
document.form.classes.focus();
}
if(document.form.authors.value==""){
alert("资源作者不能为空!");
document.form.authors.focus();
return false;}
if(document.form.keyword.value==""){
alert("资源关键词不能为空!");
document.form.keyword.focus();
return false;
}
if(document.form.title.value==""){
alert("资源标题不能为空");
document.form.title.focus();
return false;}
if(document.form.content.value==""){
alert("资源内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
var editorpath="../editor/";
</Script>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
<tr>
<td height="25" colspan="2" valign="middle" class="td_titleT"> 编辑资源</td>
</tr>
<form action="?action=maosin_saveRes&operate=maosin_mdf" name="form" Method="post" onSubmit="return mych()">
<tr class="td_bgcolor">
<td width="70" height="25" align="right" valign="middle">资源标题:</td>
<td width="*" valign="middle">
<input name="id" type="hidden" value=<%=rs("id")%>>
<input name="title" type="text" value='<%=rs("res_title")%>' class="wenbenkang" id="title" size="40" ondrop="document.form.keyword.value=document.form.title.value;" onpaste="document.form.keyword.value=document.form.title.value;" onKeyUp="document.form.keyword.value=document.form.title.value;">
标题颜色:<input name="titlecolor" type="text" class="wenbenkang" value="<%=rs("titlecolor")%>" id="titlecolor" size="7">
<select name="colorrs" onChange="titlecolor.value=this.value;">
<option value="#000000">选择颜色</option>
<%
colorStr=split(colorRS,",")
for i=0 to ubound(colorStr)
Response.Write ("<option style=""background-color:"& colorStr(i) &";color: "& colorStr(i) &""" value="""&colorStr(i)&""">"&colorStr(i)&"</option>")
next
%>
</select>
</td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">关 键 词:</td>
<td valign="middle"><input name="keyword" type="text" class="wenbenkang" id="keyword" value="<%=rs("res_keyword")%>" size="40"> <font color="#3d3d3d">*多个关键词请用“|”分隔</font></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">资源作者:</td>
<td valign="middle"><input name="authors" type="text" class="wenbenkang" value="<%=rs("res_authors")%>" id="authors">
<select name="name1" onChange="authors.value=this.value;">
<option value="">选择作者</option>
<option value="佚名">佚名</option>
<option value="不详">不详</option>
<option value="网络">网络</option>
<option value="<%=webname%>"><%=webname%></option>
</select></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">资源来源:</td>
<td valign="middle"><input name="resfrom" type="text" class="wenbenkang" value="<%=rs("res_from")%>" id="resfrom">
<select name="from1" onChange="resfrom.value=this.value;">
<option value="">选择作者</option>
<option value="转载">转载</option>
<option value="不详">不详</option>
<option value="网络">网络</option>
<option value="原创">原创</option>
<option value="整理">整理</option>
<option value="<%=webname%>"><%=webname%></option>
</select></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">资源分类:</td>
<td valign="middle">
<select name="resclass" id="resclass">
<%sql="select * from ms_res_cat"
Set rs1=Server.CreateObject("ADODB.RecordSet")
rs1.Open sql,connstr,1,1
If Not rs1.Bof And Not rs1.Eof Then
Do While Not rs1.Eof
sql="select * from ms_res_class where catID="&rs1("catID")
Set rs2=Server.CreateObject("ADODB.RecordSet")
rs2.Open sql,connstr,1,1
If Not rs2.Eof And Not rs2.Bof Then%>
<option style="color:#ff0000;font-weight:bold;">----<%=rs1("catName")%>----</option>
<%Do While Not rs2.Eof
if rs("classID")=rs2("classID") then%>
<option value="<%=rs1("catId")&","&rs2("classID")%>" selected><%=rs2("class")%></option>
<%else%>
<option value="<%=rs1("catId")&","&rs2("classID")%>"><%=rs2("class")%></option>
<%end if
rs2.MoveNext
Loop
rs2.close
Set rs2=Nothing
Else%>
<option>请添加子分类</option>
<%rs2.close
Set rs2=Nothing
End If
rs1.MoveNext
Loop
rs1.close
Set rs1=Nothing
Else%>
<option style="color:#ff0000;font-weight:bold;">----请添加大分类----</option>
<%rs1.close
Set rs1=Nothing
End If
%>
</select></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">查看权限:</td>
<td valign="middle">
<%if Cint(rs("popedom"))=0 then%>
<input type="radio" name="popedom" id="pop0" value=0 checked><label style="cursor:hand;" for="pop0">游客</label>
<input type="radio" name="popedom" id="pop1" value=1><label style="cursor:hand;" for="pop1">普通会员</label>
<input type="radio" name="popedom" id="pop2" value=2><label style="cursor:hand;" for="pop2">VIP会员</label>
<%elseif Cint(rs("popedom"))=1 then%>
<input type="radio" name="popedom" id="pop0" value=0><label style="cursor:hand;" for="pop0">游客</label>
<input type="radio" name="popedom" id="pop1" value=1 checked><label style="cursor:hand;" for="pop1">普通会员</label>
<input type="radio" name="popedom" id="pop2" value=2><label style="cursor:hand;" for="pop2">VIP会员</label>
<%elseif Cint(rs("popedom"))=2 then%>
<input type="radio" name="popedom" id="pop0" value=0><label style="cursor:hand;" for="pop0">游客</label>
<input type="radio" name="popedom" id="pop1" value=1><label style="cursor:hand;" for="pop1">普通会员</label>
<input type="radio" name="popedom" id="pop2" value=2 checked><label style="cursor:hand;" for="pop2">VIP会员</label>
<%else%>
<input type="radio" name="popedom" id="pop0" value=0 checked><label style="cursor:hand;" for="pop0">游客</label>
<input type="radio" name="popedom" id="pop1" value=1><label style="cursor:hand;" for="pop1">普通会员</label>
<input type="radio" name="popedom" id="pop2" value=2><label style="cursor:hand;" for="pop2">VIP会员</label>
<%end if%>
<span style="color:#3D3D3D;">[需要<%=pointName%><input name="jifen" type="text" class="wenbenkang" value="<%=rs("jifen")%>" size="4">以上 | 消费<%=moneyName%>:<input name="money" type="text" class="wenbenkang" value="<%=rs("money")%>" size="4">] *游客请保持为 0</span> </td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">资源属性:</td>
<td valign="middle">
<input type="checkbox" name="isgood" id="isgood" value="true" <%if rs("res_good")=true then response.write("checked") end if%>><label style="cursor:hand;" for="isgood">设为推荐</label>
<input type="checkbox" name="istop" id="istop" value="true" <%if rs("res_istop")=true then response.write("checked") end if%>><label style="cursor:hand;" for="istop">置顶资源</label>
<input type="checkbox" name="allowPl" id="allowPl" value="true" <%if rs("allow_pl")=true then response.write("checked") end if%>><label for="allowPl" style="cursor:hand;">允许评论</label> <input type="checkbox" name="picres" id="picres" value="1" <%if cint(rs("picres"))=1 then response.write("checked") end if%>><label for="picres" style="cursor:hand;">图片资源</label> <br><span style="color:#3D3D3D;">[说明:选中为有效,如果选定为图片资源,请填上图片地址。]</span></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">申请地址:</td>
<td valign="middle"><input name="apply_url" type="text" class="wenbenkang" id="apply_url" value="<%=rs("apply_url")%>" size=40></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">演示地址:</td>
<td valign="middle"><input name="demo_url" type="text" class="wenbenkang" id="demo_url" value="<%=rs("demo_url")%>" size=40></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">图片上传:</td>
<td valign="middle"><iframe height="25" width="100%" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="myup.asp?cat=res&uptype=pic&urlname=imgurl&content=oblog_Composition" name="upimg"></iframe></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">图片地址:</td>
<td valign="middle"><input name="imgurl" type="text" class="wenbenkang" id="imgurl" value="<%=rs("res_imgurl")%>" size=40></td>
</tr>
<tr class="td_bgcolor">
<td align="right" valign="top">资源内容:</td>
<td valign="top"><input type="hidden" name="content" id="edit" value="<%=server.HTMLENCode(rs("res_content"))%>"><!--#include file="../editor/edit.asp"-->
<div style="margin-top:4px;color:#3D3D3D;">换行请按Shift+Enter,直接按Enter为起一段</div></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">分页方式:</td>
<td valign="top">
<%if rs("showpage")=0 then%>
<input type="radio" name="showpage" id="sp0" value=0 checked><label for="">不分页</label>
<input type="radio" name="showpage" id="sp1" value=1><label for="sp1">自动分页</label>
<input type="radio" name="showpage" id="sp2" value=2><label for="sp2">手动分页</label>
<%elseif rs("showpage")=1 then%>
<input type="radio" name="showpage" id="sp0" value=0><label for="sp0">不分页</label>
<input type="radio" name="showpage" id="sp1" value=1 checked><label for="sp1">自动分页</label>
<input type="radio" name="showpage" id="sp2" value=2><label for="sp2">手动分页</label>
<%else%>
<input type="radio" name="showpage" id="sp0" value=0><label for="sp0">不分页</label>
<input type="radio" name="showpage" id="sp1" value=1><label for="sp1">自动分页</label>
<input type="radio" name="showpage" id="sp2" value=2 checked><label for="sp2">手动分页</label>
<%end if%>
注意:手动方式要在分页处输入:[NextPage] 字符</td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">奖励发布:</td>
<td valign="middle"><%=pointName%>:<input type="input" class="wenbenkang" name="sendOutPoint" value="0" size="15"> <%=pointUnits%> <span>共累计奖励该发布者 <%=rs("sendOutPoint")%> <%=pointUnits%></span></td>
</tr>
<tr class="td_bgcolor">
<td height="25" align="right" valign="middle">审核:</td>
<td valign="middle"><input type="checkbox" name="pass" id="pass1" value="checkbox" <%if rs("pass")=true then response.write("checked") end if%>><label for="pass1" style="cursor:hand;">通过审核</label></td>
</tr>
<tr valign="middle" class="td_titleB">
<td height="25" colspan="2" align="center">
<input name="modifyres" type="submit" id="modifyres" value="保存修改">
</td>
</tr>
</form>
</table>
<%
rs.close
set rs=nothing
End Sub
Sub deleteRes()
sql="delete from ms_res where id="&Request.QueryString("id")
conn.Execute(sql)
adminShowMsg "成功信息","<li>恭喜您,资源操作删除成功!</li><br><br><span id=seNum>5</span><a href=javascript:showtime></a>秒钟后系统将自动返回新闻管理页......</b><meta http-equiv=refresh content=5;url=admin_res.asp><SCRIPT>valignbottom()</SCRIPT><script>function showtime(secs){seNum.innerText=secs;if(--secs>0)setTimeout('showtime('+secs+')',1000);}showtime(5);</script>"
exit sub
End Sub
'=========== =============================================
'MaoSin CMS 1.1 Power by maosin.com
'Email: maosin@163.com , maosin@maosin.com
'Web: http://www.maosin.com http://www.maosin.net
'Copyright (C) 2006 maosin.com All Rights Reserved.
'========================================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -