?? qx_klgl_submit.jsp
字號:
<%@page contentType="text/html;charset=GBK"%>
<%@ page import = "com.vstsoft.std.*" %>
<%@ page import = "java.sql.*" %>
<%@ page import = "collapsar.Cipher" %>
<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;}
if (jcypurview.purviewVerdict("B0500008") == false)
{
%>
<Script Language=javascript>
alert("您沒有操作此頁權限!")
window.open("../index.jsp","_top")
</Script>
<% return; }
%>
<%
String userid =jcypurview.getUserid();
vststd tra = new vststd();
String oldpd = tra.getValue(request,"oldpassword").trim();//舊密碼
String password = tra.getValue(request,"password").trim(); //新密碼
String pd = tra.getValue(request,"pd").trim(); //驗證新密碼
String errtext = "";
String sql_update = "";
int ipd = 0;
int ixy = 0;
if (password.equals(null) || password.equals(""))
{
errtext = "口令不能為空!";
ixy = 1;
}
if (ixy != 1)
{
if (password.length() < 6)
{
errtext = "口令長度不能小于6位!";
ixy = 1;
}
}
if (ixy != 1)
{
if (pd.equals(null) || pd.equals(""))
{
errtext = "請輸入校驗口令!";
ixy = 1;
}
}
if (ixy != 1)
{
if (!pd.equals(password))
{
errtext = "校驗口令有誤,請重新輸入!";
ixy = 1;
}
}
if (ixy != 1)
{
String sqlChk = "select password from qx_user where userid = '"+userid+"'";
sun.jdbc.rowset.CachedRowSet crs = null;
crs = tra.getResultBySelect(sqlChk);
crs.next();
String _oldpd = crs.getString(1);
oldpd = Cipher.Encrypt(oldpd);
if (!oldpd.equals(_oldpd))
{
errtext = "輸入的舊口令有誤,請重新輸入!";
ixy = 1;
}
}
if (ixy != 1)
{
Cipher ch = new Cipher();
password = Cipher.Encrypt(password);
sql_update = "update qx_user set password='"+ password +"' where userid = '" + userid + "'";
ipd = tra.getResultByUpdate(sql_update);
if (ipd == 1)
{
errtext = "口令修改成功!";
}
}
%>
<html>
<head>
<title>
</title>
</head>
<body onLoad="parent.f_submit('<%=errtext%>')">
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -