📄 newfirm.inc
字号:
<%
'************************************************************************************************
' 函数名 : FormFirmTable(iFirmid)
' 输 入 : iFirmid:商户id,如果是新增商户,那么iRoleid=0,表示一张空的表
' 输 出 : 一张商户信息表(新的或者是旧的供修改的),可以提交
' 功能描述: 根据商户id,将相应的商户信息显示出来
' 调用模块: newfirm.inc
' 作 者 : 魏霖
' 日 期 : 2002-10-31
' 版 本 :
'************************************************************************************************
Function FormFirmTable(iFirmid)
'------------------------------------
' 根据iFirmid,显示相应的商户信息,供修改
'------------------------------------
dim sSQL
dim sTemp, sTempButtons
dim crs, rs, sError, crs1, rs1, crs2, rs2
dim sName,sAddress,sZip,sPerson,sPhone,sFax,sEmail,sRemark
'rs: 返回t_firm表中关于当前商户的记录
sSQL = "select * from T_firm where id = "& iFirmid
set rs = openRS(conn,sSQL)
if not rs.eof then
'存在该商户,显示该商户信息
sName=GetValue(rs,"name")
sAddress=GetValue(rs,"address")
sZip=GetValue(rs,"zip")
sPerson=GetValue(rs,"person")
sPhone=GetValue(rs,"phone")
sFax=GetValue(rs,"fax")
sEmail=GetValue(rs,"email")
sRemark=GetValue(rs,"remark")
sTempButtons=""
FormFirmtable=_
TableTitle("商 户 信 息 表", 600, "", "#0040a0") & _
"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=""600"" border=0 style=""table-layout:fixed"">" & vbLF & _
"<form name=""frmnewfirm"" method=post action=""newfirm.asp"">" &_
" <tr style=""display:none"">" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""95"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""130"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=90>这一行仅用于控制每一栏的宽度</td><td width=""90"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>商户名称</td>" & vbLF & _
" <td class=tdValue colspan=5 nowrap>" & sName & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>地 址</td>" & vbLF & _
" <td class=tdValue colspan=3 nowrap>" & sAddress & "</td>" & vbLF & _
" <td align=center>邮 编</td>" & vbLF & _
" <td class=tdValue nowrap>" & sZip & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>联 系 人</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap>" & sPerson & "</td>" & vbLF & _
" <td align=center>联系电话</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap>" & sPhone & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>传 真</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap>" & sFax & "</td>" & vbLF & _
" <td align=center>电子邮件</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap>" & sEmail & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white>" & vbLF & _
" <td align=center>备 注</td>" & vbLF & _
" <td valign=center colspan=5 style=""word-wrap:break-word;""><textarea name='Remark' cols=80 rows=6 onkeypress='this.style.color=red' onchange='this.style.color=red'>"&sRemark&"</textarea></td>" & vbLF
sTempButtons=" <img border=0 src=""../images/button/return.gif"" style=""cursor:hand"" onclick=""btnReturn_Onclick()"">"
if iRight=2 then
sTempButtons=_
" <img border=0 src=""../images/button/update.gif"" style=""cursor:hand"" name=btnUpdate>" & _
" <img border=0 src=""../images/button/delete.gif"" style=""cursor:hand"" name=btnDelete>" & _
" <img border=0 src=""../images/button/reset.gif"" style=""cursor:hand"" name=btnReset>"&_
sTempButtons
FormFirmtable=_
TableTitle("商 户 信 息 表", 600, "", "#0040a0") & _
"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=""600"" border=0 style=""table-layout:fixed"">" & vbLF & _
"<form name=""frmnewfirm"" method=post action=""newfirm.asp"">" &_
" <tr style=""display:none"">" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""95"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""130"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=90>这一行仅用于控制每一栏的宽度</td><td width=""90"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>商户名称</td>" & vbLF & _
" <td class=tdValue colspan=5 nowrap>" & sName & "</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>地 址</td>" & vbLF & _
" <td class=tdValue colspan=3 nowrap><input type=""text"" name=""address"" value=""" & sAddress & """ size=50 maxlength=50></td>" & vbLF & _
" <td align=center>邮 编</td>" & vbLF & _
" <td class=tdValue nowrap><input type=""text"" name=""zip"" value=""" & sZip & """ size=12 maxlength=10></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>联 系 人</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""person"" value=""" & sPerson & """ size=28 maxlength=25></td>" & vbLF & _
" <td align=center>联系电话</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""phone"" value=""" & sPhone & """ size=28 maxlength=25></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>传 真</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""fax"" value=""" & sFax & """ size=28 maxlength=18></td>" & vbLF & _
" <td align=center>电子邮件</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""email"" value=""" & sEmail & """ size=28 maxlength=25></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white>" & vbLF & _
" <td align=center>备 注</td>" & vbLF & _
" <td valign=center colspan=5 style=""word-wrap:break-word;""><textarea name='Remark' cols=80 rows=4 onkeypress='this.style.color=red' onchange='this.style.color=red'>"&sRemark&"</textarea></td>" & vbLF
end if
FormFirmTable = FormFirmTable & _
"<tr height=30 bgcolor=white>" & _
" <td colspan=6 align=center>" & sTempButtons & _
" </td>" & _
"</tr>" & _
"<tr bgcolor=white><td colspan=6 align=center>" & _
" <input type=hidden name=formaction>" & _
" <input type=hidden name=page value="""&iPage&""">" & _
" <input type=hidden name=Firmid value="""&iFirmid&""">" & _
"</td></tr>" & _
"</form>" & _
"</table>"
else
'不存在该角色,显示空的角色信息
sTempButtons=""
FormFirmtable=_
TableTitle("新增商户", 600, "", "#0040a0") & _
"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=600 border=0 style=""table-layout:fixed"">" & vbLF & _
"<form name=""frmnewfirm"" method=post action=""newfirm.asp"">"&_
"<tr bgcolor=white height=20><td colspan=6 align=center></td></tr>"&_
"<tr bgcolor=white height=200 valign=center><td colspan=6 align=center><b>对不起,你没有更新商户信息的权利!</b></td></tr>"
if iright=2 then
sTempButtons=_
" <img border=0 src=""../images/button/submit.gif"" style=""cursor:hand"" name=btnSubmit>" & _
" <img border=0 src=""../images/button/clear.gif"" style=""cursor:hand"" name=btnCancel >"
FormFirmtable=_
TableTitle("新增商户", 600, "", "#0040a0") & _
"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=""600"" border=0 style=""table-layout:fixed"">" & vbLF & _
"<form name=""frmnewfirm"" method=post action=""newfirm.asp"">"&_
" <tr style=""display:none"">" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""16%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=95>这一行仅用于控制每一栏的宽度</td><td width=""*"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" <td width=90>这一行仅用于控制每一栏的宽度</td><td width=""16%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>商户名称</td>" & vbLF & _
" <td class=tdValue colspan=5 nowrap><input type=""text"" name=""name"" size=80 maxlength=25></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>地 址</td>" & vbLF & _
" <td class=tdValue colspan=3 nowrap><input type=""text"" name=""address"" size=50 maxlength=50></td>" & vbLF & _
" <td align=center>邮 编</td>" & vbLF & _
" <td class=tdValue nowrap><input type=""text"" name=""zip"" size=12 maxlength=10></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>联 系 人</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""person"" size=28 maxlength=25></td>" & vbLF & _
" <td align=center>联系电话</td>" & vbLF & _
" <td class=tdValue colspan=2 nowrap><input type=""text"" name=""phone"" size=28 maxlength=25></td>" & vbLF & _
" </tr>" & vbLF & _
" <tr bgcolor=white height=25>" & vbLF & _
" <td align=center>传 真</td>" & vbLF & _
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -