📄 admin_pic.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")<>web58818 then
response.Write "<script>alert('本站提示:您还没有登陆!');this.location.href='index.asp';</script>"
Response.End
end if
if session("superadmin")<>"pic" 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><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
<script src=img/adminjs.js></script>
</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_pic.asp?action=type">分类管理</a> <a href="admin_pic.asp?action=addtype">添加分类</a> <a href="admin_pic.asp">图片管理</a> <a href="admin_pic.asp?action=add">添加图片</a></td></tr></table>
<table align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d id=uppic style="position:absolute;left:270;top:40;display:none">
<tr onmousedown="MDown(uppic)" 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.uppic.style.display=(document.all.uppic.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=pic"></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_pic Where id="&id&"")
response.write"<script>location.href='admin_pic.asp';</script>"
case"type"
call alltype("YC_picclass","图片")
case"edittype"
call edittype("YC_picclass",request("id"))
case"edittypename"
call submittype("YC_picclass",request("id"),request("classname"))
case"addtype"
call addtype()
case"addtypeok"
call addtypeok("YC_picclass",request("classname"))
case"addtype2"
call addtype2(request("id"))
case"addtype2ok"
call addtype2ok("YC_picclass",request("classname"),request("id"))
case"deltype"
call deltype("YC_picclass",request("id"))
case "list"
call list()
case "add"%>
<body onload=IframeID.document.body.innerHTML='本图片版权归本站所有,转载时请申明版权!'>
<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(IframeID.document.body.innerHTML==""){
alert("新闻内容不能为空");
IframeID.document.body.focus();
return false;}
if(document.form.writer.value==""){
alert("图片作者不能为空");
document.form.writer.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=web58818 style="width:220px"></td></tr>
<tr class=bg height="25"><td> 标题颜色:<input name="color" type="text" onfocus="colordialog()" class=web58818
value="#000000" style="width:120px"></td></tr>
<tr class=bg height="25"><td height="25"> 图片原图:<input name="pic" type="text" id="pic" size="20" class=web58818 style="width:300px"> <button onclick="document.all.uppic.style.display=(document.all.uppic.style.display=='none')?'':'none'" class=button>上传原始图片</button>
</td></tr>
<tr class=bg height="25"><td> 图片分类:<%call newclass("YC_picclass")%></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="user" type="hidden" value="<%=session("superuser")%>">
<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_picclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_pic",conn,1,3
rs.addnew
rs("title")=request.Form("title")
rs("color")=request.Form("color")
rs("bigclass")=Trim(rs7("class"))
rs("class")=request.Form("class")
rs("pic")=request.Form("pic")
rs("content")=request.Form("content")
rs("user")=request.Form("user")
rs("pass")=request.Form("pass")
rs("best")=request.Form("best")
rs("read")=request.Form("read")
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_pic.asp';</script>"
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◇功 能:编辑记录 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
case "edit"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_pic 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.writer.value==""){
alert("图片作者不能为空");
document.form.writer.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" value="<%=rs("title")%>" size="20" class=web58818 style="width:220px"></td></tr>
<tr class=bg height="25"><td> 标题颜色:<input name="color" type="text" onfocus="colordialog()" class=web58818
value="<%=rs("color")%>" style="width:120px"></td></tr>
<tr class=bg height="25"><td height="25"> 图片原图:<input name="pic" type="text" id="pic" value="<%=rs("pic")%>" size="20" class=web58818 style="width:300px"> <button onclick="document.all.uppic.style.display=(document.all.uppic.style.display=='none')?'':'none'" class=button>重新上传原始图片</button>
</td></tr>
<tr class=bg height="25"><td> 图片分类:<%call editclass("YC_picclass",rs("class"))%>
</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_picclass] where id="&Cint(Trim(request.Form("class")))
rs7.open sql7,conn,1,1
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_pic where id="&request("id")
rs.open sql,conn,1,3
rs("title")=request.Form("title")
rs("color")=request.Form("color")
rs("bigclass")=Trim(rs7("class"))
rs("class")=request.Form("class")
rs("pic")=request.Form("pic")
rs("content")=request.Form("content")
rs("pass")=request.Form("pass")
rs("best")=request.Form("best")
rs("read")=request.Form("read")
rs7.close
set rs7=nothing
rs.close
set rs=nothing
response.Redirect"admin_pic.asp"
case "pllist"
call pllist()
case "pledit"
set rs=server.CreateObject("adodb.recordset")
sql="select * from YC_pl where id="&request("id")
rs.open sql,conn,1,1%>
<form name="form1" method="post" action="?action=pleditok">
<table width="400" align=center border="0" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" rules=none class=3d>
<tr><td height="22" class=title colspan=2><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 修改评论</b></td></tr>
<tr class=bg height=25><td> 评论者:</td><td><input name="title" type="text" id="title" value="<%=rs("title")%>" size="20" class=web58818 style="width:120px"></td></tr>
<tr class=bg height=25><td valign=top> 内 容:</td><td><textarea name="content" style="width:300px;height:65px;" id="content"><%=rs("content")%></textarea></td></tr>
<tr class=bg height=25><td align=center colspan=2>
<input name="id" type="hidden" id="editpl" value="<%=rs("id")%>">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -