⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.php

📁 辅助radius软件的管理程序web平台下的程序代码自己还没有测试过
💻 PHP
字号:
<?
include "../check.php"
?>
<?
include "../sql.php" 
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新开用户</title>
<script language="JavaScript">
function numericCheck(){
	var x=true;
	var nr1=document.form1.textfield2.value;
	var flg=0;
	var str="";
	var spc=""
	var arw="";
	for (var i=0;i<nr1.length;i++){
		cmp="0123456789"
		tst=nr1.substring(i,i+1)
		if (cmp.indexOf(tst)<0){
			flg++;
			str+=" "+tst;
			spc+=tst;
			arw+="^";
		}
		else{arw+="_";}
	}
	if (flg!=0){
		if (spc.indexOf(" ")>-1) {
			str+="和空格";
		}
			+str;
		form1.textfield2.focus();
		x=false;
	}
	return x;
}
function Juge(theForm)
		{

			if (theForm.textfield.value =="")
			{
			alert("请填上姓名!");
			theForm.textfield.focus();
			return (false);
			}
			
			if (theForm.dlm.value =="")
			{
			alert("请填上登陆名!");
			theForm.dlm.focus();
			return (false);
			}
			if (theForm.dlmm.value =="")
			{
			alert("请填上登陆密码!");
			theForm.dlmm.focus();
			return (false);
			}
			if (theForm.cfmm.value =="")
			{
			alert("请填上校验密码!");
			theForm.cfmm.focus();
			return (false);
			}
			if (theForm.dlmm.value !=theForm.cfmm.value)
			{
			alert("请保证密码一致!");
			theForm.cfmm.focus();
			return (false);
			}
			
			
			if(theForm.textfield2.value!="")
			{s= false;
			if(s==numericCheck())
			{
			alert("请填上正确身份证号码!");
			theForm.textfield2.focus();
			return (false);
			}
			}
			
			
			if (theForm.textfield4.value =="")
			{
			alert("请填上联系方式!");
			theForm.textfield4.focus();
			return (false);
			}
			if (theForm.textfield5.value =="")
			{
			alert("请填取回密码问题!");
			theForm.textfield5.focus();
			return (false);
			}
            if (theForm.textfield6.value =="")
			{
			alert("请填取回密码的问题答案!");
			theForm.textfield6.focus();
			return (false);
			}
			//if (theForm.select2.value =="")
			//{
			//alert("请首先在设备管理里设置NAS信息!");
			//theForm.textfield.focus();
			//return (false);
		//	}
			//if (theForm.textfield11.value =="")
			//{
			//alert("请填上端口号!");
			//theForm.textfield11.focus();
			//return (false);
			//}
			//if ((theForm.textfield11.value >24) | (theForm.textfield11.value <1) )
		//	{
			//alert("请填写正确端口号1-24.");
			//theForm.textfield11.focus();
		//	return (false);
		//	}
		}

</script>
</head>

<body>

<p align="center">请填写新开用户详细信息<font color="#FF0000">(*为必填)</font></p>
<form name="form1" method="post" action="addb.php" onsubmit="javascript:return Juge(this);">
  <table border="1" align="center">
    <tr> 
      <td colspan="2"><font color="#FF0000">用户个人信息</font></td>
    </tr>
    <tr> 
      <td>姓名*</td>
      <td>
<input type="text" name="textfield">
      </td>
    </tr>
    <tr> 
      <td>登陆名*</td>
      <td><input name="dlm" type="text" id="dlm"></td>
    </tr>
    <tr> 
      <td>登陆密码*</td>
      <td><input name="dlmm" type="text" id="dlmm"></td>
    </tr>
    <tr>
      <td>重复密码*</td>
      <td><input name="cfmm" type="password" id="cfmm"></td>
    </tr>
    <tr> 
      <td>身份证</td>
      <td><input type="text" name="textfield2">
      </td>
    </tr>
    <tr> 
      <td>地址</td>
      <td><input type="text" name="textfield3"></td>
    </tr>
    <tr> 
      <td>联系方式*</td>
      <td><input type="text" name="textfield4">
      </td>
    </tr>
    <tr> 
      <td>取回密码问题*</td>
      <td><input type="text" name="textfield5">
      </td>
    </tr>
    <tr> 
      <td>问题答案*</td>
      <td><input type="text" name="textfield6">
      </td>
    </tr>
    <tr> 
      <td colspan="2"><font color="#FF0000">AAA系统信息</font></td>
    </tr>
    <tr> 
      <td>NAS IP*</td>
      <td><?  echo $nasip;
	  ?></td>
    </tr>
    <tr> 
      <td>NAS端口*</td>
      <td><select name="select3">
 <?  $sql="select * from nasport where nas_ip='$nasip'";
   	$relust=mysql_query($sql);
while ($row=mysql_fetch_row($relust))
	{
		for($x=2;$x<26;$x++)
  {
	if ($row[$x]!="checkbox")
	{
	$t=$x-1;
	echo '<option value="'.$t.'">'.$t.'</option>';
	}
	}
		}
?>
        </select> </td>
    </tr>
    <tr> 
      <td colspan="2"><font color="#FF0000">统计信息</font></td>
    </tr>
    <tr> 
      <td>管理地址信息</td>
      <td><input type="text" name="textfield12"></td>
    </tr>
    <tr> 
      <td>业务员姓名</td>
      <td><input type="text" name="textfield13"></td>
    </tr>
    <tr> 
      <td colspan="2"><font color="#FF0000">收费方式</font></td>
    </tr>
    <tr> 
      <td>服务类型*</td>
      <td><select name="select">
          <option value="包月">包月</option>
           </select></td>
    </tr>
    <tr> 
      <td>初装费金额----</td>
      <td> 
        <?
			$sql ="select * from charge_rate";
			$reslust=mysql_query($sql);
			echo mysql_error();
			   while ($row=mysql_fetch_row($reslust))
			            {//echo $row[2]."<br>";
						echo    "<option value=".$row[1].">".$row[1]."</option>";
						} 
			?>
      </td>
    </tr>
    <tr> 
      <td>月服务费单价----</td>
      <td> 
        <?
			$sql ="select * from charge_rate";
			$reslust=mysql_query($sql);
			echo mysql_error();
			   while ($row=mysql_fetch_row($reslust))
			            {//echo $row[2]."<br>";
						echo    "<option value=".$row[2].">".$row[2]."</option>";
						} 
			?>
      </td>
    </tr>
    <tr> 
      <td>预交N月</td>
      <td><input name="textfield14" type="text" value="0" size="5"></td>
    </tr>
  </table>
  <div align="center">
    <input type="submit" name="Submit" value="提交">
    <input type="reset" name="Submit2" value="重置">
  </div>
  <div align="center"></div>
  <input type="hidden" name="select2" value="<?  echo $nasip;?>">
</form>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -