Changeset 554


Ignore:
Timestamp:
Jul 8, 2013, 12:44:10 AM (11 years ago)
Author:
chronos
Message:
  • Opraveno: Negenerovat síťové fronty u služeb bez přiřazené rychlosti.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Version.php

    r553 r554  
    11<?php
    22
    3 $Revision = 553; // Subversion revision
     3$Revision = 554; // Subversion revision
    44$DatabaseRevision = 551; // SQL structure revision
    55$ReleaseTime = '2013-07-07';
  • trunk/Modules/Finance/UserState.php

    r552 r554  
    9090      if($Row['BillCode'] == '') $Row['BillCode'] = 'PDF';
    9191      if($Row['File'] > 0) $Invoice = '<a href="'.$this->System->Link('/file?id='.$Row['File']).'">'.$Row['BillCode'].'</a>';
    92         else $Invoice = '&nbsp;';
     92        else $Invoice = NotBlank($Row['BillCode']);
    9393      if($Row['PeriodFrom'] != '') $Period = HumanDate($Row['PeriodFrom']).' - '.HumanDate($Row['PeriodTo']);
    9494        else $Period = '&nbsp;';
  • trunk/Modules/Network/Network.php

    r548 r554  
    22
    33include_once(dirname(__FILE__).'/HostList.php');
    4 include_once(dirname(__FILE__).'/Administration.php');
    54include_once(dirname(__FILE__).'/Availability.php');
    65include_once(dirname(__FILE__).'/Subnet.php');
  • trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php

    r548 r554  
    5858while($Member = $DbResult->fetch_assoc())
    5959{
    60   $Member['Name'] = RouterOSIdent($Member['Name'].'-'.$Member['Id'] );
    61 
    6260  $ServiceIndex = 1;
    6361  echo('Zákazník '.$Member['Name']."\n");
    64   $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '.
    65     'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL)');
     62  $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` '.
     63    'JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '.
     64    'WHERE (`ServiceCustomerRel`.`Customer` = '.$Member['Id'].') AND (`ServiceCustomerRel`.`Action` IS NULL) '.
     65    'AND (`Service`.`InternetSpeedMax` > 0) AND (`Service`.`InternetSpeedMin` > 0)');
    6666  while($Service = $DbResult4->fetch_assoc())
    6767  {
    6868    echo('Služba '.$Service['Name'].': ');
     69    $MemberName = RouterOSIdent($Member['Name'].'-'.$Member['Id'].'-'.$ServiceIndex);
    6970    $SpeedIn = round($Service['InternetSpeedMin'] / $InDivider) * 1000;
    7071    $SpeedOut = round($Service['InternetSpeedMin'] / $OutDivider) * 1000;
     
    7374    if($ServiceIndex == 1)
    7475    {
    75       $ItemsQueue[] = array('name' => $Member['Name'].'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out');
    76       $ItemsQueue[] = array('name' => $Member['Name'].'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in');
     76      $ItemsQueue[] = array('name' => $MemberName.'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out');
     77      $ItemsQueue[] = array('name' => $MemberName.'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in');
    7778    }
    7879
     
    104105        $Subnet = $IPParts[2];
    105106        $PacketMark = GetMarkByComment($Name.'-out');
    106         $ItemsQueue[] = array('name' => $Name.'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $Member['Name'].'-out', 'packet-mark' => $PacketMark);
     107        $ItemsQueue[] = array('name' => $Name.'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $MemberName.'-out', 'packet-mark' => $PacketMark);
    107108        $PacketMark = GetMarkByComment($Name.'-in');
    108         $ItemsQueue[] = array('name' => $Name.'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $Member['Name'].'-in', 'packet-mark' => $PacketMark);
     109        $ItemsQueue[] = array('name' => $Name.'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $MemberName.'-in', 'packet-mark' => $PacketMark);
    109110      }
    110111    }
     
    118119      $SubnetNumber = $IPParts[2];
    119120      $PacketMark = GetMarkByComment($Subnet['Name'].'-out');
    120       $ItemsQueue[] = array('name' => $Subnet['Name'].'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $Member['Name'].'-out', 'packet-mark' => $PacketMark);
     121      $ItemsQueue[] = array('name' => $Subnet['Name'].'-out', 'limit-at' => $HostSpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => $MemberName.'-out', 'packet-mark' => $PacketMark);
    121122      $PacketMark = GetMarkByComment($Subnet['Name'].'-in');
    122       $ItemsQueue[] = array('name' => $Subnet['Name'].'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $Member['Name'].'-in', 'packet-mark' => $PacketMark);
     123      $ItemsQueue[] = array('name' => $Subnet['Name'].'-in', 'limit-at' => $HostSpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => $MemberName.'-in', 'packet-mark' => $PacketMark);
    123124    }
    124125    echo("\n");
Note: See TracChangeset for help on using the changeset viewer.