Changeset 71 for trunk/Pages/UWebCamPage.pas
- Timestamp:
- Feb 11, 2012, 10:43:06 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Pages/UWebCamPage.pas
r67 r71 40 40 I: Integer; 41 41 Id: Integer; 42 LastFileDate: string; 42 43 ImageWidth, ImageHeight: string; 43 44 begin … … 115 116 116 117 if FileExists(WebCamImage) then begin 118 DateTimeToString(LastFileDate, 'hh:mm:ss d.m.yyyy', FileDateToDateTime(FileAge(WebCamImage))); 117 119 Text := Text + '<script language="JavaScript">' + #13#10 + 118 120 ' var ImageURL= "' + NavigationLink('/' + WebCamImage) + '";' + #13#10 + … … 129 131 ' // The above dummy cgi-parameter enforce a bypass of the browser image cache.' + #13#10 + 130 132 ' // Here we actually load the image' + #13#10 + 131 ' document.theImage.src = url;' + #13#10 + 133 ' document.theImage.src = document.theImageTemp.src;' + #13#10 + 134 ' document.theImageTemp.src = url;' + #13#10 + 132 135 '' + #13#10 + 133 136 ' // Reload the image every defined period' + #13#10 + … … 137 140 138 141 '<br /><div align="center">' + DbRows[0].Values['Name'] + '<br/>' + 139 '<img name="theImage" src="" width="' + ImageWidth + '" height="' + ImageHeight + '" alt="' + 140 DbRows[0].Values['Name'] + '"/><br/>Aktualizace: ' + 141 DateTimeToStr(FileDateToDateTime(FileAge(WebCamImage))) + ' Perioda: ' + 142 IntToStr(RefreshInterval) + ' sekund Typ: ' + DbRows[0].Values['DeviceType'] + '<br />' + 142 '<img name="theImageTemp" src="' + NavigationLink('/' + WebCamImage) + '" width="0" height="0" alt="Temp image"/>' + 143 '<img name="theImage" src="' + NavigationLink('/' + WebCamImage) + '" width="' + ImageWidth + '" height="' + ImageHeight + '" alt="' + 144 DbRows[0].Values['Name'] + '"/><br/>Aktualizace: <span id="lasttime">' + 145 LastFileDate + '</span>, Perioda: ' + 146 IntToStr(RefreshInterval) + ' sekund, Typ: ' + DbRows[0].Values['DeviceType'] + '<br />' + 143 147 '<br/>' + DbRows[0].Values['Description'] + '</div>'; 144 148 end else Text := Text + '<br />Obrázek nenalezen.<br /><br />';
Note:
See TracChangeset
for help on using the changeset viewer.