Changeset 146 for trunk/Modules/User
- Timestamp:
- Dec 29, 2023, 11:44:26 PM (11 months ago)
- Location:
- trunk/Modules/User
- Files:
-
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/ModuleUser.pas
r145 r146 1 unit UModuleUser;1 unit ModuleUser; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UModularSystem, U User, UModuleBase, UWebPage;6 Classes, SysUtils, UModularSystem, User, ModuleBase, UWebPage; 7 7 8 8 type … … 30 30 31 31 uses 32 UCore, USqlDatabase, UUserControlPage;32 Core, USqlDatabase, UserControlPage; 33 33 34 34 { TModuleUser } … … 84 84 DbRows := TDbRows.Create; 85 85 86 Core.Co mmonDatabase.Query(DbRows,86 Core.Core.CommonDatabase.Query(DbRows, 87 87 'CREATE TABLE IF NOT EXISTS `User` (' + 88 88 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 96 96 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 97 97 98 Core.Co mmonDatabase.Query(DbRows,98 Core.Core.CommonDatabase.Query(DbRows, 99 99 'CREATE TABLE IF NOT EXISTS `UserOnline` (' + 100 100 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 110 110 ') ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 111 111 112 Core.Co mmonDatabase.Query(DbRows,112 Core.Core.CommonDatabase.Query(DbRows, 113 113 'CREATE TABLE IF NOT EXISTS `PermissionGroup` (' + 114 114 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 117 117 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 118 118 119 Core.Co mmonDatabase.Query(DbRows,119 Core.Core.CommonDatabase.Query(DbRows, 120 120 'CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` (' + 121 121 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 129 129 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 130 130 131 Core.Co mmonDatabase.Query(DbRows,131 Core.Core.CommonDatabase.Query(DbRows, 132 132 'CREATE TABLE IF NOT EXISTS `PermissionOperation` (' + 133 133 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 143 143 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 144 144 145 Core.Co mmonDatabase.Query(DbRows,145 Core.Core.CommonDatabase.Query(DbRows, 146 146 ' CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` (' + 147 147 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 155 155 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 156 156 157 Core.Co mmonDatabase.Query(DbRows,157 Core.Core.CommonDatabase.Query(DbRows, 158 158 'ALTER TABLE `PermissionGroupAssignment`' + 159 159 ' ADD CONSTRAINT `PermissionGroupAssignment_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `permissiongroup` (`Id`),' + … … 161 161 ' ADD CONSTRAINT `PermissionGroupAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `permissionoperation` (`Id`);'); 162 162 163 Core.Co mmonDatabase.Query(DbRows,163 Core.Core.CommonDatabase.Query(DbRows, 164 164 'ALTER TABLE `PermissionUserAssignment`' + 165 165 ' ADD CONSTRAINT `PermissionUserAssignment_ibfk_1` FOREIGN KEY (`User`) REFERENCES `user` (`Id`),' + … … 180 180 DbRows := TDbRows.Create; 181 181 182 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionUserAssignment`');183 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroupAssignment`');184 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroup`');185 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionOperation`');186 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `User`');187 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `UserOnline`');182 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionUserAssignment`'); 183 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroupAssignment`'); 184 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroup`'); 185 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionOperation`'); 186 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `User`'); 187 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `UserOnline`'); 188 188 finally 189 189 DbRows.Free; -
trunk/Modules/User/User.pas
r145 r146 1 unit U User;1 unit User; 2 2 3 3 interface -
trunk/Modules/User/UserControlPage.pas
r145 r146 1 unit U UserControlPage;1 unit UserControlPage; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UXmlClasses, 7 UWebObjects, UModuleUser, UModuleBase;7 WebObjects, ModuleUser, ModuleBase; 8 8 9 9 type … … 32 32 33 33 uses 34 UCore, UUtils, UUser, UWebSession;34 Core, Utils, User, WebSession; 35 35 36 36 { TUserControlPage } … … 63 63 UserId: Integer; 64 64 begin 65 with TWebSession(HandlerData), Core , HtmlDocument.Body do begin65 with TWebSession(HandlerData), Core.Core, HtmlDocument.Body do begin 66 66 Form := TQueryForm.Create; 67 67 with Form do begin … … 108 108 UserId: Integer; 109 109 begin 110 with TWebSession(HandlerData), Core , HtmlDocument.Body do begin110 with TWebSession(HandlerData), Core.Core, HtmlDocument.Body do begin 111 111 Form := TQueryForm.Create; 112 112 with Form do begin … … 162 162 procedure TUserControlPage.HandleLogout(HandlerData: THTTPHandlerData); 163 163 begin 164 with TWebSession(HandlerData), Core , HtmlDocument.Body do begin164 with TWebSession(HandlerData), Core.Core, HtmlDocument.Body do begin 165 165 ModuleUser.UserOnline.Logout; 166 166 with SubItems.AddString do
Note:
See TracChangeset
for help on using the changeset viewer.