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

📄 editbbb.php

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

<body>
<?php
if($dlm!=$olddlm)
{	$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(-1);";
  	 echo "</script>";
	 }
}
if(($oldnasip!=$select3)or($oldnasport!=$select2))
   { $sql =sprintf("select * from nasport where nas_ip='$select3' and port%s='checkbox'",$select2);
     $result=mysql_query($sql);
    if ($row=mysql_fetch_row($result))
       { 
        echo "<script language='javascript'>"; 
        echo 'alert("所选NAS端口已被其他用户占用,请重新选择端口!");';
        echo "javascript:history.go(-1);";
 		echo "</script>";
 	   }
	else
   		{
   		 $sql=sprintf("update nasport set port%s='' where nas_ip='$oldnasip'",$oldnasport);
		 mysql_query($sql);
		$sql=sprintf("update nasport set port%s ='checkbox' where nas_ip='$select3'",$select2);
 		 mysql_query($sql);
		 }
}
$sql="update user set name='$textfield',nas_ip='$select3',nas_port='$select2',admin_address='$textfield7',
username='$dlm',password='$dlmm' where user_serialno='$userid'";
//var_dump($sql);
mysql_query($sql) or die ("failed.");
//mysql_error($link);

 echo '<div align="center">修改成功</div>';
echo '<div align="center"><a href="edit.php" class="nmisall">[返回]</a> </div>';
//更新radius库 
include ("../rsql.php"); 

$sql="update radcheck set username='$dlm',value='$dlmm'  where username='$olddlm'";
mysql_query($sql);
$sql="update usergroup set username='$dlm' where username='$olddlm'";
mysql_query($sql);

  ?>
</body>
</html>

⌨️ 快捷键说明

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