Changeset 38
- Timestamp:
- Nov 13, 2010, 4:32:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UCustomApplication.pas
r36 r38 86 86 end; 87 87 try 88 DbRows := Database.Query('SET NAMES utf8'); 88 DbRows := TDbRows.Create; 89 Database.Query(DbRows, 'SET NAMES utf8'); 89 90 finally 90 91 DbRows.Free; -
trunk/Application/UUser.pas
r37 r38 52 52 begin 53 53 try 54 DbRows := Database.Query('SELECT * FROM `UserOnline` WHERE `SessionId`="' + 54 DbRows := TDbRows.Create; 55 Database.Query(DbRows, 'SELECT * FROM `UserOnline` WHERE `SessionId`="' + 55 56 HandlerData.Request.Cookies.Values['SessionId'] + '"'); 56 57 if DbRows.Count > 0 then begin … … 58 59 Id := StrToInt(DbRows[0].Values['Id']); 59 60 User := StrToInt(DbRows[0].Values['User']); 60 DbRows.Free; 61 DbRows := Database.Query('UPDATE `UserOnline` SET `ActivityTime` = NOW() WHERE `Id`=' + IntToStr(Id)); 61 Database.Query(DbRows, 'UPDATE `UserOnline` SET `ActivityTime` = NOW() WHERE `Id`=' + IntToStr(Id)); 62 62 end else begin 63 63 // Create new record 64 DbRows.Free; 65 DbRows := Database.Query('INSERT INTO `UserOnline` (`User`, `ActivityTime`, `SessionId`) ' + 64 Database.Query(DbRows, 'INSERT INTO `UserOnline` (`User`, `ActivityTime`, `SessionId`) ' + 66 65 'VALUES (1, NOW(), "' + HandlerData.Request.Cookies.Values['SessionId'] + '")'); 67 66 Id := Database.LastInsertId; … … 79 78 Logout; 80 79 try 81 DbRows := Database.Query('UPDATE `UserOnline` SET `User` = ' + IntToStr(User) + ', `LoginTime` = NOW() WHERE `SessionId`="' + 80 DbRows := TDbRows.Create; 81 Database.Query(DbRows, 'UPDATE `UserOnline` SET `User` = ' + IntToStr(User) + ', `LoginTime` = NOW() WHERE `SessionId`="' + 82 82 HandlerData.Request.Cookies.Values['SessionId'] + '"'); 83 83 finally … … 93 93 if Id = AnonymousUserId then Update; 94 94 if User <> AnonymousUserId then begin 95 DbRows := Database.Query('UPDATE `UserOnline` SET `User` = ' + IntToStr(AnonymousUserId) + ' WHERE `SessionId`="' + 96 HandlerData.Request.Cookies.Values['SessionId'] + '"'); 97 DbRows.Destroy; 95 try 96 DbRows := TDbRows.Create; 97 Database.Query(DbRows, 'UPDATE `UserOnline` SET `User` = ' + IntToStr(AnonymousUserId) + ' WHERE `SessionId`="' + 98 HandlerData.Request.Cookies.Values['SessionId'] + '"'); 99 finally 100 DbRows.Free; 101 end; 98 102 User := AnonymousUserId; 99 103 end; … … 103 107 104 108 procedure TWebUser.Delete(Id: Integer); 109 var 110 DbRows: TDbRows; 105 111 begin 106 Database.Query('DELETE FROM `User` WHERE `Id`=' + IntToStr(Id)); 112 try 113 DbRows := TDbRows.Create; 114 Database.Query(DbRows, 'DELETE FROM `User` WHERE `Id`=' + IntToStr(Id)); 115 finally 116 DbRows.Free; 117 end; 107 118 end; 108 119 … … 112 123 DbRows: TDbRows; 113 124 begin 114 DbRows := Database.Query('SELECT `Id` FROM `User` WHERE `Name`="' + Name + '"');115 125 try 126 DbRows := TDbRows.Create; 127 Database.Query(DbRows, 'SELECT `Id` FROM `User` WHERE `Name`="' + Name + '"'); 116 128 if DbRows.Count = 0 then begin 117 129 Salt := EncodeBase64(Copy(BinToHexString(SHA1(FloatToStr(Now))), 1, 8)); 118 Database.Query( 'INSERT INTO `User` (`Name`, `Password`, `Salt`, `Email`, `RegistrationTime`) VALUES ("' +130 Database.Query(DbRows, 'INSERT INTO `User` (`Name`, `Password`, `Salt`, `Email`, `RegistrationTime`) VALUES ("' + 119 131 Name + '", SHA1(CONCAT("' + Password + '", "' + Salt + '")), "' + Salt + 120 132 '", "' + Email + '", NOW())'); 121 133 end else raise EDuplicateItem.Create(SDuplicateUserItem); 122 134 finally 123 DbRows. Destroy;135 DbRows.Free; 124 136 end; 125 137 end; … … 129 141 DbRows: TDbRows; 130 142 begin 131 DbRows := Database.Query('SELECT `Id` FROM `User` WHERE `Name`="' + Name + '"');132 143 try 144 DbRows := TDbRows.Create; 145 Database.Query(DbRows, 'SELECT `Id` FROM `User` WHERE `Name`="' + Name + '"'); 133 146 if DbRows.Count = 1 then Result := StrToInt(DbRows[0].Items[0].Value) 134 147 else raise ENotFound.Create('User "' + Name + '" not found'); 135 148 finally 136 DBRows. Destroy;149 DBRows.Free; 137 150 end; 138 151 end; … … 142 155 DbRows: TDbRows; 143 156 begin 144 DbRows := Database.Query('SELECT `Id` FROM `User` WHERE `Name`="' + Name + '" AND ' +145 '`Password` = SHA1(CONCAT("' + Password + '", Salt))');146 157 try 158 DbRows := TDbRows.Create; 159 Database.Query(DbRows, 'SELECT `Id` FROM `User` WHERE `Name`="' + Name + '" AND ' + 160 '`Password` = SHA1(CONCAT("' + Password + '", Salt))'); 147 161 if DbRows.Count = 1 then Result := StrToInt(DbRows[0].Items[0].Value) 148 162 else raise ENotFound.Create('User "' + Name + '" not found'); 149 163 finally 150 DBRows. Destroy;164 DBRows.Free; 151 165 end; 152 166 end; -
trunk/CGI.lpi
r37 r38 45 45 </Item2> 46 46 </RequiredPackages> 47 <Units Count=" 71">47 <Units Count="55"> 48 48 <Unit0> 49 49 <Filename Value="CGI.lpr"/> … … 63 63 <IsPartOfProject Value="True"/> 64 64 <UnitName Value="UMainPage"/> 65 <IsVisibleTab Value="True"/> 65 66 <EditorIndex Value="25"/> 66 67 <WindowIndex Value="0"/> 67 <TopLine Value="2 71"/>68 <CursorPos X=" 20" Y="316"/>68 <TopLine Value="228"/> 69 <CursorPos X="32" Y="249"/> 69 70 <UsageCount Value="200"/> 70 71 <Loaded Value="True"/> … … 77 78 <TopLine Value="291"/> 78 79 <CursorPos X="1" Y="311"/> 79 <UsageCount Value="1 40"/>80 <UsageCount Value="129"/> 80 81 <DefaultSyntaxHighlighter Value="Delphi"/> 81 82 </Unit2> 82 83 <Unit3> 83 84 <Filename Value="UXmlClasses.pas"/> 84 <UsageCount Value="1 40"/>85 <UsageCount Value="129"/> 85 86 <DefaultSyntaxHighlighter Value="Delphi"/> 86 87 </Unit3> … … 89 90 <IsPartOfProject Value="True"/> 90 91 <UnitName Value="UCore"/> 91 <EditorIndex Value="3 4"/>92 <EditorIndex Value="33"/> 92 93 <WindowIndex Value="0"/> 93 94 <TopLine Value="1"/> … … 103 104 <TopLine Value="217"/> 104 105 <CursorPos X="5" Y="236"/> 105 <UsageCount Value="1 40"/>106 <UsageCount Value="129"/> 106 107 <DefaultSyntaxHighlighter Value="Delphi"/> 107 108 </Unit5> … … 112 113 <TopLine Value="10"/> 113 114 <CursorPos X="27" Y="19"/> 114 <UsageCount Value="1 40"/>115 <UsageCount Value="129"/> 115 116 <DefaultSyntaxHighlighter Value="Delphi"/> 116 117 </Unit6> … … 120 121 <TopLine Value="17"/> 121 122 <CursorPos X="34" Y="30"/> 122 <UsageCount Value="1 40"/>123 <UsageCount Value="129"/> 123 124 <DefaultSyntaxHighlighter Value="Delphi"/> 124 125 </Unit7> … … 129 130 <TopLine Value="204"/> 130 131 <CursorPos X="25" Y="226"/> 131 <UsageCount Value="1 40"/>132 <UsageCount Value="129"/> 132 133 <DefaultSyntaxHighlighter Value="Delphi"/> 133 134 </Unit8> … … 138 139 <TopLine Value="102"/> 139 140 <CursorPos X="25" Y="107"/> 140 <UsageCount Value="1 40"/>141 <UsageCount Value="129"/> 141 142 <DefaultSyntaxHighlighter Value="Delphi"/> 142 143 </Unit9> 143 144 <Unit10> 144 <Filename Value="../../../../other/powtils/main/pwmain.pas"/> 145 <UnitName Value="pwmain"/> 146 <TopLine Value="2320"/> 147 <CursorPos X="30" Y="2342"/> 148 <UsageCount Value="9"/> 145 <Filename Value="URSS.pas"/> 146 <UnitName Value="URSS"/> 147 <WindowIndex Value="0"/> 148 <TopLine Value="40"/> 149 <CursorPos X="9" Y="59"/> 150 <UsageCount Value="117"/> 149 151 <DefaultSyntaxHighlighter Value="Delphi"/> 150 152 </Unit10> 151 153 <Unit11> 152 <Filename Value="URSS.pas"/> 153 <UnitName Value="URSS"/> 154 <WindowIndex Value="0"/> 155 <TopLine Value="40"/> 156 <CursorPos X="9" Y="59"/> 157 <UsageCount Value="128"/> 154 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/datih.inc"/> 155 <EditorIndex Value="31"/> 156 <WindowIndex Value="0"/> 157 <TopLine Value="91"/> 158 <CursorPos X="10" Y="110"/> 159 <UsageCount Value="96"/> 160 <Loaded Value="True"/> 158 161 <DefaultSyntaxHighlighter Value="Delphi"/> 159 162 </Unit11> 160 163 <Unit12> 161 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/datih.inc"/> 162 <EditorIndex Value="32"/> 163 <WindowIndex Value="0"/> 164 <TopLine Value="91"/> 165 <CursorPos X="10" Y="110"/> 166 <UsageCount Value="38"/> 167 <Loaded Value="True"/> 164 <Filename Value="/usr/share/fpcsrc/rtl/objpas/dateutil.inc"/> 165 <WindowIndex Value="0"/> 166 <TopLine Value="283"/> 167 <CursorPos X="10" Y="302"/> 168 <UsageCount Value="20"/> 168 169 <DefaultSyntaxHighlighter Value="Delphi"/> 169 170 </Unit12> 170 171 <Unit13> 171 <Filename Value="/usr/share/fpcsrc/rtl/objpas/dateutil.inc"/> 172 <WindowIndex Value="0"/> 173 <TopLine Value="283"/> 174 <CursorPos X="10" Y="302"/> 175 <UsageCount Value="31"/> 172 <Filename Value="UConfig.pas"/> 173 <IsPartOfProject Value="True"/> 174 <UnitName Value="UConfig"/> 175 <EditorIndex Value="9"/> 176 <WindowIndex Value="0"/> 177 <TopLine Value="1"/> 178 <CursorPos X="58" Y="10"/> 179 <UsageCount Value="294"/> 180 <Loaded Value="True"/> 176 181 <DefaultSyntaxHighlighter Value="Delphi"/> 177 182 </Unit13> 178 183 <Unit14> 179 <Filename Value="UConfig.pas"/> 180 <IsPartOfProject Value="True"/> 181 <UnitName Value="UConfig"/> 182 <EditorIndex Value="9"/> 183 <WindowIndex Value="0"/> 184 <TopLine Value="1"/> 185 <CursorPos X="92" Y="11"/> 186 <UsageCount Value="179"/> 187 <Loaded Value="True"/> 188 <DefaultSyntaxHighlighter Value="Delphi"/> 184 <Filename Value="style/style.css"/> 185 <IsPartOfProject Value="True"/> 186 <TopLine Value="108"/> 187 <CursorPos X="1" Y="134"/> 188 <UsageCount Value="294"/> 189 <DefaultSyntaxHighlighter Value="None"/> 189 190 </Unit14> 190 191 <Unit15> 191 <Filename Value="style/ style.css"/>192 <IsPartOfProject Value="True"/> 193 <TopLine Value="1 08"/>194 <CursorPos X="1" Y="1 34"/>195 <UsageCount Value=" 179"/>196 <DefaultSyntaxHighlighter Value=" None"/>192 <Filename Value="style/global.js"/> 193 <IsPartOfProject Value="True"/> 194 <TopLine Value="1"/> 195 <CursorPos X="1" Y="1"/> 196 <UsageCount Value="294"/> 197 <DefaultSyntaxHighlighter Value="JScript"/> 197 198 </Unit15> 198 199 <Unit16> 199 <Filename Value="style/global.js"/> 200 <IsPartOfProject Value="True"/> 201 <TopLine Value="1"/> 202 <CursorPos X="1" Y="1"/> 203 <UsageCount Value="179"/> 204 <DefaultSyntaxHighlighter Value="JScript"/> 200 <Filename Value="UDatabase.pas"/> 201 <UnitName Value="UDatabase"/> 202 <WindowIndex Value="0"/> 203 <TopLine Value="608"/> 204 <CursorPos X="44" Y="627"/> 205 <UsageCount Value="98"/> 206 <DefaultSyntaxHighlighter Value="Delphi"/> 205 207 </Unit16> 206 208 <Unit17> 207 <Filename Value="U Database.pas"/>208 <UnitName Value="U Database"/>209 <WindowIndex Value="0"/> 210 <TopLine Value=" 608"/>211 <CursorPos X=" 44" Y="627"/>212 <UsageCount Value=" 109"/>209 <Filename Value="UUser.pas"/> 210 <UnitName Value="UUser"/> 211 <WindowIndex Value="0"/> 212 <TopLine Value="39"/> 213 <CursorPos X="25" Y="58"/> 214 <UsageCount Value="98"/> 213 215 <DefaultSyntaxHighlighter Value="Delphi"/> 214 216 </Unit17> 215 217 <Unit18> 216 <Filename Value=" UUser.pas"/>217 <UnitName Value="UUser "/>218 <WindowIndex Value="0"/> 219 <TopLine Value=" 39"/>220 <CursorPos X=" 25" Y="58"/>221 <UsageCount Value=" 109"/>218 <Filename Value="Pages/UUserPage.pas"/> 219 <UnitName Value="UUserPage"/> 220 <WindowIndex Value="0"/> 221 <TopLine Value="1"/> 222 <CursorPos X="69" Y="19"/> 223 <UsageCount Value="94"/> 222 224 <DefaultSyntaxHighlighter Value="Delphi"/> 223 225 </Unit18> 224 226 <Unit19> 225 <Filename Value=" Pages/UUserPage.pas"/>226 <UnitName Value="U UserPage"/>227 <WindowIndex Value="0"/> 228 <TopLine Value="1"/> 229 <CursorPos X=" 69" Y="19"/>230 <UsageCount Value=" 105"/>227 <Filename Value="UBill.pas"/> 228 <UnitName Value="UBill"/> 229 <WindowIndex Value="0"/> 230 <TopLine Value="1"/> 231 <CursorPos X="52" Y="124"/> 232 <UsageCount Value="91"/> 231 233 <DefaultSyntaxHighlighter Value="Delphi"/> 232 234 </Unit19> 233 235 <Unit20> 234 <Filename Value=" UBill.pas"/>235 <UnitName Value=" UBill"/>236 <WindowIndex Value="0"/> 237 <TopLine Value=" 1"/>238 <CursorPos X=" 52" Y="124"/>239 <UsageCount Value="1 02"/>236 <Filename Value="../../../../other/powtils/release/1.7.1/main/dynpwu.pas"/> 237 <UnitName Value="dynpwu"/> 238 <WindowIndex Value="0"/> 239 <TopLine Value="29"/> 240 <CursorPos X="2" Y="38"/> 241 <UsageCount Value="19"/> 240 242 <DefaultSyntaxHighlighter Value="Delphi"/> 241 243 </Unit20> 242 244 <Unit21> 243 <Filename Value="/usr/share/fpcsrc/packages/fv/src/dialogs.pas"/> 244 <UnitName Value="Dialogs"/> 245 <TopLine Value="1"/> 246 <CursorPos X="19" Y="4"/> 247 <UsageCount Value="10"/> 245 <Filename Value="UCGIApplication.pas"/> 246 <UnitName Value="UCGIApplication"/> 247 <WindowIndex Value="0"/> 248 <TopLine Value="112"/> 249 <CursorPos X="23" Y="125"/> 250 <UsageCount Value="5"/> 248 251 <DefaultSyntaxHighlighter Value="Delphi"/> 249 252 </Unit21> 250 253 <Unit22> 251 <Filename Value=" ../../../../other/powtils/release/1.7.1/main/dynpwu.pas"/>252 <UnitName Value=" dynpwu"/>253 <WindowIndex Value="0"/> 254 <TopLine Value=" 29"/>255 <CursorPos X=" 2" Y="38"/>256 <UsageCount Value=" 30"/>254 <Filename Value="UMainCGI.pas"/> 255 <UnitName Value="UMainCGI"/> 256 <WindowIndex Value="0"/> 257 <TopLine Value="1"/> 258 <CursorPos X="1" Y="1"/> 259 <UsageCount Value="5"/> 257 260 <DefaultSyntaxHighlighter Value="Delphi"/> 258 261 </Unit22> 259 262 <Unit23> 260 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwbuffer.pas"/> 261 <UnitName Value="pwbuffer"/> 262 <WindowIndex Value="0"/> 263 <TopLine Value="62"/> 264 <CursorPos X="6" Y="62"/> 265 <UsageCount Value="7"/> 263 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/classesh.inc"/> 264 <EditorIndex Value="7"/> 265 <WindowIndex Value="0"/> 266 <TopLine Value="539"/> 267 <CursorPos X="14" Y="556"/> 268 <UsageCount Value="97"/> 269 <Loaded Value="True"/> 266 270 <DefaultSyntaxHighlighter Value="Delphi"/> 267 271 </Unit23> 268 272 <Unit24> 269 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwbase64enc.pas"/> 270 <UnitName Value="pwbase64enc"/> 271 <WindowIndex Value="0"/> 272 <TopLine Value="125"/> 273 <CursorPos X="9" Y="141"/> 274 <UsageCount Value="7"/> 273 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/osutilsh.inc"/> 274 <EditorIndex Value="3"/> 275 <WindowIndex Value="0"/> 276 <TopLine Value="10"/> 277 <CursorPos X="22" Y="23"/> 278 <UsageCount Value="97"/> 279 <Loaded Value="True"/> 275 280 <DefaultSyntaxHighlighter Value="Delphi"/> 276 281 </Unit24> 277 282 <Unit25> 278 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwdirutil_test.pas"/>279 <UnitName Value="pwdirutil_test"/>280 <WindowIndex Value="0"/>281 <TopLine Value="1"/>282 <CursorPos X="1" Y="1"/>283 <UsageCount Value="7"/>284 <DefaultSyntaxHighlighter Value="Delphi"/>285 </Unit25>286 <Unit26>287 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwdefaultcfg.pas"/>288 <UnitName Value="pwdefaultcfg"/>289 <WindowIndex Value="0"/>290 <TopLine Value="103"/>291 <CursorPos X="29" Y="112"/>292 <UsageCount Value="7"/>293 <DefaultSyntaxHighlighter Value="Delphi"/>294 </Unit26>295 <Unit27>296 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwhtmtils.pas"/>297 <UnitName Value="pwHTMtils"/>298 <WindowIndex Value="0"/>299 <TopLine Value="1"/>300 <CursorPos X="12" Y="10"/>301 <UsageCount Value="7"/>302 <DefaultSyntaxHighlighter Value="Delphi"/>303 </Unit27>304 <Unit28>305 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwhtmtool.pas"/>306 <UnitName Value="pwhtmtool"/>307 <WindowIndex Value="0"/>308 <TopLine Value="1"/>309 <CursorPos X="8" Y="1"/>310 <UsageCount Value="5"/>311 <DefaultSyntaxHighlighter Value="Delphi"/>312 </Unit28>313 <Unit29>314 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwhtmw.pas"/>315 <UnitName Value="pwHTMw"/>316 <WindowIndex Value="0"/>317 <TopLine Value="1803"/>318 <CursorPos X="39" Y="1806"/>319 <UsageCount Value="7"/>320 <DefaultSyntaxHighlighter Value="Delphi"/>321 </Unit29>322 <Unit30>323 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwhttp.pas"/>324 <UnitName Value="pwhttp"/>325 <WindowIndex Value="0"/>326 <TopLine Value="173"/>327 <CursorPos X="10" Y="192"/>328 <UsageCount Value="5"/>329 <DefaultSyntaxHighlighter Value="Delphi"/>330 </Unit30>331 <Unit31>332 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwmailprep.pas"/>333 <UnitName Value="pwmailprep"/>334 <WindowIndex Value="0"/>335 <TopLine Value="31"/>336 <CursorPos X="3" Y="49"/>337 <UsageCount Value="7"/>338 <DefaultSyntaxHighlighter Value="Delphi"/>339 </Unit31>340 <Unit32>341 <Filename Value="../../../../other/powtils/release/1.7.1/main/pwsds.pas"/>342 <UnitName Value="pwsds"/>343 <WindowIndex Value="0"/>344 <TopLine Value="2569"/>345 <CursorPos X="27" Y="2594"/>346 <UsageCount Value="5"/>347 <DefaultSyntaxHighlighter Value="Delphi"/>348 </Unit32>349 <Unit33>350 <Filename Value="UCGIApplication.pas"/>351 <UnitName Value="UCGIApplication"/>352 <WindowIndex Value="0"/>353 <TopLine Value="112"/>354 <CursorPos X="23" Y="125"/>355 <UsageCount Value="16"/>356 <DefaultSyntaxHighlighter Value="Delphi"/>357 </Unit33>358 <Unit34>359 <Filename Value="UMainCGI.pas"/>360 <UnitName Value="UMainCGI"/>361 <WindowIndex Value="0"/>362 <TopLine Value="1"/>363 <CursorPos X="1" Y="1"/>364 <UsageCount Value="16"/>365 <DefaultSyntaxHighlighter Value="Delphi"/>366 </Unit34>367 <Unit35>368 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/classesh.inc"/>369 <EditorIndex Value="7"/>370 <WindowIndex Value="0"/>371 <TopLine Value="539"/>372 <CursorPos X="14" Y="556"/>373 <UsageCount Value="39"/>374 <Loaded Value="True"/>375 <DefaultSyntaxHighlighter Value="Delphi"/>376 </Unit35>377 <Unit36>378 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/osutilsh.inc"/>379 <EditorIndex Value="3"/>380 <WindowIndex Value="0"/>381 <TopLine Value="10"/>382 <CursorPos X="22" Y="23"/>383 <UsageCount Value="39"/>384 <Loaded Value="True"/>385 <DefaultSyntaxHighlighter Value="Delphi"/>386 </Unit36>387 <Unit37>388 283 <Filename Value="/usr/share/fpcsrc/rtl/unix/sysutils.pp"/> 389 284 <UnitName Value="sysutils"/> … … 392 287 <TopLine Value="1140"/> 393 288 <CursorPos X="26" Y="1143"/> 394 <UsageCount Value="39"/> 289 <UsageCount Value="97"/> 290 <Loaded Value="True"/> 291 <DefaultSyntaxHighlighter Value="Delphi"/> 292 </Unit25> 293 <Unit26> 294 <Filename Value="/usr/share/fpcsrc/rtl/unix/sysunixh.inc"/> 295 <EditorIndex Value="6"/> 296 <WindowIndex Value="0"/> 297 <TopLine Value="43"/> 298 <CursorPos X="5" Y="61"/> 299 <UsageCount Value="97"/> 300 <Loaded Value="True"/> 301 <DefaultSyntaxHighlighter Value="Delphi"/> 302 </Unit26> 303 <Unit27> 304 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/osutil.inc"/> 305 <EditorIndex Value="5"/> 306 <WindowIndex Value="0"/> 307 <TopLine Value="50"/> 308 <CursorPos X="10" Y="63"/> 309 <UsageCount Value="97"/> 310 <Loaded Value="True"/> 311 <DefaultSyntaxHighlighter Value="Delphi"/> 312 </Unit27> 313 <Unit28> 314 <Filename Value="Common/UStringListEx.pas"/> 315 <IsPartOfProject Value="True"/> 316 <UnitName Value="UStringListEx"/> 317 <EditorIndex Value="1"/> 318 <WindowIndex Value="0"/> 319 <TopLine Value="1"/> 320 <CursorPos X="15" Y="46"/> 321 <UsageCount Value="196"/> 322 <Loaded Value="True"/> 323 <DefaultSyntaxHighlighter Value="Delphi"/> 324 </Unit28> 325 <Unit29> 326 <Filename Value="WebServer/UCGIApplication.pas"/> 327 <UnitName Value="UCGIApplication"/> 328 <WindowIndex Value="0"/> 329 <TopLine Value="8"/> 330 <CursorPos X="17" Y="19"/> 331 <UsageCount Value="46"/> 332 <DefaultSyntaxHighlighter Value="Delphi"/> 333 </Unit29> 334 <Unit30> 335 <Filename Value="Common/UDatabase.pas"/> 336 <IsPartOfProject Value="True"/> 337 <UnitName Value="UDatabase"/> 338 <EditorIndex Value="23"/> 339 <WindowIndex Value="0"/> 340 <TopLine Value="25"/> 341 <CursorPos X="86" Y="94"/> 342 <UsageCount Value="196"/> 343 <Loaded Value="True"/> 344 <DefaultSyntaxHighlighter Value="Delphi"/> 345 </Unit30> 346 <Unit31> 347 <Filename Value="Common/UHtmlClasses.pas"/> 348 <IsPartOfProject Value="True"/> 349 <UnitName Value="UHtmlClasses"/> 350 <EditorIndex Value="29"/> 351 <WindowIndex Value="0"/> 352 <TopLine Value="279"/> 353 <CursorPos X="56" Y="299"/> 354 <UsageCount Value="196"/> 355 <Loaded Value="True"/> 356 <DefaultSyntaxHighlighter Value="Delphi"/> 357 </Unit31> 358 <Unit32> 359 <Filename Value="Common/USqlDatabase.pas"/> 360 <IsPartOfProject Value="True"/> 361 <UnitName Value="USqlDatabase"/> 362 <EditorIndex Value="27"/> 363 <WindowIndex Value="0"/> 364 <TopLine Value="196"/> 365 <CursorPos X="16" Y="210"/> 366 <UsageCount Value="196"/> 367 <Loaded Value="True"/> 368 <DefaultSyntaxHighlighter Value="Delphi"/> 369 </Unit32> 370 <Unit33> 371 <Filename Value="Common/UXmlClasses.pas"/> 372 <IsPartOfProject Value="True"/> 373 <UnitName Value="UXmlClasses"/> 374 <EditorIndex Value="11"/> 375 <WindowIndex Value="0"/> 376 <TopLine Value="44"/> 377 <CursorPos X="29" Y="61"/> 378 <UsageCount Value="196"/> 379 <Loaded Value="True"/> 380 <DefaultSyntaxHighlighter Value="Delphi"/> 381 </Unit33> 382 <Unit34> 383 <Filename Value="Application/UCustomCGIApplication.pas"/> 384 <UnitName Value="UCustomCGIApplication"/> 385 <WindowIndex Value="0"/> 386 <TopLine Value="99"/> 387 <CursorPos X="33" Y="117"/> 388 <UsageCount Value="47"/> 389 <DefaultSyntaxHighlighter Value="Delphi"/> 390 </Unit34> 391 <Unit35> 392 <Filename Value="/usr/share/fpcsrc/rtl/inc/mathh.inc"/> 393 <EditorIndex Value="30"/> 394 <WindowIndex Value="0"/> 395 <TopLine Value="61"/> 396 <CursorPos X="14" Y="78"/> 397 <UsageCount Value="96"/> 398 <Loaded Value="True"/> 399 <DefaultSyntaxHighlighter Value="Delphi"/> 400 </Unit35> 401 <Unit36> 402 <Filename Value="/usr/share/fpcsrc/rtl/inc/systemh.inc"/> 403 <WindowIndex Value="0"/> 404 <TopLine Value="476"/> 405 <CursorPos X="3" Y="489"/> 406 <UsageCount Value="23"/> 407 <DefaultSyntaxHighlighter Value="Delphi"/> 408 </Unit36> 409 <Unit37> 410 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/dati.inc"/> 411 <EditorIndex Value="32"/> 412 <WindowIndex Value="0"/> 413 <TopLine Value="519"/> 414 <CursorPos X="23" Y="526"/> 415 <UsageCount Value="92"/> 395 416 <Loaded Value="True"/> 396 417 <DefaultSyntaxHighlighter Value="Delphi"/> 397 418 </Unit37> 398 419 <Unit38> 399 <Filename Value="/usr/share/fpcsrc/rtl/unix/sysunixh.inc"/> 400 <EditorIndex Value="6"/> 401 <WindowIndex Value="0"/> 402 <TopLine Value="43"/> 403 <CursorPos X="5" Y="61"/> 404 <UsageCount Value="39"/> 420 <Filename Value="UConfigSample.pas"/> 421 <IsPartOfProject Value="True"/> 422 <UnitName Value="UConfig"/> 423 <EditorIndex Value="10"/> 424 <WindowIndex Value="0"/> 425 <TopLine Value="1"/> 426 <CursorPos X="53" Y="18"/> 427 <UsageCount Value="179"/> 405 428 <Loaded Value="True"/> 406 429 <DefaultSyntaxHighlighter Value="Delphi"/> 407 430 </Unit38> 408 431 <Unit39> 409 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/osutil.inc"/> 410 <EditorIndex Value="5"/> 411 <WindowIndex Value="0"/> 412 <TopLine Value="50"/> 413 <CursorPos X="10" Y="63"/> 414 <UsageCount Value="39"/> 432 <Filename Value="Application/UUser.pas"/> 433 <IsPartOfProject Value="True"/> 434 <UnitName Value="UUser"/> 435 <EditorIndex Value="28"/> 436 <WindowIndex Value="0"/> 437 <TopLine Value="127"/> 438 <CursorPos X="16" Y="164"/> 439 <UsageCount Value="158"/> 415 440 <Loaded Value="True"/> 416 441 <DefaultSyntaxHighlighter Value="Delphi"/> 417 442 </Unit39> 418 443 <Unit40> 419 <Filename Value=" Common/UStringListEx.pas"/>420 <IsPartOfProject Value="True"/> 421 <UnitName Value="U StringListEx"/>422 <EditorIndex Value="1 "/>423 <WindowIndex Value="0"/> 424 <TopLine Value=" 1"/>425 <CursorPos X="1 5" Y="46"/>426 <UsageCount Value=" 79"/>444 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 445 <IsPartOfProject Value="True"/> 446 <UnitName Value="UHTTPSessionMySQL"/> 447 <EditorIndex Value="12"/> 448 <WindowIndex Value="0"/> 449 <TopLine Value="81"/> 450 <CursorPos X="1" Y="96"/> 451 <UsageCount Value="157"/> 427 452 <Loaded Value="True"/> 428 453 <DefaultSyntaxHighlighter Value="Delphi"/> 429 454 </Unit40> 430 455 <Unit41> 431 <Filename Value="WebServer/UCGIApplication.pas"/> 432 <UnitName Value="UCGIApplication"/> 433 <WindowIndex Value="0"/> 434 <TopLine Value="8"/> 435 <CursorPos X="17" Y="19"/> 436 <UsageCount Value="57"/> 456 <Filename Value="WebServer/UHTTPSessionFile.pas"/> 457 <IsPartOfProject Value="True"/> 458 <UnitName Value="UHTTPSessionFile"/> 459 <EditorIndex Value="24"/> 460 <WindowIndex Value="0"/> 461 <TopLine Value="1"/> 462 <CursorPos X="18" Y="45"/> 463 <UsageCount Value="157"/> 464 <Loaded Value="True"/> 437 465 <DefaultSyntaxHighlighter Value="Delphi"/> 438 466 </Unit41> 439 467 <Unit42> 440 <Filename Value="Common/U Database.pas"/>441 <IsPartOfProject Value="True"/> 442 <UnitName Value="U Database"/>443 <EditorIndex Value="2 3"/>444 <WindowIndex Value="0"/> 445 <TopLine Value=" 61"/>446 <CursorPos X=" 26" Y="22"/>447 <UsageCount Value=" 79"/>468 <Filename Value="Common/UCommon.pas"/> 469 <IsPartOfProject Value="True"/> 470 <UnitName Value="UCommon"/> 471 <EditorIndex Value="22"/> 472 <WindowIndex Value="0"/> 473 <TopLine Value="142"/> 474 <CursorPos X="52" Y="165"/> 475 <UsageCount Value="157"/> 448 476 <Loaded Value="True"/> 449 477 <DefaultSyntaxHighlighter Value="Delphi"/> 450 478 </Unit42> 451 479 <Unit43> 452 <Filename Value=" Common/UHtmlClasses.pas"/>453 <IsPartOfProject Value="True"/> 454 <UnitName Value="UH tmlClasses"/>455 <EditorIndex Value=" 30"/>456 <WindowIndex Value="0"/> 457 <TopLine Value=" 279"/>458 <CursorPos X=" 56" Y="299"/>459 <UsageCount Value=" 79"/>480 <Filename Value="WebServer/UHTTPServer.pas"/> 481 <IsPartOfProject Value="True"/> 482 <UnitName Value="UHTTPServer"/> 483 <EditorIndex Value="13"/> 484 <WindowIndex Value="0"/> 485 <TopLine Value="1"/> 486 <CursorPos X="62" Y="11"/> 487 <UsageCount Value="157"/> 460 488 <Loaded Value="True"/> 461 489 <DefaultSyntaxHighlighter Value="Delphi"/> 462 490 </Unit43> 463 491 <Unit44> 464 <Filename Value=" Common/USqlDatabase.pas"/>465 <IsPartOfProject Value="True"/> 466 <UnitName Value="U SqlDatabase"/>467 <EditorIndex Value=" 27"/>468 <WindowIndex Value="0"/> 469 <TopLine Value="1"/> 470 <CursorPos X=" 36" Y="11"/>471 <UsageCount Value=" 79"/>492 <Filename Value="WebServer/UHTTPServerTCP.pas"/> 493 <IsPartOfProject Value="True"/> 494 <UnitName Value="UHTTPServerTCP"/> 495 <EditorIndex Value="19"/> 496 <WindowIndex Value="0"/> 497 <TopLine Value="1"/> 498 <CursorPos X="65" Y="100"/> 499 <UsageCount Value="157"/> 472 500 <Loaded Value="True"/> 473 501 <DefaultSyntaxHighlighter Value="Delphi"/> 474 502 </Unit44> 475 503 <Unit45> 476 <Filename Value=" Common/UXmlClasses.pas"/>477 <IsPartOfProject Value="True"/> 478 <UnitName Value="U XmlClasses"/>479 <EditorIndex Value=" 11"/>480 <WindowIndex Value="0"/> 481 <TopLine Value=" 44"/>482 <CursorPos X=" 29" Y="61"/>483 <UsageCount Value=" 79"/>504 <Filename Value="WebServer/UHTTPServerCGI.pas"/> 505 <IsPartOfProject Value="True"/> 506 <UnitName Value="UHTTPServerCGI"/> 507 <EditorIndex Value="21"/> 508 <WindowIndex Value="0"/> 509 <TopLine Value="1"/> 510 <CursorPos X="3" Y="29"/> 511 <UsageCount Value="157"/> 484 512 <Loaded Value="True"/> 485 513 <DefaultSyntaxHighlighter Value="Delphi"/> 486 514 </Unit45> 487 515 <Unit46> 488 <Filename Value="Application/UCustomCGIApplication.pas"/> 489 <UnitName Value="UCustomCGIApplication"/> 490 <WindowIndex Value="0"/> 491 <TopLine Value="99"/> 492 <CursorPos X="33" Y="117"/> 493 <UsageCount Value="58"/> 516 <Filename Value="Network/UTCPServer.pas"/> 517 <IsPartOfProject Value="True"/> 518 <UnitName Value="UTCPServer"/> 519 <EditorIndex Value="16"/> 520 <WindowIndex Value="0"/> 521 <TopLine Value="1"/> 522 <CursorPos X="6" Y="15"/> 523 <UsageCount Value="156"/> 524 <Loaded Value="True"/> 494 525 <DefaultSyntaxHighlighter Value="Delphi"/> 495 526 </Unit46> 496 527 <Unit47> 497 <Filename Value="/usr/share/fpcsrc/rtl/inc/varianth.inc"/> 498 <WindowIndex Value="0"/> 499 <TopLine Value="501"/> 500 <CursorPos X="10" Y="503"/> 501 <UsageCount Value="5"/> 528 <Filename Value="Common/UPool.pas"/> 529 <IsPartOfProject Value="True"/> 530 <UnitName Value="UPool"/> 531 <EditorIndex Value="18"/> 532 <WindowIndex Value="0"/> 533 <TopLine Value="1"/> 534 <CursorPos X="42" Y="8"/> 535 <UsageCount Value="156"/> 536 <Loaded Value="True"/> 502 537 <DefaultSyntaxHighlighter Value="Delphi"/> 503 538 </Unit47> 504 539 <Unit48> 505 <Filename Value="/usr/share/fpcsrc/rtl/inc/mathh.inc"/> 506 <EditorIndex Value="31"/> 507 <WindowIndex Value="0"/> 508 <TopLine Value="61"/> 509 <CursorPos X="14" Y="78"/> 510 <UsageCount Value="38"/> 540 <Filename Value="Common/UResetableThread.pas"/> 541 <IsPartOfProject Value="True"/> 542 <UnitName Value="UResetableThread"/> 543 <EditorIndex Value="17"/> 544 <WindowIndex Value="0"/> 545 <TopLine Value="1"/> 546 <CursorPos X="52" Y="92"/> 547 <UsageCount Value="156"/> 511 548 <Loaded Value="True"/> 512 549 <DefaultSyntaxHighlighter Value="Delphi"/> 513 550 </Unit48> 514 551 <Unit49> 515 <Filename Value="/usr/share/fpcsrc/rtl/inc/systemh.inc"/> 516 <WindowIndex Value="0"/> 517 <TopLine Value="476"/> 518 <CursorPos X="3" Y="489"/> 519 <UsageCount Value="34"/> 552 <Filename Value="Common/UMemoryStreamEx.pas"/> 553 <IsPartOfProject Value="True"/> 554 <UnitName Value="UMemoryStreamEx"/> 555 <EditorIndex Value="14"/> 556 <WindowIndex Value="0"/> 557 <TopLine Value="83"/> 558 <CursorPos X="47" Y="106"/> 559 <UsageCount Value="156"/> 560 <Loaded Value="True"/> 520 561 <DefaultSyntaxHighlighter Value="Delphi"/> 521 562 </Unit49> 522 563 <Unit50> 523 <Filename Value="/usr/share/fpcsrc/rtl/objpas/sysutils/dati.inc"/> 524 <EditorIndex Value="33"/> 525 <WindowIndex Value="0"/> 526 <TopLine Value="519"/> 527 <CursorPos X="23" Y="526"/> 528 <UsageCount Value="34"/> 564 <Filename Value="Common/UMIMEType.pas"/> 565 <IsPartOfProject Value="True"/> 566 <UnitName Value="UMIMEType"/> 567 <EditorIndex Value="15"/> 568 <WindowIndex Value="0"/> 569 <TopLine Value="1"/> 570 <CursorPos X="3" Y="687"/> 571 <UsageCount Value="156"/> 529 572 <Loaded Value="True"/> 530 573 <DefaultSyntaxHighlighter Value="Delphi"/> 531 574 </Unit50> 532 575 <Unit51> 533 <Filename Value="UConfigSample.pas"/>534 <IsPartOfProject Value="True"/>535 <UnitName Value="UConfig"/>536 <EditorIndex Value="10"/>537 <WindowIndex Value="0"/>538 <TopLine Value="1"/>539 <CursorPos X="53" Y="18"/>540 <UsageCount Value="62"/>541 <Loaded Value="True"/>542 <DefaultSyntaxHighlighter Value="Delphi"/>543 </Unit51>544 <Unit52>545 <Filename Value="Application/UUser.pas"/>546 <IsPartOfProject Value="True"/>547 <UnitName Value="UUser"/>548 <EditorIndex Value="29"/>549 <WindowIndex Value="0"/>550 <TopLine Value="121"/>551 <CursorPos X="64" Y="128"/>552 <UsageCount Value="41"/>553 <Loaded Value="True"/>554 <DefaultSyntaxHighlighter Value="Delphi"/>555 </Unit52>556 <Unit53>557 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/>558 <IsPartOfProject Value="True"/>559 <UnitName Value="UHTTPSessionMySQL"/>560 <EditorIndex Value="12"/>561 <WindowIndex Value="0"/>562 <TopLine Value="1"/>563 <CursorPos X="64" Y="17"/>564 <UsageCount Value="40"/>565 <Loaded Value="True"/>566 <DefaultSyntaxHighlighter Value="Delphi"/>567 </Unit53>568 <Unit54>569 <Filename Value="WebServer/UHTTPSessionFile.pas"/>570 <IsPartOfProject Value="True"/>571 <UnitName Value="UHTTPSessionFile"/>572 <EditorIndex Value="24"/>573 <WindowIndex Value="0"/>574 <TopLine Value="1"/>575 <CursorPos X="18" Y="45"/>576 <UsageCount Value="40"/>577 <Loaded Value="True"/>578 <DefaultSyntaxHighlighter Value="Delphi"/>579 </Unit54>580 <Unit55>581 <Filename Value="Common/UCommon.pas"/>582 <IsPartOfProject Value="True"/>583 <UnitName Value="UCommon"/>584 <EditorIndex Value="22"/>585 <WindowIndex Value="0"/>586 <TopLine Value="142"/>587 <CursorPos X="52" Y="165"/>588 <UsageCount Value="40"/>589 <Loaded Value="True"/>590 <DefaultSyntaxHighlighter Value="Delphi"/>591 </Unit55>592 <Unit56>593 <Filename Value="WebServer/UHTTPServer.pas"/>594 <IsPartOfProject Value="True"/>595 <UnitName Value="UHTTPServer"/>596 <IsVisibleTab Value="True"/>597 <EditorIndex Value="13"/>598 <WindowIndex Value="0"/>599 <TopLine Value="1"/>600 <CursorPos X="38" Y="9"/>601 <UsageCount Value="40"/>602 <Loaded Value="True"/>603 <DefaultSyntaxHighlighter Value="Delphi"/>604 </Unit56>605 <Unit57>606 <Filename Value="WebServer/UHTTPServerTCP.pas"/>607 <IsPartOfProject Value="True"/>608 <UnitName Value="UHTTPServerTCP"/>609 <EditorIndex Value="19"/>610 <WindowIndex Value="0"/>611 <TopLine Value="1"/>612 <CursorPos X="65" Y="100"/>613 <UsageCount Value="40"/>614 <Loaded Value="True"/>615 <DefaultSyntaxHighlighter Value="Delphi"/>616 </Unit57>617 <Unit58>618 <Filename Value="WebServer/UHTTPServerCGI.pas"/>619 <IsPartOfProject Value="True"/>620 <UnitName Value="UHTTPServerCGI"/>621 <EditorIndex Value="21"/>622 <WindowIndex Value="0"/>623 <TopLine Value="1"/>624 <CursorPos X="3" Y="29"/>625 <UsageCount Value="40"/>626 <Loaded Value="True"/>627 <DefaultSyntaxHighlighter Value="Delphi"/>628 </Unit58>629 <Unit59>630 <Filename Value="Network/UTCPServer.pas"/>631 <IsPartOfProject Value="True"/>632 <UnitName Value="UTCPServer"/>633 <EditorIndex Value="16"/>634 <WindowIndex Value="0"/>635 <TopLine Value="1"/>636 <CursorPos X="6" Y="15"/>637 <UsageCount Value="39"/>638 <Loaded Value="True"/>639 <DefaultSyntaxHighlighter Value="Delphi"/>640 </Unit59>641 <Unit60>642 <Filename Value="Common/UPool.pas"/>643 <IsPartOfProject Value="True"/>644 <UnitName Value="UPool"/>645 <EditorIndex Value="18"/>646 <WindowIndex Value="0"/>647 <TopLine Value="1"/>648 <CursorPos X="42" Y="8"/>649 <UsageCount Value="39"/>650 <Loaded Value="True"/>651 <DefaultSyntaxHighlighter Value="Delphi"/>652 </Unit60>653 <Unit61>654 <Filename Value="Common/UResetableThread.pas"/>655 <IsPartOfProject Value="True"/>656 <UnitName Value="UResetableThread"/>657 <EditorIndex Value="17"/>658 <WindowIndex Value="0"/>659 <TopLine Value="1"/>660 <CursorPos X="52" Y="92"/>661 <UsageCount Value="39"/>662 <Loaded Value="True"/>663 <DefaultSyntaxHighlighter Value="Delphi"/>664 </Unit61>665 <Unit62>666 <Filename Value="Common/UMemoryStreamEx.pas"/>667 <IsPartOfProject Value="True"/>668 <UnitName Value="UMemoryStreamEx"/>669 <EditorIndex Value="14"/>670 <WindowIndex Value="0"/>671 <TopLine Value="83"/>672 <CursorPos X="47" Y="106"/>673 <UsageCount Value="39"/>674 <Loaded Value="True"/>675 <DefaultSyntaxHighlighter Value="Delphi"/>676 </Unit62>677 <Unit63>678 <Filename Value="Common/UMIMEType.pas"/>679 <IsPartOfProject Value="True"/>680 <UnitName Value="UMIMEType"/>681 <EditorIndex Value="15"/>682 <WindowIndex Value="0"/>683 <TopLine Value="1"/>684 <CursorPos X="3" Y="687"/>685 <UsageCount Value="39"/>686 <Loaded Value="True"/>687 <DefaultSyntaxHighlighter Value="Delphi"/>688 </Unit63>689 <Unit64>690 576 <Filename Value="../../../lazarus/library/synapse/source/lib/blcksock.pas"/> 691 577 <UnitName Value="blcksock"/> … … 694 580 <TopLine Value="383"/> 695 581 <CursorPos X="15" Y="397"/> 696 <UsageCount Value=" 19"/>697 <Loaded Value="True"/> 698 </Unit 64>699 <Unit 65>582 <UsageCount Value="77"/> 583 <Loaded Value="True"/> 584 </Unit51> 585 <Unit52> 700 586 <Filename Value="Application/UCustomApplication.pas"/> 701 587 <IsPartOfProject Value="True"/> … … 703 589 <EditorIndex Value="2"/> 704 590 <WindowIndex Value="0"/> 705 <TopLine Value=" 1"/>706 <CursorPos X=" 48" Y="9"/>707 <UsageCount Value=" 39"/>708 <Loaded Value="True"/> 709 <DefaultSyntaxHighlighter Value="Delphi"/> 710 </Unit 65>711 <Unit 66>591 <TopLine Value="68"/> 592 <CursorPos X="28" Y="89"/> 593 <UsageCount Value="156"/> 594 <Loaded Value="True"/> 595 <DefaultSyntaxHighlighter Value="Delphi"/> 596 </Unit52> 597 <Unit53> 712 598 <Filename Value="/usr/share/fpcsrc/rtl/objpas/classes/stringl.inc"/> 713 599 <EditorIndex Value="8"/> … … 715 601 <TopLine Value="690"/> 716 602 <CursorPos X="3" Y="695"/> 717 <UsageCount Value=" 19"/>718 <Loaded Value="True"/> 719 <DefaultSyntaxHighlighter Value="Delphi"/> 720 </Unit 66>721 <Unit 67>603 <UsageCount Value="77"/> 604 <Loaded Value="True"/> 605 <DefaultSyntaxHighlighter Value="Delphi"/> 606 </Unit53> 607 <Unit54> 722 608 <Filename Value="Application/UPageList.pas"/> 723 609 <IsPartOfProject Value="True"/> … … 727 613 <TopLine Value="1"/> 728 614 <CursorPos X="43" Y="79"/> 729 <UsageCount Value="36"/> 730 <Loaded Value="True"/> 731 <DefaultSyntaxHighlighter Value="Delphi"/> 732 </Unit67> 733 <Unit68> 734 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/DictionaryStringString.pas"/> 735 <UnitName Value="DictionaryStringString"/> 736 <EditorIndex Value="28"/> 737 <WindowIndex Value="0"/> 738 <TopLine Value="1"/> 739 <CursorPos X="20" Y="17"/> 740 <UsageCount Value="10"/> 741 <Loaded Value="True"/> 742 </Unit68> 743 <Unit69> 744 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/DictionaryImplementation.tpl"/> 745 <WindowIndex Value="0"/> 746 <TopLine Value="22"/> 747 <CursorPos X="3" Y="40"/> 748 <UsageCount Value="10"/> 749 <DefaultSyntaxHighlighter Value="None"/> 750 </Unit69> 751 <Unit70> 752 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/DictionaryInterface.tpl"/> 753 <WindowIndex Value="0"/> 754 <TopLine Value="1"/> 755 <CursorPos X="50" Y="12"/> 756 <UsageCount Value="10"/> 757 <DefaultSyntaxHighlighter Value="None"/> 758 </Unit70> 615 <UsageCount Value="153"/> 616 <Loaded Value="True"/> 617 <DefaultSyntaxHighlighter Value="Delphi"/> 618 </Unit54> 759 619 </Units> 760 <JumpHistory Count=" 29" HistoryIndex="28">620 <JumpHistory Count="30" HistoryIndex="29"> 761 621 <Position1> 762 622 <Filename Value="Common/USqlDatabase.pas"/> 763 <Caret Line=" 426" Column="27" TopLine="424"/>623 <Caret Line="224" Column="18" TopLine="201"/> 764 624 </Position1> 765 625 <Position2> 766 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/classesh.inc"/>767 <Caret Line=" 581" Column="56" TopLine="564"/>626 <Filename Value="Common/USqlDatabase.pas"/> 627 <Caret Line="223" Column="13" TopLine="203"/> 768 628 </Position2> 769 629 <Position3> 770 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/stringl.inc"/>771 <Caret Line=" 196" Column="11" TopLine="186"/>630 <Filename Value="Common/USqlDatabase.pas"/> 631 <Caret Line="257" Column="21" TopLine="236"/> 772 632 </Position3> 773 633 <Position4> 774 <Filename Value=" /usr/share/fpcsrc/rtl/objpas/classes/stringl.inc"/>775 <Caret Line=" 194" Column="8" TopLine="186"/>634 <Filename Value="Common/USqlDatabase.pas"/> 635 <Caret Line="287" Column="21" TopLine="266"/> 776 636 </Position4> 777 637 <Position5> 778 638 <Filename Value="Common/USqlDatabase.pas"/> 779 <Caret Line=" 11" Column="15" TopLine="1"/>639 <Caret Line="305" Column="21" TopLine="284"/> 780 640 </Position5> 781 641 <Position6> 782 642 <Filename Value="Common/USqlDatabase.pas"/> 783 <Caret Line=" 25" Column="59" TopLine="8"/>643 <Caret Line="347" Column="19" TopLine="331"/> 784 644 </Position6> 785 645 <Position7> 786 646 <Filename Value="Common/USqlDatabase.pas"/> 787 <Caret Line=" 433" Column="44" TopLine="412"/>647 <Caret Line="353" Column="22" TopLine="333"/> 788 648 </Position7> 789 649 <Position8> 790 650 <Filename Value="Common/USqlDatabase.pas"/> 791 <Caret Line=" 22" Column="30" TopLine="1"/>651 <Caret Line="371" Column="17" TopLine="345"/> 792 652 </Position8> 793 653 <Position9> 794 654 <Filename Value="Common/USqlDatabase.pas"/> 795 <Caret Line=" 60" Column="68" TopLine="40"/>655 <Caret Line="367" Column="29" TopLine="347"/> 796 656 </Position9> 797 657 <Position10> 798 <Filename Value=" Common/USqlDatabase.pas"/>799 <Caret Line="17 5" Column="76" TopLine="158"/>658 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 659 <Caret Line="17" Column="64" TopLine="1"/> 800 660 </Position10> 801 661 <Position11> 802 <Filename Value=" Common/USqlDatabase.pas"/>803 <Caret Line=" 187" Column="33" TopLine="170"/>662 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 663 <Caret Line="43" Column="33" TopLine="23"/> 804 664 </Position11> 805 665 <Position12> 806 <Filename Value=" Common/USqlDatabase.pas"/>807 <Caret Line=" 191" Column="42" TopLine="174"/>666 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 667 <Caret Line="71" Column="31" TopLine="51"/> 808 668 </Position12> 809 669 <Position13> 810 <Filename Value=" Common/USqlDatabase.pas"/>811 <Caret Line=" 222" Column="43" TopLine="205"/>670 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 671 <Caret Line="73" Column="20" TopLine="55"/> 812 672 </Position13> 813 673 <Position14> 814 <Filename Value=" Common/USqlDatabase.pas"/>815 <Caret Line=" 226" Column="13" TopLine="209"/>674 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 675 <Caret Line="95" Column="35" TopLine="75"/> 816 676 </Position14> 817 677 <Position15> 818 <Filename Value=" Common/USqlDatabase.pas"/>819 <Caret Line=" 234" Column="77" TopLine="217"/>678 <Filename Value="WebServer/UHTTPSessionMySQL.pas"/> 679 <Caret Line="98" Column="33" TopLine="75"/> 820 680 </Position15> 821 681 <Position16> 822 <Filename Value=" Common/USqlDatabase.pas"/>823 <Caret Line=" 246" Column="33" TopLine="229"/>682 <Filename Value="Application/UUser.pas"/> 683 <Caret Line="128" Column="64" TopLine="115"/> 824 684 </Position16> 825 685 <Position17> 826 <Filename Value=" Common/USqlDatabase.pas"/>827 <Caret Line=" 250" Column="42" TopLine="233"/>686 <Filename Value="Application/UUser.pas"/> 687 <Caret Line="55" Column="28" TopLine="35"/> 828 688 </Position17> 829 689 <Position18> 830 <Filename Value=" Common/USqlDatabase.pas"/>831 <Caret Line=" 267" Column="76" TopLine="250"/>690 <Filename Value="Application/UUser.pas"/> 691 <Caret Line="61" Column="7" TopLine="42"/> 832 692 </Position18> 833 693 <Position19> 834 <Filename Value=" Common/USqlDatabase.pas"/>835 <Caret Line=" 277" Column="33" TopLine="260"/>694 <Filename Value="Application/UUser.pas"/> 695 <Caret Line="64" Column="30" TopLine="46"/> 836 696 </Position19> 837 697 <Position20> 838 <Filename Value=" Common/USqlDatabase.pas"/>839 <Caret Line=" 280" Column="48" TopLine="263"/>698 <Filename Value="Application/UUser.pas"/> 699 <Caret Line="81" Column="28" TopLine="61"/> 840 700 </Position20> 841 701 <Position21> 842 <Filename Value=" Common/USqlDatabase.pas"/>843 <Caret Line=" 383" Column="1" TopLine="370"/>702 <Filename Value="Application/UUser.pas"/> 703 <Caret Line="100" Column="18" TopLine="76"/> 844 704 </Position21> 845 705 <Position22> 846 <Filename Value=" Common/USqlDatabase.pas"/>847 <Caret Line=" 391" Column="66" TopLine="370"/>706 <Filename Value="Application/UUser.pas"/> 707 <Caret Line="114" Column="28" TopLine="90"/> 848 708 </Position22> 849 709 <Position23> 850 710 <Filename Value="Application/UUser.pas"/> 851 <Caret Line=" 66" Column="56" TopLine="1"/>711 <Caret Line="135" Column="16" TopLine="105"/> 852 712 </Position23> 853 713 <Position24> 854 714 <Filename Value="Application/UUser.pas"/> 855 <Caret Line="133" Column=" 73" TopLine="116"/>715 <Caret Line="133" Column="30" TopLine="112"/> 856 716 </Position24> 857 717 <Position25> 858 718 <Filename Value="Application/UUser.pas"/> 859 <Caret Line="14 7" Column="74" TopLine="122"/>719 <Caret Line="148" Column="30" TopLine="123"/> 860 720 </Position25> 861 721 <Position26> 862 <Filename Value=" Common/UMemoryStreamEx.pas"/>863 <Caret Line="25 " Column="15" TopLine="1"/>722 <Filename Value="Application/UCustomApplication.pas"/> 723 <Caret Line="253" Column="72" TopLine="147"/> 864 724 </Position26> 865 725 <Position27> 866 <Filename Value=" Common/UMemoryStreamEx.pas"/>867 <Caret Line=" 68" Column="26" TopLine="51"/>726 <Filename Value="Pages/UMainPage.pas"/> 727 <Caret Line="234" Column="81" TopLine="212"/> 868 728 </Position27> 869 729 <Position28> 870 <Filename Value=" WebServer/UHTTPServer.pas"/>871 <Caret Line=" 30" Column="29" TopLine="10"/>730 <Filename Value="Pages/UMainPage.pas"/> 731 <Caret Line="82" Column="34" TopLine="62"/> 872 732 </Position28> 873 733 <Position29> 874 <Filename Value=" WebServer/UHTTPServer.pas"/>875 <Caret Line=" 72" Column="42" TopLine="56"/>734 <Filename Value="Pages/UMainPage.pas"/> 735 <Caret Line="218" Column="32" TopLine="197"/> 876 736 </Position29> 737 <Position30> 738 <Filename Value="Pages/UMainPage.pas"/> 739 <Caret Line="237" Column="32" TopLine="216"/> 740 </Position30> 877 741 </JumpHistory> 878 742 </ProjectOptions> -
trunk/Common/USqlDatabase.pas
r37 r38 3 3 {$mode Delphi}{$H+} 4 4 5 // Upraveno: 8.9.20105 // Upraveno: 28.10.2010 6 6 7 7 interface … … 52 52 procedure CreateTable(Name: string); 53 53 procedure CreateColumn(Table, ColumnName: string; ColumnType: TTypeKind); 54 function Query(Data: string): TDbRows;55 function Select(ATable: string; Filter: string = '*'; Condition: string = '1'): TDbRows;54 procedure Query(DbRows: TDbRows; Data: string); 55 procedure Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1'); 56 56 procedure Delete(ATable: string; Condition: string = '1'); 57 57 procedure Insert(ATable: string; Data: TDictionaryStringString); … … 167 167 168 168 try 169 Rows := Query('SET NAMES ' + Encoding); 169 Rows := TDbRows.Create; 170 Query(Rows, 'SET NAMES ' + Encoding); 170 171 finally 171 172 Rows.Free; … … 194 195 System.Delete(DbValues, 1, 1); 195 196 try 196 DbResult := Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 197 DbResult := TDbRows.Create; 198 Query(DbResult, 'INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 197 199 finally 198 200 DbResult.Free; … … 200 202 end; 201 203 202 function TSqlDatabase.Query(Data: string): TDbRows;204 procedure TSqlDatabase.Query(DbRows: TDbRows; Data: string); 203 205 var 204 206 I, II: Integer; … … 206 208 DbRow: MYSQL_ROW; 207 209 begin 210 DbRows.Clear; 208 211 //DebugLog('SqlDatabase query: '+Data); 209 212 RepeatLastAction := False; 210 213 LastQuery := Data; 211 Result := TDbRows.Create;212 214 mysql_query(FSession, PChar(Data)); 213 215 if LastErrorNumber <> 0 then begin … … 217 219 DbResult := mysql_store_result(FSession); 218 220 if Assigned(DbResult) then begin 219 Result.Count := mysql_num_rows(DbResult);220 for I := 0 to Result.Count - 1 do begin221 DbRows.Count := mysql_num_rows(DbResult); 222 for I := 0 to DbRows.Count - 1 do begin 221 223 DbRow := mysql_fetch_row(DbResult); 222 Result[I] := TDictionaryStringString.Create;223 with Result[I] do begin224 DbRows[I] := TDictionaryStringString.Create; 225 with DbRows[I] do begin 224 226 for II := 0 to mysql_num_fields(DbResult) - 1 do begin 225 227 Add(mysql_fetch_field_direct(DbResult, II)^.Name, … … 253 255 System.Delete(DbValues, 1, 1); 254 256 try 255 DbResult := Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 257 DbResult := TDbRows.Create; 258 Query(DbResult, 'REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')'); 256 259 finally 257 260 DbResult.Free; … … 259 262 end; 260 263 261 function TSqlDatabase.Select(ATable: string; Filter: string = '*'; Condition: string = '1'): TDbRows;264 procedure TSqlDatabase.Select(DbRows: TDbRows; ATable: string; Filter: string = '*'; Condition: string = '1'); 262 265 begin 263 266 Table := ATable; 264 Result := Query('SELECT ' + Filter + ' FROM `' + Table + '` WHERE ' + Condition);267 Query(DbRows, 'SELECT ' + Filter + ' FROM `' + Table + '` WHERE ' + Condition); 265 268 end; 266 269 … … 282 285 System.Delete(DbValues, 1, 1); 283 286 try 284 DbResult := Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 287 DbResult := TDbRows.Create; 288 Query(DbResult, 'UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition); 285 289 finally 286 290 DbResult.Free; … … 299 303 Table := ATable; 300 304 try 301 DbResult := Query('DELETE FROM `' + Table + '` WHERE ' + Condition); 305 DbResult := TDbRows.Create; 306 Query(DbResult, 'DELETE FROM `' + Table + '` WHERE ' + Condition); 302 307 finally 303 308 DbResult.Free; … … 341 346 var 342 347 TempDatabase: string; 348 DbRows: TDbRows; 343 349 begin 344 350 TempDatabase := Database; 345 351 Database := 'mysql'; 346 352 Connect; 347 Query('CREATE DATABASE ' + TempDatabase); 353 try 354 DbRows := TDbRows.Create; 355 Query(DbRows, 'CREATE DATABASE ' + TempDatabase); 356 finally 357 DbRows.Free; 358 end; 348 359 Disconnect; 349 360 Database := TempDatabase; … … 351 362 352 363 procedure TSqlDatabase.CreateTable(Name: string); 353 begin 354 Query('CREATE TABLE `' + Name + '`' + 355 ' (`Id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`Id`));'); 364 var 365 DbRows: TDbRows; 366 begin 367 try 368 DbRows := TDbRows.Create; 369 Query(DbRows, 'CREATE TABLE `' + Name + '`' + 370 ' (`Id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`Id`));'); 371 finally 372 DbRows.Free; 373 end; 356 374 end; 357 375 … … 361 379 ColTypes: array[0..17] of string = ('', 'INT', 'CHAR', 'INT', 'DOUBLE', 362 380 'VARCHAR(255)', 'SET', 'INT', '', '', 'TEXT', 'TEXT', '', '', '', '', '', ''); 363 begin 364 Query('ALTER TABLE `' + Table + '` ADD `' + ColumnName + '` ' + 365 ColTypes[Integer(ColumnType)] + ' NOT NULL'); 381 var 382 DbRows: TDbRows; 383 begin 384 try 385 DbRows := TDbRows.Create; 386 Query(DbRows, 'ALTER TABLE `' + Table + '` ADD `' + ColumnName + '` ' + 387 ColTypes[Integer(ColumnType)] + ' NOT NULL'); 388 finally 389 DbRows.Free; 390 end; 366 391 end; 367 392 -
trunk/Pages/UMainPage.pas
r36 r38 80 80 Text := '<table>'; 81 81 try 82 DbRows := Database.Query('SELECT * FROM History ORDER BY Date DESC'); 82 DbRows := TDbRows.Create; 83 Database.Query(DbRows, 'SELECT * FROM History ORDER BY Date DESC'); 83 84 for I := 0 to DbRows.Count - 1 do begin 84 85 Text := Text + '<tr><td style="text-align: right; vertical-align: top;">' + … … 214 215 '<tr><th>Označení</th><th>Rychlost</th><th>Vyhrazená paměť</th><th>Pevný disk</th><th>Procesor</th><th>Cena [Kč/měsíc]</th></tr>'; 215 216 try 216 DbRows := Database.Query('SELECT * FROM VPSHosting ORDER BY Price DESC'); 217 DbRows := TDbRows.Create; 218 Database.Query(DbRows, 'SELECT * FROM VPSHosting ORDER BY Price DESC'); 217 219 for I := 0 to DbRows.Count - 1 do 218 220 Text := Text + '<tr><td>' + DbRows[I].Values['Name'] + '</td><td align="center">' + … … 229 231 '<br/>' + 230 232 '<i>Aktualizováno: 1.7.2010</i>'; 233 234 Text := Text + '<br/><br/><strong>Projekty využívající VPS hosting</strong><br/><ul>'; 235 try 236 DbRows := TDbRows.Create; 237 Database.Query(DbRows, 'SELECT * FROM `HostedProject` WHERE `Active`=1 AND `WebHosting`=0'); 238 for I := 0 to DbRows.Count - 1 do 239 Text := Text + '<li><a href="' + DbRows[I].Values['Homepage'] + '">' + 240 DbRows[I].Values['Name'] + '</a></li>'; 241 Text := Text + '</ul>'; 242 finally 243 DbRows.Free; 244 end; 245 246 Text := Text + '<br/><strong>Projekty využívající web hosting</strong><br/><ul>'; 247 try 248 DbRows := TDbRows.Create; 249 Database.Query(DbRows, 'SELECT * FROM `HostedProject` WHERE `Active`=1 AND `WebHosting`=1'); 250 for I := 0 to DbRows.Count - 1 do 251 Text := Text + '<li><a href="' + DbRows[I].Values['Homepage'] + '">' + 252 DbRows[I].Values['Name'] + '</a></li>'; 253 Text := Text + '</ul>'; 254 finally 255 DbRows.Free; 256 end; 231 257 end; 232 258 end; -
trunk/WebServer/UHTTPSessionMySQL.pas
r36 r38 40 40 Result := BinToHexString(SHA1(FloatToStr(Now))); 41 41 try 42 DbRows := SqlDatabase.Query('SELECT * FROM `HTTPSession` WHERE `Identification`="' + 42 DbRows := TDbRows.Create; 43 SqlDatabase.Query(DbRows, 'SELECT * FROM `HTTPSession` WHERE `Identification`="' + 43 44 Result + '"'); 44 45 Found := DbRows.Count > 0; … … 67 68 try 68 69 Lock.Acquire; 69 DbRows := SqlDatabase.Query('DELETE FROM `HTTPSession` WHERE `Time` < DATE_SUB(NOW(), INTERVAL ' + 70 DbRows := TDbRows.Create; 71 SqlDatabase.Query(DbRows, 'DELETE FROM `HTTPSession` WHERE `Time` < DATE_SUB(NOW(), INTERVAL ' + 70 72 IntToStr(Timeout) +' SECOND)'); 71 DbRows.Free; 72 DbRows := SqlDatabase.Query('SELECT * FROM `HTTPSession` WHERE `Identification`="' + 73 SqlDatabase.Query(DbRows, 'SELECT * FROM `HTTPSession` WHERE `Identification`="' + 73 74 HandlerData.SessionId + '"'); 74 75 if DbRows.Count > 0 then begin … … 91 92 try 92 93 Lock.Acquire; 93 DbRows := SqlDatabase.Query('SELECT * FROM `HTTPSession` WHERE `Identification`="' + 94 DbRows := TDbRows.Create; 95 DbRows2 := TDbRows.Create; 96 SqlDatabase.Query(DbRows, 'SELECT * FROM `HTTPSession` WHERE `Identification`="' + 94 97 HandlerData.SessionId + '"'); 95 98 if DbRows.Count > 0 then 96 DbRows2 := SqlDatabase.Query('UPDATE `HTTPSession` SET `Variables`="' + HandlerData.Session.Text99 SqlDatabase.Query(DbRows2, 'UPDATE `HTTPSession` SET `Variables`="' + HandlerData.Session.Text 97 100 + '", `Time` = NOW() WHERE `Identification`="' + HandlerData.SessionId + '"') 98 else DbRows2 := SqlDatabase.Query('INSERT INTO `HTTPSession` (`Time`, `Variables`, `Identification`) VALUES (' +101 else SqlDatabase.Query(DbRows2, 'INSERT INTO `HTTPSession` (`Time`, `Variables`, `Identification`) VALUES (' + 99 102 'NOW(), "' + HandlerData.Session.Text + '", "' + HandlerData.SessionId + '")'); 100 103 HandlerData.Response.Cookies.Values[SessionIdCookieName] := HandlerData.SessionId;
Note:
See TracChangeset
for help on using the changeset viewer.