📄 toppage.asp
字号:
<%
Class TopPage
Dim l_checku
'/****************
'/弶婜張棟(DB愙懕)
'/***************
Public Function Init(l_objDbAccess,l_dsn,l_userid,l_passwd)
Set l_checku = New CheckUtil
Call l_objDbAccess.ProcConnection(l_dsn,l_userid,l_passwd)
End Function
'/************************************************************************************
'/儊僯儏乕尃尷庢摼(庒廎)
'/param丗l_objDbAccess丂DbAccess僆僽僕僃僋僩
'/ l_system_id丂僔僗僥儉ID
'/ l_section_id丂晹栧僐乕僪
'/************************************************************************************
Public Function GetMenuAuth2(l_objDbAccess,l_system_id,l_comp_id,l_section_id)
Dim l_SQL
l_SQL = "SELECT LIST_MANAGE," &_
" DATA_CLAIM," &_
" EMPLOY," &_
" SYSTEM_EMPLOY," &_
" WAREHOUSE_EMPLOY," &_
" WAREHOUSE_LIST_MANAGE," &_
" WAREHOUSE_SYSTEM_EMPLOY," &_
" USER_EMPLOY," &_
" OTHERE_EMPLOY " &_
" FROM MENUAUTH_M" &_
" WHERE SYSTEM_ID = '" & l_system_id & "'" &_
" AND COMPANY_ID = '" & l_comp_id & "'" &_
" AND SECTION_ID = '" & l_section_id & "'"
Set GetMenuAuth2 = l_objDbAccess.ProcRecordset(l_SQL,10,0)
End Function
'/********************************************************
'/儊僯儏乕傪僙僢僔儑儞偵僙僢僩
'/********************************************************
Public Function SetMenuAuth(l_objADO_Rset)
Dim l_UserObject '儐乕僓忣曬奿擺僄儕傾
Dim l_count
Set l_UserObject = Session("User")
Do Until l_objADO_Rset.eof
For l_count = 0 to l_objADO_Rset.Fields.Count -1
l_UserObject.add l_objADO_Rset.Fields(l_count).Name,l_objADO_Rset.Fields(l_count).Value
next
l_objADO_Rset.MoveNext
Loop
Set Session("User") = l_UserObject
End Function
'***************************************************************************
'怴拝忣曬HTML庢摼
' param丗l_DBObj DbAccess僆僽僕僃僋僩
' l_ComObj Common僆僽僕僃僋僩
' return丗l_strHtml丂憅屔夛幮梡 怴拝忣曬昞帵HTML
'***************************************************************************
Public Function GetNewsInfo(l_DBObj,l_ComObj)
Dim l_SQL
Dim l_newsInfoResult
Dim l_strHtml,l_InfoCount
Dim l_CRLF
l_CRLF = Chr(13) & Chr(10)
l_SQL = "SELECT MESSAGE,TO_CHAR(REG_YMD,'YY/MM/DD') AS REG_YMD," & _
" REG_YMD AS REG_YMD2 " &_
" FROM INFORMATION_M" &_
" WHERE SYSTEM_ID='" & SYSTEMID & "'" &_
" AND KIND = '1'" & _
" AND GENRE = '" & GENRE_WARE & "'" & _
" AND OPEN_PROP = '1' " &_
" AND DEL_FLG = '0'" &_
" ORDER BY REG_YMD2 DESC"
'response.write l_SQL
Set l_newsInfoResult = l_DBObj.ProcRecordset(l_SQL,10,0)
'怴拝忣曬5審昞帵
l_InfoCount = 0
Do Until l_newsInfoResult.eof
l_strHtml = l_strHtml & "<tr> " & l_CRLF &_
" <td width=""10"" class=""txt_m""> </td>" & l_CRLF &_
" <td class=""txt_m""><a class=""news"" href=""JavaScript:newWindow(540,650,'" &_
"s_news.asp','yes');"">" &_
"[" & l_newsInfoResult.Fields("REG_YMD") & "]" &_
l_newsInfoResult.Fields("MESSAGE").Value & "</a></td>" & l_CRLF &_
"</tr>" & l_CRLF
l_newsInfoResult.MoveNext
l_InfoCount = l_InfoCount + 1
If l_InfoCount = 5 Then
Exit Do
End If
Loop
Do Until l_InfoCount => 5
l_strHtml = l_strHtml & " <tr> " & l_CRLF &_
" <td width=""10"" class=""txt_m""> </td>" & l_CRLF &_
" <td class=""txt_m""> </td>" & l_CRLF &_
"</tr>" & l_CRLF
l_InfoCount = l_InfoCount + 1
Loop
GetNewsInfo = l_strHtml
End Function
'/****************************************************************
'/怴拝忣曬棜楌庢摼
'/param丗l_newsInfoResult丂憅屔夛幮梡 怴拝忣曬昞帵HTML
'/ Start丂儗僐乕僪奐巒埵抲
'/return丗l_strHtml丂憅屔夛幮梡丂怴拝忣曬昞帵HTML
'/****************************************************************
Public Function GetNewsHistoryHtml(l_newsInfoResult,start)
Dim l_InfoCount
Dim l_strHtml
Dim l_CRLF
l_CRLF = Chr(13) & Chr(10)
If Not l_newsInfoResult.Eof Then
l_newsInfoResult.Move start
End If
'怴拝忣曬20審昞帵
l_InfoCount = 0
'l_strHtml = l_strHtml & l_newsInfoResult.PageCount
Do Until l_newsInfoResult.eof
l_strHtml = l_strHtml & "<tr> " & l_CRLF &_
" <td width=""10""> </td>" & l_CRLF &_
" <td class=""txt_m"" bgcolor=""#FBFAF2"">" &_
l_newsInfoResult.Fields("REG_YMD") & "]" &_
l_newsInfoResult.Fields("MESSAGE").Value & "</td>" & l_CRLF &_
" </tr>" & l_CRLF
l_newsInfoResult.MoveNext
l_InfoCount = l_InfoCount + 1
If l_InfoCount = 20 Then
Exit Do
End If
Loop
Do Until l_InfoCount => 20
l_strHtml = l_strHtml & " <tr> " & l_CRLF &_
" <td width=""10""> </td>" & l_CRLF &_
" <td class=""txt_m""> </td>" & l_CRLF &_
" </tr>" & l_CRLF
l_InfoCount = l_InfoCount + 1
Loop
GetNewsHistoryHtml = l_strHtml
End Function
'/*************************************
'/廔椆張棟(DB愗抐)
'/*************************************
Public Function EndProcess(l_objDbAccess)
l_objDbAccess.CloseRecodeset
l_objDbAccess.CloseConnection
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -