Changeset 900 for trunk/Modules/Portal
- Timestamp:
- Feb 17, 2021, 5:15:29 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Portal/Portal.php
r899 r900 17 17 } 18 18 19 function DoInstall(): void 20 { 21 /* $this->Database->query("INSERT INTO `PanelColumn` (`Id`, `Width`) VALUES 22 (1, ''), 23 (2, ''), 24 (3, '70%');"); 25 $this->Database->query("INSERT INTO `Panel` (`Id`, `Module`, `Parameters`, `Order`, `PanelColumn`) VALUES 26 (1, 'ActionGroup', 1, 2, 1), 27 (2, 'ActionGroup', 4, 1, 2), 28 (3, 'ActionGroup', 5, 2, 2), 29 (4, 'ActionGroup', 6, 3, 2), 30 (5, 'ActionGroup', 2, 4, 2), 31 (6, 'ActionGroup', 3, 5, 2), 32 (7, 'NewsGroupList', '', 2, 3), 33 (8, 'Webcam', '', 3, 1), 34 (9, 'UserOptions', '', 1, 3), 35 (10, 'ActionGroup', 9, 1, 1), 36 (11, 'Meteo', '', 4, 1);");*/ 19 function DoInsertSampleData(): void 20 { 21 $ActionGroup1 = $this->Database->insert('ActionGroup', array('Name' => 'Síť')); 22 $ActionGroup2 = $this->Database->insert('ActionGroup', array('Name' => 'Místní organizace')); 23 $ActionGroup3 = $this->Database->insert('ActionGroup', array('Name' => 'Stránky občanů')); 24 $ActionGroup4 = $this->Database->insert('ActionGroup', array('Name' => 'Vyhledávání')); 25 $ActionGroup5 = $this->Database->insert('ActionGroup', array('Name' => 'Užitečné')); 26 $ActionGroup6 = $this->Database->insert('ActionGroup', array('Name' => 'Zábava')); 27 $ActionGroup7 = $this->Database->insert('ActionGroup', array('Name' => 'Hostované stránky')); 28 $ActionGroup8 = $this->Database->insert('ActionGroup', array('Name' => 'Prodej počítačů')); 29 $ActionGroup9 = $this->Database->insert('ActionGroup', array('Name' => 'Různé')); 30 31 $PanelColumn1 = $this->Database->insert('PanelColumn', array('Width' => '')); 32 $PanelColumn2 = $this->Database->insert('PanelColumn', array('Width' => '')); 33 $PanelColumn3 = $this->Database->insert('PanelColumn', array('Width' => '70%')); 34 35 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup1, 'Order' => 2, 'PanelColumn' => $PanelColumn1)); 36 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup4, 'Order' => 1, 'PanelColumn' => $PanelColumn2)); 37 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup5, 'Order' => 2, 'PanelColumn' => $PanelColumn2)); 38 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup6, 'Order' => 3, 'PanelColumn' => $PanelColumn2)); 39 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup2, 'Order' => 4, 'PanelColumn' => $PanelColumn2)); 40 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup3, 'Order' => 5, 'PanelColumn' => $PanelColumn2)); 41 $this->Database->insert('Panel', array('Module' => 'NewsGroupList', 'Parameters' => '', 'Order' => 2, 'PanelColumn' => $PanelColumn3)); 42 $this->Database->insert('Panel', array('Module' => 'Webcam', 'Parameters' => '', 'Order' => 3, 'PanelColumn' => $PanelColumn1)); 43 $this->Database->insert('Panel', array('Module' => 'UserOptions', 'Parameters' => '', 'Order' => 1, 'PanelColumn' => $PanelColumn3)); 44 $this->Database->insert('Panel', array('Module' => 'ActionGroup', 'Parameters' => $ActionGroup9, 'Order' => 1, 'PanelColumn' => $PanelColumn1)); 45 $this->Database->insert('Panel', array('Module' => 'Meteo', 'Parameters' => '', 'Order' => 4, 'PanelColumn' => $PanelColumn1)); 37 46 } 38 47 … … 297 306 $Output = ''; 298 307 $DbResult = $this->Database->query('SELECT * FROM `ActionGroup`'); 308 $ActionGroups = array(); 299 309 while ($DbRow = $DbResult->fetch_assoc()) 300 310 $ActionGroups[$DbRow['Id']] = $DbRow;
Note:
See TracChangeset
for help on using the changeset viewer.