Changeset 443
- Timestamp:
- Oct 14, 2012, 10:10:16 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Error.php
r438 r443 8 8 } 9 9 10 function Handle($Number, $Message, $File name, $LineNumber, $Variables)10 function Handle($Number, $Message, $FileName, $LineNumber, $Variables) 11 11 { 12 12 global $Config; … … 31 31 if(($UserErrors & $Number)) 32 32 { 33 $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber. "\n";33 $Error = '# '.$Date.' : '.$Message.' on line '.$LineNumber.' in '.$FileName."\n"; 34 34 $Backtrace = debug_backtrace(); 35 35 $Backtrace[0]['function'] = ''; -
trunk/Common/Page.php
r438 r443 25 25 'dostupnost.php' => 'Dostupnost zařízení', 26 26 'restart.php' => 'Restart služeb', 27 'user_hosts.php' => 'Registrované počítače', 27 28 ), 28 29 'nabidky_pripojeni.php' => 'Nabídky připojení', -
trunk/index.php
r438 r443 179 179 $UserOptions = new Form('UserOptions', array()); 180 180 $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 } 181 189 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']); 182 190 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); … … 240 248 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, '. 241 249 '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 '. 243 251 'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']); 244 252 $DbRow = $DbResult->fetch_array(); … … 263 271 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Modules['User']->User['Member']); 264 272 $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'])); 266 278 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 267 279 $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']); 269 281 $DbRow = $DbResult->fetch_array(); 270 282 foreach($UserOptions->Definition['Items'] as $Index => $Item) -
trunk/network/user_hosts.php
r438 r443 13 13 14 14 $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>'; 16 16 $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'); 17 17 while($Device = $DbResult->fetch_assoc()) 18 18 { 19 19 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>'; 21 21 $DbResult2 = $this->Database->query('SELECT * FROM NetworkInterface WHERE Device = '.$Device['Id']); 22 22 while($Interface = $DbResult2->fetch_assoc()) … … 25 25 $InterfaceName = $Device['Name']; 26 26 if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name']; 27 $Output .= '<tr><td style="text-align: left; '.$Style.'"> '.$InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.NotBlank($Interface['ExternalIP']).'</td><td>'.NotBlank($Interface['CZFreeIP']).'</td><td>'.NotBlank($Interface['MAC']).'</td><td> </td><td> </td></tr>'; 27 $Output .= '<tr><td style="text-align: left; '.$Style.'"> '. 28 $InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'. 29 NotBlank($Interface['ExternalIP']).'</td><td>'. 30 NotBlank($Interface['MAC']).'</td><td> </td><td> </td></tr>'; 28 31 } 29 32 }
Note:
See TracChangeset
for help on using the changeset viewer.