📄 frm_csrb_modify_abc.asp
字号:
<!--#include virtual="/include/DBCon.inc"-->
<html>
<head>
<title>油田采油工艺综合管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css/oil.css" type="text/css">
<SCRIPT LANGUAGE="javascript" src="/include/calender.js"></SCRIPT>
<SCRIPT LANGUAGE=javascript>
<!--
function subcheck() {
form1.submit();
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<%
sdate=request.form("sdate")
syear=split(sdate,"-")(0)
smonth=split(sdate,"-")(1)
sday=split(sdate,"-")(2)
csrbId=request.form("chcsrb")
if csrbId="" then
response.redirect "/profile/errorpage.asp?title=修改措施井动态日报&msg=您没有选择任何数据!"
else
csrbId=split(csrbId,",")(0)
end if
isSub=request.form("isSub")
if isSub="" then
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_csrb,oil.oil_dict where csrb_id='" &csrbId& "' and csrb_team_id=dict_code and dict_type='team'"
rs.open SQL,conn,1,1
dim csrb(11)
csrb(0)=rs("csrb_well_id")
csrb(1)=rs("dict_value")
csrb(2)=rs("csrb_csnr")
csrb(3)=rs("csrb_sxrq")
csrb(4)=rs("csrb_jrjd")
csrb(5)=rs("csrb_mrap")
csrb(6)=rs("csrb_tcqk")
csrb(7)=rs("csrb_memo")
csrb(8)=rs("csrb_snsm")
csrb(9)=rs("csrb_zrr")
csrb(10)=rs("csrb_date")
rs.close
dim teamType(),teamTypeCount
SQL="select * from oil.oil_dict where dict_type='team'"
rs.open SQL,conn,1,1
if rs.eof and rs.bof then
response.redirect "/profile/errorpage.asp?title=措施井动态日报&msg=数据库里没有维修队信息"
else
teamTypeCount=0
do while not rs.eof
teamTypeCount=teamTypeCount+1
redim preserve teamType(teamTypeCount)
teamType(UBound(teamType)-1)=rs("dict_value") & "-" & rs("dict_code")
rs.movenext
loop
end if
%>
<span class="subject">
修改措施井的动态日报<font color=cc0000><%=csrbId%></font>
</span>
<hr size="1" class=hr width="98%" align="center">
<br>
<form action="" method=post name=form1>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width="90%">
<tr height="20">
<td class="title" align=center width=30%> </td>
<td class="title" align=center width=30%><%=csrb(10)%>数据</td>
<td class="title" align=center width=40%>本日数据(数据不变化则不填写!)</td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>队号</td>
<td align=left width=30%>  <%=csrb(1)%></td>
<td align=left width=40%>  
<select name=text1>
<option value="">请选择......</option>
<%for i=0 to teamTypeCount-1%>
<option value=<%=split(teamType(i),"-")(1)%>><%=split(teamType(i),"-")(0)%></option>
<%next%>
</select>
</td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>措施井号</td>
<td align=left width=30%>  <%=csrb(0)%></td>
<td align=left width=40%>  <input type=text name=text2 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>措施内容</td>
<td align=left width=30%>  <textarea cols=30 rows=3 class=text><%=csrb(2)%></textarea></td>
<td align=left width=40%>  <textarea name=text3 cols=30 rows=3 class=text></textarea></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>上修日期</td>
<td align=left width=30%>  <%=csrb(3)%></td>
<td align=left width=40%>  <input type=text name=text4 size=20 class=text> <input type=button value=".." class=button onclick="fPopCalendar(text4,text4); return false" alt="按此选时"></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>今日进度</td>
<td align=left width=30%>  <%=csrb(4)%></td>
<td align=left width=40%>  <input type=text name=text5 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=15%>明日安排</td>
<td align=left width=30%>  <%=csrb(5)%></td>
<td align=left width=40%>  <input type=text name=text6 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>特车情况</td>
<td align=left width=30%>  <%=csrb(6)%></td>
<td align=left width=40%>  <input type=text name=text7 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>备注</td>
<td align=left width=30%>  <textarea cols=30 rows=3 class=text><%=csrb(7)%></textarea></td>
<td align=left width=40%>  <textarea name=text8 cols=30 rows=3 class=text></textarea></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>水泥塞面</td>
<td align=left width=30%>  <%=csrb(8)%></td>
<td align=left width=40%>  <input type=text name=text9 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=30%>负责人</td>
<td align=left width=30%>  <%=csrb(9)%></td>
<td align=left width=40%>  <input type=text name=text10 size=20 class=text></td>
</tr>
</table>
<br>
<hr size="1" class=hr width="98%" align="center">
<br>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr align="center">
<td>
<input type=hidden name=chcsrb value=<%=csrbId%>>
<input type=hidden name=sdate value=<%=sdate%>>
<input type=hidden name=isSub value=true>
<input type="button" name="Submit32" value=" 更新 " class=button onclick=subcheck()>
<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_csrb.asp?year=<%=syear%>&month=<%=smonth%>&day=<%=sday%>");'>
</td>
</tr>
</table>
</form>
<%
else
text1=request.form("text1")
text2=request.form("text2")
text3=request.form("text3")
text4=request.form("text4")
text5=request.form("text5")
text6=request.form("text6")
text7=request.form("text7")
text8=request.form("text8")
text9=request.form("text9")
text10=request.form("text10")
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_csrb where csrb_id='" &csrbId& "'"
rs.open SQL,conn,1,1
redim csrb(11)
csrb(0)=rs("csrb_well_id")
csrb(1)=rs("csrb_team_id")
csrb(2)=rs("csrb_csnr")
csrb(3)=rs("csrb_sxrq")
csrb(4)=rs("csrb_jrjd")
csrb(5)=rs("csrb_mrap")
csrb(6)=rs("csrb_tcqk")
csrb(7)=rs("csrb_memo")
csrb(8)=rs("csrb_snsm")
csrb(9)=rs("csrb_zrr")
rs.close
if text1="" then
text1=csrb(1)
end if
if text2="" then
text2=csrb(0)
end if
if text3="" then
text3=csrb(2)
end if
if text4="" then
text4=csrb(3)
end if
if text5="" then
text5=csrb(4)
end if
if text6="" then
text6=csrb(5)
end if
if text7="" then
text7=csrb(6)
end if
if text8="" then
text8=csrb(7)
end if
if text9="" then
text9=csrb(8)
end if
if text10="" then
text10=csrb(9)
end if
dim maxId
SQL="select * from oil.oil_csrb"
rs.open SQL,conn,1,1
if rs.eof and rs.bof then
maxId=0
rs.close
else
rs.close
SQL="select MAX(csrb_id) as maxId from oil.oil_csrb"
rs.open SQL,conn,1,1
maxId=rs("maxId")
rs.close
end if
SQL="insert into oil.oil_csrb values('" &cint(maxId)+1& "','" &text1& "','" &text2& "','" &text3& "','" &text4& "','" &text5& "','" &text6& "','" &text7& "','" &text8& "','" &text9& "','" &text10& "','" &sdate& "')"
rs.open SQL,conn,1,3
response.redirect "frm_csrb.asp?year=" &syear& "&month=" &smonth& "&day=" &sday
end if
%>
</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -