init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View 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><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>