⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_zsgcrb_add_confirm.asp

📁 一套石油公司内部的运营管理系统
💻 ASP
字号:
<!--#include virtual="/include/DBCon.inc"-->
<%
sdate=request.form("sdate")
isSub=request.form("isSub")
syear=split(sdate,"-")(0)
smonth=split(sdate,"-")(1)
sday=split(sdate,"-")(2)

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")
%>
<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>
<!--
-->
</SCRIPT>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<form method=post name=form1>
<span class="subject">		
	添加<%=sdate%>的措施井动态日报
</span> 
<hr size="1" class=hr width="98%" align="center">
<%
if isSub="" then
dim area(1)
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_dict where dict_type='area' and dict_code='" &text1& "'"
rs.open SQL,conn,1,1
if rs.eof and rs.bof then
	response.redirect "/profile/errorpage.asp?title=查询数据&msg=数据库里没有作业区信息" 
else
	area(0)=rs("dict_value") & "-" & rs("dict_code")
	rs.movenext
end if
%>
<table width=80% border=0  cellspacing="0" cellpadding="0">
	<tr>
		<td align=left height=40>
			您确认要添加新数据吗?
		</td>
	</tr>
</table>
<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 align=left width=30%>&nbsp&nbsp<%=split(area(0),"-")(0)%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>计划开井口数</td>
   <td align=left width=70%>&nbsp&nbsp<%=text2%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=15%>实际开井口数</td>
   <td align=left width=70%>&nbsp&nbsp<%=text3%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>利用率</td>
   <td align=left width=70%>&nbsp&nbsp<%=text4%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>计划日注</td>
   <td align=left width=70%>&nbsp&nbsp<%=text5%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>实际日注</td>
   <td align=left width=70%>&nbsp&nbsp<%=text6%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>月累计注水量</td>
   <td align=left width=70%>&nbsp&nbsp<%=text7%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>年累计注水量</td>
   <td align=left width=70%>&nbsp&nbsp<%=text8%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>与昨日相比</td>
   <td align=left width=70%>&nbsp&nbsp<%=text9%></td>
  </tr> 
  <tr height="20">
   <td class="title" align=center width=30%>备注</td>
   <td align=left width=70%>&nbsp&nbsp<textarea cols=30 rows=3 class=text><%=text10%></textarea></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=sdate value="<%=sdate%>">
		<input type=hidden name=text1 value="<%=text1%>">
		<input type=hidden name=text2 value="<%=text2%>">
		<input type=hidden name=text3 value="<%=text3%>">
		<input type=hidden name=text4 value="<%=text4%>">
		<input type=hidden name=text5 value="<%=text5%>">
		<input type=hidden name=text6 value="<%=text6%>">
		<input type=hidden name=text7 value="<%=text7%>">
		<input type=hidden name=text8 value="<%=text8%>">
		<input type=hidden name=text9 value="<%=text9%>">
		<input type=hidden name=text10 value="<%=text10%>">
		<input type=hidden name=isSub value="yes">
		<input type=submit name=submit1 value=" 确定 "  class=button>
		<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='history.go(-1);'>
	  </td>
	</tr>
  </table>
<%
else
	dim maxId
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	SQL="select * from oil.oil_zsrb"
	rs.open SQL,conn,1,1
	if rs.eof and rs.bof then
		maxId=0
		rs.close
	else
		rs.close
		SQL="select MAX(zsrb_id) as maxId from oil.oil_zsrb"
		rs.open SQL,conn,1,1
		maxId=rs("maxId")
		rs.close
	end if
	SQL="select * from oil.oil_zsrb where zsrb_danw='" &text1 &"' and zsrb_date='" &sdate& "'"
	rs.open SQL,conn
	if not rs.eof then
		response.redirect "/profile/errorpage.asp?title=添加新的注水工程日报&msg=数据库已经有本日的工程日报!" 
	end if
	rs.close
	SQL="select * from oil.oil_zsrb"
	rs.open SQL,conn,1,3
	rs.addnew
	rs("zsrb_id")=cint(maxId)+1
	rs("zsrb_danw")=text1
	rs("zsrb_jhkj")=text2
	rs("zsrb_sjkj")=text3
	rs("zsrb_lyl")=text4
	rs("zsrb_jhrz")=text5
	rs("zsrb_sjrz")=text6
	rs("zsrb_ylj")=text7
	rs("zsrb_nlj")=text8
	rs("zsrb_xbzr")=text9
	rs("zsrb_sjyy")=text10
	rs("zsrb_date")=sdate
	rs.update
	rs.close
%>
<table width=80% border=0  cellspacing="0" cellpadding="0">
	<tr>
		<td align=left height=40>
		新数据已经成功添加到数据库。
		</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="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_zsgcrb.asp?year=<%=syear%>&month=<%=smonth%>&day=<%=sday%>");'>
	  </td>
	</tr>
  </table>
  <%
  end if
  %>
  </form>

</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -