?? jcy_pxb_new_modify.jsp
字號:
<%@ page contentType="text/html; charset=GBK" language="java" import="java.sql.*,com.vstsoft.std.*" errorPage=""%>
<jsp:useBean id="jcypurview" class="com.vstsoft.jcypurview" scope = "session" />
<% if (jcypurview.checkLogin() == false)
{
%>
<Script Language=javascript>
alert("用戶已斷線或未正常登錄,請重新登錄!")
window.open("../index.htm","_top")
</Script>
<% return; }%>
<%
String nowuserid = jcypurview.getUserid(); //取當前用戶編號
String nowusername = jcypurview.getUserName(); //取當前用戶名稱
String nowuserszqx = jcypurview.getUserSzqx(); //取當前用戶所在區縣
String nowuserszdw = jcypurview.getUserSzdw(); //取當前用戶所在單位
%>
<html>
<head>
<title>公務員管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<%vststd std = new vststd();%>
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires",0);
String szt = std.getValue(request,"zt");
String pxxh = std.getValue(request,"ID"); //培訓序號
String pxrs= ""; //培訓人數
String pxbm = ""; //培訓組織部門
String pxqr = ""; //培訓時間起
String pxzr = ""; //培訓時間止
String pxqc = ""; //培訓班期次
String year= ""; //培訓年度
String rqtime = "";
String rqtime1 = "";
if ( szt.equals("modify"))
{
String sql_select = "select pxbm,to_char(pxqr,'YYYY.MM.DD'),to_char(pxzr,'YYYY.MM.DD'),year,pxqc,pxrs from jcy_pxb where pxxh ='"+pxxh+"'";
sun.jdbc.rowset.CachedRowSet crs = std.getResultBySelect(sql_select);
crs.next();
pxbm = crs.getString(1);
pxqr = crs.getString(2);
pxzr = crs.getString(3);
year = crs.getString(4);
pxqc = crs.getString(5);
pxrs = crs.getString(6);
if (pxbm == null) pxbm = "";
if (pxqr == null) pxqr = "";
if (pxzr == null) pxzr = "";
if (year == null) year = "";
if (pxqc == null) pxqc = "";
if (pxrs == null) pxrs = "";
}
sun.jdbc.rowset.CachedRowSet aa=std.getResultBySelect("select to_char(sysdate,'yyyy.mm.dd') t,to_char(add_months(sysdate,-1),'yyyy.mm.dd') d,to_char(trunc(sysdate,'yyyy'),'yyyy.mm.dd') f from dual");
aa.next();
String today=aa.getString("t");//當前時間
%>
<%
//權限判斷
if (szt.equals("new"))
{
if (jcypurview.purviewVerdict("B0500032") == false)
{
%>
<Script Language=javascript>
alert("您沒有操作此頁權限!")
window.open("../index.jsp","_top")
</Script>
<% return;
}
}
%>
<%
if (szt.equals("modify"))
{
if (jcypurview.purviewVerdict("B0500033") == false)
{
%>
<Script Language=javascript>
alert("您沒有操作此頁權限!")
window.open("../index.jsp","_top")
</Script>
<% return;
}
}
%>
<script language="javascript" src = "new.js">
<!--modify: yhy-->
<link rel="stylesheet" href="../lib/main.css" type="text/css">
<script language="javascript" src="../lib/check.js"></script>
<script language="JavaScript" src="../lib/date/GetDate.js"></script>
<script language="JavaScript" src="../lib/util.js"></script>
<!-- modify end -->
</script>
<script language=javascript>
//modify yhy
function checkJsrqs(inval){
if(inval==""){
return true;
}
var ret = check_date(inval,"D");
if(ret==""){
ret = checkStartEndDate(inval,document.getElementById("rqr").value);
if(ret == -1||ret == -2){
alert("日期格式不對!");
return false;
}
if(ret == -3){
document.getElementById("rq").value="";
document.getElementById("rqr").value="";
alert("開始日期不得大于結束日期!");
return false;
}
else{
return true;
}
}
else{
ret="加入日期 起:"+ret;
alert(ret);
return false;
}
}
function checkJsrqz(inval){
if(inval==""){
return true;
}
var ret = check_date(inval,"D");
if(ret==""){
ret = checkStartEndDate(document.getElementById("rq").value,inval);
if(ret == -1||ret == -2){
alert("日期格式不對!");
return false;
}
if(ret == -3){
document.getElementById("rq").value="";
document.getElementById("rqr").value="";
alert("開始日期不得大于結束日期!");
return false;
}
else{
return true;
}
}
else{
ret="加入日期 止:"+ret;
alert(ret);
return false;
}
}
//modify end
//modify end
function f_number()
{
var rq = document.form.rq.value;
var rqr = document.form.rqr.value;
if(rq.length==0)
{
alert("請輸入培訓起始日期!");
document.form.rq.focus();
return(false);
}
if(rqr.length==0)
{
alert("請輸入培訓終止日期!");
document.form.rqr.focus();
return(false);
}
if (document.form.year.value.length > 4)
{
alert('年度長度不能超過4位!');
document.form.year.focus();
return(false);
}
if (document.form.year.value.length == 0)
{
alert('年度不能為空!');
document.form.year.focus();
return(false);
}
if (document.form.pxrs.value.length > 9)
{
alert('培訓班人數長度不能超過9位');
document.form.pxrs.focus();
return(false);
}
if (document.form.pxrs.value.length == 0)
{
alert('培訓班人數不能為空!');
document.form.pxrs.focus();
return(false);
}
if (document.form.pxqc.value.length >20)
{
alert('培訓班期次長度不能超過20位!');
document.form.pxqc.focus();
return(false);
}
if (document.form.pxqc.value.length == 0)
{
alert('培訓班期次不能為空!');
document.form.pxqc.focus();
return(false);
}
if (document.form.pxqc.value > 12)
{
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -