You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

85 lines
2.8 KiB

<!-- $Id: ads_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{include file="pageheader.htm"}
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="main-div">
<form action="mc_user.php" method="post" enctype="multipart/form-data" name="theForm" onsubmit="return validate()">
<table width="100%" id="general-table">
<tbody id="1" >
<tr>
<td class="label">
<a href="javascript:showNotice('AdCodeFlash');" title="{$lang.form_notice}">
<img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>批量导入用户:</td>
<td>
<input name="upfile" type="file" id="upfile" size='35' onChange="ChkUpImg(this.value)" />
<br/><span style="color:#F00;">*上传.txt后缀文件,例如范例里面的user_list.txt文件,一组数据以竖线符号分隔(|),多组数据在文本中回车即可</span>
<br/><a href="../mc_upfile/user_list.zip" target="_blank">1、下载范例</a>&nbsp;&nbsp;<a href="../mc_upfile/user_list.html" target="_blank">2、在线查看范例</a>
</td>
</tr>
<tr>
<td class="label">用户密码:</td>
<td>
<input type="password" name="password" value="" size="20" /></td>
</tr>
<tr>
<td class="label">确定密码:</td>
<td>
<input type="password" name="confirm_password" value="" size="20" />
</td>
</tr>
</tbody>
<tr>
<td class="label">&nbsp;</td>
<td>
<input type="submit" value="批量添加用户" class="button" />
<input type="reset" value="{$lang.button_reset}" class="button" />
<input type="hidden" name="act" value="mc_add" /></td>
</tr>
</table>
</form>
</div>
<script type="text/ecmascript" language="javascript">
/**
* 检查表单输入的数据
*/
function validate()
{
df = document.theForm;
password = df.password.value;
password2 = df.confirm_password.value;
if(password.length < 6){
alert('用户密码长度必须大于等于 6位;');
df.password.focus();
return false;
}
if(password != password2){
alert('再次输入密码不一致!');
df.confirm_password.focus();
return false;
}
return true;
}
//上传格式;
function ChkUpImg(str){
photo_type="txt,jpg";
len=str.lastIndexOf(".")+1;
type=str.substr(len);
type=type.toLowerCase();
chk=photo_type.indexOf(type);
if(chk!=-1 && type!=""){
document.images['upfile'].src="file:///"+str;
}else{
alert("上传的文件类型只支持 ."+photo_type+" 格式");
//document.images['previewimg'].src="image/nophoto.gif";
}
}
</script>
{include file="pagefooter.htm"}