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

📄 addb.php

📁 辅助radius软件的管理程序web平台下的程序代码自己还没有测试过
💻 PHP
字号:
<?
include "../check.php"
?>
<?
include "../sql.php" 
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
@import url("../nmisall.css");
-->
</style>
</head>

<body>
<?php
$sql ="select * from charge_rate";
$result=mysql_query($sql);
if (!$row=mysql_fetch_row($result))
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("费率未设定,请先设置系统费率!");';
echo "javascript:history.go(-2);";
   echo "</script>";
  }

$sql ="select * from user where name='$textfield'";
$result=mysql_query($sql);
if ($row=mysql_fetch_row($result))
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("用户名已存在,请更换!");';
echo "javascript:history.go(-2);";
   echo "</script>";
  }
  
  $sql ="select * from user where username='$dlm'";
$result=mysql_query($sql);
if ($row=mysql_fetch_row($result))
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("此帐号登陆名已被占用,请更换!");';
echo "javascript:history.go(-2);";
   echo "</script>";
  }
 
 $sql="select init_month from charge_rate ";
 $result=mysql_query($sql);
$row=mysql_fetch_row($result);
  if($textfield14<$row[0])
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("预交月数不能少于系统设定的月数!");';
echo "javascript:history.go(-2);";
   echo "</script>";
  }
  
/*$sql ="select * from user where username='$textfield7'";
$result=mysql_query($sql);
if ($row=mysql_fetch_row($result))
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("用户登陆帐号名已存在,请更换!");';
echo "javascript:history.go(-1);";
   echo "</script>";
  }*/
 
/*$sql =sprintf("select * from nasport where nas_ip='$select2' and port%s='checkbox'",$select3);
$result=mysql_query($sql);
if ($row=mysql_fetch_row($result))
  { 
   echo "<script language='javascript'>"; 
 echo 'alert("所选NAS端口已被占用,请重新选择端口!");';
echo "javascript:history.go(-1);";
 echo "</script>";
  }*/

  ?>
  
  
  
  
 <?
//写用户数据库
  //$sql="insert into user (name,id,address,username,password,service_type,contact,getpassword,sales_name,status,answerques,admin_address) values ('$textfield','$textfield2','$textfield3','$textfield7','$textfield8','$select','$textfield4','$textfield6','$textfield13','ok','$textfield5','$textfield12')";
 // mysql_query($sql);
 // echo "管理员添加成功!";
//写NASPORT数据库
 // $sql="insert into nasport (nas_ip,nas_port) values ('$select2','$select3')";
 // mysql_query($sql);
  
?>
<div align="center">
  <p>以下是你将要提交的用户信息,是否确定?</p>
  <form name="form1" method="post" action="addbb.php">
    <table border="1" align="center">
      <tr> 
        <td colspan="2"><font color="#FF0000">用户个人信息</font></td>
      </tr>
      <tr> 
        <td>姓名*</td>
        <td><?php echo "$textfield";?></td>
      </tr>
      <tr> 
        <td>登陆名</td>
        <td><?php echo "$dlm";?></td>
      </tr>
      <tr> 
        <td>登陆密码</td>
        <td><?php echo "$dlmm";?></td>
      </tr>
      <tr> 
        <td>重复密码</td>
        <td><?php echo "$cfmm";?></td>
      </tr>
      <tr> 
        <td>身份证</td>
        <td><?php echo "$textfield2";?></td>
      </tr>
      <tr> 
        <td>地址</td>
        <td><?php echo "$textfield3";?></td>
      </tr>
      <tr> 
        <td>联系方式*</td>
        <td><?php echo "$textfield4";?></td>
      </tr>
      <tr> 
        <td>取回密码问题*</td>
        <td><?php echo "$textfield5";?></td>
      </tr>
      <tr> 
        <td>问题答案*</td>
        <td><?php echo "$textfield6";?></td>
      </tr>
      <tr> 
        <td colspan="2"><font color="#FF0000">AAA系统信息</font></td>
      </tr>
      <tr> 
        <td>NAS IP*</td>
        <td><?php echo "$select2";?></td>
      </tr>
      <tr> 
        <td>NAS端口*</td>
        <td><?php echo "$select3";?></td>
      </tr>
      <tr> 
        <td colspan="2"><font color="#FF0000">统计信息</font></td>
      </tr>
      <tr> 
        <td>管理地址信息</td>
        <td><?php echo "$textfield12";?></td>
      </tr>
      <tr> 
        <td>业务员姓名</td>
        <td><?php echo "$textfield13";?></td>
      </tr>
      <tr> 
        <td colspan="2"><font color="#FF0000">收费方式</font></td>
      </tr>
      <tr> 
        <td>服务类型*</td>
        <td>包月</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>";
						$czf=$row[1];
						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>";
						$yfwfdj=$row[2];
						echo    "<option value=".$row[2].">".$row[2]."</option>";
						} 
			
			?>
        </td>
      </tr>
      <tr> 
        <td>预交N月</td>
        <td><?php echo "$textfield14";
		$yjny=$textfield14;
		?></td>
      </tr>
      <tr> 
        <td> 合计金额:</td>
        <td> 
          <?php
		$sum = $czf+$yfwfdj*$yjny;
		echo "$sum" ;
		?>
        </td>
      </tr>
    </table>
	<input type="hidden" name="xm" value="<? echo "$textfield";?>">
    <input type="hidden" name="sfz" value="<? echo "$textfield2";?>">
    <input type="hidden" name="dz" value="<? echo "$textfield3";?>">
    <input type="hidden" name="lxfs" value="<? echo "$textfield4";?>">
    <input type="hidden" name="qhmmwt" value="<? echo "$textfield5";?>">
    <input type="hidden" name="mmda" value="<? echo "$textfield6";?>">
    <input type="hidden" name="nasip" value="<? echo "$select2";?>">
    <input type="hidden" name="nasport" value="<? echo "$select3";?>">
    <input type="hidden" name="gldzxx" value="<? echo "$textfield12";?>">
    <input type="hidden" name="ywyxm" value="<? echo "$textfield13";?>">
    <input type="hidden" name="czfb" value="<? echo "$czf";?>">
    <input type="hidden" name="yfwfdjb" value="<? echo "$yfwfdj";?>">
    <input type="hidden" name="yjnyb" value="<? echo "$yjny";?>">
    <input type="hidden" name="sumb" value="<? echo "$sum";?>">
	<input type="hidden" name="dlmb" value="<? echo "$dlm";?>">
    <input type="hidden" name="dlmmb" value="<? echo "$dlmm";?>">
    <?php
	//$xm=$textfield;
	//$sfz=$textfield2;
	//$dz=$textfield3;
	//$lxfs=$textfield4;
	//$qhmmwt=$textfield5;
	//$mmda=$textfield6;
	//$nasip=$select2;
	//$nasport=$select3;
	//$gldzxx=$textfield12;
	//$ywyxm=$textfield13;
	
	//$czf
	//$yfwfdj
	//$yjny
	//$sum
	?>
    <input type="submit" name="Submit" value="确定">
  </form>
  <p>&nbsp;</p>
  <p>&nbsp; </p>
  <p>&nbsp;</p>
</div>
</body>
</html>

⌨️ 快捷键说明

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