Ignore:
Timestamp:
Apr 5, 2009, 3:54:46 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Možnost registrace podsítí pro klienty.
  • Upraveno: Skripty pro generování nastavení routerů byly upraveny pro podporu tabulky NetworkSubnet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/dhcp_routerboard.php

    r171 r187  
    33include_once('../../global.php');
    44
    5 $UserName = 'admin-ssh';
    6 
    7 $DbResult = $Database->query('SELECT * FROM NetworkSubnet');
     5$DbResult = $Database->query('SELECT * FROM `NetworkSubnet` WHERE `Member` = 0');
    86while($Subnet = $DbResult->fetch_assoc())
    97{
     
    1311  $Commands = array();
    1412  $Commands[] = '/ip dhcp-server lease { remove [find server=dhcp'.$I.']}';
    15   $DbResult2 = $Database->query('SELECT * FROM hosts WHERE (IP LIKE "192.168.'.$I.'.%") AND (MAC != "00:00:00:00:00:00") ORDER BY IP');
     13  $DbResult2 = $Database->query('SELECT * FROM `hosts` WHERE (`IP` LIKE "192.168.'.$I.'.%") AND (`MAC` != "00:00:00:00:00:00") ORDER BY `IP`');
    1614  while($Host = $DbResult2->fetch_assoc())
    1715  {
     
    1917  }
    2018  $Commands = implode(';', $Commands);
    21   $Command = '/usr/bin/ssh -l '.$UserName.' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"';
     19  $Command = '/usr/bin/ssh -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Subnet['DHCP'].' "'.$Commands.'"';
    2220  //echo($Command."\n");
    2321  $Output = '';
Note: See TracChangeset for help on using the changeset viewer.