📄 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 + -