1. ssh.php - wyświetla w tabeli zawartość pliki rc.ssh
<?php include("config.php"); { ?><html> <link href="mm_linconpan.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 24px; color: #9900FF; font-style: italic; } --> </style> <center> <div align="center"><span class="style1">Uprawnienia dla SSH</span><br> <br> <center> </div> <table border=1 bordercolor=black align=center> <tr><td><b>Lp.</b></td><td><b>IP</b></td><td><b>Port</b></td><td><b>Interfejs</b></td><td align=center><b>*</b></td><td align=center><b>*</b></tr> <?php require('config.php'); $licz=1; for ($kolejka=700; $kolejka<$ile+1; $kolejka++){ if ($licz % 2==0) $kolor='#FFC980'; else $kolor=white; if ($dane){ $ip3=$ip2[0]; $port=$ip2[1]; $interface=$interface1[0]; echo '<tr bgcolor='.$kolor.'><td align=center>'.$licz.'</td><td>'.$ip3.'</td><td align=center>'.$port.'</td><td align=center>'.$interface.'</td><td align=center><a href=index2.php?strona=ssh_z&ip='.$ip3.'&port='.$port.'&interface='.$interface.'>zmień</a></td><td align=center><a href=index2.php?strona=ssh_u&uip='.$ip3.'>usuń</a></td></tr>'; $licz=$licz+1; }}} ?> </table> <br> <table border=0 align=center> <td><form method=post action=index2.php?strona=ssh_d> <tr><td><center><input type="submit" class="subHeader" value="Dodaj"></center></td></tr> </form></td></table>
2. ssh_d.php - wyświetla kilka pól aby można było zrobić nowy wpis
<?php $ip=$_POST['dip']; include("config.php"); include("config_tmp.php"); { if (!$a) { ?> <form method=post action=index2.php?strona=ssh_d_z> <html> <center><span style="font-size: 24px; font-weight: bold; color: #9900FF; font-style: italic; font-family: Verdana, Arial, Helvetica, sans-serif"> Dodawanie użytkownika dla SSH<br> <table border=0 align=center> <tr> <td>Adres IP:</td> </tr> <tr> <td>Port:</td> <td><input type=text size=4 name=porth></td> </tr> <tr> <td>Interfejs:</td> <td><input type=text size=4 name=interfaceh> [ lan (LAN),net (internet) ]</td> </tr> </table> </html> <table border=0 align=center> <tr><td> <input type=submit class=subHeader value=Zapisz></td></tr></table> <?php } } else { } ?>
3. ssh_d_z.php - zapisuje dane do pliku
<?php $iph=$_POST['iph']; $porth=$_POST['porth']; $interfaceh=$_POST['interfaceh']; include("config.php"); include("config_tmp.php"); { if (!$a) { $klasa=$klasa+1; $ip1="$iph-$porth-$interfaceh # 1:$klasan"; echo "<big>Dla użytkownikownika o ip: <b>$iph</b> zostały nadane nowe regóły czasowaj blokady programów P2P</big>"; } } else { } ?>
4. ssh_u.php - usówa konkretny wpis z pliku
<?php $ip=$_GET['uip']; include("config.php"); include("config_tmp.php"); { } ?>
5. ssh_z.php - wyświetla dane pobrane z pliku w celu ich edycji
<?php $ip=$_GET['ip']; $port=$_GET['port']; $interface=$_GET['interface']; include("config.php"); include("config_tmp.php"); { if (!$a) { ?> <form method=post action=index2.php?strona=ssh_z_z> <html> <center><span style="font-size: 24px; font-weight: bold; color: #9900FF; font-style: italic; font-family: Verdana, Arial, Helvetica, sans-serif"> Dodawanie użytkownika dla SSH<br> <table border=0 align=center> <tr> <td>Adres IP:</td> </tr> <tr> <td>Port:</td> </tr> <tr> <td>Interfejs:</td> <td><input type=text size=4 name=interfaceh value=<?php echo $interface; ?>> [ lan (LAN),net (internet) ]</td> </tr> </table> </html> <table border=0 align=center> <tr><td> <input type=submit class=subHeader value=Zapisz></td></tr></table> <?php } } else { } ?>
6. ssh_z_z.php - zapisuje zmienione dane
<? $iph=$_POST['iph']; $porth=$_POST['porth']; $interfaceh=$_POST['interfaceh']; include("config.php"); include("config_tmp.php"); { $name2=$name1[2]; if ($a) { } } else { } ?>