📄 htview.asp
字号:
<%@ CodePage = 936 LCID = 2052 %>
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
%>
<%
ewCurSec = 0 ' Initialise
' User levels
Const ewAllowAdd = 1
Const ewAllowDelete = 2
Const ewAllowEdit = 4
Const ewAllowView = 8
Const ewAllowList = 8
Const ewAllowReport = 8
Const ewAllowSearch = 8
Const ewAllowAdmin = 16
%>
<%
If Session("project1_status") <> "login" Then
Response.Redirect "login.asp"
End If
%>
<%
' Initialize common variables
x_ID = Null
x_5408540C53F7 = Null
x_5BA26237540D79F0 = Null
x_4EA754C1578B53F7 = Null
x_657091CF = Null
x_4EF7683C = Null
x_91D1989D = Null
x_67085EA6 = Null
x_4EA4671F = Null
x_627F529E = Null
x_59076CE8 = Null
x_53CD998862A5916C = Null
%>
<!--#include file="db.asp"-->
<!--#include file="aspmkrfn.asp"-->
<%
Response.Buffer = True
sKey = Request.Querystring("key")
If sKey = "" Or IsNull(sKey) Then sKey = Request.Form("key")
If sKey = "" Or IsNull(sKey) Then Response.Redirect "htlist.asp"
' Get action
sAction = Request.Form("a_view")
If sAction = "" Or IsNull(sAction) Then
sAction = "I" ' Display with input box
End If
' Open connection to the database
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case sAction
Case "I": ' Get a record to display
If Not LoadData(sKey) Then ' Load Record based on key
Session("ewmsg") = "No Record Found for Key = " & sKey
conn.Close ' Close Connection
Set conn = Nothing
Response.Clear
Response.Redirect "htlist.asp"
End If
End Select
%>
<!--#include file="header.asp"-->
<p><span class="aspmaker">View TABLE: ht<br><br>
<a href="htlist.asp">Back to List</a>
<a href="<%= "htedit.asp?key=" & Server.URLEncode(sKey) %>">Edit</a>
<a href="<%= "htadd.asp?key=" & Server.URLEncode(sKey) %>">Copy</a>
<a href="<%= "htdelete.asp?key=" & Server.URLEncode(sKey) %>">Delete</a>
</span></p>
<p>
<form>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#000000">
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">ID</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_ID %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">合同号</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_5408540C53F7 %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">客户名称</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_5BA26237540D79F0 %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">产品型号</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_4EA754C1578B53F7 %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">数量</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_657091CF %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">价格</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_4EF7683C %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">金额</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_91D1989D %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">月度</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_67085EA6 %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">交期</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_4EA4671F %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">承办</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_627F529E %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">备注</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_59076CE8 %>
</span></td>
</tr>
<tr>
<td bgcolor="#336699"><span class="aspmaker" style="color: #FFFFFF;">反馈报酬</span></td>
<td bgcolor="#F5F5F5"><span class="aspmaker">
<% Response.Write x_53CD998862A5916C %>
</span></td>
</tr>
</table>
</form>
<p>
<!--#include file="footer.asp"-->
<%
conn.Close ' Close Connection
Set conn = Nothing
%>
<%
'-------------------------------------------------------------------------------
' Function LoadData
' - Load Data based on Key Value sKey
' - Variables setup: field variables
Function LoadData(sKey)
Dim sKeyWrk, sSql, rs, sWhere, sGroupBy, sHaving, sOrderBy
sKeyWrk = "" & AdjustSql(sKey) & ""
sSql = "SELECT * FROM [ht]"
sSql = sSql & " WHERE [ID] = " & sKeyWrk
sGroupBy = ""
sHaving = ""
sOrderBy = ""
If sGroupBy <> "" Then
sSql = sSql & " GROUP BY " & sGroupBy
End If
If sHaving <> "" Then
sSql = sSql & " HAVING " & sHaving
End If
If sOrderBy <> "" Then
sSql = sSql & " ORDER BY " & sOrderBy
End If
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sSql, conn
If rs.Eof Then
LoadData = False
Else
LoadData = True
rs.MoveFirst
' Get the field contents
x_ID = rs("ID")
x_5408540C53F7 = rs("合同号")
x_5BA26237540D79F0 = rs("客户名称")
x_4EA754C1578B53F7 = rs("产品型号")
x_657091CF = rs("数量")
x_4EF7683C = rs("价格")
x_91D1989D = rs("金额")
x_67085EA6 = rs("月度")
x_4EA4671F = rs("交期")
x_627F529E = rs("承办")
x_59076CE8 = rs("备注")
x_53CD998862A5916C = rs("反馈报酬")
End If
rs.Close
Set rs = Nothing
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -