Changeset 661
- Timestamp:
- May 31, 2014, 1:07:01 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/FormClasses.php
r657 r661 80 80 'Table' => 'FinanceYear', 81 81 'DefaultSortColumn' => 'Year', 82 'DefaultSortOrder' => 1, 82 83 'Items' => array( 83 84 'Year' => array('Type' => 'Integer', 'Caption' => 'Rok', 'Default' => ''), … … 95 96 'DefaultSortColumn' => 'Id', 96 97 'Items' => array( 97 'Id' => array('Type' => 'TFinanceYear', 'Caption' => 'Rok', 'Default' => '', 98 'Id' => array('Type' => 'TFinanceYear', 'Caption' => 'Rok', 'Default' => '', 98 99 'ReadOnly' => true), 99 100 'Income' => array('Type' => 'Integer', 'Caption' => 'Příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, -
trunk/Application/Version.php
r660 r661 1 1 <?php 2 2 3 $Revision = 66 0; // Subversion revision4 $DatabaseRevision = 6 57; // SQL structure revision5 $ReleaseTime = strtotime('2014-05- 29');3 $Revision = 661; // Subversion revision 4 $DatabaseRevision = 661; // SQL structure revision 5 $ReleaseTime = strtotime('2014-05-31'); -
trunk/Common/Setup/Updates.php
r657 r661 727 727 } 728 728 729 function UpdateTo661($Manager) 730 { 731 $Manager->Execute('CREATE TABLE IF NOT EXISTS `Contact` ( 732 `Id` int(11) NOT NULL AUTO_INCREMENT, 733 `Category` int(11) NOT NULL, 734 `Value` varchar(255) NOT NULL, 735 `Subject` int(11) DEFAULT NULL, 736 `User` int(11) DEFAULT NULL, 737 PRIMARY KEY (`Id`), 738 KEY `Category` (`Category`), 739 KEY `User` (`User`), 740 KEY `Subject` (`Subject`) 741 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 742 743 $Manager->Execute('CREATE TABLE IF NOT EXISTS `ContactCategory` ( 744 `Id` int(11) NOT NULL AUTO_INCREMENT, 745 `Name` varchar(255) NOT NULL, 746 PRIMARY KEY (`Id`) 747 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 748 749 $Manager->Execute('ALTER TABLE `Contact` 750 ADD CONSTRAINT `Contact_ibfk_3` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), 751 ADD CONSTRAINT `Contact_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `ContactCategory` (`Id`), 752 ADD CONSTRAINT `Contact_ibfk_2` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);'); 753 754 $Manager->Execute("INSERT INTO `Action` ( 755 `Id` ,`Name` ,`Title` ,`Type` ,`URL` ,`Group` ,`Icon` ,`PermissionOperation` , 756 `Enable`) VALUES (NULL , '', 'Kontakty', '1', '/is/?t=Contact&a=list', NULL , NULL , NULL , '1' 757 );"); 758 $ActionId = $Manager->Database->insert_id; 759 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 760 "VALUES (NULL , 'Kontakty', '12', '".$ActionId."', '1');"); 761 $ConatctMenuId = $Manager->Database->insert_id; 762 763 $Manager->Execute("INSERT INTO `Action` ( 764 `Id` ,`Name` ,`Title` ,`Type` ,`URL` ,`Group` ,`Icon` ,`PermissionOperation` , 765 `Enable`) VALUES (NULL , '', 'Druhy kontakty', '1', '/is/?t=ContactCategory&a=list', NULL , NULL , NULL , '1' 766 );"); 767 $ActionId = $Manager->Database->insert_id; 768 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 769 "VALUES (NULL , 'Druhy kontaktů', ".$ConatctMenuId.", '".$ActionId."', '1');"); 770 771 $Manager->Execute("INSERT INTO `ContactCategory` (`Id` ,`Name`) 772 VALUES (NULL , 'Telefón'), (NULL , 'ICQ'), (NULL , 'Jabber'), (NULL , 'Email'), (NULL , 'Skype');"); 773 } 774 729 775 class Updates 730 776 { … … 767 813 646 => array('Revision' => 647, 'Function' => 'UpdateTo647'), 768 814 647 => array('Revision' => 657, 'Function' => 'UpdateTo657'), 815 657 => array('Revision' => 661, 'Function' => 'UpdateTo661'), 769 816 )); 770 817 } -
trunk/Modules/IS/IS.php
r660 r661 507 507 '<a href="?a=delete&t='.$Table.'&i=#RowId"><img alt="Smazat" title="Smazat" src="'. 508 508 $this->System->Link('/images/delete.png').'" onclick="return confirmAction(\'Opravdu smazat položku?\');"/></a>'; 509 if(($Table != '') and (array_key_exists($Table, $this->System->FormManager->Classes))) $FormClass = $this->System->FormManager->Classes[$Table]; 509 if(($Table != '') and (array_key_exists($Table, $this->System->FormManager->Classes))) 510 $FormClass = $this->System->FormManager->Classes[$Table]; 510 511 else return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena')); 511 512 if(array_key_exists('ItemActions', $FormClass)) -
trunk/Modules/Log/Log.php
r608 r661 13 13 $this->Dependencies = array('User'); 14 14 } 15 15 16 16 function DoInstall() 17 17 { … … 20 20 function DoUnInstall() 21 21 { 22 } 23 22 } 23 24 24 function DoStart() 25 25 { … … 28 28 'Table' => 'Log', 29 29 'DefaultSortColumn' => 'Time', 30 'DefaultSortOrder' => 1, 30 31 'Items' => array( 31 32 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => '', 'ReadOnly' => true), … … 37 38 ), 38 39 )); 39 40 40 41 } 41 42 42 43 function DoStop() 43 44 { 44 45 } 45 46 46 47 function NewRecord($Module, $Operation, $Value = '') 47 48 { 48 if(array_key_exists('User', $this->System->ModuleManager->Modules) and 49 if(array_key_exists('User', $this->System->ModuleManager->Modules) and 49 50 array_key_exists('Id', $this->System->User->User)) 50 51 $UserId = $this->System->User->User['Id']; … … 52 53 if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IPAddress = $_SERVER['REMOTE_ADDR']; 53 54 else $IPAddress = ''; 54 $this->Database->insert('Log', array('Time' => 'NOW()', 55 'User' => $UserId, 'Module' => $Module, 55 $this->Database->insert('Log', array('Time' => 'NOW()', 56 'User' => $UserId, 'Module' => $Module, 56 57 'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress)); 57 58 } -
trunk/Modules/Network/Network.php
r657 r661 24 24 '<strong>Seznam známých AP a obsazení kmitočtových pásem:</strong></div>'. 25 25 '<table class="WideTable">'. 26 '<tr><th/><br/>SSID<br/><br/></th>'; 26 '<tr><th/><br/>SSID<br/><br/></th>'; 27 27 $ChannelList = array(); 28 28 if(!array_key_exists('range', $_GET)) $_GET['range'] = 'a'; 29 if($_GET['range'] == 'a') 29 if($_GET['range'] == 'a') 30 30 { 31 31 $Where = '(Frequency < 5000)'; 32 32 for($Freq = 2402; $Freq <= 2482; $Freq = $Freq + 5) $ChannelList[] = $Freq; 33 33 } 34 if($_GET['range'] == 'bc') 34 if($_GET['range'] == 'bc') 35 35 { 36 36 $Where = '(Frequency >= 5000) AND (Frequency <= 5350)'; 37 37 for($Freq = 5150; $Freq <= 5350; $Freq = $Freq + 5) $ChannelList[] = $Freq; 38 38 } 39 if($_GET['range'] == 'd') 39 if($_GET['range'] == 'd') 40 40 { 41 41 $Where = '(Frequency >= 5470)'; 42 42 for($Freq = 5470; $Freq <= 5725; $Freq = $Freq + 5) $ChannelList[] = $Freq; 43 43 } 44 45 foreach($ChannelList as $Frequency) 44 45 foreach($ChannelList as $Frequency) 46 46 { 47 47 $Output .= '<th><div class="RotatedHeader">'.$Frequency.'<div></th>'; … … 57 57 $HighFrequency = $DbRow['Frequency'] + $DbRow2['ChannelWidth'] / 2 + $DbRow2['ChannelWidthUpper']; 58 58 $Output .= '<tr><td>'.$DbRow2['SSID'].'</td>'; 59 foreach($ChannelList as $Frequency) 59 foreach($ChannelList as $Frequency) 60 60 { 61 61 if(($DbRow2['Frequency'] == $Frequency)) $Color = '#000000'; 62 62 else if(($LowFrequency <= ($Frequency - 2.5)) and ($HighFrequency >= ($Frequency + 2.5))) $Color = '#808080'; 63 63 else if(($LowFrequency == $Frequency) or ($HighFrequency == $Frequency)) $Color = '#c0c0c0'; 64 64 65 65 else $Color = '#ffffff'; 66 66 $Output .= '<td style="background-color: '.$Color.';"> </td>'; 67 67 } 68 68 69 $Output .= '</tr>'; 70 } 69 $Output .= '</tr>'; 70 } 71 71 } 72 72 $Output .= '</table>'; 73 73 return($Output); 74 } 74 } 75 75 } 76 76 77 77 class PageNetwork extends Page 78 78 { … … 87 87 $Output = $this->PageNotFound(); 88 88 } else $Output = $this->ShowInformation(); 89 return($Output); 90 } 91 89 return($Output); 90 } 91 92 92 function ShowInformation() 93 93 { … … 111 111 $this->Description = 'Networking related tools'; 112 112 $this->Dependencies = array(); 113 } 113 } 114 114 115 115 function DoInstall() 116 116 { 117 117 } 118 118 119 119 function DoUninstall() 120 { 121 } 122 120 { 121 } 122 123 123 function DoStart() 124 124 { 125 $this->System->RegisterPage('network', 'PageNetwork'); 125 $this->System->RegisterPage('network', 'PageNetwork'); 126 126 $this->System->RegisterPage(array('network', 'administration'), 'PageNetworkAdministration'); 127 127 $this->System->RegisterPage(array('network', 'availability'), 'PageAvailability'); … … 131 131 $this->System->RegisterPage(array('network', 'hosts'), 'PageHostList'); 132 132 $this->System->RegisterPage(array('network', 'frequency-plan'), 'PageFrequencyPlan'); 133 134 $this->System->FormManager->RegisterClass('Subject', array( 135 'Title' => 'Subjekty', 136 'Table' => 'Subject', 137 'DefaultSortColumn' => 'Name', 138 'Items' => array( 139 'Id' => array('Type' => 'Integer', 'Caption' => 'Identifikace', 'Default' => '', 'ReadOnly' => true), 140 'Name' => array('Type' => 'String', 'Caption' => 'Celé jméno', 'Default' => ''), 141 'AddressStreet' => array('Type' => 'String', 'Caption' => 'Ulice', 'Default' => ''), 142 'AddressTown' => array('Type' => 'String', 'Caption' => 'Město', 'Default' => ''), 143 'AddressPSC' => array('Type' => 'String', 'Caption' => 'PSČ', 'Default' => ''), 144 'AddressCountry' => array('Type' => 'TCountry', 'Caption' => 'Země', 'Default' => ''), 145 'IC' => array('Type' => 'String', 'Caption' => 'IČ', 'Default' => ''), 146 'DIC' => array('Type' => 'String', 'Caption' => 'DIČ', 'Default' => ''), 147 'MapPosition' => array('Type' => 'TMapPosition', 'Caption' => 'Pozice na mapě', 'Default' => '', 'Null' => true), 148 'WWW' => array('Type' => 'Hyperlink', 'Caption' => 'WWW', 'Default' => ''), 149 'Note' => array('Type' => 'String', 'Caption' => 'Poznámka', 'Default' => ''), 150 'Customer' => array('Type' => 'TMemberListSubject', 'Caption' => 'Členové', 'Default' => ''), 151 'Operations' => array('Type' => 'TFinanceOperationListSubject', 'Caption' => 'Platby', 'Default' => ''), 152 'Invoices' => array('Type' => 'TFinanceInvoiceListSubject', 'Caption' => 'Faktury', 'Default' => ''), 153 'Payment' => array('Type' => 'Float', 'Caption' => 'Placení', 'Default' => '', 154 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '. 155 'WHERE `FinanceOperation`.`Subject`=#Id) - (SELECT SUM(`FinanceInvoice`.`Value`) FROM `FinanceInvoice` '. 156 'WHERE `FinanceInvoice`.`Subject`=#Id)'), 157 ), 158 )); 159 $this->System->FormManager->RegisterClass('SubjectReport', array( 160 'Title' => 'Přehled subjektů', 161 'Table' => 'SubjectReport', 162 'DefaultSortColumn' => 'Id', 163 'SQL' => '(SELECT Id FROM Subject)', 164 'Items' => array( 165 'Id' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => '', 'ReadOnly' => true), 166 'Income' => array('Type' => 'Integer', 'Caption' => 'Příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 167 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 168 'AND (`FinanceOperation`.`Value` > 0))'), 169 'Spending' => array('Type' => 'Integer', 'Caption' => 'Výdaje', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 170 'SQL' => '(SELECT -ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 171 'AND (`FinanceOperation`.`Value` < 0))'), 172 'OperationBalance' => array('Type' => 'Integer', 'Caption' => 'Zisk', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 173 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 174 ')'), 175 ), 176 )); 133 177 134 $this->System->FormManager->RegisterClass('NetworkDomainAlias', array( 178 135 'Title' => 'Alias domény', … … 263 220 'Configure' => array('Type' => 'Boolean', 'Caption' => 'Nastavovat', 'Default' => ''), 264 221 ), 265 )); 222 )); 266 223 $this->System->FormManager->RegisterClass('NetworkLink', array( 267 224 'Title' => 'Síťové propojení', … … 277 234 'Table' => 'NetworkDeviceConfig', 278 235 'DefaultSortColumn' => 'Time', 236 'DefaultSortOrder' => 1, 279 237 'Items' => array( 280 238 'Device' => array('Type' => 'TNetworkDevice', 'Caption' => 'Zařízení', 'Default' => ''), … … 312 270 'ChannelWidth' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu', 'Default' => '20', 'Suffix' => 'MHz'), 313 271 'ChannelWidthUpper' => array('Type' => 'Integer', 'Caption' => 'Šírka kanálu horního', 'Default' => '0', 'Suffix' => 'MHz'), 314 'Mode' => array('Type' => 'TWirelessMode', 'Caption' => 'Režim', 'Default' => '0', 'Suffix' => ''), 315 'TotalPower' => array('Type' => 'Integer', 'Caption' => 'Celkový výkon', 'Default' => '20', 'Suffix' => 'dBm', 272 'Mode' => array('Type' 273 => 'TWirelessMode', 'Caption' => 'Režim', 'Default' => '0', 'Suffix' => ''), 274 'TotalPower' => array('Type' => 'Integer', 'Caption' => 'Celkový výkon', 'Default' => '20', 'Suffix' => 'dBm', 316 275 'SQL' => '(`TxPower` - `CableAttenuation` + `AntenaGain`)', 'ReadOnly' => true), 317 276 'LimitPower' => array('Type' => 'Integer', 'Caption' => 'Max. limit', 'Default' => '', 'Suffix' => 'dBm', … … 354 313 ), 355 314 )); 356 } 357 315 } 316 358 317 function DoStop() 359 { 360 } 318 { 319 } 361 320 }
Note:
See TracChangeset
for help on using the changeset viewer.