?? bs_add.asp
字號:
<!--#include file="config.asp"-->
<!--#include file="Inc/Ubbcode.asp"-->
<!--#include file="Inc/Function.asp"-->
<!--#include file="Conn.asp"-->
<%
dim strFileName
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages
dim i,j
dim ArticleID
dim Title1
dim sql
dim BigClassName,SmallClassName,SpecialName
dim PurviewChecked
dim strAdmin,arrAdmin
PurviewChecked=false
strFileName="bs_add.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "&SpecialName=" & SpecialName
Title1=Trim(request("Title"))
ArticleID=Request("ArticleID")
BigClassName=Trim(request("BigClassName"))
SmallClassName=Trim(request("SmallClassName"))
SpecialName=trim(request("SpecialName"))
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
sql="select * from Bs_Product where ArticleID>0"
if session("purview")>4 then
sql=sql & " and Editor='" & Session("admin") & "' and Passed=false"
end if
if Title1<>"" then
sql=sql & " and Title like '%" & Title1 & "%' "
end if
if BigClassName<>"" then
sql=sql & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sql=sql & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sql=sql & " and SpecialName='" & SpecialName & "' "
end if
end if
sql=sql & " order by articleid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="91%" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>添 加 <strong> 石 材 </strong>訂 單 </strong></td>
</tr>
<tr class="a4">
<td align="center">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" >
<tr class="Title1">
<td bgcolor="#F0F0F0" height="25"><table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr class="tdbg">
<form name="searchsoft" method="get" action="bs_add.asp">
<td height="25" bgcolor="#F0F0F0"><strong> 查找</strong>
<input name="Title" type="text" class=smallInput id="Title3" size="20" maxlength="50">
<input name="Query" type="submit" id="Query" value="查 詢">
請輸入名稱后按查詢,如果為空,查找所有。
<label></label></td>
</form>
</tr>
</table></td>
</tr>
<tr class="Title1">
<td bgcolor="#F0F0F0" height="25">|
<%
dim sqlBigClass,sqlSmallClass,rsBigClass,rsSmallClass,sqlSpecial,rsSpecial
sqlBigClass="select * from Bs_PrBigClass"
Set rsBigClass= Server.CreateObject("ADODB.Recordset")
rsBigClass.open sqlBigClass,conn,1,1
if rsBigClass.eof then
response.Write("還沒有任何欄目,請首先添加欄目。")
end if
do while not rsBigClass.eof
if rsBigClass("BigClassName")=BigClassName then
response.Write("<a href='bs_add.asp?BigClassName=" & rsBigClass("BigClassName") & "'><font color='red'>" & rsBigClass("BigClassName") & "</font></a> | ")
if session("purview")=3 then
strAdmin=rsBigClass("Admin")
if Instr(strAdmin,"|")>0 then
arrAdmin=split(strAdmin)
for i=0 to ubound(arrAdmin)
if trim(arrAdmin(i))=session("admin") then
PurviewChecked=True
exit for
end if
next
else
if trim(strAdmin)=session("Admin") then
PurviewChecked=True
end if
end if
end if
else
response.Write("<a href='bs_add.asp?BigClassName=" & rsBigClass("BigClassName") & "'>" & rsBigClass("BigClassName") & "</a> | ")
end if
rsBigClass.movenext
loop
rsBigClass.close
set rsBigClass=nothing
%> </td>
</tr>
<%
if BigClassName<>"" then
sqlSmallClass="select * from Bs_PrSmallClass where BigClassName='" & BigClassName & "'"
Set rsSmallClass= Server.CreateObject("ADODB.Recordset")
rsSmallClass.open sqlSmallClass,conn,1,1
if not (rsSmallClass.bof and rsSmallClass.eof) then
response.write "<tr '><td bgcolor='#F0F0F0'>"
do while not rsSmallClass.eof
if rsSmallClass("SmallClassName")=SmallClassName then
response.Write(" <a href='bs_add.asp?BigClassName=" & rsSmallClass("BigClassName") & "&SmallClassName=" & rsSmallClass("SmallClassName") & "'><font color='red'>" & rsSmallClass("SmallClassName") & "</font></a> ")
if session("purview")=4 then
strAdmin=rsSmallClass("Admin")
if Instr(strAdmin,"|")>0 then
arrAdmin=split(strAdmin)
for i=0 to ubound(arrAdmin)
if trim(arrAdmin(i))=session("admin") then
PurviewChecked=True
exit for
end if
next
else
if trim(strAdmin)=session("Admin") then
PurviewChecked=True
end if
end if
end if
else
response.Write(" <a href='bs_add.asp?BigClassName=" & rsSmallClass("BigClassName") & "&SmallClassName=" & rsSmallClass("SmallClassName") & "'>" & rsSmallClass("SmallClassName") & "</a> ")
end if
rsSmallClass.movenext
loop
response.write "</td></tr>"
end if
rsSmallClass.close
set rsSmallClass=nothing
end if
%>
</table>
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td width="892" height="25" bgcolor="#CCCCCC"><a href="Bs_Article.asp"> 管理</a>
>>
<%
if request.querystring="" then
response.write "所有"
else
if request("Query")<>"" then
if Title1<>"" then
response.write "名稱中含有“<font color=blue>" & Title1 & "</font>”的"
else
response.Write("所有")
end if
else
if BigClassName<>"" then
response.write "<a href='bs_add.asp?BigClassName=" & BigClassName & "'>" & BigClassName & "</a> >> "
if SmallClassName<>"" then
response.write "<a href='bs_add.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "'>" & SmallClassName & "</a>"
else
response.write "所有小類"
end if
end if
if SpecialName<>"" then
response.write "<font color=red>[專題]</font> " & SpecialName
end if
end if
end if
%> </td>
<td width="140" bgcolor="#F0F0F0">
<%
if rs.eof and rs.bof then
response.write "共找到 0 個</td></tr></table>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
response.Write "共找到 " & totalPut & " 個"
%> </td>
</tr>
</table>
<%
if currentPage=1 then
showContent
showpage strFileName,totalput,MaxPerPage,true,false,"個"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage strFileName,totalput,MaxPerPage,true,false,"個"
else
currentPage=1
showContent
showpage strFileName,totalput,MaxPerPage,true,false,"個"
end if
end if
end if
%>
<%
sub showContent
dim i
i=0
%>
<table border="0" cellspacing="1" width="100%" cellpadding="2" style="word-break:break-all">
<tr bgcolor="#F0F0F0" class="Title1">
<td width="80" height="25" align="center" bgcolor="#F0F0F0"><strong>我方名稱</strong></td>
<td width="138" align="center" bgcolor="#F0F0F0" ><strong>工廠名稱</strong></td>
<td width="132" align="center" ><strong>主要特征或說明</strong></td>
<td width="137" align="center" ><strong>圖片預覽</strong></td>
<td width="175" align="center" ><strong>操作</strong></td>
</tr>
<%do while not rs.eof%>
<tr class="tdbg">
<td width="80" height="22" align="center" bgcolor="#F0F0F0"><%=rs("Product_Id")%></td>
<td bgcolor="#F0F0F0"> <a href="Bs_ProductShow.asp?ArticleID=<%=rs("articleid")%>" target="_blank"><%=rs("Title")%></a></td>
<td width="132" align="center" bgcolor="#F0F0F0"><%=rs("bs_Content")%></td>
<td width="137" align="center" bgcolor="#F0F0F0"><img src="<%=rs("DefaultPicUrl")%>" alt="" width="50" height="50" /></td>
<td width="175" align="center" bgcolor="#F0F0F0"><a href="bs_eshop.asp?Product_Id=<%=rs("Product_Id")%>"target="_blank">添加到第<span style="color: #FF0000"><%=request.cookies("ddh")%></span>號訂單</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
%>
</form>
<BR> </td>
</tr>
</table>
<BR>
<%
rs.close
set rs=nothing
call CloseConn()
%>
<%response.end%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -