Changeset 443


Ignore:
Timestamp:
Oct 14, 2012, 10:10:16 PM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazování cesty k skriptu ve kterém došlo k chybě.
  • Opraveno: Změna hesla v nastavení uživatele. Negenerovalo se správné hashované heslo.
  • Odstraněno: Sloupec zobrazující CZFree IP adresu v seznamu registrovaných počítačů uživatelů.
  • Opraveno: Ukldádání Země v fakturační adrese zákazníka.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Error.php

    r438 r443  
    88  }
    99 
    10   function Handle($Number, $Message, $Filename, $LineNumber, $Variables)
     10  function Handle($Number, $Message, $FileName, $LineNumber, $Variables)
    1111  {
    1212  global $Config;
     
    3131  if(($UserErrors & $Number))
    3232  {
    33     $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber."\n";
     33    $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber.' in '.$FileName."\n";
    3434    $Backtrace = debug_backtrace();
    3535    $Backtrace[0]['function'] = '';
  • trunk/Common/Page.php

    r438 r443  
    2525      'dostupnost.php' => 'Dostupnost zařízení',
    2626      'restart.php' => 'Restart služeb',
     27      'user_hosts.php' => 'Registrované počítače',
    2728    ),
    2829    'nabidky_pripojeni.php' => 'Nabídky připojení',
  • trunk/index.php

    r438 r443  
    179179        $UserOptions = new Form('UserOptions', array());
    180180        $UserOptions->LoadValuesFromForm();
     181        if($UserOptions->Values['Password'] == '') unset($UserOptions->Values['Password']);
     182        else {
     183          $PasswordHash = new PasswordHash();
     184          $Salt = $PasswordHash->GetSalt();
     185          $UserOptions->Values['Password'] = $PasswordHash->Hash($UserOptions->Values['Password'], $Salt);
     186          $UserOptions->Values['Salt'] = $Salt;
     187          $this->Database->update('User', 'Id='.$this->System->Modules['User']->User['Id'], array('Salt' => $Salt));
     188        }
    181189        $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']);
    182190        $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.');
     
    240248          $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, '.
    241249            'Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, '.
    242             'Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject '.
     250            'Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject '.
    243251           'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']);       
    244252          $DbRow = $DbResult->fetch_array();
     
    263271        $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Modules['User']->User['Member']);
    264272        $Member = $DbResult->fetch_assoc();
    265         $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'], 'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'], 'DIC' => $UserOptions->Values['DIC']));
     273        $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'],
     274          array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'],
     275          'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressCountry' => $UserOptions->Values['AddressCountry'],
     276          'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'],
     277          'DIC' => $UserOptions->Values['DIC']));
    266278        $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.');
    267279        $this->System->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', $UserOptions->Values['Name']);
    268         $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->User['Member']);
     280        $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->User['Member']);
    269281        $DbRow = $DbResult->fetch_array();
    270282        foreach($UserOptions->Definition['Items'] as $Index => $Item)
  • trunk/network/user_hosts.php

    r438 r443  
    1313   
    1414    $Output = '<div align="center" style="font-size: small;"><table class="WideTable">';
    15     $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>CZFree adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>';
     15    $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>';
    1616    $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = (SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->Modules['User']->User['Id'].') ORDER BY NetworkDevice.Name');
    1717    while($Device = $DbResult->fetch_assoc())
    1818    {
    1919      if($Device['Online'] == 1) $Style = 'color: blue;'; else $Style = '';
    20       $Output .= '<tr><td colspan="5" style="text-align: left; font-weight: bold; '.$Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>';
     20      $Output .= '<tr><td colspan="4" style="text-align: left; font-weight: bold; '.$Style.'">'.$Device['Name'].'</td><td>'.$Device['HostType'].'</td><td style="text-align: right;">'.HumanDate($Device['LastOnline']).'</td></tr>';
    2121      $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']);
    2222      while($Interface = $DbResult2->fetch_assoc())
     
    2525        $InterfaceName = $Device['Name'];
    2626        if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
    27         $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.$InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.NotBlank($Interface['ExternalIP']).'</td><td>'.NotBlank($Interface['CZFreeIP']).'</td><td>'.NotBlank($Interface['MAC']).'</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
     27        $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.
     28          $InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.
     29          NotBlank($Interface['ExternalIP']).'</td><td>'.
     30          NotBlank($Interface['MAC']).'</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
    2831      }     
    2932    }
Note: See TracChangeset for help on using the changeset viewer.