Changeset 83 for trunk/Pages
- Timestamp:
- Jun 24, 2012, 12:22:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Pages/UWebCamPage.pas
r82 r83 39 39 DbRows: TDbRows; 40 40 I: Integer; 41 Id: Integer; 41 CameraId: Integer; 42 IdParam: string; 42 43 LastFileDate: string; 43 44 ImageWidth, ImageHeight: Integer; … … 53 54 //HandlerData.Request.Query.Values['W'] := 'dsd'; 54 55 //HandlerData.Request.Query.Values['H'] := 'dsd'; 55 if HandlerData.Request.Query.IndexOfName('Id') = -1 then Id := ''56 else Id := IntToStr(StrToInt(HandlerData.Request.Query.Values['Id']));56 if HandlerData.Request.Query.IndexOfName('Id') = -1 then CameraId := -1 57 else CameraId := StrToInt(HandlerData.Request.Query.Values['Id']); 57 58 if (HandlerData.Request.Query.IndexOfName('W') = -1) then begin 58 59 ImageWidth := 640; … … 61 62 end; 62 63 64 if CameraId >= 0 then IdParam := '&Id=' + IntToStr(CameraId) 65 else IdParam := ''; 63 66 Text := Text + '<table style="width: 100%"><tr><td style="width: 20%" valign="top">' + 64 67 '<strong>Velikost</strong><br/>' + 65 '<a href="?W=160 &Id=' + Id+ '">Malá</a><br/> ' +66 '<a href="?W=320 &Id=' + Id+ '">Menší</a><br/> ' +67 '<a href="?W=640 &Id=' + Id+ '">Střední</a><br/> ' +68 '<a href="?W=1024 &Id=' + Id+ '">Větší</a><br/> ' +69 '<a href="?W=1280 &Id=' + Id+ '">Velká</a><br/><br/>';68 '<a href="?W=160' + IdParam + '">Malá</a><br/> ' + 69 '<a href="?W=320' + IdParam + '">Menší</a><br/> ' + 70 '<a href="?W=640' + IdParam + '">Střední</a><br/> ' + 71 '<a href="?W=1024' + IdParam + '">Větší</a><br/> ' + 72 '<a href="?W=1280' + IdParam + '">Velká</a><br/><br/>'; 70 73 71 74 Text := Text + '<strong>Místní kamery</strong><br/>'; … … 88 91 '</td><td style="width: 80%" valign="top">'; 89 92 90 if Id = ''then begin93 if CameraId = -1 then begin 91 94 try 92 95 DbRows := TDbRows.Create; … … 109 112 DbRows := TDbRows.Create; 110 113 Database.Query(DbRows, 'SELECT * FROM `Webcam` WHERE (`Id`=' + 111 I d+ ') AND (`Enabled`=1)');114 IntToStr(CameraId) + ') AND (`Enabled`=1)'); 112 115 if DbRows.Count > 0 then begin 113 116 114 117 WebCamImage := 'images/webcam/' + DbRows[0].Values['ImageName']; 115 118 RefreshInterval := StrToInt(DbRows[0].Values['ImagePeriod']); 116 Id := DbRows[0].Values['Id'];119 CameraId := StrToInt(DbRows[0].Values['Id']); 117 120 ImageHeight := Round(ImageWidth * StrToInt(DbRows[0].Values['Height']) / StrToInt(DbRows[0].Values['Width'])); 118 121
Note:
See TracChangeset
for help on using the changeset viewer.