aqhome-cgi: more code sharing, adding page handling
allows to define your own pages with graphs, sensors and actors.
This commit is contained in:
@@ -86,13 +86,13 @@ void AQH_ModDevices_RunSetData(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *se
|
||||
|
||||
pbuf=GWEN_Buffer_new(0, 256, 0, 1);
|
||||
if (sValueName && *sValueName) {
|
||||
GBAS(pbuf, "Location: /aqbt/devices/value.html?device=");
|
||||
GBAS(pbuf, "Location: value.html?device=");
|
||||
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
|
||||
GBAS(pbuf, "&value=");
|
||||
GWEN_Text_EscapeToBuffer(sValueName, pbuf);
|
||||
}
|
||||
else {
|
||||
GBAS(pbuf, "Location: /aqbt/devices/values.html?device=");
|
||||
GBAS(pbuf, "Location: values.html?device=");
|
||||
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
|
||||
}
|
||||
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(pbuf));
|
||||
|
||||
Reference in New Issue
Block a user