📄 sysproduct.asp
字号:
end select
end if
sqlSearch=sqlSearch & " order by id desc"
Set rsSearch= Server.CreateObject("ADODB.Recordset")
rsSearch.open sqlSearch,conn,1,1
if rsSearch.eof and rsSearch.bof then
response.write "<p align='center'><br><br>没有或没有找到任何产品</p>"
else
if currentPage=1 then
call SearchResultContent()
else
if (currentPage-1)*MaxPerPage<totalPut then
rsSearch.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsSearch.bookmark
call SearchResultContent()
else
currentPage=1
call SearchResultContent()
end if
end if
end if
rsSearch.close
set rsSearch=nothing
end sub
sub SearchResultContent()
dim i,strTemp,ViewList
i=1
ViewList=4
strTemp=""
strtemp= strtemp & "<p>"
strTemp= strTemp & "<TABLE width='98%' align=center BORDER=0 CELLSPACING=1 CELLPADDING=0>"
strTemp= strTemp & "<tr>"
do while not rsSearch.eof
strTemp= strTemp & "<td>"
strTemp= strTemp & "<table align=center width=170 border=0 cellspacing=2 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td colspan=2>"
strTemp= strTemp &"<TABLE align=center border=0 cellPadding=0 cellSpacing=5>"
strTemp= strTemp &"<TR>"
strTemp= strTemp &"<TD align=middle > <TABLE align=center border=0 cellPadding=0 cellSpacing=0>"
strTemp= strTemp &"<TR>"
strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0ltop.gif' width=10></TD>"
strTemp= strTemp &"<TD background='Img/bg_01.gif' height=10></TD>"
strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rtop.gif' width=10></TD>"
strTemp= strTemp &"</TR>"
strTemp= strTemp &"<TR> "
strTemp= strTemp &"<TD background='Img/bg_03.gif' width=10> </TD>"
strTemp= strTemp & "<td width=130 height=100>"&"<div align=center>"
If ISHTML = 1 Then
AutoLink = ""&ProName&""&Separated&""&rsSearch("ID")&"."&HTMLName&""
Else
AutoLink = "ProductShow.asp?ClassID="& rsSearch("ClassID")&"&ID=" & rsSearch("id") &""
End If
strTemp= strTemp &"<a href="""&AutoLink&""">"
strTemp= strTemp & "<img src=" & rsSearch("DefaultPicUrl") & " width='130' height='100' border='0' onload='javascript:DrawImage(this);'>" & "</a><br></div>"
strTemp= strTemp & "</td>"
strTemp= strTemp &"<TD background='Img/bg_04.gif' width=10> </TD>"
strTemp= strTemp &"</TR>"
strTemp= strTemp &"<TR>"
strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0lbottom.gif' width=10></TD>"
strTemp= strTemp &"<TD background=Img/bg_02.gif height=10></TD>"
strTemp= strTemp &"<TD height=10><IMG height=10 src='Img/bg_0rbottom.gif' width=10></TD>"
strTemp= strTemp &"</TR>"
strTemp= strTemp &"</TABLE></TD>"
strTemp= strTemp &"</TR>"
strTemp= strTemp &"</TABLE>"
strTemp= strTemp & "</a></div></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td align=right >"
strTemp= strTemp & "名称:</td>"
strTemp= strTemp & "<td width=80% >"
strTemp= strTemp & "<a href=ProductShow.asp?ID=" & rsSearch("id") & ">" & rsSearch("Title") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td align=right >"
strTemp= strTemp & "编号:</td>"
strTemp= strTemp & "<td>"
strTemp= strTemp & rsSearch("Product_Id") & ""
strTemp= strTemp & "</a></td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td colspan=2>"
strTemp= strTemp & "<table width=100% border=0 cellpadding=0 cellspacing=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td>"
strTemp= strTemp & "</td><td></td></tr>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=50% height=12>"
strTemp= strTemp & "</td>"
strTemp= strTemp & "<td width=50% height=12>"
strTemp= strTemp & "<div align=center><input name='Product_Id' type='checkbox' id='Product_Id' value="&cstr(rsSearch("Product_Id"))&"> 选取"
strTemp= strTemp & "</div></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
strTemp= strTemp & "</td>"
strTemp= strTemp & "</tr><tr>"
strTemp= strTemp & "<td height=1 colspan=3 bgcolor=#CCCCCC></td>"
strTemp= strTemp & "</tr>"
strTemp= strTemp & "</table>"
if i mod ViewList =0 then
strTemp= strTemp & "</td></tr><tr>"
else
strTemp= strTemp & "</td>"
end if
rsSearch.MoveNext
i=i+1
if i>MaxPerPage then exit do
loop
strtemp= strtemp & "</tr></table>"
response.write strTemp
end sub
'=================================================
'过程名:ShowClassNavigation
'作 用:显示栏目导航
'参 数:无
'=================================================
sub ShowClassNavigation()
dim rsNavigation,sqlNavigation,strNavigation,PrevRootID,i
sqlNavigation="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.RootID,C.LinkUrl,C.Child,C.Readme From 0791idc_ProductClass C"
sqlNavigation= sqlNavigation & " inner join Layout L on C.LayoutID=L.LayoutID where C.Depth<=1 order by C.RootID,C.OrderID"
Set rsNavigation= Server.CreateObject("ADODB.Recordset")
rsNavigation.open sqlNavigation,conn,1,1
if rsNavigation.bof and rsNavigation.eof then
response.write "没有任何栏目"
else
strNavigation="<table border='0' cellpadding='0' cellspacing='2'><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a>】</td><td>"
PrevRootID=rsNavigation(4)
rsNavigation.movenext
i=1
do while not rsNavigation.eof
if PrevRootID=rsNavigation(4) then
if i mod 6=0 then
strNavigation=strNavigation & "<br>"
end if
strNavigation=strNavigation & "<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a> "
i=i+1
else
strNavigation=strNavigation & "</td></tr><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "' title='" & rsNavigation(7) & "'>" & rsNavigation(1) & "</a>】</td><td>"
i=1
end if
PrevRootID=rsNavigation(4)
rsNavigation.movenext
loop
strNavigation=strNavigation & "</td></tr></table>"
response.write strNavigation
end if
rsNavigation.close
set rsNavigation=nothing
end sub
'=================================================
'过程名:ShowAllClass
'作 用:显示所有栏目(栏目导航)
'参 数:无
'=================================================
sub ShowAllClass()
if rsBigClass.bof and rsBigClass.eof then
response.Write " 没有任何栏目"
else
dim sqlClass,rsClass,strClassName
rsBigClass.movefirst
do while not rsBigClass.eof
strClassName= "【<a href='Product.asp?BigClassName=" & rsBigClass("BigClassName") & "'><b>" & rsBigClass("BigClassName") & "</b></a>】<br><br>"
sqlClass="select * from 0791idc_SmallClass where BigClassName='" & rsBigClass("BigClassName") & "' Order by SmallClassID"
Set rsClass= Server.CreateObject("ADODB.Recordset")
rsClass.open sqlClass,conn,1,1
do while not rsClass.eof
strClassName=strClassName & " <a href='Product.asp?BigClassName=" & rsClass("BigClassName") & "&SmallClassName=" & rsClass("SmallClassName") & "'>" & rsClass("SmallClassName") & "</a> "
rsClass.movenext
loop
response.write strClassName & "<br><br>"
rsBigClass.movenext
loop
rsClass.close
set rsClass=nothing
end if
end sub
'=================================================
'过程名:ShowProductContent
'作 用:显示文章具体的内容
'参 数:无
'=================================================
sub ShowProductContent()
dim ID,strContent,CurrentPage
dim ContentLen,MaxPerPage,pages,i,lngBound
dim BeginPoint,EndPoint
ID=rs("ID")
strContent=rs("Content")
response.write strContent
end sub
'=================================================
'过程名:ShowUserLogin
'作 用:显示用户登录表单
'参 数:无
'=================================================
sub ShowUserLogin()
dim strLogin
If Session("UserName")="" Then
strLogin= "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
strLogin=strLogin & "<form action='UserLogin.asp' method='post' name='UserLogin' onSubmit='return CheckForm();'>"
strLogin=strLogin & "<tr><td height='25' align='right'>用户名:</td><td height='25'><input name='UserName' type='text' id='UserName' size='10' maxlength='20'></td></tr>"
strLogin=strLogin & "<tr><td height='25' align='right'>密 码:</td><td height='25'><input name='Password' type='password' id='Password' size='10' maxlength='20'></td></tr>"
strLogin=strLogin & "<tr align='center'><td height='25' colspan='2'><input name='Login' type='submit' id='Login' value=' 登录 '> <input name='Reset' type='reset' id='Reset' value=' 清除 '>"
strLogin=strLogin & "</td></tr>"
strLogin=strLogin & "<tr><td height='20' align='center' colspan='2'><a href='UserReg.asp' target='_blank'>新用户注册</a> <a href='GetPassword.asp' target='_blank'>忘记密码?</a></td></tr>"
strLogin=strLogin & "</form></table>"
response.write strLogin
%>
<script language=javascript>
function CheckForm()
{
if(document.UserLogin.UserName.value=="")
{
alert("请输入用户名!");
document.UserLogin.UserName.focus();
return false;
}
if(document.UserLogin.Password.value == "")
{
alert("请输入密码!");
document.UserLogin.Password.focus();
return false;
}
}
</script>
<%
Else
response.write "欢迎您!" & Session("UserName") & "<br><br>"
response.write "用户控制面板:<br><br> <a href='UserServer.asp'><b>进入会员中心</b></a><br><br>"
end if
end sub
'=================================================
'过程名:ShowUserLoginT
'作 用:显示用户登录表单
'参 数:无
'=================================================
sub ShowUserLoginT()
dim strLogin
If Session("UserName")="" Then
strLogin= "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
strLogin=strLogin & "<form action='UserLogin.asp' method='post' name='UserLogin' ><tr>"
strLogin=strLogin & "<td height='25' align='right'> 会员登陆∶ 用户 </td>"
strLogin=strLogin & "<td height='25'><input name='UserName' type='text' id='UserName' class='input' size='10' maxlength='20'></td>"
strLogin=strLogin & "<td height='25' align='right'> 密码 </td>"
strLogin=strLogin & "<td height='25'><input name='Password' type='password' id='Password' size='10' class='input' maxlength='20'></td>"
strLogin=strLogin & "<td width='8'> </td>"
strLogin=strLogin & "<td height='25'><input type=image height=18 width=52 src='Images/bot_login.gif' name=image></td>"
strLogin=strLogin & "<td width='10'> </td>"
strLogin=strLogin & "<td height='25' align='center'><a href='UserReg.asp' target='_blank'><img src='Images/bot_reg.gif' width=52 height=18 border=0></a></td>"
' strLogin=strLogin & "<td height='25' align='center'><a href='GetPassword.asp' target='_blank'>忘记密码</a></td>"
strLogin=strLogin & "</tr></form></table>"
response.write strLogin
Else
response.write " 欢迎您! <font color=#FF0000><b>" & Session("UserName") & "</b></font>"
response.write " <font color=#666666>用户控制面板:</font> <a href='UserServer.asp'><font color=#339900><b>会员管理中心</b></font></a>"
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -