📄 index.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>供应商备份/导入</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function checkForm(FLAG)
{
msg='确认要继续么?';
if(FLAG==1)
{
if(document.form1.CSV_FILE.value=="")
{ alert("请选择要导入的文件!");
return (false);
}
}
else
{
if(document.form2.CSV_FILE.value=="")
{ alert("请选择要导入的文件!");
return (false);
}
}
if(window.confirm(msg))
{
if(FLAG==1)
{
if (document.form1.CSV_FILE.value!="")
{
var file_temp=document.form1.CSV_FILE.value,file_name;
var Pos;
Pos=file_temp.lastIndexOf("\\");
file_name=file_temp.substring(Pos+1,file_temp.length);
document.form1.FILE_NAME.value=file_name;
}
form1.submit();
}
else
{
if (document.form2.CSV_FILE.value!="")
{
var file_temp=document.form2.CSV_FILE.value,file_name;
var Pos;
Pos=file_temp.lastIndexOf("\\");
file_name=file_temp.substring(Pos+1,file_temp.length);
document.form2.FILE_NAME.value=file_name;
}
form2.submit();
}
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/sys_config.gif" align="absmiddle"><span class="big3"> 供应商导入</span><br>
</td>
</tr>
</table>
<div align="center" class="Big1">
<b>请指定用于供应商导入的CSV文件:</b>
<form name="form1" method="post" action="import.php?FLAG=1" enctype="multipart/form-data">
<input type="file" name="CSV_FILE" class="BigInput" size="30">
<input type="hidden" name="FILE_NAME">
<input type="button" value="导入" class="BigButton" onclick="return checkForm(1);">
</form>
</div>
<div align="center" class="Big1">
<input value="返回" type="button" class="BigButton" title="返回" name="button" onclick="location='../index.php'">
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -