Prechádzať zdrojové kódy

bufix: fix mikrotik telnet

rajven 5 rokov pred
rodič
commit
774de903e6

+ 1 - 1
html/admin/logs/ip.php

@@ -56,7 +56,7 @@ print_navigation($page_url,$page,$displayed,$count_records[0],$total);
 
 
 <?php
 <?php
 
 
-$sSQL = "SELECT * FROM User_auth WHERE `timestamp`>='$date1' AND `timestamp`<'$date2' $ip_where ORDER BY timestamp DESC LIMIT $start,$displayed";
+$sSQL = "SELECT * FROM User_auth WHERE `timestamp`>='$date1' AND `timestamp`<'$date2' $ip_where ORDER BY id DESC LIMIT $start,$displayed";
 
 
 $iplog = get_records_sql($db_link, $sSQL);
 $iplog = get_records_sql($db_link, $sSQL);
 foreach ($iplog as $row) {
 foreach ($iplog as $row) {

+ 1 - 1
html/admin/logs/mac.php

@@ -27,7 +27,7 @@ Mac:&nbsp<input type="text" name="mac" value="<?php echo mac_dotted($f_mac); ?>"
 </form>
 </form>
 
 
 <?php
 <?php
-$countSQL="SELECT Count(*) FROM mac_history WHERE `timestamp`>='$date1' AND `timestamp`<'$date2' $mac_where";
+$countSQL="SELECT Count(*) FROM mac_history WHERE `timestamp`>='$date1' AND `timestamp`<'$date2' ORDER BY id DESC $mac_where";
 $res = mysqli_query($db_link, $countSQL);
 $res = mysqli_query($db_link, $countSQL);
 $count_records = mysqli_fetch_array($res);
 $count_records = mysqli_fetch_array($res);
 
 

+ 1 - 1
scripts/Rstat/cmd.pm

@@ -319,7 +319,7 @@ if ($switch_auth{$device->{vendor_id}}{proto} eq 'telnet') {
             }
             }
         if ($device->{vendor_id} eq '5') { log_cmd($t,"terminal page-break disable"); }
         if ($device->{vendor_id} eq '5') { log_cmd($t,"terminal page-break disable"); }
         if ($device->{vendor_id} eq '6') { log_cmd($t,"terminal length 0"); }
         if ($device->{vendor_id} eq '6') { log_cmd($t,"terminal length 0"); }
-        if ($device->{vendor_id} eq '9') { log_cmd($t,"/system note set show-at-login=no"); }
+        if ($device->{vendor_id} eq '9') { log_cmd4($t,"/system note set show-at-login=no"); }
         if ($device->{vendor_id} eq '16') { log_cmd($t,"terminal width 0"); }
         if ($device->{vendor_id} eq '16') { log_cmd($t,"terminal width 0"); }
         if ($device->{vendor_id} eq '17') {
         if ($device->{vendor_id} eq '17') {
             log_cmd($t,"more displine 50");
             log_cmd($t,"more displine 50");

+ 2 - 0
scripts/sync_mikrotik.pl

@@ -82,6 +82,8 @@ $gate = netdev_set_auth($gate);
 
 
 my $t = netdev_login($gate);
 my $t = netdev_login($gate);
 
 
+log_cmd4($t,"/system note set show-at-login=no");
+
 foreach my $int (@lan_int) { #interface dhcp loop
 foreach my $int (@lan_int) { #interface dhcp loop
 next if (!$int);
 next if (!$int);
 $int=trim($int);
 $int=trim($int);