init web ems all
This commit is contained in:
294
wxc2_omc/security/userManage/pwdStreng.php
Executable file
294
wxc2_omc/security/userManage/pwdStreng.php
Executable file
@@ -0,0 +1,294 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:ϵͳǿ<CDB3><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD>ϵ:<3A><><EFBFBD><EFBFBD>:header.inc
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ:<3A><>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD>:
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
ʱ<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="background-color:#FFFAF4;overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<?php
|
||||
//adjust_head();
|
||||
//adjust_title_head();
|
||||
/*
|
||||
echo "<br>";
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\" align=\"left\">";
|
||||
echo "$strAdvanced > $strOmcUser";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";*/
|
||||
//adjust_title_tail();
|
||||
adjust_content_head();
|
||||
echo "<br>";
|
||||
|
||||
$DEBUG = 0;
|
||||
$pubDb ='OMC_PUB';
|
||||
$table_name ='sysPwdStrength'; /*<2A><><EFBFBD><EFBFBD>ǿ<EFBFBD>ȱ<EFBFBD>*/
|
||||
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$ucCategory=$_POST['ucCategory']; //<2F>ַ<EFBFBD>Unicode<64><65><EFBFBD><EFBFBD>
|
||||
$maxLength=$_REQUEST['maxLength'];
|
||||
$maxLoginNum=$_POST['maxLoginNum'];
|
||||
$delayedTime=$_POST['delayedTime'];
|
||||
|
||||
if($DEBUG) echo "confMode=$confMode<br>";
|
||||
if($DEBUG) echo "confMode=$ucCategory<br>";
|
||||
if(!isset($ucCategory)){
|
||||
$ucCategory=3;
|
||||
}
|
||||
if(!isset($maxLength)){
|
||||
$maxLength=127;
|
||||
}
|
||||
if(!isset($maxLoginNum)){
|
||||
$maxLoginNum=5;
|
||||
}
|
||||
if(!isset($delayedTime)){
|
||||
$delayedTime=120;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
function question_Validator(theForm)
|
||||
{
|
||||
if(theForm.unicodeType.value==''){
|
||||
var TypeEmpty="<?php echo $strTypeCannotBeEmpty; ?>";
|
||||
alert(TypeEmpty);
|
||||
theForm.unicodeType.focus();
|
||||
return(false);
|
||||
}else if(theForm.maxLength.value==''){
|
||||
var MaxEmpty="<?php echo $strMaxCannotBeEmpty; ?>";
|
||||
alert(MaxEmpty);
|
||||
theForm.maxLength.focus();
|
||||
return(false);
|
||||
|
||||
|
||||
|
||||
}else if(theForm.pwdOutTime.value==''){
|
||||
var pwdEmpty="<?php echo $strPwdEmpty; ?>";
|
||||
alert(pwdEmpty);
|
||||
theForm.pwdOutTime.focus();
|
||||
return(false);
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
if(theForm.maxLoginNum.value==''){
|
||||
var NumEmpty="<?php echo $strNumCannotBeEmpty; ?>";
|
||||
alert(NumEmpty);
|
||||
theForm.maxLoginNum.focus();
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(theForm.delayedTime.value==''){
|
||||
var TimeEmpty="<?php echo $strTimeCannotBeEmpty; ?>";
|
||||
alert(TimeEmpty);
|
||||
theForm.delayedTime.focus();
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
if(theForm.pwdOutTime.value <24){
|
||||
var pwdConfirm="<?php echo $strPwdMistake; ?>";
|
||||
alert(pwdConfirm);
|
||||
theForm.pwdOutTime.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
if(theForm.unicodeType.value <1 || theForm.unicodeType.value>4){
|
||||
var UnicodeTypeConfirm="<?php echo $strUnicodeTypeMistake; ?>";
|
||||
alert(UnicodeTypeConfirm);
|
||||
theForm.unicodeType.focus();
|
||||
return (false);
|
||||
}
|
||||
if(theForm.maxLength.value < 9 || theForm.maxLength.value > 128){
|
||||
var maxLengthConfirm="<?php echo $strMaxLengthMistake; ?>";
|
||||
alert(maxLengthConfirm);
|
||||
theForm.maxLength.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
if(theForm.maxLoginNum.value <5 || theForm.maxLoginNum.value>8){
|
||||
var maxLoginNumConfirm="<?php echo $maxLoginNumRule; ?>";
|
||||
alert(maxLoginNumConfirm);
|
||||
theForm.maxLoginNum.focus();
|
||||
return (false);
|
||||
}
|
||||
if(theForm.delayedTime.value < 120 || theForm.delayedTime.value > 600){
|
||||
var delayedTimeConfirm="<?php echo $delayedLoginTimeRule; ?>";
|
||||
alert(delayedTimeConfirm);
|
||||
theForm.delayedTime.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($confMode == 'strong'){
|
||||
?>
|
||||
<form action="<?php echo"$PHP_SELF?table_name=$table_name"; ?>" method="POST" onsubmit="return question_Validator(this)" name="operForm" >
|
||||
<!-- <table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" height="189" bgcolor="#FFFFEF">
|
||||
-->
|
||||
<table class="formCenter">
|
||||
<tr>
|
||||
<td colspan=3 vAlign="top" bgcolor="#E6E6E6" height="12"><b>
|
||||
<?php
|
||||
|
||||
echo $configPwdStreng; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>
|
||||
|
||||
?>
|
||||
</b></td>
|
||||
</tr>
|
||||
|
||||
<!-- //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>-->
|
||||
|
||||
<tr>
|
||||
<td><?php echo $unicodeNum; ?></td>
|
||||
<td><input type="text" name="unicodeType" id="unicodeType" maxlength="16" size="16" value="<?php echo $ucCategory; ?>" class="text"></td><!--<2D><><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
<td width="150"><?php echo $pwdType; ?></td> <!--<2D><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѡ1-4<><34><EFBFBD><EFBFBD>ʾ-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $theMax; ?></td> <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEB3A4><EFBFBD><EFBFBD>-->
|
||||
<td> <input type="text" name="maxLength" id="maxLength" maxlength="16" size="16" value="<?php echo $maxLength; ?>" class="text">
|
||||
<td width="150"> <?php echo $maxLengthRule; ?></td> <!--<2D><><EFBFBD><EFBFBD>128-->
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $strMaxLoginNum; ?></td> <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼ʧ<C2BC>ܴ<EFBFBD><DCB4><EFBFBD>-->
|
||||
<td> <input type="text" name="maxLoginNum" id="maxLoginNum" maxlength="16" size="16" value="<?php echo $maxLoginNum; ?>" class="text">
|
||||
<td width="150"> <?php echo $maxLoginNumRule; ?></td> <!--<2D><><EFBFBD><EFBFBD>Ϊ<EFBFBD>˴<EFBFBD>-->
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><?php echo $strDelayedLoginTime; ?></td>
|
||||
<td> <input type="text" name="delayedTime" id="delayedTime" maxlength="16" size="16" value="<?php echo $delayedTime; ?>" class="text">
|
||||
<td width="150"> <?php echo $delayedLoginTimeRule; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $strPwdOutTime; ?></td>
|
||||
<td> <input type="text" name="pwdOutTime" id="pwdOutTime" maxlength="16" size="16" value="<?php echo $pwdOutTime; ?>" class="text">
|
||||
<td width="150"> <?php echo $pwdOutTimeRule; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
<td colspan=3 width=600 align=center><p>
|
||||
<?php
|
||||
echo "<input type=\"submit\" name=\"config\" value=\"$strConfig\" class=\"button\"> "; //<2F><><EFBFBD>ð<EFBFBD>ť
|
||||
echo "<input type=\"reset\" name=\"reset\" value=\"$strCancel\" class=\"button\"> ";
|
||||
echo "<input type=\"button\" value=\"$strReturn\" class=\"button\" onclick=javascript:location.href=\"./userList.php\";> ";
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>
|
||||
|
||||
|
||||
$config=$_POST['config'];
|
||||
if($config){
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
$ucCategory=$_POST['unicodeType'];
|
||||
$pwdOutTime=$_POST['pwdOutTime'];
|
||||
$select_sql ="SELECT count(*) as number_of_records
|
||||
FROM $table_name
|
||||
WHERE ucCategory='$ucCategory' and maxLength='$maxLength' and maxLoginNum='$maxLoginNum' and delayedTime='$delayedTime' and pwdOutTime='$pwdOutTime'";
|
||||
//<2F><><EFBFBD>ò<EFBFBD>û<EFBFBD>иĶ<D0B8>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
$result = mysqli_query($pubConn,$select_sql);
|
||||
$record = @mysqli_fetch_object($result);
|
||||
$number_of_records = $record->number_of_records;
|
||||
//echo "<br>number_of_records=$number_of_records";
|
||||
if(1) echo "<br>select_sql=$select_sql";
|
||||
|
||||
if($number_of_records){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strTheRecordExits,$strConfigFails"; /*δ<>иĶ<D0B8><C4B6>ĵط<C4B5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"3; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}else{
|
||||
// $str_sql="REPLACE INTO $table_name
|
||||
// ( realName,userName,password,privilege,updateTime)
|
||||
// VALUES
|
||||
// ('$realName','$userName',md5('$password'),'$privilege',CURRENT_TIMESTAMP)
|
||||
// ";
|
||||
|
||||
//<2F><EFBFBD>ϵͳǿ<CDB3>ȱ<EFBFBD><C8B1><EFBFBD>ǿ<EFBFBD><C7BF>
|
||||
$str_sql="UPDATE $table_name
|
||||
SET ucCategory='$ucCategory',maxLength='$maxLength',write_time=CURRENT_TIMESTAMP,maxLoginNum='$maxLoginNum',delayedTime='$delayedTime',pwdOutTime='$pwdOutTime'
|
||||
WHERE keyId=1
|
||||
";
|
||||
|
||||
|
||||
$result=mysqli_query($pubConn,$str_sql);
|
||||
// echo "sql=$str_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
if(!$result){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigFails"; /*<2A><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"20; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigSucceeds";/*<2A><><EFBFBD>óɹ<C3B3>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjust_content_tail();
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user