HEX
Server: Apache/2.4.37 (CentOS Stream) OpenSSL/1.1.1k
System: Linux ysnet.com.tw 4.18.0-553.5.1.el8.x86_64 #1 SMP Tue May 21 05:46:01 UTC 2024 x86_64
User: test (521)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /var/www/net/fmtoser.php
<?php
	include "routeros_api.php";
	include "name.php";
	include "mysqllink.php" ;//資料庫引入檔
	if($_SERVER['REQUEST_METHOD']==='GET'){
    	$rosid = $_GET['rosid'];
    }
	//storeSensitiveInformation($nombro, $password);
	//$rosid ="001";
	$fblink = "select * from $tbname " ;
	$freslut = $dblink->query($fblink ) ;
	if ($freslut) {
		$md=0;
		while ($nb = mysqli_fetch_array ($freslut)){
			$ros[$md]["name"]=$nb["name"];
			$ros[$md]["address"]=$nb["address"];
			$md++;
		}
	}
?>
<html>
	<title>PPPOE</title>
	<style type="text/css">
		.body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin: 50px;
        }
		input{
			border:0;
			background-color:#003C9D;
			color:#fff;
			border-radius:10px;
			cursor:pointer;
		}
		input:hover{
			color:#003C9D;
			background-color:#fff;
			border:2px #003C9D solid;
		}
	</style>
	<body>
		<?php
			if($rosid=="011"){
				for($i=0;$i<$md;$i++){
					if($ros[$i]["name"]=="011a"){
						$vpna=$ros[$i]["address"];
					}else if($ros[$i]["name"]=="011b"){
						$vpnb=$ros[$i]["address"];
					}else if($ros[$i]["name"]=="011cd"){
						$vpncd=$ros[$i]["address"];
					}
				}
		?>
        	<h3>請選擇棟別</h3>
				<td width="303">
					<a href="http://<?php echo $vpna;?>.sn.mynetname.net:5678" target="_blank">銘傳寶利發A棟</a><br>
					<a href="http://<?php echo $vpnb;?>.sn.mynetname.net:5678" target="_blank"> 銘傳寶利發B棟</a><br>
					<a href="http://<?php echo $vpncd;?>.sn.mynetname.net:5678" target="_blank"> 銘傳寶利發CD棟</a><br>
				</td>
			<?php 
				}else if($rosid=="204"){
					for($i=0;$i<$md;$i++){
						if($ros[$i]["name"]=="204"){
							$vpn=$ros[$i]["address"];
						}
					}
					header("Location:http://$vpn:5678"); 
            		exit;
				}else {
					for($i=0;$i<$md;$i++){
						if($ros[$i]["name"]==$rosid){
							$vpn=$ros[$i]["address"];
						}
					}
					header("Location:http://$vpn.sn.mynetname.net:5678");
            		exit;
				}
			?>
	</body>
</html>