Changeset 153
- Timestamp:
- Feb 11, 2024, 3:07:19 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/WebCamPage.pas
r151 r153 81 81 try 82 82 DbRows := TDbRows.Create; 83 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1 ');83 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1 AND `Public`=1'); 84 84 for I := 0 to DbRows.Count - 1 do begin 85 85 Text := Text + MakeLink(DbRows[I].Items['Name'], NavigationLink( … … 119 119 try 120 120 DbRows := TDbRows.Create; 121 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1 ');121 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE `Enabled`=1 AND `Public`=1'); 122 122 ImageWidthThumb := 160; 123 123 for I := 0 to DbRows.Count - 1 do begin … … 142 142 RefreshInterval: Integer; 143 143 LastFileDate: string; 144 Token: string; 144 145 begin 145 146 Result := ''; 146 147 with TWebSession(HandlerData) do 147 148 try 149 if HandlerData.Request.Query.TryGetValue('Token', Token) then 150 else Token := ''; 151 148 152 DbRows := TDbRows.Create; 149 153 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE (`Id`=' + 150 IntToStr(Id) + ') AND (`Enabled`=1)'); 154 IntToStr(Id) + ') AND (`Enabled`=1) AND ' + 155 '((`Public` = 1) OR ((`Public` = 0) AND (`Token`="' + 156 Database.EscapeString(Token) + '")))'); 151 157 if DbRows.Count > 0 then begin 152 158 WebCamImage := 'images/webcam/' + DbRows[0].Items['ImageName'];
Note:
See TracChangeset
for help on using the changeset viewer.