📄 admin_inc.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shjia where username='"&request.cookies("days6")("shjianame")&"' ",conn,1,1
id=rs_s("shjiaid")
if id<>"" then
if not isnumeric(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
else
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
end if
end if
sub mydindan()
if request.cookies("days6")("shjianame")="" then
response.Redirect "admin_login.asp"
response.End
end if
%>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6DBF7">
<tr>
<td align="center" background="../admin/images/bg_3.gif" height="25" colspan="4"><b><font color="#ffffff">管理订单</font></b></td>
</tr>
<tr>
<td width="50%" align="right" colspan="4" bgcolor="#D6DBF7">
<select name="zhuangtai" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option value="admin_right.asp?action=mydindan&zhuangtai=0" selected>--请选择查讯状态--</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=0" >全部订单状态</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=1" >未作任何处理</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=2" >用户已经划出款</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=3" >服务商已经收到款</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=4" >服务商已经发货</option>
<option value="admin_right.asp?action=mydindan&zhuangtai=5" >用户已经收到货</option>
</select>
</td>
</tr>
<tr bgcolor="#D6DBF7" align="center">
<td>订单号</td>
<td>货 款</td>
<td>费 用</td>
<td>订单状态</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
dim zhuangtai
zhuangtai=request.QueryString("zhuangtai")
if zhuangtai<>"" then
if not isnumeric(zhuangtai) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
else
if not isinteger(zhuangtai) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
end if
end if
if zhuangtai=0 or zhuangtai="" then
select case zhuangtai
case "0"
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,shjiaid,zhuangtai from shop_action where shjiaid="&id&" and zhuangtai<6 order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,shjiaid,zhuangtai from shop_action where shjiaid="&id&" and zhuangtai<6 order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,shouhuoname,songhuofangshi,zhifufangshi,shjiaid,zhuangtai from shop_action where shjiaid="&id&" and zhuangtai="&zhuangtai&" order by actiondate",conn,1,1
end if
do while not rs.eof
dim Godbook,username
set Godbook=server.CreateObject("adodb.recordset")
Godbook.open "select username from [user] where userid="&rs("userid"),conn,1,1
username=trim(Godbook("username"))
Godbook.close
set Godbook=nothing
%>
<tr bgcolor="#D6DBF7" align="center">
<td>
<a href="admin_ding.asp?dan=<%=trim(rs("dingdan"))%>&sjid=<%=trim(rs("shjiaid"))%>&username=<%=username%>" target="_blank"><%=trim(rs("dingdan"))%></a>
</td>
<td>
<%dim rs2
set Godbook=server.CreateObject("adodb.recordset")
Godbook.open "select sum(zonger) as zonger from shop_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
response.write "<font color=#FF6600>"&Godbook("zonger")&"元</font>"
Godbook.close
set Godbook=nothing%>
</td>
<td>
<%
set Godbook=server.CreateObject("adodb.recordset")
Godbook.open "select feiyong from shop_action where dingdan='"&trim(rs("dingdan"))&"' ",conn,1,1
response.write "<font color=#FF6600>"&Godbook("feiyong")&"元</font>"
Godbook.close
set Godbook=nothing%>
</td>
<td>
<%select case rs("zhuangtai")
case "1"
response.write "未作任何处理"
case "2"
response.write "用户已经划出款"
case "3"
response.write "服务商已经收到款"
case "4"
response.write "服务商已经发货"
case "5"
response.write "用户已经收到货"
end select%>
</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%
end sub
sub glnews()
if request.cookies("days6")("shjianame")="" then
response.Redirect "admin_login.asp"
response.End
end if
%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6DBF7">
<tr>
<td align="center" background="../admin/images/bg_3.gif" height="25" colspan="4"><b><font color="#ffffff">管理新闻</font></b></td>
</tr>
<tr bgcolor="#D6DBF7" align="center">
<td width="10%">序号 </td>
<td width="50%">新闻标题</td>
<td width="30%">添加时间</td>
<td width="10%">操作</td>
</tr>
<% set rs=server.CreateObject("adodb.recordset")
rs.open "select * from news where shjiaid="&id&" order by addtime desc",conn,1,1
if err.number<>0 then
response.write "数据库中无数据"
end if
do while not rs.eof
%>
<tr bgcolor="#D6DBF7">
<td align="center"><%=rs("newsid")%> </td>
<td STYLE='PADDING-LEFT: 10px'><a href=admin_right.asp?action=addnews&id=<%=rs("newsid")%>&isedit=1>
<% if len(replace(trim(rs("title")),"<br>",""))>25 then
response.write left(replace(trim(rs("title")),"<br>",""),23)&".."
else
response.write replace(trim(rs("title")),"<br>","")
end if%></a></td>
<td align="center"><%=rs("addtime")%></td>
<td align="center"><a href="saveshjiainfo.asp?action=delnews&newsid=<%=rs("newsid")%>"><font color="#FF0000">删除</font></a>
</td>
</tr>
<%rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%
end sub
sub fk()
if request.cookies("days6")("shjianame")="" then
response.Redirect "shjia.asp"
response.End
end if
%>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6DBF7">
<tr>
<td align="center" background="../admin/images/bg_3.gif" height="25" colspan="4"><b><font color="#ffffff">查看留言</font></b></td>
</tr>
<tr bgcolor="#D6DBF7" align="center">
<td width="10%">序号 </td>
<td width="50%">留言标题</td>
<td width="30%">添加时间</td>
<td width="10%">操作</td>
</tr>
<% set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_shjiafk where shjiaid="&id&" order by fkdate desc",conn,1,1
if err.number<>0 then
response.write "数据库中无数据"
end if
do while not rs.eof%>
<tr bgcolor="#D6DBF7">
<td align="center"><%=rs("fkid")%> </td>
<td STYLE='PADDING-LEFT: 10px'><a href="javascript:;" onClick=javascript:window.open('admin_fk.asp?id=<%=rs("fkid")%>')>
<% if len(replace(trim(rs("fksubject")),"<br>",""))>25 then
response.write left(replace(trim(rs("fksubject")),"<br>",""),23)&".."
else
response.write replace(trim(rs("fksubject")),"<br>","")
end if%></a>
</td>
<td align="center"><%=rs("fkdate")%></td>
<td align="center"><a href="saveshjiainfo.asp?action=delfk&fkid=<%=rs("fkid")%>"><font color="#FF0000">删除</font></a>
</td>
</tr>
<%rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%
end sub
sub modify()
if request.cookies("days6")("shjianame")="" then
response.Redirect "shjia.asp"
response.End
end if
dim selectbookid
'//删除商品
selectbookid=request("selectbookid")
if selectbookid<>"" then
conn.execute "delete from shop_books where bookid in ("&selectbookid&")"
'response.Redirect "managebook.asp"
response.Write "<script language=javascript>alert('你选择的商品已删除');window.location.href='admin_right.asp?action=modify';</script>"
'response.End
end if
%>
<script>
function test()
{
if(!confirm('确认删除吗?')) return false;
}
</script>
<form name="form1" method="post" action="">
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6DBF7">
<tr>
<td align="center" background="../admin/images/bg_3.gif" height="25" colspan="4"><b><font color="#ffffff">管理商品</font></b></td>
</tr>
<tr bgcolor="#D6DBF7" align="center">
<td width="10%">序号 </td>
<td width="50%">商品名称</td>
<td width="30%">添加时间</td>
<td width="10%">操作</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_books where shjiaid="&id&" order by adddate desc",conn,1,1
if err.number<>0 then
response.write "数据库中无数据"
end if%>
<%
do while not rs.eof%>
<tr bgcolor="#D6DBF7">
<td align="center"><%=rs("bookid")%></td>
<td STYLE='PADDING-LEFT: 10px'><a href=admin_right.asp?action=editshp&id=<%=rs("bookid")%>>
<% if len(replace(trim(rs("bookname")),"<br>",""))>25 then
response.write left(replace(trim(rs("bookname")),"<br>",""),23)&".."
else
response.write replace(trim(rs("bookname")),"<br>","")
end if%>
</a>
<%
if rs("checkcard")=1 then
response.write " <a href=addcard.asp?bookid="&rs("bookid")&"><font color=red>增加卡号</font></a>"
end if
if rs("kucun")=0 then
response.write " <font color=#ff00ff>缺货</font>"
end if
%></td>
<td align="center"><%=rs("adddate")%></td>
<td align="center"><input name="selectbookid" type="checkbox" id="selectbookid" value="<%=rs("bookid")%>">
</td>
</tr>
<%rs.movenext
loop
rs.close
set rs=nothing%>
<tr>
<td bgcolor="#D6DBF7" colspan="4" align="right">
<input type="submit" name="Submit" value="删 除" onClick="return test();">
</td>
</tr>
</table>
</form>
<%
end sub
sub addclass()
if request.cookies("days6")("shjianame")="" then
response.Redirect "shjia.asp"
response.End
end if
set rsi=server.CreateObject("adodb.recordset")
rsi.Open "select * from shop_books where shjianame='"&request.cookies("days6")("shjianame")&"'",conn,1,3
if rsi.recordcount>0 then
Count_i=rsi.RecordCount
if lx=0 then
if Count_i>=lxanum then
response.Write "<script language=javascript>alert('你注册免费型商家最多只能添加20个产品!');history.go(-1);</script>"
response.End
end if
end if
if lx=1 then
if Count_i>=lxbnum then
response.Write "<script language=javascript>alert('你注册B型商家最多只能添加100个产品!');history.go(-1);</script>"
response.End
end if
end if
if lx=2 then
if Count_i>=lxcnum then
response.Write "<script language=javascript>alert('你注册C型商家最多只能添加100000个产品!');history.go(-1);</script>"
response.End
end if
end if
end if
rsi.close
set rsi=nothing
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
if(checkspace(document.myform.anclassid.value)) {
document.myform.anclassid.focus();
alert("请选择大类!");
return false;
}
if(checkspace(document.myform.Nclassid.value)) {
document.myform.Nclassid.focus();
alert("请选择小类!");
return false;
}
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
<form name="myform" method="post" action="admin_right.asp?action=addshp" OnSubmit="return checkkk()">
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6DBF7">
<tr>
<td align="center" background="../admin/images/bg_3.gif" height="25" colspan="4"><b><font color="#ffffff">请按分类级别由高到低从下面的选框中选择商品分类,完成后请点“下一步”</font></b></td>
</tr>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shjia where username='"&request.cookies("days6")("shjianame")&"' ",conn,1,1
%>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.Nclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<tr>
<td width="100%" align="center" bgcolor="#D6DBF7">
<%
rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select class="wenbenkuang" name="anclassid" size=10 style='width:200px' id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%> -></option>
<% dim selclass
selclass=rs("anclassid")
rs.movenext
do while not rs.eof
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -