only you,请帮忙看看我的问题,能否解决?多谢
问题:ID:2132909
问题:JSP传值错误问题 ( 积分:100, 回复:0, 阅读:7 )
分类:JSP/Servlet ( 版主:垃圾清洁工, luyear )
来自:fallwind68, 时间:2003-8-25 15:59:00, ID:2132909 | 编辑 [显示:小字体 | 大字体]
[
]
各位仁兄:请帮忙,十万火急! 写的拙劣,请别见笑,还请多多指教。谢过了
目的:实现一次修改多条记录,而且记录条数是变量,视选则的条件而定。
问题:数据如何定义和传递,现有的程序中循环内的input好像传不到下个页面。值为NULL?? why
#### 循环内的input:
for (int i = 0 ;
i< lowofcun ;
i++ )
{
String tmpName1="count1-"+String.valueOf(i);
........
out.print("<TR align='right'>");
out.print("<TD bgcolor='#66CCFF' width='200' align='left'>"+sbno+"</TD>");
out.print("<TD bgcolor='#66CCFF' width='300' align='left'>"+sbname+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName1 align='right' value="+count1+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName2 align='right' value="+sum1+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName3 align='right' value="+count2+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName4 align='right' value="+sum2+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName5 align='right' value="+count3+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName6 align='right' value="+sum3+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName7 align='right' value="+count4+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName8 align='right' value="+sum4+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName9 align='right' value="+count5+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName10 align='right' value="+sum5+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName11 align='right' value="+count6+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName12 align='right' value="+sum6+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName13 align='right' value="+count7+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName14 align='right' value="+sum7+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("</TR>");}
##### 三个相关程序源码如下:
***** 1 ****
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page language="java" import="java.sql.*" import="oracle.jdbc.driver.*"%>
<html><head><title>支行季度报表数据信息录入</title></head>
<%! //处理字符串的一个常用方法。
public String getStringV(String s)
{ if(s==null) s="";
try{ byte a[]=s.getBytes("ISO-8859-1");
s=new String(a);}
catch(Exception e)
{}
return s;
}
%>
<%! //处理从数据库取汉字字符串乱码问题。
public String getStringFromAixOracle(String s)
{ if(s==null) s="";
String s2 = "";
System.out.println("*************************************");
try{
byte a[]=s.getBytes("US-ASCII");
if(a != null) {
int len = a.length;
char c[] = new char[100];
s.getChars(0, len, c, 0);
for( int i = 0;
i < len;
i++) {
System.out.println("b" + i + "(" + a
+ ")(" + c + ")(" + (byte)c + ")");
a = (byte)(a - 128);
}
}
s2=new String(a, "GBK");
//byte a1[]=s.getBytes("US-ASCII");
//s2 = new String(a1);
System.out.println("122printdebug"+s+","+s2);
byte a1[]="中山支行".getBytes();
if(a1 != null) {
int len1 = a1.length;
for( int i = 0;
i < len1;
i++) {
System.out.println("bx" + i + "(" + a1 + ")");
//a = (byte)(a - 128);
}
}
String s3=new String(a1, "GBK");
//byte a1[]=s.getBytes("US-ASCII");
//s2 = new String(a1);
System.out.println("123printdebug"+s+","+s3);
}catch(Exception e) {
e.printStackTrace();
}
return s2;
}
%>
<% //为防止客户直接进入此页面,先从对象获取季度报表数据信息。
String userID="",userpriv="",userpriv2="",userbranchid="",tbname="";
if(session.isNew())
{ response.sendRedirect("index_00.jsp");}
else
{ userID=(String)session.getAttribute("UserNo");
userpriv= (String)session.getAttribute("Privilege");
userbranchid= (String)session.getAttribute("branchid");
userID=getStringV(userID);
userpriv=getStringV(userpriv);
userbranchid=getStringV(userbranchid);
}
%>
<body background="../images/pic.gif">
<table width="100%">
<tr>
<td align="center" valign="bottom"><font size=5><b>支行季度报表数据信息录入 </b></font></td>
</tr>
</table>
<br>
<FORM name=form METHOD="post" ACTION="QuarterUpdate1.jsp">
<table border="0" align="center" width="60%">
<tr>
<td class="black15" align="right" width="35%"> 选择年份: </td>
<td class="black15" width="65%">
<select name="YearNo">
<option value="2003" selected>2003年度</option>
<option value="2004">2004年度</option>
</select>
</td>
</tr>
<tr>
<td class="black15" align="right" width="35%"> 选择季度: </td>
<td class="black15" width="65%">
<select name="QuatreNo">
<option value="1">第1季度</option>
<option value="2">第2季度</option>
<option selected value="3">第3季度</option>
<option value="4">第4季度</option>
</select>
</td>
</tr>
<tr>
<td class="black15" align="right" width="35%"> 选择国家: </td>
<td class="black15" width="65%">
<select name="countryis">
<%
String countryis = "",BankName ="";
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try{ Class.forName("oracle.jdbc.driver.OracleDriver");}
catch(ClassNotFoundException e)
{ out.println("SQL_Operate():"+e.getMessage());
String alarm="数据库操作出错!";
out.println("<script language=/"javascript/">alert(/"" +alarm +"/")</script>");
}
try{ con=DriverManager.getConnection("jdbcracle:thin10.100.2.101:1521ra8","gjyw","gjyw");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
//根据权限级别判断是只显示自己还是所有用户信息
String condition="SELECT * FROM userinfo order by userid";
rs=sql.executeQuery("SELECT * FROM supplybankinfo WHERE supplybankno like '__0000' order by supplybankno");
rs.last();
int countrynumber=rs.getRow();
rs.beforeFirst();
while(rs.next())
{
countryis = rs.getString(1);
countryis = countryis.substring(0,2);
BankName = rs.getString(2);
BankName=getStringFromAixOracle(BankName);
%>
<option value="<%= countryis %>"><%= countryis %>:<%= BankName %></option>
<%
}
con.close();
}
catch(SQLException e1)
{ out.print("数据库操作出错:"+e1.getMessage());
String alarm="数据库操作出错!";
out.println("<script language=/"javascript/">alert(/"" +alarm +"/")</script>");
}
%>
</select>
</td>
</tr>
<tr>
<td class="black15" width="35%"> </td>
<td class="black15" width="65%"> </td>
</tr>
<tr>
<td align="right" width="35%"><input name="submit" type="submit" value="确认"> </td>
<td align="left" width="65%"> <input name="reset" type="reset" value="取消"></td>
</tr>
</table>
</FORM>
</body>
</html>
******** 2 *******
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page language="java" import="java.sql.*" import="java.util.*" import="oracle.jdbc.driver.*"%>
<%@ page import="java.util.*"%>
<html><head><title>支行季度报表数据信息录入</title></head>
<SCRIPT LANGUAGE="JAVASCRIPT">
function checkCode(String){
var counter=0
for(var i=0;i<String.value.length;i++){
var codeAss=String.value.charCodeAt(i)
if((codeAss<48)||(codeAss>57)){
counter=counter+1
}
}
if(counter!=0){
alert("您必须输入数字")
String.focus()
return false
}
return true
}
function checkText(FORM){
if(document.forms[0].count1.value.length==0){
alert("请输入数据")
do
cument.forms[0].count1.focus()
return false
}
else
{
if(!checkCode(document.forms[0].count1)){
return false
}
}
if(document.forms[0].sum1.value.length==0){
alert("请输入数据")
do
cument.forms[0].sum1.focus()
return false
}
else
{
if(!checkCode(document.forms[0].sum1)){
return false
}
}
return true
}
function OnkeyS(e){
var charCode=(navigator.appName=="Netscape")?e.which:e.keyCode
if(charCode==13){
//document.vForm.submit();
do
cument.vForm.count1.focus()
}
}
</Script>
<%! //处理字符串的一个常用方法。
public String getStringV(String s)
{ if(s==null) s="";
try{ byte a[]=s.getBytes("ISO-8859-1");
s=new String(a);}
catch(Exception e)
{}
return s;
}
%>
<% //为防止客户直接进入此页面,先从对象获取季度报表数据信息。
String userID="",userpriv="",userpriv2="",userbranchid="";
if(session.isNew())
{ response.sendRedirect("index_00.jsp");}
else
{ userID=(String)session.getAttribute("UserNo");
userpriv= (String)session.getAttribute("Privilege");
userbranchid= (String)session.getAttribute("branchid");
userID=getStringV(userID);
userpriv=getStringV(userpriv);
userbranchid=getStringV(userbranchid);
}
%>
<% //获取提交的用户代码和口令
String YearNo=request.getParameter("YearNo");
YearNo=getStringV(YearNo);
String QuatreNo=request.getParameter("QuatreNo");
QuatreNo=getStringV(QuatreNo);
String tbname="quarter"+userbranchid+YearNo+QuatreNo;
String countryis=request.getParameter("countryis");
countryis=getStringV(countryis);
%>
<%!
String lnofthiscuntty="1";
%>
<body background="../images/pic.gif">
<table width="100%">
<tr>
<td align="center" valign="bottom"><font size=5><b>支行季度报表数据信息录入 [<%=tbname%>]</b></font></td>
</tr>
</table>
<br>
<%
Connection con=null;
Statement sql=null;
ResultSet rs=null;
try{ Class.forName("oracle.jdbc.driver.OracleDriver");}
catch(ClassNotFoundException e)
{ out.println("SQL_Operate():"+e.getMessage());
String alarm="数据库操作出错!";
out.println("<script language=/"javascript/">alert(/"" +alarm +"/")</script>");
}
try{ con=DriverManager.getConnection("jdbcracle:thin10.100.2.101:1521ra8","gjyw","gjyw");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=sql.executeQuery("SELECT * FROM "+tbname+" WHERE supplybankno like '__0000'");
rs.last();
int countrynumber=rs.getRow();
rs=sql.executeQuery("SELECT * FROM "+tbname+" WHERE supplybankno like '___999'");
rs.last();
int qitanumber=rs.getRow();
String condition="SELECT * FROM "+tbname;
rs=sql.executeQuery(condition);
rs.last();
int lownumber=rs.getRow();
int banknumber=lownumber-qitanumber-countrynumber-1;
out.print("这是"+userbranchid+"网点的"+YearNo+"年"+QuatreNo+"季度的报表,包括"+countrynumber+"个国家的"+banknumber+"家代理行;");
rs=sql.executeQuery("SELECT * FROM "+tbname+" WHERE substr(supplybankno,1,2)="+"'"+countryis+"'"+" order by supplybankno") ;
rs.last();
int lowofcun=rs.getRow();
lnofthiscuntty=String.valueOf(lowofcun);
out.print(lnofthiscuntty+countryis);
String countryna="";
rs.first();
countryna=rs.getString(2);
countryna=getStringV(countryna);
//out.print("这是["+countryna+"]的["+lowofcun+"]家代理行:");
out.print("这是["+countryis+"]的["+(lowofcun-2)+"]家代理行:");
%>
<FORM name=vForm METHOD="post" ACTION="QuarterUpdate2.jsp">
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="3" width="70" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>代理行编码</strong></font></div>
</td>
<td rowspan="3" width="109" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>代理行名称</strong></font></div>
</td>
<td colspan="6" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>信用证业务</strong></font></div>
</td>
<td colspan="4" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>托收业务</strong></font></div>
</td>
<td colspan="4" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>汇款业务</strong></font></div>
</td>
</tr>
<tr>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>进口开证</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>来证通知</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>议付</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>进口业务</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>出口业务</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>汇入汇款</strong></font></div>
</td>
<td colspan="2" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>汇出汇款</strong></font></div>
</td>
</tr>
<tr>
<td width="64" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="56" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="56" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="48" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="56" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="48" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="48" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="48" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="48" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="40" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="40" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="40" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
<td width="40" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>笔数</strong></font></div>
</td>
<td width="40" height="24" bgcolor="#66CCFF">
<div align="center"><font size="3"><strong>金额</strong></font></div>
</td>
</tr>
<% String sbno="",sbname="";
//String sbno[]={},sbname[]={};
int ii=0,jj=0,count1=0,sum1=0,count2=0,sum2=0,count3=0,sum3=0,count4=0,sum4=0,count5=0,sum5=0,count6=0,sum6=0,count7=0,sum7=0;
//int count1[]={},sum1[]={},count2[]={},sum2[]={},count3[]={},sum3[]={},count4[]={},sum4[]={},count5[]={},sum5[]={},count6[]={},sum6[]={},count7[]={},sum7[]={};
//
Hashtable hs = new Hashtable();
rs.beforeFirst();
for (int i = 0 ;
i< lowofcun ;
i++ )
{ rs.next();
sbno=rs.getString(1);
sbname=rs.getString(2);
sbname=getStringV(sbname);
count1=rs.getInt(3);
sum1=rs.getInt(4);
count2=rs.getInt(5);
sum2=rs.getInt(6);
count3=rs.getInt(7);
sum3=rs.getInt(8);
count4=rs.getInt(9);
sum4=rs.getInt(10);
count5=rs.getInt(11);
sum5=rs.getInt(12);
count6=rs.getInt(13);
sum6=rs.getInt(14);
count7=rs.getInt(15);
sum7=rs.getInt(16);
// hs.put(i+" "+1,sbno);
// hs.put(i+" "+2,count1);
// hs.put(i+" "+3,sum1);
String tmpName1="count1-"+String.valueOf(i);
String tmpName2="sum1-"+String.valueOf(i);
String tmpName3="count2-"+String.valueOf(i);
String tmpName4="sum2-"+String.valueOf(i);
String tmpName5="count3-"+String.valueOf(i);
String tmpName6="sum3-"+String.valueOf(i);
String tmpName7="count4-"+String.valueOf(i);
String tmpName8="sum4-"+String.valueOf(i);
String tmpName9="count5-"+String.valueOf(i);
String tmpName10="sum5-"+String.valueOf(i);
String tmpName11="count6-"+String.valueOf(i);
String tmpName12="sum6-"+String.valueOf(i);
String tmpName13="count7-"+String.valueOf(i);
String tmpName14="sum7-"+String.valueOf(i);
//根据sbno的后四位选择背景颜色string.substring(起始位,终止位)
if(sbno.substring(2,6).equals("0000")){
out.print("<TR bgcolor='#CCFFCC' align='right'>");
out.print("<TD bgcolor='#66CCFF' width='200' align='left'>"+sbno+"</TD>");
out.print("<TD bgcolor='#66CCFF' width='300' align='left'>"+sbname+"</TD>");
out.print("<TD>"+count1+"</TD>");
out.print("<TD>"+sum1+"</TD>");
out.print("<TD>"+count2+"</TD>");
out.print("<TD>"+sum2+"</TD>");
out.print("<TD>"+count3+"</TD>");
out.print("<TD>"+sum3+"</TD>");
out.print("<TD>"+count4+"</TD>");
out.print("<TD>"+sum4+"</TD>");
out.print("<TD>"+count5+"</TD>");
out.print("<TD>"+sum5+"</TD>");
out.print("<TD>"+count6+"</TD>");
out.print("<TD>"+sum6+"</TD>");
out.print("<TD>"+count7+"</TD>");
out.print("<TD>"+sum7+"</TD>");
out.print("</TR>");
}
else
{
out.print("<TR align='right'>");
out.print("<TD bgcolor='#66CCFF' width='200' align='left'>"+sbno+"</TD>");
out.print("<TD bgcolor='#66CCFF' width='300' align='left'>"+sbname+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName1 align='right' value="+count1+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName2 align='right' value="+sum1+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName3 align='right' value="+count2+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName4 align='right' value="+sum2+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName5 align='right' value="+count3+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName6 align='right' value="+sum3+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName7 align='right' value="+count4+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName8 align='right' value="+sum4+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName9 align='right' value="+count5+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName10 align='right' value="+sum5+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName11 align='right' value="+count6+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName12 align='right' value="+sum6+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName13 align='right' value="+count7+" SIZE='5' MAXLENGTH='10'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='text' NAME=tmpName14 align='right' value="+sum7+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("</TR>");}
out.print(tmpName1+","+tmpName2+","+tmpName3+","+tmpName4+","+tmpName5+","+tmpName6+","+tmpName7+","+tmpName8+","+tmpName8+","+tmpName9+"!");
}
out.print("<TR>");
out.print("<TD>"+"<INPUT TYPE='hidden' NAME='countryiss' align='right' value="+countryis+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("<TD>"+"<INPUT TYPE='hidden' NAME='lowofcunty' align='right' value="+lowofcun+" SIZE='9' MAXLENGTH='13'>"+"</TD>");
out.print("</TR>");
out.print("</Table>");
%>
<table border="0" align="center" width="40%>
<tr>
<td class="black15" width="35%"> </td>
<td class="black15" width="65%"> </td>
</tr>
<tr>
<td align="right" width="35%"><input name="submit" type="submit" value="确认"> </td>
<td align="left" width="65%"> <input name="reset" type="reset" value="取消"></td>
</tr>
<tr>
<td class="black15" width="35%"> </td>
<td class="black15" width="65%"> </td>
</tr>
</table>
<%
con.close();
}
catch(SQLException e1)
{ String errmsg=e1.getMessage(),alarm="";
out.print("数据库操作出错:"+errmsg);
if(errmsg.substring(0,9).equals("ORA-00942")){
alarm="出错:"+userbranchid+"网点的"+YearNo+"年"+QuatreNo+"季度的报表还没有建立,如果需要请先做初始化!";
}
else
{
alarm="数据库操作出错!";
}
out.println("<script language=/"javascript/">alert(/"" +alarm +"/")</script>");
}
%>
</table>
</FORM>
</body>
</html>
**** 3 *****
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page language="java" import="java.sql.*" import="java.util.*" import="oracle.jdbc.driver.*"%>
<%@ page import="java.util.*"%>
<html><head><title>支行季度报表数据信息录入</title></head>
<%! //处理字符串的一个常用方法。
public String getStringV(String s)
{ if(s==null) s="";
try{ byte a[]=s.getBytes("ISO-8859-1");
s=new String(a);}
catch(Exception e)
{}
return s;
}
%>
<% //为防止客户直接进入此页面,先从对象获取季度报表数据信息。
String userID="",userpriv="",userpriv2="",userbranchid="";
if(session.isNew())
{ response.sendRedirect("index_00.jsp");}
else
{ userID=(String)session.getAttribute("UserNo");
userpriv= (String)session.getAttribute("Privilege");
userbranchid= (String)session.getAttribute("branchid");
userID=getStringV(userID);
userpriv=getStringV(userpriv);
userbranchid=getStringV(userbranchid);
}
%>
<% //获取提交的用户代码和口令
//String YearNo=request.getParameter("YearNo");
//YearNo=getStringV(YearNo);
//String QuatreNo=request.getParameter("QuatreNo");
//QuatreNo=getStringV(QuatreNo);
//String tbname="quarter"+userbranchid+YearNo+QuatreNo;
String countryis=request.getParameter("countryiss");
String inini="lowofcunty";
String lnofthiscuntty=request.getParameter(inini);
int lowofcun= Integer.parseInt(lnofthiscuntty);
//int? sum[n]= parseFloat(.);
out.println(countryis+","+lnofthiscuntty+","+lowofcun+",");
for (int i = 0 ;
i< lowofcun ;
i++ )
{
String tmpName1="count1-"+String.valueOf(i);
String tmpName2="sum1-"+String.valueOf(i);
String tmpName3="count2-"+String.valueOf(i);
String tmpName4="sum2-"+String.valueOf(i);
String tmpName5="count3-"+String.valueOf(i);
String tmpName6="sum3-"+String.valueOf(i);
String tmpName7="count4-"+String.valueOf(i);
String tmpName8="sum4-"+String.valueOf(i);
String tmpName9="count5-"+String.valueOf(i);
String tmpName10="sum5-"+String.valueOf(i);
String tmpName11="count6-"+String.valueOf(i);
String tmpName12="sum6-"+String.valueOf(i);
String tmpName13="count7-"+String.valueOf(i);
String tmpName14="sum7-"+String.valueOf(i);
out.print(tmpName1+","+tmpName2+","+tmpName3+","+tmpName4+","+tmpName5+","+tmpName6+","+tmpName7+","+tmpName8+","+tmpName8+","+tmpName9+"!");
String scount1=request.getParameter(tmpName1);
//int count1= Integer.parseInt(scount1);
out.println("["+scount1+"]");
}
%>
<body background="../images/pic.gif">
<table width="100%">
<tr>
<td align="center" valign="bottom"><font size=5><b>支行季度报表数据信息录入</b></font></td>
</tr>
</table>
<br>
</table>
</FORM>
</body>
</html>