init web ems all
This commit is contained in:
BIN
wxc2_omc/security/userManage/.userList.php.swp
Executable file
BIN
wxc2_omc/security/userManage/.userList.php.swp
Executable file
Binary file not shown.
198
wxc2_omc/security/userManage/batchAddConf.php
Executable file
198
wxc2_omc/security/userManage/batchAddConf.php
Executable file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֶ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>û<EFBFBD><C3BB>ij<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><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 ='sysUser'; /*<2A><><EFBFBD><EFBFBD>ǿ<EFBFBD>ȱ<EFBFBD>*/
|
||||
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$timeOut=$_REQUEST['timeOut']; //<2F>ַ<EFBFBD>Unicode<64><65><EFBFBD><EFBFBD>
|
||||
if($DEBUG) echo "confMode=$confMode<br>";
|
||||
$userName=$_REQUEST['userName'];
|
||||
$sysUser="sysUser";
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
|
||||
function question_Validator(theForm)
|
||||
{
|
||||
|
||||
|
||||
if(theForm.timeOut.value==''){
|
||||
var AccountEmpty="<?php echo $strTimeCannotBeEmpty; ?>";
|
||||
alert(AccountEmpty);
|
||||
theForm.timeOut.focus();
|
||||
return(false);
|
||||
}else{
|
||||
|
||||
if(theForm.timeOut.value <300 || theForm.timeOut.value>3600){
|
||||
var TimeConfirm="<?php echo $outtimeInfo; ?>";
|
||||
alert(TimeConfirm);
|
||||
theForm.timeOut.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
function changeAgentContent(){
|
||||
document.getElementById("inputFileAgent").value = document.getElementById("impFile").value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($confMode == 'BatchAdd'){
|
||||
?>
|
||||
|
||||
|
||||
<form action="<?php echo"$PHP_SELF?table_name=$table_name"; ?>" enctype="multipart/form-data" method="POST" name="subsData" >
|
||||
<table bgcolor="#FFFFEF" border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" >
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td width=100% colspan=2 align=center>
|
||||
<font size=3><b>
|
||||
<?php echo $batchAddUser;
|
||||
?>
|
||||
</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<font color="#0000FF" size=2><?php echo "$strAddRecordNum <= 100";?></font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo "$strSelectFile";?>:</td>
|
||||
<td>
|
||||
<input type="file" name="impFile" id="impFile" style="display:none" onchange="changeAgentContent()">
|
||||
<input type="text" value="" readonly id="inputFileAgent" />
|
||||
<input type="button" onclick="document.getElementById('impFile').click()" value="<?php echo $strBrowse;?>" class="button"/>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="20971520"><!-- MAX_FILE_SIZE = 20M -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<input type="submit" name="Submit" id="Submit" value="<?php echo $strSubmit; ?>" class="button">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
echo "<font color=red>$impRemark</font>";
|
||||
}
|
||||
/* $content = @file_get_contents($txt);
|
||||
if ($content === false) {
|
||||
echo '<27><EFBFBD><DEB7><EFBFBD>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>';
|
||||
} elseif (strlen($content) === 0) {
|
||||
echo '<27>ļ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
||||
} else {
|
||||
echo '<27><><EFBFBD>ǿ<EFBFBD><C7BF>ļ<EFBFBD>';
|
||||
}*/
|
||||
|
||||
if( $_FILES['impFile']['name']){
|
||||
|
||||
$test=file_get_contents($_FILES['impFile']['tmp_name']);
|
||||
if($DEBUG){
|
||||
echo mb_detect_encoding($test, array('GB2312','GBK','UTF-16','UCS-2','UTF-8','BIG5','ASCII'));
|
||||
print_r(explode(",",$test));
|
||||
}
|
||||
$array=explode(",",$test);
|
||||
$newArr=array_chunk($array,4);
|
||||
// print_r($array);
|
||||
// echo print_r($newArr[1][0]);
|
||||
// echo sizeof($newArr);
|
||||
// echo sizeof($array);
|
||||
// foreach($newArr[0] as $value)
|
||||
if(sizeof($array)%4==0){
|
||||
for($i=0;$i<sizeof($newArr);$i++){
|
||||
if(sizeof($newArr[$i])){
|
||||
$realName=$newArr[$i][0];
|
||||
$userName=$newArr[$i][1];
|
||||
$password=$newArr[$i][2];
|
||||
$privilege=$newArr[$i][3];
|
||||
$salt=rand(1000,9999); //<2F><><EFBFBD><EFBFBD>4λ<34><CEBB><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
$realPwd=md5($password.$salt);
|
||||
$batchSql="INSERT INTO $sysUser (realName,userName,password,privilege,updateTime,salt)VALUES('$realName','$userName','$realPwd','$privilege',CURRENT_TIMESTAMP,'$salt')";
|
||||
//echo $batchSql;
|
||||
// debug_log("/tmp/test.txt", $batchSql);
|
||||
mysqli_query($pubConn,$batchSql);
|
||||
$errStr= mysqli_error($pubConn);
|
||||
if ($errStr!=null)
|
||||
{
|
||||
// echo "batchSql=$batchSql<br>";
|
||||
echo mysqli_error($pubConn);
|
||||
}else {
|
||||
$j=$i+1;
|
||||
}
|
||||
}
|
||||
}//end for
|
||||
echo "<script>
|
||||
alert('$totalNum:$j');
|
||||
|
||||
</script>";
|
||||
|
||||
echo " <meta http-equiv=\"refresh\" content=\"3; url=./userList.php\"> ";
|
||||
|
||||
}else{
|
||||
echo "<script>
|
||||
alert('$checkImport');
|
||||
history.go(-1);
|
||||
|
||||
</script>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
266
wxc2_omc/security/userManage/blackPwdConf.php
Executable file
266
wxc2_omc/security/userManage/blackPwdConf.php
Executable file
@@ -0,0 +1,266 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֶԺ<D6B6><D4BA><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 ='sysBlackPwd';
|
||||
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$userName=$_REQUEST['userName'];
|
||||
$password=$_REQUEST['blackPwd'];
|
||||
if($DEBUG) echo "confMode=$confMode<br>";
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
|
||||
|
||||
function set_value(check_box,check_input,check_value)
|
||||
{ if(check_box.checked){
|
||||
check_input.value=check_value;
|
||||
}else{
|
||||
check_input.value='';
|
||||
}
|
||||
}
|
||||
|
||||
function Check(lang, theform, confMode){
|
||||
if(confMode == 'edit'){
|
||||
var password=theform.new_password_1.value;
|
||||
}else{
|
||||
var password=theform.password.value;
|
||||
}
|
||||
//password strength---lyj
|
||||
var patrn=/^(?![A-z0-9]+$)(?=.[^%&',;=?$\x22])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{8,}$/;
|
||||
// matching ---lyj
|
||||
|
||||
var Passwordstrengthinfo="<?php echo $Passwordstrength; ?>";
|
||||
if (!patrn.test(password) || password.length<8){
|
||||
if (lang=='eng')
|
||||
alert("password must contain digits, uppercase letters, lowercase letters, and special characters");
|
||||
if (lang=='chn')
|
||||
alert(Passwordstrengthinfo);
|
||||
if(confMode == 'add'){
|
||||
theform.password.focus();
|
||||
theform.password.select();
|
||||
}else{
|
||||
theform.new_password_1.focus();
|
||||
theform.new_password_1.select();
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$str_sql="SELECT *
|
||||
FROM $table_name
|
||||
";
|
||||
$result = @mysqli_query($pubConn,$str_sql);
|
||||
$myrows = @mysqli_fetch_array($result);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($confMode == 'add'){
|
||||
?>
|
||||
<form action="<?php echo"$PHP_SELF"; ?>" method="POST" onsubmit="return Check('<?php echo $language;?>',this,'<?php echo $confMode;?>')" 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 $addBlackPwd; //
|
||||
|
||||
?>
|
||||
</b></td>
|
||||
</tr>
|
||||
|
||||
<!-- //<2F><><EFBFBD>Ӻ<EFBFBD><D3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
|
||||
<tr>
|
||||
<td><?php echo $black; ?></td>
|
||||
<td><input type="password" name="password" id="password" maxlength="16" size="16" value="" class="text"></td>
|
||||
<td width="150"rowspan=2><?php echo $strPasswordStrengthPolicy; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $repeatBlackPwd; ?></td>
|
||||
<td> <input type="password" name="re_password" maxlength="16" size="16" class="text">
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan=3 width=600><?php echo $strPleaseReviewTheTableCarefully; ?></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td colspan=3 width=600 align=center><p>
|
||||
<?php
|
||||
echo "<input type=\"submit\" name=\"uadd\" value=\"$strAdd\" class=\"button\"> ";
|
||||
echo "<input type=\"reset\" name=\"reset\" value=\"$strCancel\" class=\"button\"> ";
|
||||
echo "<input type=\"button\" value=\"$strReturn\" class=\"button\" onclick=javascript:location.href=\"./blackPwdList.php\";> ";
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}///end edit
|
||||
?>
|
||||
|
||||
<?php
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
|
||||
|
||||
|
||||
//echo "<br>realName=$realName,userName=$userName,password=$password,privilege=$privilege,updateTime=$updateTime";
|
||||
$uadd=$_POST['uadd'];
|
||||
if($uadd){
|
||||
$password=$_POST['password'];
|
||||
|
||||
|
||||
$select_sql ="SELECT count(*) as number_of_records
|
||||
FROM $table_name
|
||||
WHERE blackPwd='$password' "; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><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";
|
||||
echo "<br>select_sql=$select_sql";
|
||||
|
||||
if($number_of_records){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strTheRecordExits,$strAddFails";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"5; url=./blackPwdList.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)
|
||||
// ";
|
||||
|
||||
|
||||
$str_sql="REPLACE INTO $table_name
|
||||
( blackPwd,write_time)
|
||||
VALUES
|
||||
('$password',CURRENT_TIMESTAMP)
|
||||
";
|
||||
|
||||
|
||||
|
||||
$result=mysqli_query($pubConn,$str_sql);
|
||||
// echo "sql=$str_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
if(!$result){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strAddFails";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"5; url=./blackPwdList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strAddSucceeds";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./blackPwdList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if($delete)
|
||||
if ($confMode == 'del')
|
||||
{
|
||||
//echo "<br>userName=$userName";
|
||||
$sureDel = $_POST['sureDel'];
|
||||
//$userName=$_REQUEST['userName'];
|
||||
if (($sureDel == 'Yes')||($sureDel =='<27><>')){
|
||||
$delSql="DELETE FROM $table_name WHERE blackPwd='$password'";
|
||||
if(0) echo "<br>delSql = $delSql";
|
||||
$del_result = mysqli_query($pubConn,$delSql);
|
||||
//echo "<br>del_result=$del_result";
|
||||
if ($del_result==1){
|
||||
echo "<br><font size=3 color=blue>$strDelete $strSuccessful</font>";
|
||||
|
||||
}
|
||||
echo " <meta http-equiv=\"refresh\" content=\"3; url=./blackPwdList.php\"> ";
|
||||
}
|
||||
elseif (($sureDel == 'No')||($sureDel=='<27><>')){
|
||||
echo "<br><font size=3 color=blue>$strDelCancel</font>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"3; url=./blackPwdList.php\"> ";
|
||||
|
||||
//$confMode='edit';
|
||||
}
|
||||
else{
|
||||
echo "$sureDel";
|
||||
echo "<font size=3 color=black>$strSureDelPwd<font size=3 color=blue>$password </font>?</font>";
|
||||
echo "<form method=\"POST\" name=\"confForm\" action=\"$PHP_SELF?blackPwd=$password\">";
|
||||
echo "<input type=\"submit\" name=\"sureDel\" value=$strYes class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"sureDel\" value=$strNo class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"confMode\" value=\"del\">";
|
||||
echo "<input type=\"hidden\" name=\"password\" value=\"$password\">";
|
||||
echo "</form>";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
adjust_content_tail();
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
178
wxc2_omc/security/userManage/blackPwdList.php
Executable file
178
wxc2_omc/security/userManage/blackPwdList.php
Executable file
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
程序说明:
|
||||
功能说明:黑名单密码展示
|
||||
|
||||
调用关系:调用: header.inc,connectdb_billing.inc
|
||||
被调用:
|
||||
|
||||
变量说明:
|
||||
作者:崔体存 2005-11-14
|
||||
|
||||
修改注释:
|
||||
NO.1
|
||||
姓名:
|
||||
时间:
|
||||
修改说明:
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$confUser=$_REQUEST['confUser'];
|
||||
?>
|
||||
<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
|
||||
|
||||
$DEBUG = 0;
|
||||
$initial_record = $_REQUEST['initial_record'];
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
?>
|
||||
<!--添加按钮 以及跳转-->
|
||||
<td align="center">
|
||||
<nobr>
|
||||
<a href="./blackPwdConf.php?confMode=add">
|
||||
<IMG align=absBottom border=0 src="../../images/add.gif" ><?php echo "$strAdd"; ?>
|
||||
</a>
|
||||
</nobr>
|
||||
</td>
|
||||
<!--添加按钮 以及跳转-->
|
||||
<td align="center">
|
||||
<nobr>
|
||||
<a href="./userList.php">
|
||||
<IMG align=absBottom border=0 src="../../images/clear.gif" ><?php echo "$strBack"; ?>
|
||||
</a>
|
||||
</nobr>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
$userInfo = $_SESSION['userInfo'];
|
||||
if($DEBUG)
|
||||
{
|
||||
echo "userInfo[privilege] = $userInfo[privilege]<br>";
|
||||
echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
}
|
||||
$table_name = 'sysBlackPwd';
|
||||
//$table_name_alluser = 'sysUser';
|
||||
$sort_field = 'write_time';
|
||||
$sort_direction = 'ASC';
|
||||
$number_records_to_display = 210;
|
||||
//查询黑名单有多少条记录 以便分页
|
||||
|
||||
|
||||
|
||||
/*$blackTable='sysBlackPwd';
|
||||
|
||||
$blackSQL="SELECT blackPwd
|
||||
FROM $blackTable
|
||||
";
|
||||
$blackResult = mysqli_query($pubConn,$blackSQL);
|
||||
while($allBlackRow=mysqli_fetch_array($blackResult)){
|
||||
$blackRow[]=$allBlackRow;
|
||||
}
|
||||
|
||||
// print_r($blackRow);
|
||||
echo $blackRow[0]['blackPwd'];
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (!$initial_record)
|
||||
{
|
||||
$initial_record = 0;
|
||||
$str_sql_all ="SELECT count(*) as number_of_records FROM $table_name ";
|
||||
$result = @mysqli_query($pubConn,$str_sql_all);
|
||||
$record = @mysqli_fetch_object($result);
|
||||
$number_of_records = $record->number_of_records;
|
||||
}
|
||||
|
||||
if ($number_of_records >= 1)
|
||||
{
|
||||
//下面是控制分页显示,传递变量
|
||||
$next_index = $initial_record + $number_records_to_display; //本页的结束数目
|
||||
if ($next_index > $number_of_records)
|
||||
{
|
||||
$next_index = $number_of_records;
|
||||
}
|
||||
$t1 = $initial_record + 1;
|
||||
$prev_index = $initial_record - $number_records_to_display;
|
||||
if ($prev_index < 0)
|
||||
{
|
||||
$prev_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//把记录查询出来 且以write_time为排序规则
|
||||
$str_sql="SELECT *
|
||||
FROM $table_name
|
||||
ORDER BY $sort_field $sort_direction
|
||||
LIMIT $initial_record, $number_records_to_display";
|
||||
|
||||
// echo "<br>str_sql=$str_sql";
|
||||
$result = mysqli_query($pubConn,$str_sql);
|
||||
$myrows = @mysqli_fetch_array($result);
|
||||
//倘若没有数据
|
||||
if(!$myrows)
|
||||
{
|
||||
echo "$strNotFindRecord";
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" name=confForm>
|
||||
<!--总计记录-->
|
||||
<table border="0" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<!--统计黑名单密码的数量-->
|
||||
<?php
|
||||
echo "$strDisplayRecords:<FONT color=#0000ff> $initial_record - $next_index</FONT>, ($strTotalRecords:<font color=#0000ff> $number_of_records</font> ) ";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- <table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" height="189" bgcolor="#faf0e6">
|
||||
-->
|
||||
<table class="formCenter">
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td align="center"><?php echo $black; ?></td>
|
||||
|
||||
<td align="center"><?php echo $blackTime; ?></td>
|
||||
<td align="center"> </td> <!--放删除按钮-->
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
//echo "confUser=$confUser<br>";
|
||||
|
||||
do{
|
||||
echo "<tr>";
|
||||
echo "<td align=\"center\">$myrows[blackPwd]</td>"; //密码
|
||||
|
||||
echo "<td align=\"center\">$myrows[write_time]</td>"; //添加黑名单密码的时间
|
||||
echo "<td align=\"center\"><a href=\"./blackPwdConf.php?confMode=del&blackPwd=$myrows[blackPwd]\">$strDelete</td>";
|
||||
|
||||
//echo "$str_sql_alluser<br>";
|
||||
//echo "user prive = $myrows_pri[privilege]";
|
||||
/* if ( ($myrows_pri['privilege']<$userInfo['privilege']) && ($myrows['userName'] != $userInfo['ID']) )
|
||||
{
|
||||
echo "<td align=\"center\"><a href=\"./onlineUserlist.php?confMode=del&userName=$myrows[username]\">$strForceOff</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td> </td>";
|
||||
}*/
|
||||
echo "</tr>";
|
||||
}while($myrows=@mysqli_fetch_array($result));
|
||||
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
188
wxc2_omc/security/userManage/onlineUserlist.php
Executable file
188
wxc2_omc/security/userManage/onlineUserlist.php
Executable file
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>б<EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc,connectdb_billing.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ߣ<EFBFBD><DFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2005-11-14
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$confUser=$_REQUEST['confUser'];
|
||||
?>
|
||||
<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();
|
||||
$DEBUG = 0;
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"100%\" align=\"center\">";
|
||||
echo "<font size=4 color=blue><b>$strOnlineSysUser</b></font>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
$userInfo = $_SESSION['userInfo'];
|
||||
if($DEBUG)
|
||||
{
|
||||
echo "userInfo[privilege] = $userInfo[privilege]<br>";
|
||||
echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
}
|
||||
$table_name = 'sysOnlineUser';
|
||||
$table_name_alluser = 'sysUser';
|
||||
$sort_field = 'userName,login_time';
|
||||
$sort_direction = 'ASC';
|
||||
$number_records_to_display = 210;
|
||||
|
||||
|
||||
|
||||
|
||||
//<2F><>ʱ<EFBFBD>Զ<EFBFBD><D4B6>dz<EFBFBD>
|
||||
if(!isset($userInfo)) $userInfo = $_SESSION['userInfo'];
|
||||
$sessionName=$userInfo['ID'];
|
||||
$outime_table='sysUser';
|
||||
$timeSql="
|
||||
SELECT timeOut
|
||||
FROM $outime_table
|
||||
WHERE userName='$sessionName'
|
||||
";
|
||||
|
||||
if($DEBUG) echo "timesql=$timeSql,userName=$sessionName";
|
||||
$timeResult = mysqli_query($pubConn,$timeSql);
|
||||
$timeRow= mysqli_fetch_array($timeResult);
|
||||
echo mysqli_error($pubConn);
|
||||
$outTime =$timeRow['timeOut'];
|
||||
//echo $outTime;
|
||||
if(!$outTime) {
|
||||
$outTime=600;
|
||||
?> <script type="text/JavaScript">
|
||||
var outtimeNull=<?php echo $outTimeInfo?> //<2F><><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF>г<EFBFBD>ʱʱ<CAB1><CAB1>,Ĭ<><C4AC>Ϊ10<31><30><EFBFBD><EFBFBD>
|
||||
alert(outtimeNull);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
if(isset($_SESSION['expiretime'])) {
|
||||
if($_SESSION['expiretime'] < time()) {
|
||||
unset($_SESSION['expiretime']);
|
||||
echo "<script> var Timeout='$Timeout';alert(Timeout);
|
||||
|
||||
window.top.location = \"../../security/login/login.php\";
|
||||
</script>";
|
||||
|
||||
// echo retJson(401,'<27><>¼<EFBFBD><C2BC><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>¼','');
|
||||
} else {
|
||||
$_SESSION['expiretime'] = time() + $outTime; // ˢ<><CBA2>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
}
|
||||
}else{
|
||||
$_SESSION['expiretime'] = time() + $outTime; // 5Сʱ<D0A1><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
//end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!$initial_record)
|
||||
{
|
||||
$initial_record = 0;
|
||||
$str_sql_all ="SELECT count(*) as number_of_records FROM $table_name ";
|
||||
$result = @mysqli_query($pubConn,$str_sql_all);
|
||||
$record = @mysqli_fetch_object($result);
|
||||
$number_of_records = $record->number_of_records;
|
||||
}
|
||||
|
||||
if ($number_of_records >= 1)
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ʒ<EFBFBD>ҳ<EFBFBD><D2B3>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
||||
$next_index = $initial_record + $number_records_to_display; //<2F><>ҳ<EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>Ŀ
|
||||
if ($next_index > $number_of_records)
|
||||
{
|
||||
$next_index = $number_of_records;
|
||||
}
|
||||
$t1 = $initial_record + 1;
|
||||
$prev_index = $initial_record - $number_records_to_display;
|
||||
if ($prev_index < 0)
|
||||
{
|
||||
$prev_index = 0;
|
||||
}
|
||||
}
|
||||
$due_time=date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s")-20,date("m"),date("d"),date("Y")));
|
||||
$str_sql="SELECT *
|
||||
FROM $table_name WHERE refresh_time > '$due_time'
|
||||
ORDER BY $sort_field $sort_direction
|
||||
LIMIT $initial_record, $number_records_to_display";
|
||||
|
||||
// echo "<br>str_sql=$str_sql";
|
||||
$result = mysqli_query($pubConn,$str_sql);
|
||||
$myrows = @mysqli_fetch_array($result);
|
||||
if(!$myrows)
|
||||
{
|
||||
echo "$strNotFindRecord";
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="POST" name=confForm>
|
||||
<table border="0" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<!--ͳ<><CDB3><EFBFBD><EFBFBD><EFBFBD>߲<EFBFBD><DFB2><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
<?php
|
||||
echo "$strDisplayRecords:<FONT color=#0000ff> $initial_record - $next_index</FONT>, ($strTotalRecords:<font color=#0000ff> $number_of_records</font> ) ";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- <table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" height="189" bgcolor="#faf0e6">
|
||||
-->
|
||||
<table class="formCenter">
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td align="center"><?php echo $strAccountName; ?></td>
|
||||
<td align="center"><?php echo "IP"; ?></td>
|
||||
<td align="center"><?php echo $strLoginTime; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
//echo "confUser=$confUser<br>";
|
||||
|
||||
do{
|
||||
echo "<tr>";
|
||||
echo "<td align=\"center\">$myrows[username]</td>";
|
||||
echo "<td align=\"center\">$myrows[ip]</td>";
|
||||
echo "<td align=\"center\">$myrows[login_time]</td>";
|
||||
$str_sql_alluser="SELECT privilege FROM $table_name_alluser WHERE userName='$myrows[username]'";
|
||||
$result_pri = mysqli_query($pubConn,$str_sql_alluser);
|
||||
$myrows_pri = @mysqli_fetch_array($result_pri);
|
||||
//echo "$str_sql_alluser<br>";
|
||||
//echo "user prive = $myrows_pri[privilege]";
|
||||
/* if ( ($myrows_pri['privilege']<$userInfo['privilege']) && ($myrows['userName'] != $userInfo['ID']) )
|
||||
{
|
||||
echo "<td align=\"center\"><a href=\"./onlineUserlist.php?confMode=del&userName=$myrows[username]\">$strForceOff</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td> </td>";
|
||||
}*/
|
||||
echo "</tr>";
|
||||
}while($myrows=@mysqli_fetch_array($result));
|
||||
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
203
wxc2_omc/security/userManage/pwdOutTimeConf.php
Executable file
203
wxc2_omc/security/userManage/pwdOutTimeConf.php
Executable file
@@ -0,0 +1,203 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֶ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>û<EFBFBD><C3BB>ij<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><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 ='sysUser'; /*<2A><><EFBFBD><EFBFBD>ǿ<EFBFBD>ȱ<EFBFBD>*/
|
||||
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$timeOut=$_REQUEST['timeOut']; //<2F>ַ<EFBFBD>Unicode<64><65><EFBFBD><EFBFBD>
|
||||
if($DEBUG) echo "confMode=$confMode<br>";
|
||||
$userName=$_REQUEST['userName'];
|
||||
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
|
||||
function question_Validator(theForm)
|
||||
{
|
||||
|
||||
|
||||
if(theForm.timeOut.value==''){
|
||||
var AccountEmpty="<?php echo $strTimeCannotBeEmpty; ?>";
|
||||
alert(AccountEmpty);
|
||||
theForm.timeOut.focus();
|
||||
return(false);
|
||||
}else{
|
||||
|
||||
if(theForm.timeOut.value <300 || theForm.timeOut.value>3600){
|
||||
var TimeConfirm="<?php echo $outtimeInfo; ?>";
|
||||
alert(TimeConfirm);
|
||||
theForm.timeOut.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($confMode == 'timeout'){
|
||||
?>
|
||||
<form action="<?php echo"$PHP_SELF?table_name=$table_name&userName=$userName"; ?>" method="POST" onsubmit="return question_Validator(this)" name="operForm" >
|
||||
|
||||
<table class="formCenter">
|
||||
<tr>
|
||||
<td colspan=3 vAlign="top" bgcolor="#E6E6E6" height="12"><b>
|
||||
<?php
|
||||
|
||||
echo $configTimeout1; //<2F><><EFBFBD>ÿ<EFBFBD><C3BF>г<EFBFBD>ʱʱ<CAB1><CAB1>
|
||||
|
||||
?>
|
||||
</b></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><?php echo $strName; ?></td>
|
||||
<td><?php echo $userName; ?></td>
|
||||
<td width="150"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $timeoutNum; ?></td>
|
||||
<td><input type="text" name="timeOut" id="timeOut" maxlength="16" size="16" value="" class="text"></td><!--<2D><><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
<td width="150"><?php echo $outtimeInfo; ?></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>
|
||||
|
||||
|
||||
//echo "<br>realName=$realName,userName=$userName,password=$password,privilege=$privilege,updateTime=$updateTime";
|
||||
$config=$_POST['config'];
|
||||
if($config){
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
|
||||
$select_sql ="SELECT count(*) as number_of_records
|
||||
FROM $table_name
|
||||
WHERE timeOut='$timeOut' and userName='$userName'"; //<2F><><EFBFBD>ò<EFBFBD>û<EFBFBD>иĶ<D0B8>,<2C><><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($DEBUG) echo "<br>select_sql=$select_sql";
|
||||
|
||||
if($number_of_records){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$timeConfigFails"; /*δ<>иĶ<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>Ŀ<DEB8><C4BF>г<EFBFBD>ʱʱ<CAB1><CAB1>
|
||||
$str_sql="UPDATE
|
||||
$table_name
|
||||
set timeout='$timeOut' WHERE userName='$userName'
|
||||
";
|
||||
|
||||
|
||||
|
||||
$result=mysqli_query($pubConn,$str_sql);
|
||||
// echo "sql=$str_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
if(!$result){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigtimeFails"; /*???????ʧ<><CAA7>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"5; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigtimeSucceeds";/*<2A><><EFBFBD>óɹ<C3B3>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjust_content_tail();
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
||||
202
wxc2_omc/security/userManage/timeConf.php
Executable file
202
wxc2_omc/security/userManage/timeConf.php
Executable file
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֶ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>û<EFBFBD><C3BB>ij<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><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 ='sysUser'; /*<2A><><EFBFBD><EFBFBD>ǿ<EFBFBD>ȱ<EFBFBD>*/
|
||||
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$timeOut=$_REQUEST['timeOut']; //<2F>ַ<EFBFBD>Unicode<64><65><EFBFBD><EFBFBD>
|
||||
if($DEBUG) echo "confMode=$confMode<br>";
|
||||
$userName=$_REQUEST['userName'];
|
||||
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
|
||||
function question_Validator(theForm)
|
||||
{
|
||||
|
||||
|
||||
if(theForm.timeOut.value==''){
|
||||
var AccountEmpty="<?php echo $strTimeCannotBeEmpty; ?>";
|
||||
alert(AccountEmpty);
|
||||
theForm.timeOut.focus();
|
||||
return(false);
|
||||
}else{
|
||||
|
||||
if(theForm.timeOut.value <300 || theForm.timeOut.value>3600){
|
||||
var TimeConfirm="<?php echo $outtimeInfo; ?>";
|
||||
alert(TimeConfirm);
|
||||
theForm.timeOut.focus();
|
||||
return (false);
|
||||
}
|
||||
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($confMode == 'timeout'){
|
||||
?>
|
||||
<form action="<?php echo"$PHP_SELF?table_name=$table_name&userName=$userName"; ?>" method="POST" onsubmit="return question_Validator(this)" name="operForm" >
|
||||
|
||||
<table class="formCenter">
|
||||
<tr>
|
||||
<td colspan=3 vAlign="top" bgcolor="#E6E6E6" height="12"><b>
|
||||
<?php
|
||||
|
||||
echo $configTimeout1; //<2F><><EFBFBD>ÿ<EFBFBD><C3BF>г<EFBFBD>ʱʱ<CAB1><CAB1>
|
||||
|
||||
?>
|
||||
</b></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><?php echo $strName; ?></td>
|
||||
<td><?php echo $userName; ?></td>
|
||||
<td width="150"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $timeoutNum; ?></td>
|
||||
<td><input type="text" name="timeOut" id="timeOut" maxlength="16" size="16" value="" class="text"></td><!--<2D><><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
<td width="150"><?php echo $outtimeInfo; ?></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>
|
||||
|
||||
|
||||
//echo "<br>realName=$realName,userName=$userName,password=$password,privilege=$privilege,updateTime=$updateTime";
|
||||
$config=$_POST['config'];
|
||||
if($config){
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
|
||||
$select_sql ="SELECT count(*) as number_of_records
|
||||
FROM $table_name
|
||||
WHERE timeOut='$timeOut' and userName='$userName'"; //<2F><><EFBFBD>ò<EFBFBD>û<EFBFBD>иĶ<D0B8>,<2C><><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($DEBUG) echo "<br>select_sql=$select_sql";
|
||||
|
||||
if($number_of_records){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$timeConfigFails"; /*δ<>иĶ<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>Ŀ<DEB8><C4BF>г<EFBFBD>ʱʱ<CAB1><CAB1>
|
||||
$str_sql="UPDATE
|
||||
$table_name
|
||||
set timeout='$timeOut' WHERE userName='$userName'
|
||||
";
|
||||
|
||||
|
||||
|
||||
$result=mysqli_query($pubConn,$str_sql);
|
||||
// echo "sql=$str_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
if(!$result){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigtimeFails"; /*<2A><>????ʧ<><CAA7>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"5; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strConfigtimeSucceeds";/*<2A><><EFBFBD>óɹ<C3B3>*/
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./userList.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adjust_content_tail();
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
456
wxc2_omc/security/userManage/userConf.php
Executable file
456
wxc2_omc/security/userManage/userConf.php
Executable file
@@ -0,0 +1,456 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ֶ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD>б༭
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ:<3A><><EFBFBD><EFBFBD>:header.inc
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>ֵ:<3A><>
|
||||
<09><><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();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\" align=\"left\">";
|
||||
echo "Advanced > Administrator";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
echo "<br>";
|
||||
|
||||
$DEBUG = 1;
|
||||
$pubDb ='OMC_PUB';
|
||||
$table_name ='sysUser';
|
||||
if (!isset($privilegeFlag)) {
|
||||
$privilegeFlag = 0;
|
||||
}
|
||||
if($DEBUG) echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
// echo "<pre>";
|
||||
// echo print_r($userInfo);
|
||||
// echo "</pre>";
|
||||
$confMode=$_REQUEST['confMode'];
|
||||
$userName=$_REQUEST['userName'];
|
||||
if($DEBUG) echo "confMode=$confMode, userName=$userName<br>";
|
||||
$old_userName=$_REQUEST['old_userName'];?>
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
function question_Validator(theForm)
|
||||
{
|
||||
<?php
|
||||
|
||||
if( $userName != '')
|
||||
{
|
||||
?>
|
||||
if(theForm.new_password_1.value.length> 0 || theForm.new_password_2.value.length> 0){
|
||||
if(theForm.new_password_1.value.length < 6 || theForm.new_password_1.value.length> 16){
|
||||
var NewPasswordMistake="<?php echo $strPasswordDigitHasAMistake; ?>";
|
||||
alert(NewPasswordMistake);
|
||||
theForm.new_password_1.focus();
|
||||
return (false);
|
||||
}
|
||||
if(theForm.new_password_1.value != theForm.new_password_2.value){
|
||||
var NotCoherent="<?php echo $strInputPasswordIsNotCoherent; ?>";
|
||||
alert(NotCoherent);
|
||||
theForm.new_password_1.focus();
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
if(theForm.userName.value==''){
|
||||
var AccountEmpty="<?php echo $strAccountCannotBeEmpty; ?>";
|
||||
alert(AccountEmpty);
|
||||
theForm.userName.focus();
|
||||
return(false);
|
||||
}else if(theForm.password.value==''){
|
||||
var PasswordEmpty="<?php echo $strPasswordCannotBeEmpty; ?>";
|
||||
alert(PasswordEmpty);
|
||||
theForm.userName.focus();
|
||||
return(false);
|
||||
}else if(theForm.realName.value==''){
|
||||
var InputName="<?php echo $strPleaseInputRealName; ?>";
|
||||
alert(InputName);
|
||||
theForm.userName.focus();
|
||||
return(false);
|
||||
}else{
|
||||
if(theForm.re_password.value.length> 0 || theForm.password.value.length> 0){
|
||||
if(theForm.re_password.value.length < 6 || theForm.re_password.value.length> 16){
|
||||
var PasswordLength="<?php echo $strPasswordDigitHasAMistake; ?>";
|
||||
alert(PasswordLength);
|
||||
theForm.password.focus();
|
||||
return (false);
|
||||
}
|
||||
if(theForm.password.value != theForm.re_password.value){
|
||||
var RepeatPassword="<?php echo $strInputPasswordIsNotCoherent; ?>";
|
||||
alert(RepeatPassword);
|
||||
theForm.re_password.focus();
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
return (true);
|
||||
}
|
||||
|
||||
function set_value(check_box,check_input,check_value)
|
||||
{ if(check_box.checked){
|
||||
check_input.value=check_value;
|
||||
}else{
|
||||
check_input.value='';
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$str_sql="SELECT *
|
||||
FROM $table_name
|
||||
WHERE userName = '$userName'
|
||||
";
|
||||
$result = @mysqli_query($pubConn,$str_sql);
|
||||
$myrows = @mysqli_fetch_array($result);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (($confMode == 'add')||($confMode == 'edit')){
|
||||
?>
|
||||
<form action="<?php echo"$PHP_SELF?table_name=$table_name&old_userName=$myrows[userName]"; ?>" method="POST" onsubmit="return question_Validator(this)" name="operForm">
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" height="189">
|
||||
<tr>
|
||||
<td colspan=3 vAlign="top" bgcolor="#E6E6E6" height="12"><b>
|
||||
<?php
|
||||
if($userName != ''){
|
||||
echo $strOperatorList;
|
||||
}else{
|
||||
echo $strAddOperator;
|
||||
}
|
||||
?>
|
||||
</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $strRealName; ?></td>
|
||||
<td><input type="text" name="realName" size="16" value="<?php echo"$myrows[realName]"?>" class="text"></td>
|
||||
<td width="150"> <?php echo $strLessThanSixteencharacters; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
echo "<tr>";
|
||||
echo "<td>$strAccountName</td>";
|
||||
$userName = $myrows[userName];
|
||||
if ( $confMode == 'edit' ) {
|
||||
echo "<td>$myrows[userName]</td>";
|
||||
} else {
|
||||
echo "<td><input type=\"text\" name=\"userName\" size=\"16\" class=\"text\"></td>";
|
||||
}
|
||||
echo "<td width=\"150\">$strMoreThanSixAndLessThanSixteencharacters;</td>";
|
||||
echo "</tr>";
|
||||
|
||||
//<2F><EFBFBD><DEB8>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
if($userName != ''){
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td> <?php echo "$strModifyPassword"; ?>(<?php echo "$strSuggestedLengthEqualSixcharacters"; ?>)</td>
|
||||
<td>
|
||||
<?php echo "$strNewPassword"; ?>:<input type="password" name="new_password_1" size="16" class="text">
|
||||
<td width="150"> <?php echo "$strMoreThanSixAndLessThanSixteencharacters"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<?php echo "$strRepeatInput"; ?><input type="password" name="new_password_2" size="16" class="text">
|
||||
<td width="150"> <?php echo $strMoreThanSixAndLessThanSixteencharacters; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}else{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $strSystemLoginPassword; ?></td>
|
||||
<td><input type="password" name="password" size="16" value="<?php echo"$myrows[password]"?>" class="text"></td>
|
||||
<td width="150"><?php echo $strMoreThanSixAndLessThanSixteencharacters; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $strRepeatInputtingPassword; ?></td>
|
||||
<td> <input type="password" name="re_password" size="16" class="text">
|
||||
<td width="150"> <?php echo $strMoreThanSixAndLessThanSixteencharacters; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ( $myrows[privilege]<$userInfo[privilege] ) {
|
||||
echo "<TR>";
|
||||
echo "<TD>$strOperationAuthority</TD>";
|
||||
echo "<TD>";
|
||||
//echo "$userInfo[privilege],$myrows[privilege]<br>";
|
||||
if('accountManager' == $userInfo[ID]){
|
||||
$limitPrivilege = 4;
|
||||
}else{
|
||||
$limitPrivilege = $userInfo[privilege];
|
||||
}
|
||||
//echo "limitPrivilege = $limitPrivilege";
|
||||
echo "<select name=selected_permit size=1 >";
|
||||
//for($i=0; $i < sizeof($privilegeDefArr); $i++){
|
||||
for($i=0; $i < $limitPrivilege; $i++){
|
||||
if($privilegeDefArr[$i][show] <= 0) continue;
|
||||
echo "<option value =\"$i\" ";
|
||||
if($myrows[privilege] == $privilegeDefArr[$i][permit]){
|
||||
echo " selected";
|
||||
}
|
||||
echo ">{$privilegeDefArr[$i][remark]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</TD>";
|
||||
echo "<TD>$strListedOption</TD>";
|
||||
echo "</TR>";
|
||||
$privilegeFlag = 1;
|
||||
} else {
|
||||
$privilegeFlag = 0;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $strTimeOfLastAccountInfoUpdate; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($userName){
|
||||
echo "$myrows[updateTime]";
|
||||
}else{
|
||||
$updateTime=date("Y-m-d h:i:s",mktime());
|
||||
echo"$updateTime";
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=3 width=600><?php echo $strPleaseReviewTheTableCarefully; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="70%">
|
||||
<tr align="center">
|
||||
<td><p>
|
||||
<?php
|
||||
if($userName == ''){
|
||||
echo "<input type=\"submit\" name=\"uadd\" value=\"$strAdd\" class=\"button\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"change\" value=\"$strSave\" class=\"button\"> ";
|
||||
echo "<input type=\"hidden\" name=\"userName\" value=\"$userName\">";
|
||||
echo "<input type=\"hidden\" name=\"privilegeFlag\" value=\"$privilegeFlag\">";
|
||||
}
|
||||
echo "<input type=\"reset\" name=\"reset\" value=\"$strCancel\" class=\"button\"> ";
|
||||
echo "<input type=\"button\" value=\"$strReturn\" class=\"button\" onclick=javascript:location.href=\"./userList.php?confUser=$userName\";> ";
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}///end edit
|
||||
?>
|
||||
|
||||
<?php
|
||||
$uadd=$_POST['uadd'];
|
||||
$change=$_POST['change'];
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
|
||||
if($uadd){
|
||||
$user_permit = 0;
|
||||
$userName=$_POST['userName'];
|
||||
$realName=$_POST['realName'];
|
||||
$password=$_POST['password'];
|
||||
$selected_permit=$_POST['selected_permit'];
|
||||
for($i=1; $i < sizeof($privilegeDefArr);$i++){
|
||||
if($selected_permit == $i){
|
||||
$user_permit=$privilegeDefArr[$i][permit];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$privilege=$user_permit;
|
||||
$select_sql ="SELECT count(*) as number_of_records
|
||||
FROM $table_name
|
||||
WHERE userName='$userName' ";
|
||||
$result = mysqli_query($pubConn,$select_sql);
|
||||
$record = @mysql_fetch_object($result);
|
||||
$number_of_records = $record->number_of_records;
|
||||
//echo "<br>number_of_records=$number_of_records";
|
||||
//echo "<br>select_sql=$select_sql";
|
||||
//echo "<br>realName=$realName,userName=$userName,password=$password,privilege=$privilege,updateTime=$updateTime";
|
||||
if($number_of_records){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strTheRecordExits,$strAddFails";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
$userName=$old_userNamer;
|
||||
}else{
|
||||
$str_sql="REPLACE INTO $table_name
|
||||
( realName,userName,password,privilege,updateTime)
|
||||
VALUES
|
||||
('$realName','$userName',md5('$password'),'$privilege',CURRENT_TIMESTAMP)
|
||||
";
|
||||
$log_name=$strAddUser."\'$userName\'";
|
||||
$result=mysqli_query($pubConn,$str_sql);
|
||||
if ($result)
|
||||
$log_name=$log_name.$strSuccessful;
|
||||
else
|
||||
$log_name=$log_name.$strFail;
|
||||
insertLog("$log_name");
|
||||
if(!$result){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strAddFails";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
$userName=$old_userNamer;
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strAddSucceeds";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./userList.php\"> ";
|
||||
//echo " <meta http-equiv=\"refresh\" content=\"0; url=../oper_list/oper_list_down.php\"> ";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}elseif($change){ //<2F><EFBFBD><DEB8>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F>ļ<DEB8>¼ʱ<C2BC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>userName
|
||||
$userName=$_POST['userName'];
|
||||
$userName=$_POST['userName'];
|
||||
$realName=$_POST['realName'];
|
||||
$new_password_1=$_POST['new_password_1'];
|
||||
$selected_permit=$_POST['selected_permit'];
|
||||
$privilegeFlag=$_POST['privilegeFlag'];
|
||||
if ( 1 == $privilegeFlag ) {
|
||||
$user_permit = 0;
|
||||
for($i=1; $i < sizeof($privilegeDefArr);$i++){
|
||||
if($selected_permit == $i){
|
||||
$user_permit=$privilegeDefArr[$i][permit];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$privilege=$user_permit;
|
||||
}
|
||||
if($userName != $old_userName){
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strAddFails,$strCannotChangeUserName,$strIfYouWangToChangeItPleaseUseAddFunction";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
$userName=$old_userName;
|
||||
}else{
|
||||
if($new_password_1 != ''){ //<2F><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
|
||||
$password=$new_password_1;
|
||||
if ( 1 == $privilegeFlag ) {
|
||||
$str_sql= "UPDATE $table_name
|
||||
SET realName = '$realName',password = md5('$password'),privilege = '$privilege',updateTime=CURRENT_TIMESTAMP
|
||||
WHERE userName ='$userName'
|
||||
";
|
||||
} else{
|
||||
$str_sql= "UPDATE $table_name
|
||||
SET realName = '$realName',password = md5('$password'),updateTime=CURRENT_TIMESTAMP
|
||||
WHERE userName ='$userName'
|
||||
";
|
||||
}
|
||||
}else{ //<2F><><EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
|
||||
if ( 1 == $privilegeFlag ) {
|
||||
$str_sql= "UPDATE $table_name
|
||||
SET realName = '$realName',privilege = '$privilege',updateTime=CURRENT_TIMESTAMP
|
||||
WHERE userName ='$userName'
|
||||
";
|
||||
} else {
|
||||
$str_sql= "UPDATE $table_name
|
||||
SET realName = '$realName',updateTime=CURRENT_TIMESTAMP
|
||||
WHERE userName ='$userName'
|
||||
";
|
||||
}
|
||||
}
|
||||
//echo "<br>str_sql=$str_sql";
|
||||
$log_name=$strEditUser."\'$userName\'";
|
||||
$result = mysqli_query($pubConn,$str_sql);
|
||||
if ($result)
|
||||
$log_name = $log_name.$strSuccessful;
|
||||
else
|
||||
$log_name = $log_name.$strFail;
|
||||
insertLog("$log_name");
|
||||
|
||||
if(!$result){ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>е<EFBFBD>$result
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strModificationFails";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
$userName=$old_userNamer;
|
||||
}else{
|
||||
echo "<script language=\"javascript\"> ";
|
||||
echo "alert('";
|
||||
echo "$strModificationSucceeds";
|
||||
echo "'); ";
|
||||
echo "</script>";
|
||||
}
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./userList.php\"> ";
|
||||
}
|
||||
}
|
||||
|
||||
//ɾ<><C9BE><EFBFBD>û<EFBFBD>
|
||||
|
||||
//if($delete)
|
||||
if ($confMode == 'del')
|
||||
{
|
||||
$sureDel = $_POST['sureDel'];
|
||||
//echo "<br>userName=$userName";
|
||||
if (($sureDel == 'Yes')||($sureDel=='<27><>')){
|
||||
$delSql="DELETE FROM $table_name WHERE userName='$userName'";
|
||||
if($DEBUG) echo "<br>delSql = $delSql";
|
||||
$del_result = mysqli_query($pubConn,$delSql);
|
||||
//echo "<br>del_result=$del_result";
|
||||
if ($del_result==1){
|
||||
echo "<br><font size=3 color=blue>$strDelete $strSuccessful</font>";
|
||||
$log_name=$strDelUser."\'$userName\'".$strSuccessful;
|
||||
insertLog("$log_name");
|
||||
}
|
||||
echo " <meta http-equiv=\"refresh\" content=\"1; url=./userList.php\"> ";
|
||||
}
|
||||
elseif (($sureDel == 'No')||($sureDel=='<27><>')){
|
||||
echo "<br><font size=3 color=blue>$strDelCancel</font>";
|
||||
echo " <meta http-equiv=\"refresh\" content=\"3; url=./userList.php\"> ";
|
||||
//$confMode='edit';
|
||||
}
|
||||
else{
|
||||
echo "<font size=3 color=black>$strSureDel<font size=3 color=blue>$userName </font>?</font>";
|
||||
echo "<form method=\"POST\" name=\"confForm\" action=\"$PHP_SELF\">";
|
||||
echo "<input type=\"submit\" name=\"sureDel\" value=$strYes class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"sureDel\" value=$strNo class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"confMode\" value=\"del\">";
|
||||
echo "<input type=\"hidden\" name=\"userName\" value=\"$userName\">";
|
||||
echo "</form>";
|
||||
adjust_content_tail();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
adjust_content_tail();
|
||||
|
||||
?>
|
||||
|
||||
</html>
|
||||
193
wxc2_omc/security/userManage/userList.php
Executable file
193
wxc2_omc/security/userManage/userList.php
Executable file
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>б<EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc,connectdb_billing.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ߣ<EFBFBD><DFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2005-11-14
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$confUser=$_REQUEST['confUser'];
|
||||
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
$helpId="2.60";
|
||||
$DEBUG = 0;
|
||||
$initial_record = $_REQUEST['initial_record'];
|
||||
$number_of_records = $_REQUEST['number_of_records'];
|
||||
$privilegeRemark = array(
|
||||
"1" => "Status",
|
||||
"2" => "Status/Performance/Log",
|
||||
"3" => "Status/Performance/Log/Configuration/Account/Maintenance",
|
||||
"4" => "Status/Performance/Log/Configuration/Account/Maintenance/Advanced",
|
||||
"5" => "Status/Performance/Log/Configuration/Account/Maintenance/Advanced/Template"
|
||||
);
|
||||
$userInfo = $_SESSION['userInfo'];
|
||||
|
||||
if($DEBUG)
|
||||
{
|
||||
echo "userInfo[privilege] = $userInfo[privilege]<br>";
|
||||
echo "userInfo[ID] = $userInfo[ID]<br>";
|
||||
}
|
||||
$table_name = 'sysUser';
|
||||
$sort_field = 'privilege,userName,updateTime';
|
||||
$sort_direction = 'ASC';
|
||||
$number_records_to_display = 200;
|
||||
$pubConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], "OMC_PUB");
|
||||
if (!$initial_record)
|
||||
{
|
||||
$initial_record = 0;
|
||||
$str_sql_all ="SELECT count(*) as number_of_records FROM $table_name ";
|
||||
$result = @mysqli_query($pubConn,$str_sql_all);
|
||||
//$record = @mysqli_fetch_object($result);
|
||||
$record = mysqli_fetch_assoc($result);
|
||||
$number_of_records = $record['number_of_records'];
|
||||
}
|
||||
|
||||
if ($number_of_records >= 1)
|
||||
{
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ʒ<EFBFBD>ҳ<EFBFBD><D2B3>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
||||
$next_index = $initial_record + $number_records_to_display; //<2F><>ҳ<EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>Ŀ
|
||||
if ($next_index > $number_of_records)
|
||||
{
|
||||
$next_index = $number_of_records;
|
||||
}
|
||||
$t1 = $initial_record + 1;
|
||||
$prev_index = $initial_record - $number_records_to_display;
|
||||
if ($prev_index < 0)
|
||||
{
|
||||
$prev_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$str_sql="SELECT *
|
||||
FROM $table_name
|
||||
ORDER BY $sort_field $sort_direction
|
||||
LIMIT $initial_record, $number_records_to_display";
|
||||
|
||||
//echo "<br>str_sql=$str_sql";
|
||||
$result = mysqli_query($pubConn,$str_sql);
|
||||
$myrows = mysqli_fetch_array($result);
|
||||
if(!$myrows)
|
||||
{
|
||||
echo "$strNotFindRecord";
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\" align=\"left\">";
|
||||
echo "Advanced > Administrator";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
echo "<br>";
|
||||
?>
|
||||
|
||||
<td align="left" width="10%">
|
||||
<nobr>
|
||||
<a href="./userList.php">
|
||||
<IMG align=absBottom border=0 src="../../images/list.gif" ><?php echo "$strList"; ?>
|
||||
</a>
|
||||
</nobr>
|
||||
|
||||
</td>
|
||||
<td align="left" width="10%">
|
||||
<nobr>
|
||||
<a href="./userConf.php?confMode=add">
|
||||
<IMG align=absBottom border=0 src="../../images/add.gif" ><?php echo "$strAdd"; ?>
|
||||
</a>
|
||||
</nobr>
|
||||
</td>
|
||||
|
||||
<form method="POST" name=confForm action="./userConf.php" >
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<!--ͳ<>Ʋ<EFBFBD><C6B2><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-->
|
||||
<?php
|
||||
echo "$strDisplayRecords:<FONT color=#0000ff> $initial_record - $next_index</FONT>, ($strTotalRecords:<font color=#0000ff> $number_of_records</font> ) ";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td align="center"><?php echo $strAccountName; ?></td>
|
||||
<td align="center"><?php echo $strRealName; ?></td>
|
||||
<td align="center"><?php echo "Privilege"; ?></td>
|
||||
<td align="center"><?php echo "Access menu"; ?></td>
|
||||
<td align="center"> </td>
|
||||
<td align="center"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
do{
|
||||
if($confUser == $myrows[userName])
|
||||
{
|
||||
echo "<tr bgcolor=\"#CCFFCC\"> ";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=\"#FFFFFF\"> ";
|
||||
}
|
||||
//echo "$myrows[userName],$myrows[privilege],$userInfo[ID]<br>";
|
||||
echo "<td align=\"center\">$myrows[userName]</td>";
|
||||
echo "<td align=\"center\">$myrows[realName]</td>";
|
||||
echo "<td align=\"center\">{$privilegeDefArr[$myrows[privilege]][remark]}</td>";
|
||||
echo "<td>{$privilegeRemark[$myrows[privilege]]}</td>";
|
||||
|
||||
//for accountManager
|
||||
if('accountManager' == $userInfo[ID])
|
||||
{
|
||||
$userInfo[privilege] = 4;
|
||||
}
|
||||
|
||||
if ( ($myrows[privilege]<$userInfo[privilege]) || ($myrows[userName] == $userInfo[ID]) )
|
||||
{
|
||||
echo "<td align=\"center\"><a href=\"./userConf.php?confMode=edit&userName=$myrows[userName]\">$strEdit</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td> </td>";
|
||||
}
|
||||
if ( ($myrows[privilege]<$userInfo[privilege]) && ($myrows[userName] != $userInfo[ID]) )
|
||||
{
|
||||
echo "<td align=\"center\"><a href=\"./userConf.php?confMode=del&userName=$myrows[userName]\">$strDelete</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td> </td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}while($myrows=mysqli_fetch_array($result));
|
||||
|
||||
?>
|
||||
|
||||
</table>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user