Changeset 97
- Timestamp:
- Oct 2, 2012, 9:42:35 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 25 added
- 25 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/System/UModuleSystem.pas
r93 r97 86 86 end; 87 87 Core.ModuleManager.OnModuleChange := ModuleChange; 88 inherited Start;88 inherited; 89 89 end; 90 90 … … 128 128 try 129 129 DbRows := TDbRows.Create; 130 Core.CommonDatabase.Query(DbRows, 'DROP TABLE `SystemModule`');130 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `SystemModule`'); 131 131 finally 132 132 DbRows.Free; -
trunk/Modules/User/UModuleUser.pas
r96 r97 116 116 try 117 117 DbRows := TDbRows.Create; 118 Core.CommonDatabase.Query(DbRows, 'DROP TABLE `User`');119 Core.CommonDatabase.Query(DbRows, 'DROP TABLE `UserOnline`');118 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `User`'); 119 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `UserOnline`'); 120 120 finally 121 121 DbRows.Free; -
trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
r92 r97 6 6 7 7 uses 8 Classes, SysUtils, UModularSystem ;8 Classes, SysUtils, UModularSystem, SpecializedDictionary; 9 9 10 10 type … … 72 72 begin 73 73 inherited Stop; 74 with Core.Pages do begin 75 UnregisterPage('internet'); 76 UnregisterPage('hosting'); 77 UnregisterPage('historie'); 78 UnregisterPage('dokumenty'); 79 UnregisterPage('voip'); 80 UnregisterPage('odkazy'); 81 UnregisterPage('kontakt'); 82 UnregisterPage('serverinfo'); 83 UnregisterPage('kamery'); 84 UnregisterPage('plany'); 85 UnregisterPage('sit'); 86 UnregisterPage('projekty'); 87 UnregisterPage(''); 88 end; 74 89 end; 75 90 76 91 procedure TModuleZdechovNET.Install; 92 var 93 DbRows: TDbRows; 94 Data: TDictionaryStringString; 77 95 begin 96 try 97 DbRows := TDbRows.Create; 98 Data := TDictionaryStringString.Create; 99 100 Core.CommonDatabase.Query(DbRows, 101 'CREATE TABLE IF NOT EXISTS `VPSHosting` (' + 102 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + 103 ' `Name` varchar(255) NOT NULL,' + 104 ' `Memory` varchar(255) NOT NULL,' + 105 ' `Space` varchar(255) NOT NULL,' + 106 ' `Internet` varchar(255) NOT NULL,' + 107 ' `CPU` varchar(255) NOT NULL,' + 108 ' `Price` int(11) NOT NULL,' + 109 ' PRIMARY KEY (`Id`)' + 110 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 111 112 Core.CommonDatabase.Query(DbRows, 113 'CREATE TABLE IF NOT EXISTS `History` (' + 114 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + 115 ' `Date` date NOT NULL,' + 116 ' `Text` text COLLATE utf8_czech_ci NOT NULL,' + 117 ' PRIMARY KEY (`Id`)' + 118 ') ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 119 120 Core.CommonDatabase.Query(DbRows, 121 'CREATE TABLE IF NOT EXISTS `Webcam` (' + 122 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + 123 ' `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,' + 124 ' `Description` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,' + 125 ' `ImageName` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,' + 126 ' `ImageURL` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,' + 127 ' `ImagePeriod` int(11) NOT NULL,' + 128 ' `Width` int(11) NOT NULL,' + 129 ' `Height` int(11) NOT NULL,' + 130 ' `Enabled` int(11) NOT NULL DEFAULT "1",' + 131 ' `DeviceType` varchar(255) NOT NULL,' + 132 ' PRIMARY KEY (`Id`)' + 133 ') ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 134 135 Core.CommonDatabase.Query(DbRows, 136 ' CREATE TABLE IF NOT EXISTS `Plans` (' + 137 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + 138 ' `TimeCreate` datetime NOT NULL,' + 139 ' `TimeFinished` datetime DEFAULT NULL,' + 140 ' `Description` text COLLATE utf8_czech_ci NOT NULL,' + 141 ' `Conclusion` text COLLATE utf8_czech_ci NOT NULL,' + 142 ' `Public` int(11) NOT NULL DEFAULT "0",' + 143 ' PRIMARY KEY (`Id`),' + 144 ' KEY `TimeCreate` (`TimeCreate`),' + 145 ' KEY `TimeFinished` (`TimeFinished`)' + 146 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 147 148 finally 149 Data.Free; 150 DbRows.Free; 151 end; 152 78 153 inherited Install; 79 154 end; 80 155 81 156 procedure TModuleZdechovNET.Uninstall; 157 var 158 DbRows: TDbRows; 82 159 begin 83 160 inherited Uninstall; 161 try 162 DbRows := TDbRows.Create; 163 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `Plans`'); 164 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `Webcam`'); 165 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `VPSHosting`'); 166 Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `History`'); 167 finally 168 DbRows.Free; 169 end; 84 170 end; 85 171 -
trunk/Packages/CoolWeb/Modules/UUser.pas
r84 r97 68 68 end else begin 69 69 // Create new record 70 Database.Query(DbRows, 'INSERT INTO `UserOnline` (`User`, `ActivityTime`, `SessionId` ) ' +71 'VALUES (1, NOW(), "' + HandlerData.Request.Cookies.Values['SessionId'] + '" )');70 Database.Query(DbRows, 'INSERT INTO `UserOnline` (`User`, `ActivityTime`, `SessionId`, `ScriptName`) ' + 71 'VALUES (1, NOW(), "' + HandlerData.Request.Cookies.Values['SessionId'] + '", "")'); 72 72 Id := Database.LastInsertId; 73 73 User := 1; -
trunk/Pages/UPageAdmin.pas
r93 r97 93 93 Text := 'Installing module ' + ModuleName; 94 94 Module.Install; 95 Module.Start; 95 96 end else Text := Text + 'Module ' + ModuleName + ' not found'; 96 97 end else Text := Text + 'Module not specified'; -
trunk/ZdechovNET.lpi
r96 r97 117 117 </Item7> 118 118 </RequiredPackages> 119 <Units Count="2 5">119 <Units Count="23"> 120 120 <Unit0> 121 121 <Filename Value="ZdechovNET.lpr"/> … … 129 129 </Unit1> 130 130 <Unit2> 131 <Filename Value="style/style.css"/> 132 <IsPartOfProject Value="True"/> 131 <Filename Value="Application/UWebObjects.pas"/> 132 <IsPartOfProject Value="True"/> 133 <UnitName Value="UWebObjects"/> 133 134 </Unit2> 134 135 <Unit3> 135 <Filename Value="style/global.js"/> 136 <IsPartOfProject Value="True"/> 136 <Filename Value="Pages/UServerInfoPage.pas"/> 137 <IsPartOfProject Value="True"/> 138 <ComponentName Value="ServerInfoPage"/> 139 <ResourceBaseClass Value="DataModule"/> 140 <UnitName Value="UServerInfoPage"/> 137 141 </Unit3> 138 142 <Unit4> 139 <Filename Value="Application/UWebObjects.pas"/> 140 <IsPartOfProject Value="True"/> 141 <UnitName Value="UWebObjects"/> 143 <Filename Value="ReadMe.txt"/> 144 <IsPartOfProject Value="True"/> 142 145 </Unit4> 143 146 <Unit5> 144 <Filename Value="Pages/UContactPage.pas"/> 145 <IsPartOfProject Value="True"/> 146 <ComponentName Value="ContactPage"/> 147 <ResourceBaseClass Value="DataModule"/> 148 <UnitName Value="UContactPage"/> 147 <Filename Value="Modules/User/UModuleUser.pas"/> 148 <IsPartOfProject Value="True"/> 149 <UnitName Value="UModuleUser"/> 149 150 </Unit5> 150 151 <Unit6> 151 <Filename Value="Pages/UInternetPage.pas"/> 152 <IsPartOfProject Value="True"/> 153 <ComponentName Value="InternetPage"/> 154 <ResourceBaseClass Value="DataModule"/> 155 <UnitName Value="UInternetPage"/> 152 <Filename Value="UCore.pas"/> 153 <IsPartOfProject Value="True"/> 154 <ComponentName Value="Core"/> 155 <HasResources Value="True"/> 156 <ResourceBaseClass Value="DataModule"/> 157 <UnitName Value="UCore"/> 156 158 </Unit6> 157 159 <Unit7> 158 <Filename Value="Pages/UHostingPage.pas"/> 159 <IsPartOfProject Value="True"/> 160 <ComponentName Value="HostingPage"/> 161 <ResourceBaseClass Value="DataModule"/> 162 <UnitName Value="UHostingPage"/> 160 <Filename Value="Modules/User/UUserControlPage.pas"/> 161 <IsPartOfProject Value="True"/> 162 <ComponentName Value="UserControlPage"/> 163 <HasResources Value="True"/> 164 <ResourceBaseClass Value="DataModule"/> 165 <UnitName Value="UUserControlPage"/> 163 166 </Unit7> 164 167 <Unit8> 165 <Filename Value="Pages/UHistoryPage.pas"/> 166 <IsPartOfProject Value="True"/> 167 <ComponentName Value="HistoryPage"/> 168 <ResourceBaseClass Value="DataModule"/> 169 <UnitName Value="UHistoryPage"/> 168 <Filename Value="Modules/System/UModuleSystem.pas"/> 169 <IsPartOfProject Value="True"/> 170 <UnitName Value="UModuleSystem"/> 170 171 </Unit8> 171 172 <Unit9> 172 <Filename Value="Pages/UDocumentsPage.pas"/> 173 <IsPartOfProject Value="True"/> 174 <ComponentName Value="DocumentsPage"/> 175 <ResourceBaseClass Value="DataModule"/> 176 <UnitName Value="UDocumentsPage"/> 173 <Filename Value="Pages/UPageAdmin.pas"/> 174 <IsPartOfProject Value="True"/> 175 <ComponentName Value="PageAdmin"/> 176 <HasResources Value="True"/> 177 <ResourceBaseClass Value="DataModule"/> 178 <UnitName Value="UPageAdmin"/> 177 179 </Unit9> 178 180 <Unit10> 179 <Filename Value="Pages/UVoIPPage.pas"/> 180 <IsPartOfProject Value="True"/> 181 <ComponentName Value="VoIPPage"/> 182 <ResourceBaseClass Value="DataModule"/> 183 <UnitName Value="UVoIPPage"/> 181 <Filename Value="Modules/ZdechovNET/UModuleZdechovNET.pas"/> 182 <IsPartOfProject Value="True"/> 183 <UnitName Value="UModuleZdechovNET"/> 184 184 </Unit10> 185 185 <Unit11> 186 <Filename Value="Pages/UPlansPage.pas"/> 187 <IsPartOfProject Value="True"/> 188 <ComponentName Value="PlansPage"/> 189 <HasResources Value="True"/> 190 <ResourceBaseClass Value="DataModule"/> 191 <UnitName Value="UPlansPage"/> 186 <Filename Value="Modules/ZdechovNET/UAboutPage.pas"/> 187 <IsPartOfProject Value="True"/> 188 <HasResources Value="True"/> 192 189 </Unit11> 193 190 <Unit12> 194 <Filename Value="Pages/ULinksPage.pas"/> 195 <IsPartOfProject Value="True"/> 196 <ComponentName Value="LinksPage"/> 197 <ResourceBaseClass Value="DataModule"/> 198 <UnitName Value="ULinksPage"/> 191 <Filename Value="Modules/ZdechovNET/UContactPage.pas"/> 192 <IsPartOfProject Value="True"/> 193 <HasResources Value="True"/> 199 194 </Unit12> 200 195 <Unit13> 201 <Filename Value="Pages/UServerInfoPage.pas"/> 202 <IsPartOfProject Value="True"/> 203 <ComponentName Value="ServerInfoPage"/> 204 <ResourceBaseClass Value="DataModule"/> 205 <UnitName Value="UServerInfoPage"/> 196 <Filename Value="Modules/ZdechovNET/UDocumentsPage.pas"/> 197 <IsPartOfProject Value="True"/> 198 <HasResources Value="True"/> 206 199 </Unit13> 207 200 <Unit14> 208 <Filename Value="Pages/UWebCamPage.pas"/> 209 <IsPartOfProject Value="True"/> 210 <ComponentName Value="WebCamPage"/> 211 <ResourceBaseClass Value="DataModule"/> 212 <UnitName Value="UWebCamPage"/> 201 <Filename Value="Modules/ZdechovNET/UHistoryPage.pas"/> 202 <IsPartOfProject Value="True"/> 203 <HasResources Value="True"/> 213 204 </Unit14> 214 205 <Unit15> 215 <Filename Value="Pages/UNetworkPage.pas"/> 216 <IsPartOfProject Value="True"/> 217 <ComponentName Value="NetworkPage"/> 218 <HasResources Value="True"/> 219 <ResourceBaseClass Value="DataModule"/> 220 <UnitName Value="UNetworkPage"/> 206 <Filename Value="Modules/ZdechovNET/UHostingPage.pas"/> 207 <IsPartOfProject Value="True"/> 208 <HasResources Value="True"/> 221 209 </Unit15> 222 210 <Unit16> 223 <Filename Value="Pages/UAboutPage.pas"/> 224 <IsPartOfProject Value="True"/> 225 <ComponentName Value="AboutPage"/> 226 <HasResources Value="True"/> 227 <ResourceBaseClass Value="DataModule"/> 228 <UnitName Value="UAboutPage"/> 211 <Filename Value="Modules/ZdechovNET/UInternetPage.pas"/> 212 <IsPartOfProject Value="True"/> 213 <HasResources Value="True"/> 229 214 </Unit16> 230 215 <Unit17> 231 <Filename Value="ReadMe.txt"/> 232 <IsPartOfProject Value="True"/> 216 <Filename Value="Modules/ZdechovNET/ULinksPage.pas"/> 217 <IsPartOfProject Value="True"/> 218 <HasResources Value="True"/> 233 219 </Unit17> 234 220 <Unit18> 235 <Filename Value="Pages/UProjectsPage.pas"/> 236 <IsPartOfProject Value="True"/> 237 <ComponentName Value="ProjectsPage"/> 238 <HasResources Value="True"/> 239 <ResourceBaseClass Value="DataModule"/> 240 <UnitName Value="UProjectsPage"/> 221 <Filename Value="Modules/ZdechovNET/UNetworkPage.pas"/> 222 <IsPartOfProject Value="True"/> 223 <HasResources Value="True"/> 241 224 </Unit18> 242 225 <Unit19> 243 <Filename Value="Modules/ User/UModuleUser.pas"/>244 <IsPartOfProject Value="True"/> 245 < UnitName Value="UModuleUser"/>226 <Filename Value="Modules/ZdechovNET/UPlansPage.pas"/> 227 <IsPartOfProject Value="True"/> 228 <HasResources Value="True"/> 246 229 </Unit19> 247 230 <Unit20> 248 <Filename Value="UCore.pas"/> 249 <IsPartOfProject Value="True"/> 250 <ComponentName Value="Core"/> 251 <HasResources Value="True"/> 252 <ResourceBaseClass Value="DataModule"/> 253 <UnitName Value="UCore"/> 231 <Filename Value="Modules/ZdechovNET/UProjectsPage.pas"/> 232 <IsPartOfProject Value="True"/> 233 <HasResources Value="True"/> 254 234 </Unit20> 255 235 <Unit21> 256 <Filename Value="Modules/User/UUserControlPage.pas"/> 257 <IsPartOfProject Value="True"/> 258 <ComponentName Value="UserControlPage"/> 259 <HasResources Value="True"/> 260 <ResourceBaseClass Value="DataModule"/> 261 <UnitName Value="UUserControlPage"/> 236 <Filename Value="Modules/ZdechovNET/UVoIPPage.pas"/> 237 <IsPartOfProject Value="True"/> 238 <HasResources Value="True"/> 262 239 </Unit21> 263 240 <Unit22> 264 <Filename Value="Modules/ System/UModuleSystem.pas"/>265 <IsPartOfProject Value="True"/> 266 < UnitName Value="UModuleSystem"/>241 <Filename Value="Modules/ZdechovNET/UWebCamPage.pas"/> 242 <IsPartOfProject Value="True"/> 243 <HasResources Value="True"/> 267 244 </Unit22> 268 <Unit23>269 <Filename Value="Pages/UPageAdmin.pas"/>270 <IsPartOfProject Value="True"/>271 <ComponentName Value="PageAdmin"/>272 <HasResources Value="True"/>273 <ResourceBaseClass Value="DataModule"/>274 <UnitName Value="UPageAdmin"/>275 </Unit23>276 <Unit24>277 <Filename Value="Modules/ZdechovNET/UModuleZdechovNET.pas"/>278 <IsPartOfProject Value="True"/>279 <UnitName Value="UModuleZdechovNET"/>280 </Unit24>281 245 </Units> 282 246 </ProjectOptions>
Note:
See TracChangeset
for help on using the changeset viewer.