请大家帮忙修改,不知道怎么改了。。谢谢!!!!
<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%>
<%@ page import="java.sql.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="javax.naming.*"%>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="com.jwt.*"%>
<!-- 操作员基本信息开始-->
<%
String uname = (String)session.getAttribute("username");//传来的登陆号
String ucode = (String)session.getAttribute("unitcode");//传来的单位
String uid = (String)session.getAttribute("userid");//传来的单位
String urule = (String)session.getAttribute("rule");//权限
if(uname==null){
request.setAttribute("problem","登录超时,请重新登录!");
RequestDispatcher rd = getServletContext().getRequestDispatcher("/yw/errorpage.jsp");
rd.forward(request,response);
return;
}
%>
<!-- 操作员基本信息结束-->
<!--数据库连接开始-->
<%
Context ctx = null;
DataSource ds;
Connection conn = null; //Connection接口
Statement stmt = null; //Statement接口
Statement stmt2 = null; //Statement接口
ResultSet rs = null; //记录结果集
ResultSet rs2 = null; //记录结果集
String sql=null;
String sql2=null;
try {
ctx = (Context) new InitialContext().lookup("java:comp/env");
ds = (DataSource) ctx.lookup("jdbc/jwt");
conn = ds.getConnection();
stmt = conn.createStatement();
stmt2 = conn.createStatement();
} catch (Exception e) {
System.out.println(e);
}
%>
<!--数据库连接结束-->
<html>
<head>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
<SCRIPT>
function showcalendar(obj)
{
dv=window.showModalDialog("./images/calendar.htm","44","center:1;help:no;status:no;dialogHeight:246px;dialogWidth:216px;scroll:no")
if (dv) {if (dv=="null") obj.value='';else obj.value=dv;}
}
function changeQmsl(obj){
var tr = obj.parentNode.parentNode;
var dyzj = tr.all["dyzj"];
var dyjs = tr.all["dyjs"];
var qmsl = tr.all["qmsl"];
var qssl = tr.all["qssl"];
if(dyzj.value != "" && dyjs.value != ""){
var val = qssl.innerHTML * 1; //字符转换成数字
qmsl.innerHTML = val + dyzj.value - qyjs.value;
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>开卡</title>
<%
String nianf="";
String yuef="";
if (request.getParameter("nianf")!=null){
nianf=request.getParameter("nianf");
}
if (request.getParameter("yuef")!=null){
yuef=request.getParameter("yuef");
}
String rq=nianf+yuef;
DateFormat f = new SimpleDateFormat("yyyyMM");
Calendar c = GregorianCalendar.getInstance();
c.setTime(f.parse(rq));//提示这行错误!!估计是rq的传值不对!!求改正!!!
c.add(Calendar.MONTH, -1);
String rq1=f.format(c.getTime());
%>
<!-- 时间begt endt开始 -->
<%
SimpleDateFormat format = new SimpleDateFormat(&qu