📄 depot_list.inc
字号:
<%
'###############################################################################
'#
'# 文件名 : depot_list.inc
'#
'# 创建人 : yaoxiaohui
'# 日期 : 2002-11-06
'#
'# 修改历史 : ****年**月**日 ******
'# 修改内容 : *********************************
'#
'# 功能描述 : 仓库列表
'# 版 本 : v1.0
'#
'# Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'###############################################################################
'*******************************************************************************
Function TableHeader()
TableHeader = _
"<table cellspacing=1 cellpadding=0 width=""100%"" align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
"<tr style=""display:none"">" & vbLF & _
" <td width=80>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td width=100></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=""*""></td></tr>" & vbLF & _
"<tr height=20>" & _
"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">仓库列表</td></tr>" & _
"<tr bgcolor=white>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "depot_id", "仓库编号", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> <img src=""../images/bg/ar-y.gif"" width=8 height=8> " & TableHeaderField(sFileName, "depot_name", "仓库名称", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "location", "位置", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "startup_time", "启用时间", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "depot_keeper", "管理员", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "depot_type", "仓库类别", sFormParams, sSorting, sSorted) & "</td>" & _
"<td class=tdHead align=center> " & TableHeaderField(sFileName, "remark", "备注", sFormParams, sSorting, sSorted) & "</td>" & _
"</tr>"
End Function
'*******************************************************************************
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
dim sTemp : sTemp = "" ' 临时字符串变量
dim j ' 临时循环变量
'------------------------------------
' 分页所需的变量定义
'------------------------------------
Dim iCounter : iCounter = 1
Dim iPrevPage, iNextPage
'------------------------------------
' 获取数据库连接
'------------------------------------
dim rs : set rs = Openrs(conn,sSQL)
dim sDepotID, sDepotName, sLocation, sStartupTime, sKeeper, sDepotType, sRemark
''response.write sSQL : response.end
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
sDepotID = rs("depot_id")
sDepotName = rs("depot_name")
sLocation = rs("location")
sStartupTime = rs("startup_time")
sKeeper = rs("depot_keeper")
sDepotType = rs("depot_type")
sRemark = rs("remark")
sTemp = sTemp & "<tr bgcolor=white height=20>" & _
"<td align=center title=""" & sDepotID & """ nowrap> " & sDepotID& " </td>" & _
"<td title=""点击可以察看“" & sDepotName & "”的信息"" style=""cursor:hand;color:blue;"" onclick=""javascript:location.href='depot_edit.asp?depot_id=" & sDepotID & "';"" nowrap> <img src=""../images/bg/ar-g.gif"" width=8 height=8> " & sDepotName & " </td>" & _
"<td align=center title=""" & sLocation & """ nowrap> " & sLocation & " </td>" & _
"<td align=center title=""" & sStartupTime & """ nowrap> " & sStartupTime & " </td>" & _
"<td align=center title=""" & sKeeper & """ nowrap> " & sKeeper & " </td>" & _
"<td align=center title=""" & sDepotType & """ nowrap> " & sDepotType & " </td>" & _
"<td align=center title=""" & sRemark & """ nowrap> " & sRemark & " </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
rs.Close()
set rs = nothing
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
' 首页、前页、后页、尾页等分页信息
sTemp = sTemp & "<tr bgcolor=white height=20><td colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
TableRecords = sTemp
End Function
'*******************************************************************************
Function TableLink()
dim sTemp : sTemp = ""
if hasright(ID_STOCK) < RIGHT_WRITE then
sTemp = _
"<table width=""100%"" cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
"<tr height=10>" & vbLF & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
"</tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=600> " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_query.asp"">库存查询</a></td>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
else
sTemp = _
"<table width=""100%"" cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
"<tr height=10>" & vbLF & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
"</tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=600> " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/depot_edit.asp"">新建仓库</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_query.asp"">库存查询</a></td>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
end if
TableLink = sTemp
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -