📄 admin_down.asp
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="sqlx.asp"-->
<%call hacker()
if session("superlogin")<>yecao then
response.Write "<script>alert('本站提示:您还没有登陆!');this.location.href='index.asp';</script>"
Response.End
end if
if session("superadmin")<>"down" then
if session("superadmin")<>"admin" then
response.Write "<script>alert('\n错误提示:您的权限不足!\n\n您不是下载管理员!');this.location.href='index.asp';</script>"
Response.End
end if
end if%>
<html>
<head>
<script src=img/adminjs.js></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
</head>
<body <%if request("action")="edit" then%>onload="return cc();"<%end if%> style="padding:0;margin:0">
<%call titlecolor()%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" rules=none class=3d><tr class="bg" height="22"><td> <img src=img/admin.gif border=0 width=15 height=15 align=absMiddle> <a href="admin_down.asp?action=type">分类管理</a> <a href="admin_down.asp?action=addtype">添加分类</a> <a href="admin_down.asp">下载管理</a> <a href="admin_down.asp?action=add">添加下载</a> </td></tr></table>
<table align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d id=updown style="position:absolute;left:100;top:208;display:none">
<tr onmousedown="MDown(updown)" style="cursor:move" height=22><td colspan="2" class="uptitle"><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 上传文件</b>
<img onclick="document.all.updown.style.display=(document.all.updown.style.display=='none')?'':'none'" style="position:absolute;right:2;top:5;cursor:hand" border="0" src="img/adminclose.gif" align=absMiddle></td></tr>
<tr class=bg>
<td align=center height=30><iframe frameborder=0 width=290 height=35 scrolling=no src="up.asp?action=down"></iframe>
</td>
</tr>
</table>
<table align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d id=updownpic style="position:absolute;left:100;top:100;display:none">
<tr onmousedown="MDown(updownpic)" style="cursor:move" height=22><td colspan="2" class="uptitle"><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 上传软件缩略图片</b>
<img onclick="document.all.updownpic.style.display=(document.all.updownpic.style.display=='none')?'':'none'" style="position:absolute;right:2;top:5;cursor:hand" border="0" src="img/adminclose.gif" align=absMiddle></td></tr>
<tr class=bg>
<td align=center height=30><iframe frameborder=0 width=290 height=35 scrolling=no src="up.asp?action=downpic"></iframe>
</td>
</tr>
</table>
<%
select case request("action")
case"delnopass"
user=request.querystring("user")
id=request.querystring("id")
conn.execute("update YC_user set user_money=user_money-10,user_all=user_all-1 where user_name="""&user&"""")
Conn.Execute("Delete * From YC_down Where id="&id&"")
response.write"<script>location.href='admin_down.asp';</script>"
case"type"
call alltype("YC_downclass","下载")
case"edittype"
call edittype("YC_downclass",request("id"))
case"edittypename"
call submittype("YC_downclass",request("id"),request("classname"))
case"addtype"
call addtype()
case"addtypeok"
call addtypeok("YC_downclass",request("classname"))
case"addtype2"
call addtype2(request("id"))
case"addtype2ok"
call addtype2ok("YC_downclass",request("classname"),request("id"))
case"deltype"
call deltype("YC_downclass",request("id"))
case "list"
call list()
case "add"%>
<script language="javascript">
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form.title.value==""){
alert("下载标题不能为空");
document.form.title.focus();
return false;}
if(document.form.url1.value==""){
alert("本地下载不能为空");
document.form.url1.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("下载内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=addok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d>
<tr class="title" height="22"><td><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 发布下载</b></td></tr>
<tr class=bg height="25"><td> 软件名称:<input name="title" type="text" id="title" size="20" class=yecao style="width:220px"></td></tr>
<tr class=bg height="25"><td> 标题颜色:<input name="color" type="text" onfocus="colordialog()" class=yecao
value="#000000" style="width:120px"></td></tr>
<tr class=bg height="25"><td> 软件分类:<%call newclass("YC_downclass")%></td></tr>
<tr class=bg height="25"><td> 软件大小:<input name="size" type="text" id="size" size="20" class=yecao style="width:120px"></td></tr>
<tr class=bg height="25"><td> 软件演示:<input name="show" type="text" id="show" size="20" class=yecao style="width:300px" value="http://www.web300.cn"></td></tr>
<tr class=bg height="25"><td> 官方主页:<input name="web" type="text" id="web" size="20" class=yecao style="width:300px" value="http://www.web300.cn"></td></tr>
<tr class=bg height="25"><td> 推荐程度:<select name=commend class=yecao>
<option value="★☆☆☆☆">★☆☆☆☆</option>
<option value="★★☆☆☆">★★☆☆☆</option>
<option value="★★★☆☆" selected>★★★☆☆</option>
<option value="★★★★☆">★★★★☆</option>
<option value="★★★★★">★★★★★</option>
</select></td></tr>
<tr height="25" class=bg><td> 软件缩图:<input name="pic" type="text" id="pic" size="20" class=yecao style="width:300px"> <button onclick="document.all.updownpic.style.display=(document.all.updownpic.style.display=='none')?'':'none'" class=button>上传缩图</button></td></tr>
<tr class=bg height="25"><td> 本地下载:<input name="url1" type="text" id="url1" size="20" class=yecao style="width:300px"> <button onclick="document.all.updown.style.display=(document.all.updown.style.display=='none')?'':'none'" class=button>上传软件 </button></td></tr>
<tr class=bg height="25"><td> 镜像下载:<input name="url2" type="text" id="url2" size="20" class=yecao style="width:300px"></td></tr>
<tr class=bg height="25"><td> 友情下载:<input name="url3" type="text" id="url3" size="20" class=yecao style="width:300px"></td></tr>
<tr height="25" class=bg><td> 是否通过:<input name="pass" type="radio" value="true" checked> 通过 <input name="pass" type="radio" value="false"> 不通过</td></tr>
<tr height="25" class=bg><td> 是否推荐:<input name="best" type="radio" value="true" > 推荐 <input name="best" type="radio" value="false" checked> 不推荐</td></tr>
<tr height="25" class=bg><td> 查看权限:<input name="read" type="radio" value="0" checked> 访问游客 <input name="read" type="radio" value="1" > 普通会员 <input name="read" type="radio" value="2"> VIP会员</td></tr>
<tr><td><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="new" type="submit" class="adminbutton" id="new" value="发 布"> <input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
<textarea name="content" cols="50" rows="50" id="content" style="display:none"></textarea>
</table>
</form>
<%
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:处理添加记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "addok"
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from [YC_downclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_down",conn,1,3
rs.addnew
rs("title")=Trim(request.Form("title"))
rs("color")=Trim(request.Form("color"))
rs("bigclass")=Trim(rs7("class"))
rs("class")=Trim(request.Form("class"))
rs("pic")=Trim(request.Form("pic"))
rs("content")=Trim(request.Form("content"))
rs("size")=Trim(request.Form("size"))
rs("show")=Trim(request.Form("show"))
rs("web")=Trim(request.Form("web"))
rs("commend")=request.Form("commend")
rs("url1")=Trim(request.Form("url1"))
rs("url2")=Trim(request.Form("url2"))
rs("url3")=Trim(request.Form("url3"))
rs("user")=Trim(session("superuser"))
rs("pass")=request.Form("pass")
rs("best")=request.Form("best")
rs("read")=request.Form("read")
rs.update
conn.execute("update YC_user set user_money=user_money+5,user_all=user_all+1 where user_name="""&session("superuser")&"""")
rs.close
set rs=nothing
rs7.close
set rs7=nothing
response.write"<script>location.href='admin_down.asp';</script>"
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:编辑记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "edit"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_down where id="&request.QueryString("id")
rs.open sql,conn,1,3%>
<script language="javascript">
function cc(){
IframeID.document.body.innerHTML=document.all("content").value;
document.all("content").value="";
}
function chk(){
document.all("content").value=IframeID.document.body.innerHTML;
if(document.form.title.value==""){
alert("下载标题不能为空");
document.form.title.focus();
return false;}
if(document.form.url1.value==""){
alert("本地下载不能为空");
document.form.url1.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("下载内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<form method="post" name="form" id="form" onsubmit="return chk();" action="?action=editok">
<table width="100%" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" class=title><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 修改下载</b></td></tr>
<tr class=bg height="25"><td> 软件名称:<input name="title" type="text" id="title" size="20" class=yecao style="width:220px" value="<%=rs("title")%>"></td></tr>
<tr class=bg height="25"><td> 标题颜色:<input name="color" type="text" onfocus="colordialog()" class=yecao
value="<%=rs("color")%>" style="width:120px"></td></tr>
<tr class=bg height="25"><td> 软件分类:<%call editclass("YC_downclass",rs("class"))%></td></tr>
<tr class=bg height="25"><td> 软件大小:<input name="size" type="text" id="size" size="20" class=yecao style="width:120px" value="<%=rs("size")%>"></td></tr>
<tr class=bg height="25"><td> 软件演示:<input name="show" type="text" id="show" size="20" class=yecao style="width:300px" value="<%=rs("show")%>"></td></tr>
<tr class=bg height="25"><td> 官方主页:<input name="web" type="text" id="web" size="20" class=yecao style="width:300px" value="<%=rs("web")%>"></td></tr>
<tr class=bg height="25"><td> 推荐程度:
<select name=commend class=yecao>
<option value="★☆☆☆☆" <%if rs("commend")="★☆☆☆☆" then response.write "selected"%>>★☆☆☆☆</option>
<option value="★★☆☆☆" <%if rs("commend")="★★☆☆☆" then response.write "selected"%>>★★☆☆☆</option>
<option value="★★★☆☆" <%if rs("commend")="★★★☆☆" then response.write "selected"%>>★★★☆☆</option>
<option value="★★★★☆" <%if rs("commend")="★★★★☆" then response.write "selected"%>>★★★★☆</option>
<option value="★★★★★" <%if rs("commend")="★★★★★" then response.write "selected"%>>★★★★★</option>
</select></td></tr>
<tr height="25" class=bg><td> 软件缩图:<input name="pic" type="text" id="pic" size="20" class=yecao style="width:300px" value="<%=rs("pic")%>"> <button onclick="document.all.updownpic.style.display=(document.all.updownpic.style.display=='none')?'':'none'" class=button>重新上传缩图</button></td></tr>
<tr class=bg height="25"><td> 本地下载:<input name="url1" type="text" id="url1" size="20" class=yecao style="width:300px" value="<%=rs("url1")%>"> <button onclick="document.all.updown.style.display=(document.all.updown.style.display=='none')?'':'none'" class=button>重新上传软件</button></td></tr>
<tr class=bg height="25"><td> 镜像下载:<input name="url2" type="text" id="url2" size="20" class=yecao style="width:300px" value="<%=rs("url2")%>"></td></tr>
<tr class=bg height="25"><td> 友情下载:<input name="url3" type="text" id="url3" size="20" class=yecao style="width:300px" value="<%=rs("url3")%>"></td></tr>
<tr height="25" class=bg><td> 是否通过:<input name="pass" type="radio" value="true" <%if rs("pass")=true then response.write "checked" end if%>> 通过 <input name="pass" type="radio" value="false" <%if rs("pass")=false then response.write "checked" end if%>> 不通过</td></tr>
<tr height="25" class=bg><td> 是否推荐:<input name="best" type="radio" value="true" <%if rs("best")=true then response.write "checked" end if%>> 推荐 <input name="best" type="radio" value="false" <%if rs("best")=false then response.write "checked" end if%>> 不推荐</td></tr>
<tr height="25" class=bg><td> 查看权限:<input name="read" type="radio" value="0" <%if rs("read")=0 then response.write "checked" end if%>> 访问游客 <input name="read" type="radio" value="1" <%if rs("read")=1 then response.write "checked" end if%>> 普通会员 <input name="read" type="radio" value="2" <%if rs("read")=2 then response.write "checked" end if%>> VIP会员</td></tr>
<tr><td height="30" colspan=2><%call html()%></td></tr><tr><td class="hr"></td></tr>
<tr height="30" class=foot><td align="center">
<input name="id" type="hidden" id="id" value="<%=rs("id")%>">
<input name="edit" type="submit" class="adminbutton" id="edit" value="修 改"> <input name="Submit2" type="reset" class="adminbutton" value="清 空" onclick="ClearReset()"></td></tr>
<textarea name="content" id="content" style=display:none><%=Server.HtmlEncode(rs("content"))%></textarea>
</table></form>
<%rs.close
set rs=nothing
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:处理编辑记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "editok"
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from [YC_downclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
sql="select * from [YC_down] where id="&request.Form("id")
rs.open sql,conn,1,3
rs("bigclass")=rs7("class")
rs("title")=Trim(request.Form("title"))
rs("color")=request.Form("color")
rs("class")=request.Form("class")
rs("pic")=Trim(request.Form("pic"))
rs("content")=request.Form("content")
rs("size")=Trim(request.Form("size"))
rs("show")=Trim(request.Form("show"))
rs("web")=Trim(request.Form("web"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -