⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_num.asp

📁 电子商城代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
admintop()
Dim admin_flag
admin_flag=",33,"
	if session("admin_name")="" or instr(","&session("flag")&",",admin_flag)=0 then
	adminflag()	
	else
if request("action")="change" Then
s_id=Replace(request("skin_id"),"?skin_id=","")
top1=CLng(safereplace(request("top1")))
If top1="" Then top1="1"
top2=CLng(safereplace(request("top2")))
If top2="" Then top2="1"
top3=CLng(safereplace(request("top3")))
If top3="" Then top3="3"
top4=CLng(safereplace(request("top4")))
If top4="" Then top4="1"
top5=CLng(safereplace(request("top5")))
If top5="" Then top5="1"
top6=CLng(safereplace(request("top6")))
If top6="" Then top6="1"
top7=CLng(safereplace(request("top7")))
If top7="" Then top7="1"
top8=CLng(safereplace(request("top8")))
If top8="" Then top8="1"
top9=CLng(safereplace(request("top9")))
If top9="" Then top9="1"
top10=CLng(safereplace(request("top10")))
If top10="" Then top10="1"
top11=CLng(safereplace(request("top11")))
If top11="" Then top11="1"
top12=CLng(safereplace(request("top12")))
If top12="" Then top12="1"
top13=CLng(safereplace(request("top13")))
If top13="" Then top13="1"
top14=CLng(safereplace(request("top14")))
If top14="" Then top14="1"
top15=CLng(safereplace(request("top15")))
If top15="" Then top15="1"
top16=CLng(safereplace(request("top16")))
If top16="" Then top16="1"
top17=CLng(safereplace(request("top17")))
If top17="" Then top17="1"
top18=CLng(safereplace(request("top18")))
If top18="" Then top18="1"
top19=CLng(safereplace(request("top19")))
If top19="" Then top19="1"
top20=CLng(safereplace(request("top20")))
If top20="" Then top20="1"
ys1=safereplace(request("ys1"))
If ys1="" Then ys1="1"
ys2=safereplace(request("ys2"))
If ys2="" Then ys2="1"
ys3=safereplace(request("ys3"))
If ys3="" Then ys3="1"
'ys4=safereplace(request("ys4"))
'If ys4="" Then ys4="1"
If s_id<>"" Then 
set rs=server.createobject("adodb.recordset")
sql="select * from [56770_skins] where s_id="&s_id&""
rs.open sql, conn, 1, 3
s_topnum=""&top1&"$$$"&top2&"$$$"&top3&"$$$"&top4&"$$$"&top5&"$$$"&top6&"$$$"&top7&"$$$"&top8&"$$$"&top9&"$$$"&top10&"$$$"&top11&"$$$"&top12&"$$$"&top13&"$$$"&top14&"$$$"&top15&"$$$"&top16&"$$$"&top17&"$$$"&top18&"$$$"&top19&"$$$"&top20&"$$$"&ys1&"$$$"&ys2&"$$$"&ys3&""
rs("s_topnum")=trim(s_topnum)
rs.update
rs.close
Response.Write "<script language=""javascript"">alert('数据更新成功!');location.href=""admin_skin.asp""</script>"
response.End()
Else
        Response.Write "<script language=""javascript"">alert('请选择要保存的模板');javascript:history.back();</script>"
        response.End()
End If 
else

%>
<table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
  <tr>
  <td>
   <table border="0" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" align="center" width="100%">
  <tr>
 <td height="27" class="classtop" align="center" colspan="2">数据调用设置--请输入需要调用的数据数量</td>
</tr>
<form method="POST" action="?action=change">
<%
s_id=request("skin_id")
set rs=server.createobject("adodb.recordset")
If s_id<>"" Then 
       sql="select top 1 * from [56770_skins] where s_id="&s_id&""
Else
       sql="select top 1 * from [56770_skins] where s_check=1 order by s_id desc"
End If 
rs.open sql, conn, 1, 1
If rs.eof Then 
%>
  <tr>
 <td height="27" class="classtd" align="center" colspan="2">暂无模板数据</td>
</tr>
<%
Else

If s_id<>"" Then 
	   skin_id=CLng(s_id)
Else
	   skin_id=rs("s_id")
End If 
str_num=Split(rs("s_topnum"),"$$$")
top1=str_num(0)
top2=str_num(1)
top3=str_num(2)
top4=str_num(3)
top5=str_num(4)
top6=str_num(5)
top7=str_num(6)
top8=str_num(7)
top9=str_num(8)
top10=str_num(9)
top11=str_num(10)
top12=str_num(11)
top13=str_num(12)
top14=str_num(13)
top15=str_num(14)
top16=str_num(15)
top17=str_num(16)
top18=str_num(17)
top19=str_num(18)
top20=str_num(19)
ys1=str_num(20)
ys2=str_num(21)
ys3=str_num(22)
'ys4=str_num(22)
%>
<tr>
<td width="40%" class="classtd" height="25">当前模板:</td>
<td width="60%" class="classtd">&nbsp;

			   <%   
			   		response.write"<select name='skin_id' onChange=""var jmpURL=this.options[this.selectedIndex].value ;if(jmpURL!='') {window.location=jmpURL; }else{ this.selectedIndex=0; }"">"
		            response.write"<option>==请选择要编辑的模板==</option>"
                    Set rss=conn.execute("select s_name,s_id from [56770_skins] order by s_id desc")
                    If rss.eof Then 
		                   response.write"<option value=''>== 暂无模板 ==</option>"
		            Else 
		                   Do While Not rss.eof 
		                   response.write"<option value='?skin_id="&rss("s_id")&"'"
						   If skin_id=rss("s_id") Then response.write" selected" End If 
						   response.write">  ┝ "&rss("s_name")&"</option>"
		                   rss.movenext
		                   Loop
		            End If 
		            rss.close:Set rss=Nothing 
		            response.write"</select>"
%>
</td>
</tr>
<tr>
<td height="27" class="classtop" colspan="2">.:: 商品展示效果设置</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">商品分类页:</td>
<td width="60%" class="classtd">&nbsp;
<select name="ys1">
<option value="1" <%If ys1="1" Then response.write"selected" End If%>>图片模式</option>
<option value="0" <%If ys1="0" Then response.write"selected" End If%>>文本模式</option>
</select>
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">精品推荐页:</td>
<td width="60%" class="classtd">&nbsp;
<select name="ys2">
<option value="1" <%If ys2="1" Then response.write"selected" End If%>>图片模式</option>
<option value="0" <%If ys2="0" Then response.write"selected" End If%>>文本模式</option>
</select>
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">新货上架页:</td>
<td width="60%" class="classtd">&nbsp;
<select name="ys3">
<option value="1" <%If Left(Trim(ys3),1)="1" Then response.write"selected" End If%>>图片模式</option>
<option value="0" <%If Left(Trim(ys3),1)="0" Then response.write"selected" End If%>>文本模式</option>
</select>
</td>
</tr>
<!--<tr>
<td width="40%" class="classtd" height="25">商品搜索页:</td>
<td width="60%" class="classtd">&nbsp;
<select name="ys4">
<option value="pic" <%If ys4="pic" Then response.write"selected" End If%>>图片模式</option>
<option value="word" <%If ys4="word" Then response.write"selected" End If%>>文本模式</option>
</select>
</td>
</tr>-->
<tr>
<td height="27" class="classtop" colspan="2">.:: 首页</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">最新商品专题:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top1" size="5" value="<%=top1%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">最新商品评论:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top2" size="5" value="<%=top2%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">新货上架:</td>
<td width="60%" class="classtd">&nbsp;
每行显示<input type="text" name="top3" size="5" value="<%=top3%>" class="form">个,共显示<input type="text" name="top4" size="5" value="<%=top4%>" class="form">个
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">精品推荐:</td>
<td width="60%" class="classtd">&nbsp;
每行显示<input type="text" name="top5" size="5" value="<%=top5%>" class="form">个,共显示<input type="text" name="top6" size="5" value="<%=top6%>" class="form">个
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">最新特价商品:</td>
<td width="60%" class="classtd">&nbsp;
每行显示<input type="text" name="top7" size="5" value="<%=top7%>" class="form">个,共显示<input type="text" name="top8" size="5" value="<%=top8%>" class="form">个
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">人气排行:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top9" size="5" value="<%=top9%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">热卖商品:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top10" size="5" value="<%=top10%>" class="form">
</td>
</tr>
<tr>
<td height="27" class="classtop" colspan="2">.:: 商品分类页通用部分</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">特价列表:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top11" size="5" value="<%=top11%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">热卖列表:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top13" size="5" value="<%=top13%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">推荐列表:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top15" size="5" value="<%=top15%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">新品列表:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top17" size="5" value="<%=top17%>" class="form">
</td>
</tr>
<tr>
<td height="27" class="classtop" colspan="2">.:: 商品一级分类</td>
</tr>

<tr>
<td width="40%" class="classtd" height="25">每页显示:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top12" size="5" value="<%=top12%>" class="form">
</td>
</tr>
<tr>
<td height="27" class="classtop" colspan="2">.:: 商品二级分类</td>
</tr>

<tr>
<td width="40%" class="classtd" height="25">每页显示:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top14" size="5" value="<%=top14%>" class="form">
</td>
</tr>
<tr>
<td height="27" class="classtop" colspan="2">.:: 商品三级分类</td>
</tr>

<tr>
<td width="40%" class="classtd" height="25">每页显示:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top16" size="5" value="<%=top16%>" class="form">
</td>
</tr>

<tr>
<td height="27" class="classtop" colspan="2">.:: 特价商品</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">左侧特价推荐:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top18" size="5" value="<%=top18%>" class="form">
</td>
</tr>
<tr>
<td width="40%" class="classtd" height="25">每页显示:</td>
<td width="60%" class="classtd">&nbsp;
<input type="text" name="top19" size="5" value="<%=top19%>" class="form"> 行
</td>
</tr>
<tr>
<td class="classfooter" height="30" colspan="2" align="center">
<input type="submit" value="提 交 设 置" name="B1" class="button">
<input type="hidden" name="top20" value="0">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
rs.close:Set rs=Nothing 
end If
End If 
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -