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

📄 zx_xxlrry.asp

📁 数据结构课程设计之最小生成数的K算法的实现 简短 简洁
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../function.asp"-->

<%
aspname=request("aspname")
xin=request("xin")
bh=request("bh")
bid=request("bid")%>

<head>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>

<body topmargin="0" leftmargin="0" bgcolor="#dddddd">
<script>
var x
x="<%=request.form("submitx")%>"
if (x=="查 询"){
window.location="select.asp?aspname=<%=aspname%>&bh=<%=bh%>"
}
</script>
<script>
var y
y="<%=request.form("submity")%>"
if (y=="新 增"){
window.location="<%=aspname%>.asp?aspname=<%=aspname%>&bh=<%=bh%>&name=<%=name%>&xin=1"
}
</script>
<%
action="add"
if xin=0 then

	sql="select * from ZXXMRY Where Zxxmry_id='"& bid &"'"
	set rs=server.Createobject("ADODB.Recordset")
	rs.open sql,conn,1,3
	if rs.eof then
		if request.form("submitn")=" 提 交 " then
			ktbh=request("bh")
			nl=emptyn(request.form("nl"))
			szdw=request.form("szdw2")
			ryxm=request.form("ryxm")
			zgh=request.form("zgh")
			zc=request.form("zc")
			rypm=emptyn(request.form("rypm"))
			bfb=emptyn(request.form("bfb"))
			rs.addnew
			rs("Zxxm_no")=ktbh
			rs("Zxxmry_nl")=nl
			rs("Zxxmry_szdw")=szdw
			rs("Zxxmry_xm")=ryxm
			rs("Zxxmry_zgh")=zgh
			rs("Zxxmry_zc")=zc
			rs("Zxxmry_pm")=rypm
			rs("Zxxmry_bfb")=bfb
			rs.update
			action="suc"
			errn="人员信息录入成功!"
		end if
	else		
		ktbh=rs("Zxxm_no")
		nl=rs("Zxxmry_nl")
		szdw=rs("Zxxmry_szdw")
		szdw2=szdw
		ryxm=rs("Zxxmry_xm")
		zgh=rs("Zxxmry_zgh")
		ryfg=rs("Zxxmry_zc")
		rypm=rs("Zxxmry_pm")
		bfb=rs("Zxxmry_bfb")
		if request.form("submitn")=" 提 交 " then
			ktbh=request("ktbh")
			nl=emptyn(request.form("nl"))
			szdw=request.form("szdw2")
			ryxm=request.form("ryxm")
			zgh=request.form("zgh")
			rypm=emptyn(request.form("rypm"))
			bfb=emptyn(request.form("bfb"))
			rs("Zxxm_no")=ktbh
			rs("Zxxmry_nl")=nl
			rs("Zxxmry_szdw")=szdw
			rs("Zxxmry_xm")=ryxm
			rs("Zxxmry_zgh")=zgh
			rs("Zxxmry_zc")=ryfg
			rs("Zxxmry_pm")=rypm
			rs("Zxxmry_bfb")=bfb
			rs.update
			action="suc"
			errn="人员信息录入成功!"
		end if
	end if
elseif xin=1 then
		sql="select * from ZXXMRY "
	set rs=server.Createobject("ADODB.Recordset")
	rs.open sql,conn,1,3
		if request.form("submitn")=" 提 交 " then
			ktbh=request("bh")
			nl=emptyn(request.form("nl"))
			szdw=request.form("szdw2")
			ryxm=request.form("ryxm")
			zgh=request.form("zgh")
			rypm=emptyn(request.form("rypm"))
			bfb=emptyn(request.form("bfb"))
			rs.addnew
			rs("Zxxm_no")=ktbh
			rs("Zxxmry_nl")=nl
			rs("Zxxmry_szdw")=szdw
			rs("Zxxmry_xm")=ryxm
			rs("Zxxmry_zgh")=zgh
			rs("Zxxmry_zc")=ryfg
			rs("Zxxmry_pm")=rypm
			rs("Zxxmry_bfb")=bfb
			rs.update
			action="suc"
			errn="人员信息录入成功!"
		end if
		end if	
		%>
		<%if action="add" then%>
<br>
<br>

<table width="100%" height="265" border="0" cellpadding="0" cellspacing="0" bordercolor="#D6CFCE" background=>
  <tr> 
    <td height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><div align="center"><strong>纵向项目人员信息表</strong></div></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="235"> <div align="right">
	<form action="" name="form1" method="post"> 
          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="20%" align="right">课题编号:</td>
              <td ><input name="ktbh" type=text id="ktbh" readonly="" value="<%=bh%>" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #C0C0C0" size=12 maxlength=20> 
                <div align="right"></div></td>
				<td colspan="2"><div align="right">年龄:</div></td>
              <td><input name="nl" type=text id="nl" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" value="<%=nl%>" size=12 maxlength=2></td>
            </tr>
            <tr> 
              <td width="20%" align="right"></td>
              <td colspan="4"> <div align="right"></div></td>
            </tr>
            <tr> 
              <td align="right">所在单位:</td>
              <td colspan="2"><div align="right"></div>
                <input name="szdw" value="<%=szdw%>" readonly="" type=text id="szdw" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=40> 
                <a href="#" onClick=window.open('windowopen.asp?owid=DD_kyjg&forms=form1&formt=szdw&formt2=szdw2','','width=250,scrollbars=1,height=300')><img src="../images/open.gif" width="18" height="12" border="0"></a> 
                <INPUT name="szdw2" type=hidden id="szdw2" value="<%=szdw2%>"></td>
              <td align="right">百 分 比:</td>
              <td><input name="bfb" type=text id="bfb" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" value="<%=bfb%>" size=12 maxlength=2>
                %</td>   
            </tr>
            <tr> 
              <td align="right"> </td>
              <td width="30%"> </td>
              <td width="20%" colspan="2"> </td>
              <td width="30%"> </td>
            </tr>
            <tr> 
              <td align="right">人员姓名:</td>
              <td><input name="ryxm" type=text id="ryxm2" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" value="<%=ryxm%>" size=12 maxlength=12></td>
              <td colspan="2"><div align="right">人员职称:</div></td>
              <td> <div align="left"> 
                  <input name="zc" value="<%=zc%>" type=text id="zc" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=14>
                </div></td>
            </tr>
            <tr> 
              <td align="right"> </td>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr> 
              <td align="right">职 工 号:</td>
              <td><input name="zgh" value="<%=zgh%>" type=text id="zgh2" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=10></td>
              <td colspan="2"><div align="right">人员排名:</div></td>
              <td><input name="rypm" type=text id="rypm" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" value="<%=rypm%>" size=12 maxlength=2></td>
            </tr>
            <tr> 
              <td> </td>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr> 
              <td> </td>
              <td> </td>
              <td colspan="2"><div align="right"></div></td>
              <td> </td>
            </tr>
            <tr> 
              <td colspan="5"> <div align="center"> 
                  <INPUT type=submit value=' 提 交 ' name=Submitn OnClick="return check()" style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
                  <INPUT name="reset" type=reset style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%" value=' 取 消 '>
               <INPUT type=submit value="查 询"  name=Submitx style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
			   <INPUT type=submit value="新 增"  name=Submity style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
			   </div></td>
            </tr>
          </table>
        </form>
        </div></td>
  </tr>
</table>
<%elseif action="suc" then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><script>
	alert("<% =errn %>")
	if(confirm("您是否需要继续录入或修改同一编号的人员信息?"))
	{window.location="<%=aspname%>.asp?aspname=<%=aspname%>&bh=<%=bh%>&name=<%=name%>&xin=1"
	}
	else
	window.close
	  </script>
	</div></td>
  </tr>
</table>
<%end if%>
<script>
function check(){
    var str1;
	str1=document.form1.szdw.value;
	if(str1=="" ){
  	     alert("所在单位不能为空!");
		 return(false);
		}
    str1=document.form1.ryxm.value;
	if(str1=="" ){
  	     alert("人员姓名不能为空!");
		 return(false);
		}
	nr1=document.form1.nl.value;	
	if(nr1=="" ){
  	     alert("年龄不能为空!");
		 return(false);
		}
	for (var i=0;i<nr1.length;i++){
	   if(nr1.charAt(i)<"0"  || nr1.charAt(i)>"9" ){
	       alert("年龄必须是数字!");
		   return(false);
		   }
	}	
	var j=0;
    nr1=document.form1.bfb.value;
	for (var i=0;i<nr1.length;i++){
	   if(nr1.charAt(i)<"0"  || nr1.charAt(i)>"9"){
	       alert("百分比必须是数值!");
		   return(false);
		   }
	}	
	
    nr1=document.form1.rypm.value;	
	for (var i=0;i<nr1.length;i++){
	   if(nr1.charAt(i)<"0"  || nr1.charAt(i)>"9" ){
	       alert("人员排名必须是数字!");
		   return(false);
		   }
	}	

	return 1;
}
</script>


⌨️ 快捷键说明

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