source: trunk/oscam-http.h @ 1739

Last change on this file since 1739 was 1739, checked in by merek, 10 years ago

Merge from UMP r1806 - dingo35: Autodetect boxtype for DVBAPI

File size: 69.7 KB
Line 
1#ifdef WEBIF
2#include "globals.h"
3
4#define SERVER "webserver/1.0"
5#define PROTOCOL "HTTP/1.0"
6#define RFC1123FMT "%a, %d %b %Y %H:%M:%S GMT"
7#define AUTHREALM "Forbidden"
8#define AUTHNONCEVALIDSECS 15
9#define MAXGETPARAMS 100
10#define SHUTDOWNREFRESH 30
11
12#define CSS "\
13body {background-color: white; font-family: Arial; font-size: 11px; text-align:center}\n\
14p {color: white; }\n\
15h2 {color: #F7F7F7; font-family: Arial; font-size: 50px; line-height: 50px; text-align:center; margin-top:0px; margin-bottom:0px}\n\
16h4 {color: #AAAAAA; font-family: Arial; font-size: 12px; line-height: 9px; text-align:center}\n\
17TABLE {border-spacing:1px; border:0px; padding:0px; margin-left:auto; margin-right:auto;}\n\
18TH {height:10px; border:0px; font-family: Arial; font-size: 11px; padding:5px; background-color:#CCCCCC; color:black;}\n\
19TD {height:10px; border:0px; font-family: Arial; font-size: 11px; padding:5px; background-color:#EEEEEE; color:black;}\n\
20HR {height:1px; border-width:0; color:white; background-color:#AAAAAA}\n\
21TR.s TD {background-color:#e1e1ef;}\n\
22TR.l TD {background-color:#e1e1ef;}\n\
23TR.n TD {background-color:#e1e1ef;}\n\
24TR.h TD {background-color:#e1e1ef;}\n\
25TR.r TD {background-color:#fff3e7;}\n\
26TR.p TD {background-color:#fdfbe1;}\n\
27TR.c TD {background-color:#f1f5e6;}\n\
28TR.online TD {background-color:#f1f5e6;}\n\
29TR.expired TD {background-color:#ffe2d4;}\n\
30DIV.log {border:1px dotted #AAAAAA; background-color: #FAFAFA; padding:10; font-family:\"Courier New\", monospace; color:#666666; font-size: 11px; word-wrap:break-word; text-align:left; }\n\
31DIV.sidlist {border:1px dotted #AAAAAA; background-color: #fffdf5; padding:2; font-family:\"Courier New\", monospace ; color:#666666; font-size: 11px; word-wrap:break-word; text-align:left;}\n\
32TABLE.menu {border-spacing:0px; border:0px; padding:0px; margin-left:auto; margin-right:auto;}\n\
33TABLE.status {border-spacing:1px; border:0px; padding:0px; background-color:white; empty-cells:show;}\n\
34TABLE.config {width:750px;}\n\
35TABLE.invisible TD {border:0px; font-family:Arial; font-size: 12px; padding:5px; background-color:#EEEEEE;}\n\
36TD.menu {font-color:wblack; background-color:white; font-family: Arial; font-size:14px; font-weight:bold;}\n\
37TD.script {font-color:black; background-color:white; font-family: Arial; font-size:14px; font-weight:bold;}\n\
38TD.shutdown {font-color:black; background-color:white; font-family: Arial; font-size:14px; font-weight:bold;}\n\
39TD.shutdown A:hover {color: red;}\n\
40TD.configmenu {font-color:black; background-color:white; font-family: Arial; font-size:11px; font-weight:bold;}\n\
41textarea.bt{font-family: Arial; font-size: 12px;}\n\
42input{font-family: Arial; font-size: 12px;}\n\
43A:link {color: #050840;}\n\
44A:visited {color: #050840;}\n\
45A:active {color: #050840;}\n\
46A:hover {color: #ff9e5f;}\n\
47DIV.message {float:right}\n\
48IMG{border:0px solid;}\n\
49P.blinking {text-decoration: blink; font-weight:bold; font-size:large; color:red;}\n"
50
51#define ICMAI "data:image/x-icon;base64,\
52AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAA\
53AAAAAADw//8A7/D/AODg4ADf8P8A0PD/AM///wDA4P8Az8/PALDw/wCQz/8AsLC/AGDP/wBgz88A\
54YJD/AGCQzwBfr+8AYJCQAC9gzwAvYJAAIADfAC8AzwAvL5AAHw+wAF9QXwAfQGAAEB9vACAgIAAQ\
55LzAAABAfAA8PDwAADw8AAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
56AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
57AAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/\
71//8AICAOBgMEBiAgIAMDBg8gICAgEQ8gDgkICAgLGA8RICAgICAgBAgIBQQEBQgbICAgICAgCAYF\
72CAMBAQEDCCAgICAgIAkWEwwBAAAAAAAgICAgIB4IExYIAQwAAAAAICAgICAgCRYZFBMTFBUHASAg\
73ICAgIBQTExMTExMTExYgICAgIBMTEyAgGBAgICATExMgICAZHyANDwsIBQUIICAZICAgICAgICAS\
74DhwgICAgICAgICAgICD/AiD/AiAgICAgICAgICAg/xog/xogICAgICAgICAgIP8CIP8CICAgICAg\
75ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIMHDYQDAA2UA4AcuAMADbQBAAgAAAAACAAAA\
760QKAAW4AwAF3AMABbQDgA1wA4ANpAPAHZADwB3MA+A9hAPwfYgA="
77
78#define ICDEL "data:image/png;base64,\
79iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA\
80BGdBTUEAALGeYUxB9wAAACBjSFJNAAB6JQAAgIMAAPn/AACA6AAAUggAARVYAAA6lwAAF2/XWh+Q\
81AAADFklEQVR42qSRS2icVRxHz//e+30z40zSNI1NJ5M0aWpj0hCToEiRqAhWS5G2ii7ERVdioSC4\
82E7pyI5SutIsufCJaFIoQRLJQKVpKwaRYA1XTF01MWpukdJLM8/vuw0VF3HvgtzmrHxw5uWPHrvGD\
83Bz7u6u3uvvDRJ58uXr3xjktTnEBOQQZIAOcDOE+kVfuD/f3vbhvY9dyN8xdOm7GXDn0zvm/vw/Ha\
84XdSzE8fOrZWL1/+8fURpxX+xzpPRes/A2OiHW4eHB27PL8xvNGqXTDYTt6ryKmZ9hd5NJiru6Xvj\
85+2b5qemVxhNBSTkA1ntVatt0Zmxs7FBZqdr01NTRtNH8IADyXrFILjJvPTby0LGhgt2il25SWy7z\
8681+N1Ys1P5QTBoei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DR/zx2wW4d3y/FvnlqR2Slv0Q/8/qgZmTlXB94CpoAJ9eT9noFtm+584GDKC7pA\
136u3DxKke/vLesZnZLqxk5c+5bYBn4Ppuz5WzOZra/5CbKf/389rGvH7W4VaNV/QnWxjQ1M3XOzQGn\
137AAd4tFUMJa0qr449uM/5iQ34yfsAATAp5EkD1Wyu/Zd/IQUOAU8GnX1NETVEDSCqXl6RQsgSxjr+\
138r++A3UB8010AzxcItr3wB6JpwHH17Hvu7NHJc87xXDZn129OK4ayGZjx1xKUVu0IzqU4/cukAvv/\
139CxVDuQv4YtMEz3QkeTdqSJ+ulXv4qYfoyGxh4olpUt2DHx35XH8ohnJ3m90VJGgsLjDZinSXerok\
140xZDK/c8eSy8v5G396Bsi2oWLFlg6/7FdOjVTq19f6BBVHzA/8EVEXKPW2CfFkBvd/Vt0tfTbuc7u\
141oZHxhw+kg84RLJrHtc4T18/QuDFPVLuEiM+ZE6fLzrlxKeSpqDK9/WV7pRjK86J80r1+1OsfHs8k\
142Mz14skq98iflxVJUunilac6ezubssBTyfArszebMtYdIADs9X18zs3EXW696egU47GL3ZjZnFwH+\
143AYRRPIe3vIMRAAAAAElFTkSuQmCC"
144
145#define ICDIS "data:image/png;base64,\
146iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA\
147BGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VG\
148AAADAUlEQVR42mJkAILW1taU////FzIxMUkD6Rt///7trqurW8uABJqampwYGRkrWVhYTP/9+/cO\
149qGbm1q1bewACiBkoEcvMzDyfm5tbVExMjIOfn1/mz58/YTY2Nt/3799/FKS5vr4+mouLa4WOjo66\
150np4eh4CAgOD3799dZGVlvwEEEAvQVpDNDBwcHAxARQxAAxh4eHgY7t+/3wk0/AfQphdsbGwLjYyM\
151mB0dHRlAaj98+MAAdAXDhQsXkgACiAVomzRI8MePHwxfv35lALqGgZeXl0FRUZHhwYMHE4Hif/X1\
1529ZmBLgJrBgGgC8AWAfnCAAHE8u3bt9NATd5AGu5fYDiAFSkoKIDYzLq6unDNIPDz50+GV69eMfz+\
153/fsGQACxAImOT58+OfHx8XEC/QVWCAwsMA1yCcgmoBqws4WFhcGGHz16lOH69ev/gQZNAAgg5hMn\
154TjwyMDB48OvXL39gODCB/AbCMIOAoQ62FebN48ePMxw+fJjhy5cvFR0dHbMBAogZJHn69OnL2tra\
15514AKvIEByQYyAKQZGQMDk+HWrVsg2/+8e/euaOLEiX0gvQABxALzFygMQDEBsgmkGOgtsDjMAJDT\
156QeKsrKwMQNfCwwMggMAu8Pf3jwb6dSkwXtlhgQXTAOODYkdQUJABGFZMQBd4AGPp+6VLl44CBBCz\
157l5eXjZCQ0GoVFRU2kGKQRhiAhQfMJSB5UOyA8MePH12kpaWvAgQQs6qq6jR1dXUtkPORNcOcDooB\
158ZDFQoIJiB+gixsePH0sDBBALOzu7KScnJ1bN9+7dA4X2Xy0tLWaYV0DioBQLshCoVwMggFiAAfIU\
159mBrFgBywITDNd+/eZQDakA/0wovLly8vA+YBZpgFsFT7+fPntwABxAwMjG9ARYEgf4FsAfn54cOH\
160DI8ePSrfuXNnH9AVV4F+vQvU4AnMcKwgw0EJDphXGJ48edINEECMIBPd3d0Tgc5KAHpFAhidd4EK\
1615gA1r0POzs7Ozk5AZ2cBY0EX6Or3QK+tBqbOCQABBgCzBWGTrJ55PAAAAABJRU5ErkJggg=="
162
163#define ICENA "data:image/png;base64,\
164iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA\
165BGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VG\
166AAADKUlEQVR42mJgAAJpBgbNmQwMUy8yMOzoZ2CYKM7AoMOABtQYGMw2MjDMusTAsLOdgaGHh4F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MAAAAASUVORK5CYII="
181
182#define ICHID "data:image/png;base64,\
183iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0\
184U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJdSURBVDjLpZP7S1NhGMf9W7YfogSJboSE\
185UVCY8zJ31trcps6zTI9bLGJpjp1hmkGNxVz4Q6ildtXKXzJNbJRaRmrXoeWx8tJOTWptnrNryre5\
186YCYuI3rh+8vL+/m8PA/PkwIg5X+y5mJWrxfOUBXm91QZM6UluUmthntHqplxUml2lciF6wrmdHri\
187I0Wx3xw2hAediLwZRWRkCPzdDswaSvGqkGCfq8VEUsEyPF1O8Qu3O7A09RbRvjuIttsRbT6HHzeb\
188sDjcB4/JgFFlNv9MnkmsEszodIIY7Oaut2OJcSF68Qx8dgv8tmqEL1gQaaARtp5A+N4NzB0lMXxo\
189n/uxbI8gIYjB9HytGYuusfiPIQcN71kjgnW6VeFOkgh3XcHLvAwMSDPohOADdYQJdF1FtLMZPmsl\
190vhZJk2ahkgRvq4HHUoWHRDqTEDDl2mDkfheiDgt8pw340/EocuClCuFvboQzb0cwIZgki4KhzlaE\
1916w0InipbVzBfqoK/qRH94i0rgokSFeO11iBkp8EdV8cfJo0yD75aE2ZNRvSJ0lZKcBXLaUYmQrCz\
192DT6tDN5SyRqYlWeDLZAg0H4JQ+Jt6M3atNLE10VSwQsN4Z6r0CBwqzXesHmV+BeoyAUri8EyMfi2\
193FowXS5dhd7doo2DVII0V5BAjigP89GEVAtda8b2ehodU4rNaAW+dGfzlFkyo89GTlcrHYCLpKD+V\
1947yeeHNzLjkp24Uu1Ed6G8/F8qjqGRzlbl2H2dzjpMg1KdwsHxOlmJ7GTeZC/nesXbeZ6c9OYnuxU\
195c3fmBuFft/Ff8xMd0s65SXIb/gAAAABJRU5ErkJggg=="
196
197#define TPLHEADER "\
198<HTML>\n\
199  <HEAD>\n\
200    <TITLE>OSCAM ##CS_VERSION## build ###CS_SVN_VERSION##</TITLE>\n\
201    <link rel=\"stylesheet\" type=\"text/css\" href=\"site.css\">\n\
202    <link href=\"##ICO##\" rel=\"icon\" type=\"image/x-icon\"/>\
203    ##REFRESH##\
204  </HEAD>\n\
205  <BODY>\n\
206    <H2>OSCAM ##CS_VERSION## build ###CS_SVN_VERSION##</H2>"
207
208#define TPLFOOTER "\
209  <HR/><H4>OSCAM Webinterface developed by Streamboard Team - ##CURDATE## ##CURTIME## | Access from ##CURIP##</H4><H4>Style by Eneen</H4>\
210  </BODY>\
211</HTML>"
212
213#define TPLREFRESH "\
214\n<meta http-equiv=\"refresh\" content=\"##REFRESHTIME##; URL=##REFRESHURL##\" />\n"
215
216#define TPLMENU "\
217  <TABLE border=0 class=\"menu\">\n\
218    <TR>\n\
219      <TD CLASS=\"menu\"><A HREF=\"status.html\">STATUS</TD>\n\
220      <TD CLASS=\"menu\"><A HREF=\"config.html\">CONFIGURATION</TD>\n\
221      <TD CLASS=\"menu\"><A HREF=\"readers.html\">READERS</TD>\n\
222      <TD CLASS=\"menu\"><A HREF=\"userconfig.html\">USERS</TD>\n\
223      <TD CLASS=\"menu\"><A HREF=\"services.html\">SERVICES</TD>\n\
224      <TD CLASS=\"script\"><A HREF=\"script.html\">SCRIPT</TD>\n\
225      <TD CLASS=\"shutdown\"><A HREF=\"shutdown.html\">SHUTDOWN</TD>\n\
226    </TR>\n\
227  </TABLE>"
228
229#define TPLCONFIGMENU "\
230    <BR><BR>\n\
231    <TABLE border=0 class=\"configmenu\">\n\
232        <TR>\n\
233            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=global\">Global</TD>\n\
234            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=camd33\">Camd3.3</TD>\n\
235            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=camd35\">Camd3.5</TD>\n\
236            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=camd35tcp\">Camd3.5 TCP</TD>\n\
237            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=newcamd\">Newcamd</TD>\n\
238            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=radegast\">Radegast</TD>\n\
239            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=cccam\">Cccam</TD>\n\
240            ##TPLCONFIGMENUGBOX##\
241            ##TPLCONFIGMENUANTICASC##\
242            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=monitor\">Monitor</TD>\n\
243            <TD CLASS=\"configmenu\"><A HREF=\"config.html?part=serial\">Serial</TD>\n\
244            ##TPLCONFIGMENUDVBAPI##\
245        </TR>\n\
246    </TABLE>"
247
248#ifdef CS_ANTICASC
249#define TPLCONFIGMENUANTICASC "<TD CLASS=\"configmenu\"><A HREF=\"config.html?part=anticasc\">Anticascading</TD>\n"
250#endif
251
252#ifdef HAVE_DVBAPI
253#define TPLCONFIGMENUDVBAPI "<TD CLASS=\"configmenu\"><A HREF=\"config.html?part=dvbapi\">DVB-Api</TD>\n"
254#endif
255
256#ifdef CS_WITH_GBOX
257#define TPLCONFIGMENUGBOX "<TD CLASS=\"configmenu\"><A HREF=\"config.html?part=gbox\">Gbox</TD>\n"
258#endif
259
260#define TPLSTATUS "\
261  ##TPLHEADER##\
262  ##TPLMENU##\n\
263  <BR><BR>\n\
264  <form action=\"status.html\" method=\"get\">\n\
265    <select name=\"hideidle\">\n\
266      <option value=\"0\" ##HIDEIDLECLIENTSSELECTED0##>Show idle clients</option>\n\
267      <option value=\"1\" ##HIDEIDLECLIENTSSELECTED1##>Hide idle clients</option>\n\
268      <option value=\"2\">Show hidden clients</option>\n\
269    </select>\n\
270    <input type=\"submit\" value=\"Update\">\n\
271  </form>\n\
272  <TABLE WIDTH=\"100%\" cellspacing=\"0\" class=\"status\">\n\
273    <TR>\n\
274      <TH>hide</TH>\n\
275      <TH>PID</TH>\n\
276      <TH>Typ</TH>\n\
277      <TH>ID</TH>\n\
278      <TH>Label</TH>\n\
279      <TH>AU</TH>\n\
280      <TH>Crypted</TH>\n\
281      <TH>Address</TH>\n\
282      <TH>Port</TH>\n\
283      <TH>Protocol</TH>\n\
284      <TH>Login Date</TH>\n\
285      <TH>Login Time</TH>\n\
286      <TH>Online</TH>\n\
287      <TH>caid:srvid</TH>\n\
288      <TH>Last Channel</TH>\n\
289      <TH>Idle</TH>\n\
290      <TH>Status</TH>\n\
291    </TR>\n\
292    ##CLIENTSTATUS##\
293  </TABLE><BR>\n\
294  <DIV class=\"log\">\n\
295  ##LOGHISTORY##\
296  </DIV>\n\
297  ##TPLFOOTER##"
298
299#define TPLCLIENTSTATUSBIT "\
300 <TR class=\"##CLIENTTYPE##\">\n\
301  <TD align=\"center\" WIDTH=\"10\"><A HREF =\"status.html?hide=##HIDEIDX##\" TITLE=\"Hide this client\"><IMG SRC=\"##HIDEICON##\" ALT=\"Hide\"></A></TD>\n\
302  <TD align=\"center\">##CLIENTPID##</TD>\n\
303  <TD align=\"center\">##CLIENTTYPE##</TD>\n\
304  <TD align=\"center\">##CLIENTCNR##</TD>\n\
305  <TD>##CLIENTUSER##</TD>\n\
306  <TD align=\"center\">##CLIENTCAU##</TD>\n\
307  <TD align=\"center\">##CLIENTCRYPTED##</TD>\n\
308  <TD align=\"center\">##CLIENTIP##</TD>\n\
309  <TD align=\"center\">##CLIENTPORT##</TD>\n\
310  <TD>##CLIENTPROTO##</TD>\n\
311  <TD align=\"center\">##CLIENTLOGINDATE##</TD>\n\
312  <TD align=\"center\">##CLIENTLOGINTIME##</TD>\n\
313  <TD align=\"center\">##CLIENTLOGINSECS##</TD>\n\
314  <TD align=\"center\">##CLIENTCAID##:##CLIENTSRVID##</TD>\n\
315  <TD>##CLIENTSRVPROVIDER####CLIENTSRVNAME##</TD>\n\
316  <TD align=\"center\">##CLIENTIDLESECS##</TD>\n\
317  <TD align=\"center\">##CLIENTCON##</TD>\n\
318 </TR>\n"
319
320#define TPLUSERCONFIGLIST "\
321  ##TPLHEADER##\
322  ##TPLMENU##\n\
323  ##MESSAGE##\
324  <BR>\
325  <TABLE CLASS=\"configmenu\"><TR><TD CLASS=\"configmenu\"><A HREF=\"userconfig.html?part=adduser\">Add User</TD></TR></TABLE><BR>\
326  <TABLE cellspacing=\"0\" cellpadding=\"10\">\n\
327    <TR>\n\
328      <TH>Lock</TH>\n\
329      <TH>Label</TH>\n\
330      <TH>Status</TH>\n\
331      <TH>Protocol</TH>\n\
332      <TH>Last Channel</TH>\n\
333      <TH>Idle</TH>\n\
334      <TH>OK</TH>\n\
335      <TH>NOK</TH>\n\
336      <TH>IGN</TH>\n\
337      <TH>TOUT</TH>\n\
338      <TH>CACHE</TH>\n\
339      <TH>TUN</TH>\n\
340      <TH>LTIME</TH>\n\
341      <TH>EOK</TH>\n\
342      <TH>ENOK</TH>\n\
343      <TH colspan=\"2\" align=\"center\">Action</TH>\n\
344    </TR>\n\
345    ##USERCONFIGS##\
346    ##NEWUSERFORM##\
347  </TABLE><BR>\n\
348  ##TPLFOOTER##"
349
350#define TPLADDNEWUSER "\
351    <TR>\n\
352        <FORM action=\"user_edit.html\" method=\"get\">\n\
353        <TD>&nbsp;</TD>\n\
354        <TD colspan=\"6\">New User:&nbsp;&nbsp;<input name=\"user\" type=\"text\">&nbsp;&nbsp;&nbsp;<input type=\"submit\" value=\"Add User\"></TD>\n\
355        <TD colspan=\"10\" align=\"center\"></TD>\n\
356        </FORM>\n\
357    <TR>\n"
358
359#define TPLUSERCONFIGLISTBIT "\
360  <TR class=\"##CLASSNAME##\">\n\
361    <TD align=\"center\"><A HREF=\"userconfig.html?user=##USERENC##&action=##SWITCH##\" TITLE=\"##SWITCHTITLE##\"><IMG SRC=\"##SWITCHICO##\"BORDER=\"0\" ALT=\"##SWITCHTITLE##\"/></A></TD>\n\
362    <TD>##USER##</TD>\n\
363    <TD>##STATUS####EXPIRED##</TD>\n\
364    <TD align=\"center\">##CLIENTPROTO##</TD>\n\
365    <TD>##LASTCHANNEL##</TD>\n\
366    <TD align=\"center\">##IDLESECS##</TD>\n\
367    <TD align=\"center\">##CWOK##</TD>\n\
368    <TD align=\"center\">##CWNOK##</TD>\n\
369    <TD align=\"center\">##CWIGN##</TD>\n\
370    <TD align=\"center\">##CWTOUT##</TD>\n\
371    <TD align=\"center\">##CWCACHE##</TD>\n\
372    <TD align=\"center\">##CWTUN##</TD>\n\
373    <TD align=\"center\">##CWLASTRESPONSET##</TD>\n\
374    <TD align=\"center\">##EMMOK##</TD>\n\
375    <TD align=\"center\">##EMMNOK##</TD>\n\
376    <TD align=\"center\"><A HREF=\"user_edit.html?user=##USERENC##\" TITLE=\"edit this user\"><IMG SRC=\"##EDIICO##\" BORDER=\"0\" ALT=\"Edit User\"/></A></TD>\n\
377    <TD align=\"center\"><A HREF=\"userconfig.html?user=##USERENC##&action=delete\" TITLE=\"delete this user\"><IMG SRC=\"##DELICO##\"BORDER=\"0\" ALT=\"Delete User\"/></A></TD>\n\
378  </TR>\n"
379
380#define TPLUSEREDIT "\
381##TPLHEADER##\
382##TPLMENU##\n\
383<DIV CLASS=\"message\">##MESSAGE##</DIV>\
384<BR><BR>\n\
385  <form action=\"user_edit.html\" method=\"get\">\n\
386  <input name=\"user\" type=\"hidden\" value=\"##USERNAME##\">\n\
387  <input name=\"disabled\" type=\"hidden\" value=\"0\">\n\
388  <input name=\"suppresscmd08\" type=\"hidden\" value=\"0\">\n\
389  <input name=\"keepalive\" type=\"hidden\" value=\"0\">\n\
390  <TABLE cellspacing=\"0\">\n\
391    <TR>\n\
392      <TH>&nbsp;</TH>\n\
393      <TH>Edit User ##USERNAME##</TH>\n\
394    <TR>\n\
395      <TD>Password:</TD>\n\
396      <TD><input name=\"pwd\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##PASSWORD##\"></TD>\n\
397    </TR>\n\
398    <TR>\
399        <TD>Disabled:</TD>\
400        <TD><input name=\"disabled\" type=\"checkbox\" value=\"1\" ##DISABLEDCHECKED##></TD>\n\
401    <TR>\n\
402      <TD>Exp. Date:</TD>\n\
403      <TD><input name=\"expdate\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##EXPDATE##\"></TD>\n\
404    </TR>\n\
405    <TR>\n\
406      <TD>Group:</TD>\n\
407      <TD><input name=\"group\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##GROUPS##\"></TD>\n\
408    </TR>\n\
409    <TR>\n\
410      <TD>Hostname:</TD>\n\
411      <TD><input name=\"hostname\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##DYNDNS##\"></TD>\n\
412    </TR>\n\
413    <TR>\n\
414      <TD>Uniq:</TD>\n\
415      <TD><select name=\"uniq\">\n\
416        <option value=\"0\" ##UNIQSELECTED0##>0 - none</option>\n\
417        <option value=\"1\" ##UNIQSELECTED1##>1 - strict first</option>\n\
418        <option value=\"2\" ##UNIQSELECTED2##>2 - per IP</option>\n\
419        <option value=\"3\" ##UNIQSELECTED3##>3 - strict last</option>\n\
420        <option value=\"4\" ##UNIQSELECTED4##>4 - per IP last</option>\n\
421      </SELECT></TD>\n\
422    </TR>\n\
423    <TR>\n\
424      <TD>Sleep:</TD>\n\
425      <TD><input name=\"sleep\" type=\"text\" size=\"4\" maxlength=\"4\" value=\"##SLEEP##\"></TD>\n\
426    </TR>\n\
427    <TR>\n\
428      <TD>Monlevel:</TD>\n\
429      <TD><select name=\"monlevel\">\n\
430        <option value=\"0\" ##MONSELECTED0##>0 - no access to monitor</option>\n\
431        <option value=\"1\" ##MONSELECTED1##>1 - only server and own procs</option>\n\
432        <option value=\"2\" ##MONSELECTED2##>2 - all procs, but viewing only, default</option>\n\
433        <option value=\"3\" ##MONSELECTED3##>3 - all procs, reload of oscam.user possible</option>\n\
434        <option value=\"4\" ##MONSELECTED4##>4 - complete access</option>\n\
435      </select></TD>\n\
436    </TR>\n\
437    <TR>\n\
438      <TD>AU:</TD>\n\
439      <TD><select name=\"au\">\n\
440        <option value=\" \" ##AUSELECTED##>none</option>\n\
441        <option value=\"1\" ##AUTOAUSELECTED##>auto</option>\n\
442        ##RDROPTION##\
443      </select></TD>\n\
444    </TR>\n\
445    <TR>\n\
446      <TD>Services:</TD>\n\
447      <TD>\n\
448        <TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##\
449            </TD>\n\
450          </TR>\n\
451        </TABLE>\n\
452    <TR>\n\
453      <TD>CAID:</TD>\n\
454      <TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD>\n\
455    </TR>\n\
456    <TR>\n\
457      <TD>Ident:</TD>\n\
458      <TD><input name=\"ident\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##IDENTS##\"></TD>\n\
459    </TR>\n\
460    <TR>\n\
461      <TD>Betatunnel:</TD>\n\
462      <TD><textarea name=\"betatunnel\" cols=\"47\" rows=\"4\" class=\"bt\">##BETATUNNELS##</textarea></TD>\
463    </TR>\n\
464     <TR>\n\
465      <TD>Suppresscmd08:</TD>\n\
466      <TD><input name=\"suppresscmd08\" type=\"checkbox\" value=\"1\" ##SUPPRESSCMD08##></TD>\n\
467    </TR>\n\
468    ##TPLUSEREDITANTICASC##\
469    <TR>\n\
470    <TR><TD>Keepalive:</TD><TD><input name=\"keepalive\" type=\"checkbox\" value=\"1\" ##KEEPALIVE##></TD></TD></TR>\n\
471      <TD align=\"center\"><input type=\"submit\" name=\"action\" value=\"Save\" title=\"Save settings and reload users\"></TD>\n\
472      <TD align=\"center\"><input name=\"newuser\" type=\"text\" size=\"20\" maxlength=\"20\" title=\"Enter new username if you want to clone this user\">&nbsp;&nbsp;&nbsp;<input type=\"submit\" name=\"action\" value=\"Save As\" title=\"Save as new user and reload users\"></TD>\n\
473    </TR>\n\
474  </TABLE>\n\
475</form>\n\
476##TPLFOOTER##"
477
478#define TPLUSEREDITRDRSELECTED "\t<option value=\"##READERNAME##\" ##SELECTED##>##READERNAME##</option>"
479
480#define TPLUSEREDITSIDOKBIT "\
481          <TR>\n\
482            <TD><INPUT NAME=\"services\" TYPE=\"CHECKBOX\" VALUE=\"##SIDLABEL##\" ##CHECKED##> ##SIDLABEL##</TD>\n"
483
484#define TPLUSEREDITSIDNOBIT "\
485            <TD><INPUT NAME=\"services\" TYPE=\"CHECKBOX\" VALUE=\"!##SIDLABEL##\" ##CHECKED##> !##SIDLABEL##</TD>\n\
486          </TR>\n"
487
488#ifdef CS_ANTICASC
489# define TPLUSEREDITANTICASC "\
490    <TR>\n\
491      <TD>Anticascading numusers:</TD>\n\
492      <TD><input name=\"numusers\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##AC_USERS##\"></TD>\n\
493    </TR>\n\
494    <TR>\n\
495      <TD>Anticascading penalty:</TD>\n\
496      <TD><input name=\"penalty\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##AC_PENALTY##\"></TD>\n\
497    </TR>\n"
498#endif
499
500#define TPLSIDTAB "\
501  ##TPLHEADER##\
502  ##TPLMENU##\n\
503  <BR><BR><DIV class=\"log\">\n\
504  ##SIDTABS##\
505  </DIV>\n\
506  ##TPLFOOTER##"
507
508#define TPLSIDTABBIT "\
509label=##LABEL##<BR>\n\
510caid(##CAIDNUM##)=##CAIDS##<BR>\n\
511provider(##PROVIDNUM##)=##PROVIDS##<BR>\n\
512services(##SRVIDNUM##)=##SRVIDS##<BR><BR>\n"
513
514#define TPLREADERS "\
515##TPLHEADER##\
516##TPLMENU##\n\
517<BR><BR>\n\
518  <TABLE CLASS=\"configmenu\"><TR><TD CLASS=\"configmenu\"><A HREF=\"scanusb.html\">Scan USB</A></TD></TR></TABLE><BR>\
519  <TABLE cellspacing=\"0\" cellpadding=\"10\">\n\
520    <TR>\n\
521      <TH>Reader</TH>\n\
522      <TH>Protocol</TH>\n\
523      <TH>EERR</TH>\n\
524      <TH>EWRI</TH>\n\
525      <TH>ESKI</TH>\n\
526      <TH>EBLO</TH>\n\
527      <TH COLSPAN=\"3\">Action</TH>\n\
528    </TR>\n\
529    ##READERLIST##\
530  </TABLE>\n\
531##TPLFOOTER##"
532
533#define TPLREADERSBIT "\
534    <TR>\n\
535      <TD>##READERNAME##</TD>\n\
536      <TD>##CTYP##</TD>\n\
537      <TD align=\"center\">##EMMERROR##</TD>\n\
538      <TD align=\"center\">##EMMWRITTEN##</TD>\n\
539      <TD align=\"center\">##EMMSKIPPED##</TD>\n\
540      <TD align=\"center\">##EMMBLOCKED##</TD>\n\
541      <TD align=\"center\"><A HREF=\"readerconfig.html?reader=##READERNAMEENC##\" TITLE=\"Edit this Reader\"><IMG SRC=\"##EDIICO##\" BORDER=\"0\" ALT=\"Edit Reader\"/></A></TD>\
542      <TD align=\"center\">##ENTITLEMENT##</TD>\n\
543      <TD align=\"center\">##READERREFRESH##</TD>\n\
544      </TR>\n"
545
546#define TPLREADERENTITLEBIT "<A HREF=\"entitlements.html?reader=##READERNAMEENC##\" TITLE=\"Show Entitlement\"><IMG SRC=\"##ENTICO##\" BORDER=\"0\" ALT=\"Show Entitlement\"/></A>\n"
547
548#define TPLREADERREFRESHBIT "<A HREF=\"readers.html?action=reread&ridx=##RIDX##\" TITLE=\"Refresh Entitlement\"><IMG SRC=\"##REFRICO##\" BORDER=\"0\" ALT=\"Refresh Entitlement\"/></A>"
549
550#define TPLSCANUSB "\
551##TPLHEADER##\
552##TPLMENU##\n\
553<BR><BR>\n\
554<TABLE cellspacing=\"0\" cellpadding=\"10\">\n\
555    <TR><TH>USB Devices</TH></TR>\n\
556    ##USBBIT##\n\
557</TABLE>\n\
558##TPLFOOTER##"
559
560#define TPLSCANUSBBIT "<TR><TD>##USBENTRY##</TD></TR>\n"
561
562#define TPLENTITLEMENTS "\
563##TPLHEADER##\
564##TPLMENU##\n\
565<BR><BR>Entitlements for ##READERNAME##<BR><BR>\n\n\
566<DIV class=\"log\">\n\
567  ##LOGHISTORY##\
568</DIV>\n\
569##TPLFOOTER##"
570
571#define TPLREADERCONFIG "\
572##TPLHEADER##\
573##TPLMENU##\n\
574<BR><BR>\n\
575##MESSAGE##\
576  <form action=\"readerconfig.html?action=execute\" method=\"get\"><input name=\"reader\" type=\"hidden\" value=\"##READERNAME##\">\n\
577  <TABLE cellspacing=\"0\">\n\
578    <TR><TH>&nbsp;</TH><TH>Edit Reader ##READERNAME##</TH></TR>\n\
579    ##READERDEPENDINGCONFIG##\
580    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
581  </TABLE>\n\
582<BR><BR>Saving not yet implemented - Nothing changes on click<BR><BR>\n\
583##TPLFOOTER##"
584#define TPLSAVETEMPLATES "##TPLHEADER##\
585##TPLMENU##\n\
586<br><b>Saved ##CNT## templates to ##PATH##</b><br>\n\
587##TPLFOOTER##"
588#define TPLREADERCONFIGSIDOKBIT "\
589          <TR>\n\
590            <TD><INPUT NAME=\"services\" TYPE=\"CHECKBOX\" VALUE=\"##SIDLABEL##\" ##CHECKED##> ##SIDLABEL##</TD>\n"
591
592#define TPLREADERCONFIGSIDNOBIT "\
593            <TD><INPUT NAME=\"services\" TYPE=\"CHECKBOX\" VALUE=\"!##SIDLABEL##\" ##CHECKED##> !##SIDLABEL##</TD>\n\
594          </TR>\n"
595
596#define TPLREADERCONFIGMOUSEBIT "\
597        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
598    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
599    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
600    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
601    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
602    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
603    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
604    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
605    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
606    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
607    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
608    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n\
609    <TR><TD>Detect:</TD><TD><input name=\"detect\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##DETECT##\"></TD></TR>\n\
610    <TR><TD>Mhz:</TD><TD><input name=\"mhz\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MHZ##\"></TD></TR>\n\
611    <TR><TD>Cardmhz:</TD><TD><input name=\"cardmhz\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CARDMHZ##\"></TD></TR>\n\
612    <TR><TD>Blocknano:</TD><TD><input name=\"blocknano\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##BLOCKNANO##\"></TD></TR>\n\
613    <TR><TD>Savenano:</TD><TD><input name=\"savenano\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##SAVENANO##\"></TD></TR>\n"
614#define TPLREADERCONFIGSMARTBIT "\
615        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
616    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
617    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
618    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
619    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
620    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
621    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
622    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
623    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
624    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
625    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
626    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
627#define TPLREADERCONFIGINTERNALBIT "\
628        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
629    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
630    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
631    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
632    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
633    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
634    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
635    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
636    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
637    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
638    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
639    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
640#define TPLREADERCONFIGSERIALBIT "\
641        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
642    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
643    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
644    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
645    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
646    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
647    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
648    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
649    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
650    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
651    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
652    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
653#define TPLREADERCONFIGCAMD35BIT "\
654        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
655    <TR><TD>Account:</TD><TD><input name=\"account\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##USER##,##PASS##\"></TD></TR>\n\
656    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
657    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
658    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
659    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
660    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
661    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
662    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
663    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
664    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
665    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
666    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
667#define TPLREADERCONFIGCS378XBIT "\
668        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
669    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
670    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
671    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
672    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
673    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
674    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
675    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
676    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
677    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
678    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
679    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
680#define TPLREADERCONFIGRADEGASTBIT "\
681        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
682    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
683    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
684    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
685    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
686    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
687    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
688    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
689    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
690    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
691    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
692    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
693#define TPLREADERCONFIGNCD525BIT "\
694        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
695    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
696    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
697    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
698    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
699    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
700    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
701    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
702    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
703    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
704    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
705    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
706#define TPLREADERCONFIGNCD524BIT "\
707        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
708    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
709    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
710    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
711    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
712    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
713    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
714    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
715    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
716    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
717    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
718    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
719#ifdef CS_WITH_GBOX
720#define TPLREADERCONFIGGBOXBIT "\
721        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
722    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
723    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
724    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
725    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
726    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
727    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
728    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
729    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
730    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
731    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
732    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
733#endif
734#ifdef HAVE_PCSC
735#define TPLREADERCONFIGPCSCBIT "\
736        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DEVICE####R_PORT####L_PORT##\"></TD></TR>\n\
737    <TR><TD>Group:</TD><TD><input name=\"grp\" type=\"text\" size=\"10\" maxlength=\"10\" value=\"##GRP##\"></TD></TR>\n\
738    <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##NCD_KEY##\"></TD></TR>\n\
739    <TR><TD>Pincode:</TD><TD><input name=\"pincode\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##PINCODE##\"></TD></TR>\n\
740    <TR><TD>Readnano:</TD><TD><input name=\"readnano\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##EMMFILE##\"></TD></TR>\n\
741    <TR><TD>Services:</TD><TD>\n<TABLE cellspacing=\"0\" class=\"invisible\">##SIDS##</TD>\n</TR>\n</TABLE>\n\
742    <TR><TD>Inactivitytimeout:</TD><TD><input name=\"inactivitytimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##INACTIVITYTIMEOUT##\"></TD></TR>\n\
743    <TR><TD>Reconnecttimeout:</TD><TD><input name=\"reconnecttimeout\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##RECEIVETIMEOUT##\"></TD></TR>\n\
744    <TR><TD>Disableserverfilter:</TD><TD><input name=\"disableserverfilter\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##DISABLESERVERFILTER##\"></TD></TR>\n\
745    <TR><TD>Fallback:</TD><TD><input name=\"fallback\" type=\"text\" size=\"3\" maxlength=\"3\" value=\"##FALLBACK##\"></TD></TR>\n\
746    <TR><TD>CAID:</TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\n\
747    <TR><TD>Boxid:</TD><TD><input name=\"boxid\" type=\"text\" size=\"30\" maxlength=\"50\" value=\"##BOXID##\"></TD></TR>\n"
748#endif
749#define TPLCONFIGGBOX "\
750##TPLHEADER##\
751##TPLMENU##\n\
752##TPLCONFIGMENU##\n\
753<BR><BR>\n\
754<DIV CLASS=\"message\">##MESSAGE##</DIV>\
755<form action=\"config.html\" method=\"get\">\n\
756    <input name=\"part\" type=\"hidden\" value=\"gbox\">\n\
757    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
758    <TABLE class=\"config\" cellspacing=\"0\">\n\
759        <TR><TH>&nbsp;</TH><TH>Edit Gbox Config </TH></TR>\n\
760        <TR><TD>Password:</TD><TD><input name=\"password\" type=\"text\" size=\"10\" maxlength=\"8\" value=\"##PASSWORD##\"></TD></TR>\n\
761        <TR><TD>Maxdist:</TD><TD><input name=\"maxdist\" type=\"text\" size=\"5\" maxlength=\"2\" value=\"##MAXDIST##\"></TD></TR>\n\
762        <TR><TD>Ignorelist:</TD><TD><input name=\"ignorelist\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##IGNORELIST##\"></TD></TR>\n\
763        <TR><TD>Onlineinfos:</TD><TD><input name=\"onlineinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##ONLINEINFOS##\"></TD></TR>\n\
764        <TR><TD>Cardinfos:</TD><TD><input name=\"cardinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CARDINFOS##\"></TD></TR>\n\
765        <TR><TD>Locals:</TD><TD><input name=\"locals\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##LOCALS##\"></TD></TR>\n\
766    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
767    </TABLE>\n\
768##TPLFOOTER##"
769
770#ifdef CS_ANTICASC
771#define TPLCONFIGANTICASC "\
772##TPLHEADER##\
773##TPLMENU##\n\
774##TPLCONFIGMENU##\n\
775<BR><BR>\n\
776##MESSAGE##\
777<form action=\"config.html\" method=\"get\">\n\
778    <input name=\"part\" type=\"hidden\" value=\"anticasc\">\n\
779    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
780    <TABLE class=\"config\" cellspacing=\"0\">\n\
781        <TR><TH>&nbsp;</TH><TH>Edit Anticascading Config</TH></TR>\n\
782        <TR><TD>Enabled:</TD><TD><input name=\"enabled\" type=\"checkbox\" value=\"1\" ##CHECKED##>\n\
783        <TR><TD>Numusers:</TD><TD><input name=\"numusers\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NUMUSERS##\"></TD></TR>\n\
784        <TR><TD>Sampletime:</TD><TD><input name=\"sampletime\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SAMPLETIME##\"></TD></TR>\n\
785        <TR><TD>Samples:</TD><TD><input name=\"samples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SAMPLES##\"></TD></TR>\n\
786        <TR><TD>Penalty:</TD><TD><input name=\"penalty\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PENALTY##\"></TD></TR>\n\
787        <TR><TD>AClogfile:</TD><TD><input name=\"aclogfile\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##ACLOGFILE##\"></TD></TR>\n\
788        <TR><TD>Fakedelay:</TD><TD><input name=\"fakedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##FAKEDELAY##\"></TD></TR>\n\
789        <TR><TD>Denysamples:</TD><TD><input name=\"denysamples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##DENYSAMPLES##\"></TD></TR>\n\
790    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
791    </TABLE>\n\
792</form>\n\
793##TPLFOOTER##"
794#endif
795
796#define TPLCONFIGCCCAM "\
797##TPLHEADER##\
798##TPLMENU##\n\
799##TPLCONFIGMENU##\n\
800<BR><BR>\n\
801##MESSAGE##\
802<form action=\"config.html\" method=\"get\">\n\
803    <input name=\"part\" type=\"hidden\" value=\"cccam\">\n\
804    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
805    <TABLE class=\"config\" cellspacing=\"0\">\n\
806        <TR><TH>&nbsp;</TH><TH>Edit Cccam Config</TH></TR>\n\
807        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"##PORT##\"></TD></TR>\n\
808        <TR><TD>Reshare:</TD><TD><input name=\"reshare\" type=\"text\" size=\"2\" maxlength=\"1\" value=\"##RESHARE##\"></TD></TR>\n\
809        <TR><TD>Version:</TD><TD><input name=\"version\" type=\"text\" size=\"6\" maxlength=\"6\" value=\"##VERSION##\"></TD></TR>\n\
810        <TR><TD>Build:</TD><TD><input name=\"build\" type=\"text\" size=\"4\" maxlength=\"4\" value=\"##BUILD##\"></TD></TR>\n\
811        <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
812    </TABLE>\n\
813</form>\n\
814##TPLFOOTER##"
815
816#define TPLCONFIGMONITOR "\
817##TPLHEADER##\
818##TPLMENU##\n\
819##TPLCONFIGMENU##\n\
820<BR><BR>\n\
821##MESSAGE##\
822<form action=\"config.html\" method=\"get\">\n\
823    <input name=\"part\" type=\"hidden\" value=\"monitor\">\n\
824    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
825  <input name=\"httphideidleclients\" type=\"hidden\" value=\"0\">\n\
826    <TABLE class=\"config\" cellspacing=\"0\">\n\
827        <TR><TH>&nbsp;</TH><TH>Edit Monitor Config</TH></TR>\n\
828        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MONPORT##\"></TD></TR>\n\
829        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
830        <TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##NOCRYPT##\"></TD></TR>\n\
831        <TR><TD>Aulow:</TD><TD><input name=\"aulow\" type=\"text\" size=\"5\" maxlength=\"1\" value=\"##AULOW##\"> min</TD></TR>\n\
832        <TR>\n\
833            <TD>Monlevel:</TD>\n\
834        <TD><select name=\"monlevel\">\n\
835                <option value=\"0\" ##MONSELECTED0##>0 - no access to monitor</option>\n\
836                <option value=\"1\" ##MONSELECTED1##>1 - only server and own procs</option>\n\
837                <option value=\"2\" ##MONSELECTED2##>2 - all procs, but viewing only, default</option>\n\
838                <option value=\"3\" ##MONSELECTED3##>3 - all procs, reload of oscam.user possible</option>\n\
839                <option value=\"4\" ##MONSELECTED4##>4 - complete access</option>\n\
840            </select></TD>\n\
841        </TR>\n\
842        <TR><TD>Hideclientto:</TD><TD><input name=\"hideclient_to\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HIDECLIENTTO##\"> s</TD></TR>\n\
843        <TR><TD>Httpport:</TD><TD><input name=\"httpport\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HTTPPORT##\"></TD></TR>\n\
844        <TR><TD>Httpuser:</TD><TD><input name=\"httpuser\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##HTTPUSER##\"></TD></TR>\n\
845        <TR><TD>Httppwd:</TD><TD><input name=\"httppwd\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##HTTPPASSWORD##\"></TD></TR>\n\
846        <TR><TD>Httpcss:</TD><TD><input name=\"httpcss\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##HTTPCSS##\"></TD></TR>\n\
847        <TR><TD>Httprefresh:</TD><TD><input name=\"httprefresh\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HTTPREFRESH##\"> s</TD></TR>\n\
848        <TR><TD>Httptpl:</TD><TD><input name=\"httptpl\" type=\"text\" size=\"50\" maxlength=\"128\" value=\"##HTTPTPL##\"></TD></TR>\n\
849        <TR><TD>Httpscript:</TD><TD><input name=\"httpscript\" type=\"text\" size=\"50\" maxlength=\"128\" value=\"##HTTPSCRIPT##\"></TD></TR>\n\
850        <TR><TD>HttpHideIdleClients:</TD><TD><input name=\"httphideidleclients\" type=\"checkbox\" value=\"1\" ##CHECKED##>\n\
851    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
852    </TABLE>\n\
853</form>\n\
854##TPLFOOTER##"
855
856#define TPLCONFIGRADEGAST "\
857##TPLHEADER##\
858##TPLMENU##\n\
859##TPLCONFIGMENU##\n\
860<BR><BR>\n\
861##MESSAGE##\
862<form action=\"config.html\" method=\"get\">\n\
863    <input name=\"part\" type=\"hidden\" value=\"radegast\">\n\
864    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
865    <TABLE class=\"config\" cellspacing=\"0\">\n\
866        <TR><TH>&nbsp;</TH><TH>Edit Radegast Config</TH></TR>\n\
867        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\
868        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
869        <TR><TD>Allowed:</TD><TD><input name=\"allowed\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##ALLOWED##\"></TD></TR>\n\
870        <TR><TD>User:</TD><TD><input name=\"user\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##USER##\"></TD></TR>\n\
871    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
872    </TABLE>\n\
873</form>\n\
874##TPLFOOTER##"
875
876#define TPLCONFIGNEWCAMD "\
877##TPLHEADER##\
878##TPLMENU##\n\
879##TPLCONFIGMENU##\n\
880<BR><BR>\n\
881##MESSAGE##\
882<form action=\"config.html\" method=\"get\">\n\
883    <input name=\"part\" type=\"hidden\" value=\"newcamd\">\n\
884    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
885    <input name=\"keepalive\" type=\"hidden\" value=\"0\">\n\
886    <TABLE class=\"config\" cellspacing=\"0\">\n\
887        <TR><TH>&nbsp;</TH><TH>Edit Newcamd Config</TH></TR>\n\
888        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##PORT##\"></TD></TR>\n\
889        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
890        <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\"##KEY##\"></TD></TR>\n\
891        <TR><TD>Allowed:</TD><TD><input name=\"allowed\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##ALLOWED##\"></TD></TR>\n\
892        <TR><TD>Keepalive:</TD><TD><input name=\"keepalive\" type=\"checkbox\" value=\"1\" ##KEEPALIVE##></TD></TR>\n\
893        <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
894    </TABLE>\n\
895</form>\n\
896##TPLFOOTER##"
897
898#define TPLCONFIGGLOBAL "\
899##TPLHEADER##\
900##TPLMENU##\n\
901##TPLCONFIGMENU##\n\
902<BR><BR>\n\
903##MESSAGE##\
904<form action=\"config.html\" method=\"get\">\n\
905    <input name=\"part\" type=\"hidden\" value=\"global\">\n\
906    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
907    <TABLE class=\"config\" cellspacing=\"0\">\n\
908        <TR><TH>&nbsp;</TH><TH>Edit Global Config</TH></TR>\n\
909        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
910        <TR><TD>PID File:</TD><TD><input name=\"pidfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##PIDFILE##\"></TD></TR>\n\
911        <TR><TD>Usrfile:</TD><TD><input name=\"usrfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##USERFILE##\"></TD></TR>\n\
912        <TR><TD>Logfile:</TD><TD><input name=\"logfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##LOGFILE##\"></TD></TR>\n\
913        <TR><TD>Usrfileflag:</TD><TD><input name=\"usrfileflag\" type=\"text\" size=\"5\" maxlength=\"1\" value=\"##USERFILEFLAG##\"></TD></TR>\n\
914        <TR><TD>CWlogdir:</TD><TD><input name=\"cwlogdir\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##CWLOGDIR##\"></TD></TR>\n\
915        <TR><TD>Clienttimeout:</TD><TD><input name=\"clienttimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CLIENTTIMEOUT##\"> s</TD></TR>\n\
916        <TR><TD>Fallbacktimeout:</TD><TD><input name=\"fallbacktimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##FALLBACKTIMEOUT##\"> s</TD></TR>\n\
917        <TR><TD>Clientmaxidle:</TD><TD><input name=\"clientmaxidle\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CLIENTMAXIDLE##\"> s</TD></TR>\n\
918        <TR><TD>Cachedelay:</TD><TD><input name=\"cachedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CACHEDELAY##\"> ms</TD></TR>\n\
919        <TR><TD>Bindwait:</TD><TD><input name=\"bindwait\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##BINDWAIT##\"> s</TD></TR>\n\
920        <TR><TD>Netprio:</TD><TD><input name=\"netprio\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NETPRIO##\"></TD></TR>\n\
921        <TR><TD>Resolvedelay:</TD><TD><input name=\"resolvedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##RESOLVEDELAY##\"> ms</TD></TR>\n\
922        <TR><TD>Sleep:</TD><TD><input name=\"sleep\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SLEEP##\"> min</TD></TR>\n\
923        <TR><TD>Unlockparental:</TD><TD><input name=\"unlockparental\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##UNLOCKPARENTAL##\"></TD></TR>\n\
924        <TR><TD>Nice:</TD><TD><input name=\"nice\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NICE##\"></TD></TR>\n\
925        <TR><TD>Serialreadertimeout:</TD><TD><input name=\"serialreadertimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SERIALTIMEOUT##\"> ms</TD></TR>\n\
926        <TR><TD>Maxlogsize:</TD><TD><input name=\"maxlogsize\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MAXLOGSIZE##\"></TD></TR>\n\
927        <TR><TD>Waitforcards:</TD><TD><input name=\"waitforcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##WAITFORCARDS##\"></TD></TR>\n\
928        <TR><TD>Preferlocalcards:</TD><TD><input name=\"preferlocalcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PREFERLOCALCARDS##\"></TD></TR>\n\
929        <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
930    </TABLE>\n\
931</form>\n\
932##TPLFOOTER##"
933
934#define TPLCONFIGCAMD33 "\
935##TPLHEADER##\
936##TPLMENU##\n\
937##TPLCONFIGMENU##\n\
938<BR><BR>\n\
939##MESSAGE##\
940<form action=\"config.html\" method=\"get\">\n\
941    <input name=\"part\" type=\"hidden\" value=\"camd33\">\n\
942    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
943    <TABLE class=\"config\" cellspacing=\"0\">\n\
944        <TR><TH>&nbsp;</TH><TH>Edit Camd33 Config</TH></TR>\n\
945        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\
946        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
947        <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\"##KEY##\"></TD></TR>\n\
948        <TR><TD>Passive:</TD><TD><input name=\"passive\" type=\"text\" size=\"3\" maxlength=\"1\" value=\"##PASSIVE##\"></TD></TR>\n\
949        <TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##NOCRYPT##\"></TD></TR>\n\
950    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
951    </TABLE>\n\
952</form>\n\
953##TPLFOOTER##"
954
955#define TPLCONFIGCAMD35 "\
956##TPLHEADER##\
957##TPLMENU##\n\
958##TPLCONFIGMENU##\n\
959<BR><BR>\n\
960##MESSAGE##\
961<form action=\"config.html\" method=\"get\">\n\
962    <input name=\"part\" type=\"hidden\" value=\"camd35\">\n\
963    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
964    <input name=\"suppresscmd08\" type=\"hidden\" value=\"0\">\n\
965    <TABLE class=\"config\" cellspacing=\"0\">\n\
966        <TR><TH>&nbsp;</TH><TH>Edit Camd35 Config</TH></TR>\n\
967        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\
968        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
969        <TR><TD>Suppresscmd08:</TD><TD><input name=\"suppresscmd08\" type=\"checkbox\" value=\"1\" ##SUPPRESSCMD08##></TD></TR>\n\
970        <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
971    </TABLE>\n\
972</form>\n\
973##TPLFOOTER##"
974
975#define TPLCONFIGCAMD35TCP "\
976##TPLHEADER##\
977##TPLMENU##\n\
978##TPLCONFIGMENU##\n\
979<BR><BR>\n\
980##MESSAGE##\
981<form action=\"config.html\" method=\"get\">\n\
982    <input name=\"part\" type=\"hidden\" value=\"camd35tcp\">\n\
983    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
984    <TABLE class=\"config\" cellspacing=\"0\">\n\
985        <TR><TH>&nbsp;</TH><TH>Edit Camd35 TCP Config</TH></TR>\n\
986        <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"100\" maxlength=\"200\" value=\"##PORT##\"></TD></TR>\n\
987        <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"> Use 0 (zero) to delete.</TD></TR>\n\
988    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
989    </TABLE>\n\
990</form>\n\
991##TPLFOOTER##"
992
993#define TPLCONFIGSERIAL "\
994##TPLHEADER##\
995##TPLMENU##\n\
996##TPLCONFIGMENU##\n\
997<BR><BR>\n\
998##MESSAGE##\
999<form action=\"config.html\" method=\"get\">\n\
1000    <input name=\"part\" type=\"hidden\" value=\"serial\">\n\
1001    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
1002    <TABLE class=\"config\" cellspacing=\"0\">\n\
1003        <TR><TH>&nbsp;</TH><TH>Edit Serial Config</TH></TR>\n\
1004        <TR><TD>Device:</TD><TD><input name=\"device\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##SERIALDEVICE##\"></TD></TR>\n\
1005    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
1006    </TABLE>\n\
1007</form>\n\
1008<BR><BR>Configuration Serial not yet implemented<BR><BR>\n\
1009##TPLFOOTER##"
1010
1011#ifdef HAVE_DVBAPI
1012#define TPLCONFIGDVBAPI "\
1013##TPLHEADER##\
1014##TPLMENU##\n\
1015##TPLCONFIGMENU##\n\
1016<BR><BR>\n\
1017##MESSAGE##\
1018<form action=\"config.html\" method=\"get\">\n\
1019    <input name=\"part\" type=\"hidden\" value=\"dvbapi\">\n\
1020    <input name=\"action\" type=\"hidden\" value=\"execute\">\n\
1021    <input name=\"enabled\" type=\"hidden\" value=\"0\">\n\
1022    <input name=\"au\" type=\"hidden\" value=\"0\">\n\
1023    <TABLE class=\"config\" cellspacing=\"0\">\n\
1024        <TR><TH>&nbsp;</TH><TH>Edit DVB Api Config</TH></TR>\n\
1025        <TR><TD>Enabled:</TD><TD><input name=\"enabled\" type=\"checkbox\" value=\"1\" ##ENABLEDCHECKED##>\n\
1026        <TR><TD>AU:</TD><TD><input name=\"au\" type=\"checkbox\" value=\"1\" ##AUCHECKED##>\n\
1027        <TR><TD>User:</TD><TD><input name=\"user\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##USER##\"></TD></TR>\n\
1028    <TR><TD colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"OK\">\n</TD></TR>\n\
1029    </TABLE>\n\
1030</form>\n\
1031##TPLFOOTER##"
1032#endif
1033
1034#define TPLSERVICECONFIGLIST "\
1035  ##TPLHEADER##\
1036  ##TPLMENU##\n\
1037  ##MESSAGE##\
1038  <BR><BR>\
1039  <TABLE cellspacing=\"0\" cellpadding=\"10\">\n\
1040    <TR>\n\
1041      <TH>Label</TH>\n\
1042      <TH colspan=\"3\" align=\"center\">Action</TH>\n\
1043    </TR>\n\
1044    ##SERVICETABS##\
1045    <TR>\n\
1046      <FORM action=\"services_edit.html\" method=\"get\"><INPUT TYPE=\"hidden\" NAME=\"action\" VALUE=\"add\">\n\
1047      <TD>New Service:</TD>\n\
1048      <TD><input name=\"service\" type=\"text\"></TD>\n\
1049      <TD  colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Add\"></TD>\n\
1050      </FORM>\n\
1051    <TR>\n\
1052  </TABLE>\n\
1053  ##TPLFOOTER##"
1054
1055#define TPLSERVICECONFIGLISTBIT "\
1056  <TR>\n\
1057    <TD>##LABEL##</TD>\n\
1058    <TD width =\"250\" align=\"center\">##SIDLIST##</TD>\n\
1059    <TD><A HREF=\"services_edit.html?service=##LABELENC##&action=edit\" TITLE=\"Edit this Service\"><IMG SRC=\"##EDIICO##\" BORDER=\"0\" ALT=\"Edit Service\"/></A></TD>\n\
1060    <TD><A HREF=\"services.html?service=##LABELENC##&action=delete\" TITLE=\"Delete this Service\"><IMG SRC=\"##DELICO##\" BORDER=\"0\" ALT=\"Delete Service\"/></A></TD>\n\
1061  </TR>\n"
1062
1063#define TPLSERVICECONFIGSIDBIT "\
1064    <DIV class=\"##SIDCLASS##\">##SID##</DIV>"
1065
1066#define TPLSERVICEEDIT "\
1067##TPLHEADER##\
1068##TPLMENU##\n\
1069<DIV CLASS=\"message\">##MESSAGE##</DIV>\
1070<BR><BR>\n\
1071  <form action=\"services_edit.html\" method=\"get\">\n\
1072  <input name=\"service\" type=\"hidden\" value=\"##LABELENC##\">\n\
1073  <TABLE cellspacing=\"0\">\n\
1074    <TR>\n<TH>&nbsp;</TH>\n<TH>Edit Service ##LABEL##</TH>\n</TR>\n\
1075    <TR>\n<TD>caid: </TD><TD><input name=\"caid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CAIDS##\"></TD></TR>\
1076    <TR>\n<TD>provid: </TD><TD><input name=\"provid\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##PROVIDS##\"></TD></TR>\
1077    <TR>\n<TD>srvid: </TD><TD><textarea name=\"srvid\" cols=\"80\" rows=\"5\">##SRVIDS##</textarea></TD></TR>\
1078    <TR>\n<TD>&nbsp;</TD><TD align=\"right\"><input type=\"submit\" name=\"action\" value=\"Save\" title=\"Save service and reload services\"></TD>\n\
1079  </TABLE>\n\
1080</form>\n\
1081##TPLFOOTER##"
1082
1083#define TPLPRESHUTDOWN "\
1084##TPLHEADER##\
1085##TPLMENU##\n\
1086<br><br><br><DIV class = \"warning\">Do you really want to shutdown oscam?<br>\
1087All users will become disconnected.<br>\
1088You will not be able to restart oscam from the webinterface.<br>\
1089The webinterface will try to connect to oscam once 30 seconds after shutdown.</b><br>\n\
1090</DIV><br><form action=\"shutdown.html\" method=\"get\">\n\
1091<input type=\"submit\" name=\"action\" value=\"Shutdown\" title=\"Save service and reload services\"></TD>\n\
1092</form>\
1093##TPLFOOTER##"
1094
1095#define TPLSHUTDOWN "\
1096<HTML>\n\
1097  <HEAD>\n\
1098    <TITLE>OSCAM ##CS_VERSION## build ###CS_SVN_VERSION##</TITLE>\n\
1099    <link href=\"##ICO##\" rel=\"icon\" type=\"image/x-icon\"/>\
1100    ##REFRESH##\
1101    <style type=\"text/css\">\n\
1102    ##STYLESHEET##\n\
1103    </style>\n\
1104  </HEAD>\n\
1105  <BODY>\n\
1106    <H2>OSCAM ##CS_VERSION## build ###CS_SVN_VERSION##</H2>\
1107##TPLMENU##\n\
1108<br><P CLASS=\"blinking\">Oscam Shutdown - Try Reconnect in ##SECONDS## Seconds</p><br><br>\n\
1109##TPLFOOTER##"
1110
1111#define TPLSCRIPT "\
1112##TPLHEADER##\
1113##TPLMENU##\n\
1114<br><br><b>Oscam execute script: ##SCRIPTNAME## --> Status: ##SCRIPTRESULT## --> Returncode: ##CODE##</b><br>\n\
1115##TPLFOOTER##"
1116
1117enum refreshtypes {REFR_ACCOUNTS, REFR_READERS, REFR_SERVER, REFR_ANTICASC, REFR_SERVICES};
1118
1119char *tpl[]={
1120    "HEADER",
1121    "FOOTER",
1122    "MENU",
1123    "REFRESH",
1124    "STATUS",
1125    "CLIENTSTATUSBIT",
1126    "USERCONFIGLIST",
1127    "ADDNEWUSER",
1128    "USERCONFIGLISTBIT",
1129    "SIDTAB",
1130    "SIDTABBIT",
1131    "READERS",
1132    "READERSBIT",
1133    "READERENTITLEBIT",
1134    "READERREFRESHBIT",
1135    "SCANUSB",
1136    "SCANUSBBIT",
1137    "ENTITLEMENTS",
1138    "READERCONFIG",
1139    "READERCONFIGSIDOKBIT",
1140    "READERCONFIGSIDNOBIT",
1141    "READERCONFIGMOUSEBIT",
1142    "READERCONFIGSMARTBIT",
1143    "READERCONFIGINTERNALBIT",
1144    "READERCONFIGSERIALBIT",
1145    "READERCONFIGCAMD35BIT",
1146    "READERCONFIGCS378XBIT",
1147    "READERCONFIGRADEGASTBIT",
1148    "READERCONFIGNCD525BIT",
1149    "READERCONFIGNCD524BIT",
1150    "USEREDIT",
1151    "USEREDITRDRSELECTED",
1152    "USEREDITSIDOKBIT",
1153    "USEREDITSIDNOBIT",
1154    "SAVETEMPLATES",
1155    "CONFIGMENU",
1156    "CONFIGGBOX",
1157    "CONFIGCCCAM",
1158    "CONFIGMONITOR",
1159    "CONFIGRADEGAST",
1160    "CONFIGNEWCAMD",
1161    "CONFIGGLOBAL",
1162    "CONFIGCAMD33",
1163    "CONFIGCAMD35",
1164    "CONFIGCAMD35TCP",
1165    "CONFIGSERIAL",
1166    "SERVICECONFIGLIST",
1167    "SERVICECONFIGLISTBIT",
1168    "SERVICECONFIGSIDBIT",
1169    "SERVICEEDIT",
1170    "PRESHUTDOWN",
1171    "SHUTDOWN",
1172    "SCRIPT"
1173#ifdef HAVE_DVBAPI
1174    ,"CONFIGDVBAPI"
1175    ,"CONFIGMENUDVBAPI"
1176#endif
1177#ifdef CS_ANTICASC
1178    ,"USEREDITANTICASC"
1179    ,"CONFIGANTICASC"
1180    ,"CONFIGMENUANTICASC"
1181#endif
1182#ifdef CS_WITH_GBOX
1183    ,"CONFIGMENUGBOX"
1184    ,"READERCONFIGGBOXBIT"
1185#endif
1186#ifdef HAVE_PCSC
1187    ,"READERCONFIGPCSCBIT"
1188#endif
1189};
1190
1191char *tplmap[]={
1192    TPLHEADER,
1193    TPLFOOTER,
1194    TPLMENU,
1195    TPLREFRESH,
1196    TPLSTATUS,
1197    TPLCLIENTSTATUSBIT,
1198    TPLUSERCONFIGLIST,
1199    TPLADDNEWUSER,
1200    TPLUSERCONFIGLISTBIT,
1201    TPLSIDTAB,
1202    TPLSIDTABBIT,
1203    TPLREADERS,
1204    TPLREADERSBIT,
1205    TPLREADERENTITLEBIT,
1206    TPLREADERREFRESHBIT,
1207    TPLSCANUSB,
1208    TPLSCANUSBBIT,
1209    TPLENTITLEMENTS,
1210    TPLREADERCONFIG,
1211    TPLREADERCONFIGSIDOKBIT,
1212    TPLREADERCONFIGSIDNOBIT,
1213    TPLREADERCONFIGMOUSEBIT,
1214    TPLREADERCONFIGSMARTBIT,
1215    TPLREADERCONFIGINTERNALBIT,
1216    TPLREADERCONFIGSERIALBIT,
1217    TPLREADERCONFIGCAMD35BIT,
1218    TPLREADERCONFIGCS378XBIT,
1219    TPLREADERCONFIGRADEGASTBIT,
1220    TPLREADERCONFIGNCD525BIT,
1221    TPLREADERCONFIGNCD524BIT,
1222    TPLUSEREDIT,
1223    TPLUSEREDITRDRSELECTED,
1224    TPLUSEREDITSIDOKBIT,
1225    TPLUSEREDITSIDNOBIT,
1226    TPLSAVETEMPLATES,
1227    TPLCONFIGMENU,
1228    TPLCONFIGGBOX,
1229    TPLCONFIGCCCAM,
1230    TPLCONFIGMONITOR,
1231    TPLCONFIGRADEGAST,
1232    TPLCONFIGNEWCAMD,
1233    TPLCONFIGGLOBAL,
1234    TPLCONFIGCAMD33,
1235    TPLCONFIGCAMD35,
1236    TPLCONFIGCAMD35TCP,
1237    TPLCONFIGSERIAL,
1238    TPLSERVICECONFIGLIST,
1239    TPLSERVICECONFIGLISTBIT,
1240    TPLSERVICECONFIGSIDBIT,
1241    TPLSERVICEEDIT,
1242    TPLPRESHUTDOWN,
1243    TPLSHUTDOWN,
1244    TPLSCRIPT
1245#ifdef HAVE_DVBAPI
1246    ,TPLCONFIGDVBAPI
1247    ,TPLCONFIGMENUDVBAPI
1248#endif
1249#ifdef CS_ANTICASC
1250    ,TPLUSEREDITANTICASC
1251    ,TPLCONFIGANTICASC
1252    ,TPLCONFIGMENUANTICASC
1253#endif
1254#ifdef CS_WITH_GBOX
1255    ,TPLCONFIGMENUGBOX
1256    ,TPLREADERCONFIGGBOXBIT
1257#endif
1258#ifdef HAVE_PCSC
1259    ,TPLREADERCONFIGPCSCBIT
1260#endif
1261};
1262
1263struct templatevars {
1264    int varscnt;
1265    int varsalloc;
1266    int tmpcnt;
1267    int tmpalloc;
1268    char **names;
1269    char **values;
1270    char **tmp;
1271};
1272
1273struct uriparams {
1274    int paramcount;
1275    char *params[MAXGETPARAMS];
1276    char *values[MAXGETPARAMS];
1277};
1278
1279static char hex2ascii[256][2];
1280static char noncekey[33];
1281
1282
1283char *tpl_addVar(struct templatevars *vars, int append, char *name, char *value);
1284char *tpl_addTmp(struct templatevars *vars, char *value);
1285char *tpl_printf(struct templatevars *vars, int append, char *varname, char *fmtstring, ...);
1286char *tpl_getVar(struct templatevars *vars, char *name);
1287struct templatevars *tpl_create();
1288void tpl_clear(struct templatevars *vars);
1289char *tpl_getUnparsedTpl(const char* name);
1290char *tpl_getTpl(struct templatevars *vars, const char* name);
1291char *parse_auth_value(char *value);
1292void calculate_nonce(char *result, int resultlen);
1293int check_auth(char *authstring, char *method, char *path, char *expectednonce);
1294void send_headers(FILE *f, int status, char *title, char *extra, char *mime);
1295void send_css(FILE *f);
1296char *getParam(struct uriparams *params, char *name);
1297int tpl_saveIncludedTpls(const char *path);
1298#endif
Note: See TracBrowser for help on using the repository browser.