Changeset 1028
- Timestamp:
- 01/02/10 10:40:12 (14 years ago)
- Location:
- branches/monitor-improvement
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/monitor-improvement/oscam-http-helpers.c
r1024 r1028 393 393 } 394 394 395 void send_htmlhead(FILE *f, int refresh){396 397 /*build HTML head*/398 fprintf(f, "<HTML>\n");399 fprintf(f, "<HEAD>\n");400 fprintf(f, "<TITLE>OSCAM %s build #%s</TITLE>\n", CS_VERSION, CS_SVN_VERSION);401 fprintf(f, "<link rel=\"stylesheet\" type=\"text/css\" href=\"site.css\">\n");402 if (refresh > 0)403 fprintf(f, "<meta http-equiv=\"refresh\" content=\"%d; URL=/status.html\" />", refresh);404 fprintf(f, "</HEAD>\n");405 fprintf(f, "<BODY>");406 fprintf(f, "<H2>OSCAM %s build #%s</H2>\r\n", CS_VERSION, CS_SVN_VERSION);407 408 }409 410 395 void send_css(FILE *f){ 411 396 if(strlen(cfg->http_css) > 0 && file_exists(cfg->http_css) == 1){ … … 420 405 fputs(CSS, f); 421 406 } 422 }423 424 void send_footer(FILE *f){425 426 /*create footline*/427 time_t t;428 struct tm *lt;429 time(&t);430 431 lt=localtime(&t);432 433 fprintf(f, "<HR/>");434 fprintf(f, "<H4>OSCAM Webinterface - %02d.%02d.%02d %02d:%02d:%02d</H4>\r\n",435 lt->tm_mday, lt->tm_mon+1, lt->tm_year%100,436 lt->tm_hour, lt->tm_min, lt->tm_sec);437 }438 439 void send_oscam_menu(FILE *f){440 441 /*create menue*/442 fprintf(f, "<TABLE border=0 class=\"menu\">\r\n");443 fprintf(f, " <TR>\r\n");444 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"./status.html\">STATUS</TD>\r\n");445 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"./config.html\">CONFIGURATION</TD>\r\n");446 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"./readers.html\">READERS</TD>\r\n");447 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"./userconfig.html\">USERS</TD>\r\n");448 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"./services.html\">SERVICES</TD>\r\n");449 fprintf(f, " </TR>\r\n");450 fprintf(f, "</TABLE>\r\n");451 452 407 } 453 408 -
branches/monitor-improvement/oscam-http.c
r1027 r1028 9 9 #include <dirent.h> 10 10 #include <sys/socket.h> 11 12 static char* monlevel[] = {13 "0 = no access to monitor",14 "1 = only server and own procs",15 "2 = all procs, but viewing only, default",16 "3 = all procs, reload of oscam.user possible",17 "4 = complete access"18 };19 11 20 12 void refresh_oscam(enum refreshtypes refreshtype){ … … 58 50 } 59 51 60 void send_oscam_config_global(FILE *f, struct uriparams *params) { 61 int i; 62 63 fprintf(f,"<BR><BR>"); 52 void send_oscam_config_global(struct templatevars *vars, FILE *f, struct uriparams *params) { 53 int i; 64 54 65 55 if (strcmp(getParam(params, "action"), "execute") == 0){ 66 //we found the execute flag 67 for(i=0;i<(*params).paramcount;i++){ 56 for(i = 0; i < (*params).paramcount; ++i){ 68 57 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 69 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);58 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 70 59 //we use the same function as used for parsing the config tokens 71 60 chk_t_global((*params).params[i], (*params).values[i]); 72 61 } 73 62 } 74 75 //Disclaimer 76 fprintf(f,"<BR><BR><B>Configuration Global *DONE*</B><BR><BR>"); 63 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration Global *DONE*</B><BR><BR>"); 77 64 refresh_oscam(REFR_SERVER); 78 } else { 79 80 //if nothing above matches we show the form 81 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 82 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"global\">\r\n"); 83 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 84 fprintf(f,"<TABLE cellspacing=\"0\">"); 85 fprintf(f,"\t<TH> </TH><TH>Edit Global Config </TH>"); 86 87 //ServerIP 88 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->srvip)); 89 //Logfile 90 fprintf(f,"\t<TR><TD>Logfile:</TD><TD><input name=\"logfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", logfile); 91 //PID File 92 fprintf(f,"\t<TR><TD>PID File:</TD><TD><input name=\"pidfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", cfg->pidfile); 93 //Userfile 94 fprintf(f,"\t<TR><TD>Usrfile:</TD><TD><input name=\"usrfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", cfg->usrfile); 95 //Logfile 96 fprintf(f,"\t<TR><TD>CWlogdir:</TD><TD><input name=\"cwlogdir\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", cfg->cwlogdir); 97 //Clienttimeout 98 fprintf(f,"\t<TR><TD>Clienttimeout:</TD><TD><input name=\"clienttimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%ld\"></TD></TR>\r\n", cfg->ctimeout); 99 //fallbacktimeout 100 fprintf(f,"\t<TR><TD>Fallbacktimeout:</TD><TD><input name=\"fallbacktimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%ld\"></TD></TR>\r\n", cfg->ftimeout); 101 //clientmaxidle 102 fprintf(f,"\t<TR><TD>Clientmaxidle:</TD><TD><input name=\"clientmaxidle\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->cmaxidle); 103 //cachedelay 104 fprintf(f,"\t<TR><TD>Cachedelay:</TD><TD><input name=\"cachedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%ld\"></TD></TR>\r\n", cfg->delay); 105 //bindwait 106 fprintf(f,"\t<TR><TD>Bindwait:</TD><TD><input name=\"bindwait\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->bindwait); 107 //netprio 108 fprintf(f,"\t<TR><TD>Netprio:</TD><TD><input name=\"netprio\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%ld\"></TD></TR>\r\n", cfg->netprio); 109 //resolvedelay 110 fprintf(f,"\t<TR><TD>Resolvedelay:</TD><TD><input name=\"resolvedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->resolvedelay); 111 //sleep 112 fprintf(f,"\t<TR><TD>Sleep:</TD><TD><input name=\"sleep\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->tosleep); 113 //unlockparental 114 fprintf(f,"\t<TR><TD>Unlockparental:</TD><TD><input name=\"unlockparental\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ulparent); 115 //nice 116 fprintf(f,"\t<TR><TD>Nice:</TD><TD><input name=\"nice\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->nice); 117 //serialreadertimeout 118 fprintf(f,"\t<TR><TD>Serialreadertimeout:</TD><TD><input name=\"serialreadertimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->srtimeout); 119 //maxlogsize 120 fprintf(f,"\t<TR><TD>Maxlogsize:</TD><TD><input name=\"maxlogsize\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->max_log_size); 121 //showecmdw 122 fprintf(f,"\t<TR><TD>Showecmdw:</TD><TD><input name=\"showecmdw\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->show_ecm_dw); 123 //waitforcards 124 fprintf(f,"\t<TR><TD>Waitforcards:</TD><TD><input name=\"waitforcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->waitforcards); 125 //preferlocalcards 126 fprintf(f,"\t<TR><TD>Preferlocalcards:</TD><TD><input name=\"preferlocalcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->preferlocalcards); 127 128 //Tablefoot and finish form 129 fprintf(f,"</TABLE>\r\n"); 130 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 131 132 //Disclaimer 133 fprintf(f,"<BR><BR>Configuration Global not yet implemented chengings havn't any effect<BR><BR>"); 134 } 135 } 136 137 void send_oscam_config_camd33(FILE *f, struct uriparams *params) { 138 int i; 139 140 fprintf(f,"<BR><BR>"); 65 } 66 tpl_addVar(vars, 0, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->srvip)); 67 tpl_addVar(vars, 0, "LOGFILE", logfile); 68 tpl_addVar(vars, 0, "PIDFILE", cfg->pidfile); 69 tpl_addVar(vars, 0, "USERFILE", cfg->usrfile); 70 tpl_addVar(vars, 0, "CWLOGDIR", cfg->cwlogdir); 71 tpl_printf(vars, 0, "CLIENTTIMEOUT", "%ld", cfg->ctimeout); 72 tpl_printf(vars, 0, "FALLBACKTIMEOUT", "%ld", cfg->ftimeout); 73 tpl_printf(vars, 0, "CLIENTMAXIDLE", "%d", cfg->cmaxidle); 74 tpl_printf(vars, 0, "CACHEDELAY", "%ld", cfg->delay); 75 tpl_printf(vars, 0, "BINDWAIT", "%d", cfg->bindwait); 76 tpl_printf(vars, 0, "NETPRIO", "%ld", cfg->netprio); 77 tpl_printf(vars, 0, "RESOLVEDELAY", "%d", cfg->resolvedelay); 78 tpl_printf(vars, 0, "SLEEP", "%d", cfg->tosleep); 79 tpl_printf(vars, 0, "UNLOCKPARENTAL", "%d", cfg->ulparent); 80 tpl_printf(vars, 0, "NICE", "%d", cfg->nice); 81 tpl_printf(vars, 0, "SERIALTIMEOUT", "%d", cfg->srtimeout); 82 tpl_printf(vars, 0, "MAXLOGSIZE", "%d", cfg->max_log_size); 83 tpl_printf(vars, 0, "SHOWECMDW", "%d", cfg->show_ecm_dw); 84 tpl_printf(vars, 0, "WAITFORCARDS", "%d", cfg->waitforcards); 85 tpl_printf(vars, 0, "PREFERLOCALCARDS", "%d", cfg->preferlocalcards); 86 87 fputs(tpl_getTpl(vars, "CONFIGGLOBAL"), f); 88 } 89 90 void send_oscam_config_camd33(struct templatevars *vars, FILE *f, struct uriparams *params) { 91 int i; 141 92 142 93 if (strcmp(getParam(params, "action"), "execute") == 0){ 143 //we found the execute flag 144 for(i=0;i<(*params).paramcount;i++){ 94 for(i = 0; i < (*params).paramcount; ++i){ 145 95 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 146 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);96 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 147 97 //we use the same function as used for parsing the config tokens 148 98 chk_t_camd33((*params).params[i], (*params).values[i]); 149 99 } 150 100 } 151 152 //Disclaimer 153 fprintf(f,"<BR><BR><B>Configuration camd33 *DONE*</B><BR><BR>"); 101 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration camd33 *DONE*</B><BR><BR>"); 154 102 refresh_oscam(REFR_SERVER); 155 } else { 156 157 //if nothing above matches we show the form 158 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 159 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"camd33\">\r\n"); 160 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 161 fprintf(f,"<TABLE cellspacing=\"0\">"); 162 fprintf(f,"\t<TH> </TH><TH>Edit Camd33 Config </TH>"); 163 164 //Port 165 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->c33_port); 166 //ServerIP 167 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->c33_srvip)); 168 //Key 169 int keysize =sizeof(cfg->c33_key); 170 fprintf(f,"\t<TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\""); 171 for (i=0;i<keysize;i++) 172 fprintf(f,"%02X",cfg->c33_key[i]); 173 fprintf(f,"\"></TD></TR>\r\n"); 174 //Passive 175 fprintf(f,"\t<TR><TD>Passive:</TD><TD><input name=\"passive\" type=\"text\" size=\"3\" maxlength=\"1\" value=\"%d\"></TD></TR>\r\n", cfg->c33_passive); 176 //Nocrypt 177 fprintf(f,"\t<TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"50\" maxlength=\"50\" value=\""); 103 } 104 tpl_printf(vars, 0, "PORT", "%d", cfg->c33_port); 105 tpl_addVar(vars, 0, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->c33_srvip)); 106 tpl_printf(vars, 0, "PASSIVE", "%d", cfg->c33_passive); 107 108 for (i = 0; i < sizeof(cfg->c33_key); ++i) tpl_printf(vars, 1, "KEY", "%02X",cfg->c33_key[i]); 178 109 struct s_ip *cip; 179 110 char *dot=""; 180 for (cip=cfg->c33_plain; cip; cip=cip->next){ 181 if (!(cip->ip[0] == cip->ip[1])) 182 fprintf(f,"%s%s-%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0]), inet_ntoa(*(struct in_addr *)&cip->ip[1])); 183 else 184 fprintf(f,"%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 111 for (cip = cfg->rad_allowed; cip; cip = cip->next){ 112 tpl_printf(vars, 1, "NOCRYPT", "%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 113 if (cip->ip[0] == cip->ip[1]) tpl_printf(vars, 1, "NOCRYPT", "-%s", inet_ntoa(*(struct in_addr *)&cip->ip[1])); 114 dot=","; 185 115 } 186 fprintf(f,"\">wrong, see Ticket #265</TD></TR>\r\n"); 187 188 //Tablefoot and finish form 189 fprintf(f,"</TABLE>\r\n"); 190 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 191 192 //Disclaimer 193 fprintf(f,"<BR><BR>Configuration camd33 not yet implemented<BR><BR>"); 194 } 195 } 196 197 void send_oscam_config_camd35(FILE *f, struct uriparams *params) { 198 int i; 199 200 fprintf(f,"<BR><BR>"); 201 116 117 fputs(tpl_getTpl(vars, "CONFIGCAMD33"), f); 118 } 119 120 void send_oscam_config_camd35(struct templatevars *vars, FILE *f, struct uriparams *params) { 121 int i; 202 122 if (strcmp(getParam(params, "action"),"execute") == 0){ 203 //we found the execute flag 204 for(i=0;i<(*params).paramcount;i++){ 123 for(i = 0; i < (*params).paramcount; ++i){ 205 124 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 206 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);125 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 207 126 //we use the same function as used for parsing the config tokens 208 127 chk_t_camd35((*params).params[i], (*params).values[i]); 209 128 } 210 129 } 211 212 //Disclaimer 213 fprintf(f,"<BR><BR><B>Configuration camd35 *DONE*</B><BR><BR>"); 130 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration camd35 *DONE*</B><BR><BR>"); 214 131 refresh_oscam(REFR_SERVER); 215 } else { 216 //if nothing above matches we show the form 217 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 218 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"camd35\">\r\n"); 219 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 220 fprintf(f,"<TABLE cellspacing=\"0\">"); 221 fprintf(f,"\t<TH> </TH><TH>Edit Camd35 Config </TH>"); 222 223 //Port 224 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->c35_port); 225 //ServerIP 226 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->c35_tcp_srvip)); 227 228 //Tablefoot and finish form 229 fprintf(f,"</TABLE>\r\n"); 230 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 231 232 //Disclaimer 233 fprintf(f,"<BR><BR>Configuration camd35 not yet implemented<BR><BR>"); 234 } 235 } 236 237 void send_oscam_config_newcamd(FILE *f, struct uriparams *params) { 238 int i; 239 240 fprintf(f,"<BR><BR>"); 241 132 } 133 tpl_printf(vars, 0, "PORT", "%d", cfg->c35_port); 134 tpl_addVar(vars, 1, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->c35_tcp_srvip)); 135 136 fputs(tpl_getTpl(vars, "CONFIGCAMD35"), f); 137 } 138 139 void send_oscam_config_newcamd(struct templatevars *vars, FILE *f, struct uriparams *params) { 140 int i; 242 141 if (strcmp(getParam(params, "action"),"execute") == 0){ 243 //we found the execute flag 244 for(i=0;i<(*params).paramcount;i++){ 142 for(i = 0; i < (*params).paramcount; ++i){ 245 143 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 246 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);144 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 247 145 //we use the same function as used for parsing the config tokens 248 146 chk_t_newcamd((*params).params[i], (*params).values[i]); 249 147 } 250 148 } 251 252 //Disclaimer 253 fprintf(f,"<BR><BR><B>Configuration newcamd *DONE*</B><BR><BR>"); 149 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration newcamd *DONE*</B><BR><BR>"); 254 150 refresh_oscam(REFR_SERVER); 255 } else { 256 //if nothing above matches we show the form 257 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 258 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"newcamd\">\r\n"); 259 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 260 fprintf(f,"<TABLE cellspacing=\"0\">"); 261 fprintf(f,"\t<TH> </TH><TH>Edit Newcamd Config </TH>"); 262 263 //Port 264 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"80\" maxlength=\"200\" value=\""); 151 } 265 152 int j; 266 153 char *dot1, *dot2; 267 154 if (cfg->ncd_ptab.nports>0){ 268 155 dot1 = ""; 269 for(i=0;i<cfg->ncd_ptab.nports;i++){ 270 dot2 = ""; 271 fprintf(f, "%s%d", dot1, cfg->ncd_ptab.ports[i].s_port); 272 fprintf(f, "@%04X", cfg->ncd_ptab.ports[i].ftab.filts[0].caid); 156 for(i = 0; i < cfg->ncd_ptab.nports; ++i){ 157 dot2 = ":"; 158 tpl_printf(vars, 1, "PORT", "%s%d@%04X", dot1, cfg->ncd_ptab.ports[i].s_port, cfg->ncd_ptab.ports[i].ftab.filts[0].caid); 273 159 if (cfg->ncd_ptab.ports[i].ftab.filts[0].nprids > 0){ 274 fprintf(f, ":"); 275 for (j = 0; j < cfg->ncd_ptab.ports[i].ftab.filts[0].nprids; j++){ 276 fprintf(f,"%s%lX", dot2, cfg->ncd_ptab.ports[i].ftab.filts[0].prids[j]); 160 for (j = 0; j < cfg->ncd_ptab.ports[i].ftab.filts[0].nprids; ++j){ 161 tpl_printf(vars, 1, "PORT", "%s%lX", dot2, cfg->ncd_ptab.ports[i].ftab.filts[0].prids[j]); 277 162 dot2 = ","; 278 163 } … … 282 167 } 283 168 284 fprintf(f,"\"></TD></TR>\r\n"); 285 286 //ServerIP 287 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->ncd_srvip)); 288 //Key 289 fprintf(f,"\t<TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\""); 290 291 for (i=0;i<14;i++) 292 fprintf(f,"%02X",cfg->ncd_key[i]); 293 294 fprintf(f,"\"></TD></TR>\r\n"); 295 //Tablefoot and finish form 296 fprintf(f,"</TABLE>\r\n"); 297 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 298 } 299 } 300 301 void send_oscam_config_radegast(FILE *f, struct uriparams *params) { 302 int i; 303 304 fprintf(f,"<BR><BR>"); 305 169 tpl_addVar(vars, 0, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->ncd_srvip)); 170 for (i=0;i<14;i++) tpl_printf(vars, 1, "KEY", "%02X", cfg->ncd_key[i]); 171 172 fputs(tpl_getTpl(vars, "CONFIGNEWCAMD"), f); 173 } 174 175 void send_oscam_config_radegast(struct templatevars *vars, FILE *f, struct uriparams *params) { 176 int i; 306 177 if (strcmp(getParam(params, "action"),"execute") == 0){ 307 //we found the execute flag 308 for(i=0;i<(*params).paramcount;i++){ 178 for(i = 0; i < (*params).paramcount; ++i){ 309 179 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 310 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);180 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 311 181 //we use the same function as used for parsing the config tokens 312 182 chk_t_radegast((*params).params[i], (*params).values[i]); 313 183 } 314 184 } 315 316 //Disclaimer 317 fprintf(f,"<BR><BR><B>Configuration Radegast *DONE*</B><BR><BR>"); 185 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration Radegast *DONE*</B><BR><BR>"); 318 186 refresh_oscam(REFR_SERVER); 319 } else { 320 321 //if nothing above matches we show the form 322 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 323 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"radegast\">\r\n"); 324 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 325 fprintf(f,"<TABLE cellspacing=\"0\">"); 326 fprintf(f,"\t<TH> </TH><TH>Edit Radegast Config </TH>"); 327 328 //Port 329 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->rad_port); 330 //ServerIP 331 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->rad_srvip)); 332 //Allowed 333 fprintf(f,"\t<TR><TD>Allowed:</TD><TD><input name=\"allowed\" type=\"text\" size=\"50\" maxlength=\"50\" value=\""); 187 } 188 tpl_printf(vars, 0, "PORT", "%d", cfg->rad_port); 189 tpl_addVar(vars, 0, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->rad_srvip)); 190 tpl_addVar(vars, 0, "USER", cfg->rad_usr); 191 334 192 struct s_ip *cip; 335 193 char *dot=""; 336 194 for (cip=cfg->rad_allowed; cip; cip=cip->next){ 337 if (!(cip->ip[0] == cip->ip[1])) 338 fprintf(f,"%s%s-%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0]), inet_ntoa(*(struct in_addr *)&cip->ip[1])); 339 else 340 fprintf(f,"%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 195 tpl_printf(vars, 1, "ALLOWED", "%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 196 if (cip->ip[0] == cip->ip[1]) tpl_printf(vars, 1, "ALLOWED", "-%s", inet_ntoa(*(struct in_addr *)&cip->ip[1])); 197 dot=","; 341 198 } 342 fprintf(f,"\">wrong, see Ticket #265</TD></TR>\r\n"); 343 //Port 344 fprintf(f,"\t<TR><TD>User:</TD><TD><input name=\"user\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", cfg->rad_usr); 345 346 //Tablefoot and finish form 347 fprintf(f,"</TABLE>\r\n"); 348 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 349 } 350 } 351 352 void send_oscam_config_cccam(FILE *f, struct uriparams *params) { 353 int i; 354 355 fprintf(f,"<BR><BR>"); 356 199 200 fputs(tpl_getTpl(vars, "CONFIGRADEGAST"), f); 201 } 202 203 void send_oscam_config_cccam(struct templatevars *vars, FILE *f, struct uriparams *params) { 204 int i; 357 205 if (strcmp(getParam(params, "action"),"execute") == 0){ 358 //we found the execute flag 359 for(i=0;i<(*params).paramcount;i++){ 206 for(i = 0; i < (*params).paramcount; ++i){ 360 207 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 361 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);208 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 362 209 //we use the same function as used for parsing the config tokens 363 210 chk_t_cccam((*params).params[i], (*params).values[i]); 364 211 } 365 212 } 366 367 //Disclaimer 368 fprintf(f,"<BR><BR>Configuration Cccam Do not yet implemented<BR><BR>"); 213 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR>Configuration Cccam Do not yet implemented<BR><BR>"); 369 214 refresh_oscam(REFR_SERVER); 370 } else { 371 372 //if nothing above matches we show the form 373 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 374 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"cccam\">\r\n"); 375 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 376 fprintf(f,"<TABLE cellspacing=\"0\">"); 377 fprintf(f,"\t<TH> </TH><TH>Edit Cccam Config </TH>"); 378 379 380 //Tablefoot and finish form 381 fprintf(f,"</TABLE>\r\n"); 382 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 383 384 //Disclaimer 385 fprintf(f,"<BR><BR>Configuration Cccam not yet implemented<BR><BR>"); 386 } 387 } 388 389 void send_oscam_config_gbox(FILE *f, struct uriparams *params) { 390 int i; 391 392 fprintf(f,"<BR><BR>"); 393 215 } 216 fputs(tpl_getTpl(vars, "CONFIGCCCAM"), f); 217 } 218 219 void send_oscam_config_gbox(struct templatevars *vars, FILE *f, struct uriparams *params) { 220 int i; 394 221 if (strcmp(getParam(params, "action"),"execute") == 0){ 395 //we found the execute flag 396 for(i=0;i<(*params).paramcount;i++){ 222 for(i = 0; i < (*params).paramcount; ++i){ 397 223 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 398 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);224 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 399 225 //we use the same function as used for parsing the config tokens 400 226 chk_t_gbox((*params).params[i], (*params).values[i]); 401 227 } 402 228 } 403 404 //Disclaimer 405 fprintf(f,"<BR><BR><B>Configuration Gbox *DONE*</B><BR><BR>"); 229 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration Gbox *DONE*</B><BR><BR>"); 406 230 refresh_oscam(REFR_SERVER); 407 } else { 408 409 //if nothing above matches we show the form 410 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 411 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"gbox\">\r\n"); 412 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 413 fprintf(f,"<TABLE cellspacing=\"0\">"); 414 fprintf(f,"\t<TH> </TH><TH>Edit Gbox Config </TH>"); 415 416 //Password 417 fprintf(f,"\t<TR><TD>Password:</TD><TD><input name=\"password\" type=\"text\" size=\"10\" maxlength=\"8\" value=\""); 418 for (i=0;i<4;i++) 419 fprintf(f,"%02X",cfg->gbox_pwd[i]); 420 fprintf(f,"\"></TD></TR>\r\n"); 421 //Maxdist 422 fprintf(f,"\t<TR><TD>Maxdist:</TD><TD><input name=\"maxdist\" type=\"text\" size=\"5\" maxlength=\"2\" value=\"%d\"></TD></TR>\r\n", cfg->maxdist); 423 //ignorelist 424 fprintf(f,"\t<TR><TD>Ignorelist:</TD><TD><input name=\"ignorelist\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"%s\"></TD></TR>\r\n", cfg->ignorefile); 425 //onlineinfos 426 fprintf(f,"\t<TR><TD>Onlineinfos:</TD><TD><input name=\"onlineinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"%s\"></TD></TR>\r\n", cfg->gbxShareOnl); 427 //cardinfos 428 fprintf(f,"\t<TR><TD>Cardinfos:</TD><TD><input name=\"cardinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"%s\"></TD></TR>\r\n", cfg->cardfile); 429 //locals 430 fprintf(f,"\t<TR><TD>Locals:</TD><TD><input name=\"locals\" type=\"text\" size=\"50\" maxlength=\"50\" value=\""); 231 } 232 tpl_printf(vars, 0, "MAXDIST", "%d", cfg->maxdist); 233 for (i=0;i<4;i++) tpl_printf(vars, 1, "PASSWORD", "%02X", cfg->gbox_pwd[i]); 234 tpl_addVar(vars, 0, "IGNORELIST", (char *)cfg->ignorefile); 235 tpl_addVar(vars, 0, "ONLINEINFOS", (char *)cfg->gbxShareOnl); 236 tpl_addVar(vars, 0, "CARDINFOS", (char *)cfg->cardfile); 431 237 char *dot = ""; 432 238 for (i = 0; i < cfg->num_locals; i++){ 433 fprintf(f,"%s%06lX", dot, cfg->locals[i]);239 tpl_printf(vars, 1, "LOCALS", "%s%06lX", dot, cfg->locals[i]); 434 240 dot=";"; 435 241 } 436 fprintf(f,"\"></TD></TR>\r\n"); 437 438 //Tablefoot and finish form 439 fprintf(f,"</TABLE>\r\n"); 440 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 441 } 442 } 443 444 void send_oscam_config_monitor(FILE *f, struct uriparams *params) { 445 int i; 446 447 fprintf(f,"<BR><BR>"); 448 242 fputs(tpl_getTpl(vars, "CONFIGGBOX"), f); 243 } 244 245 void send_oscam_config_monitor(struct templatevars *vars, FILE *f, struct uriparams *params) { 246 int i; 449 247 if (strcmp(getParam(params, "action"),"execute") == 0){ 450 //we found the execute flag 451 for(i=0;i<(*params).paramcount;i++){ 248 for(i = 0; i < (*params).paramcount; ++i){ 452 249 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 453 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);250 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 454 251 //we use the same function as used for parsing the config tokens 455 252 chk_t_monitor((*params).params[i], (*params).values[i]); 456 253 } 457 254 } 458 459 //Disclaimer 460 fprintf(f,"<BR><BR><B>Configuration Monitor *DONE*</B><BR><BR>"); 255 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration Monitor *DONE*</B><BR><BR>"); 461 256 refresh_oscam(REFR_SERVER); 462 } else { 463 464 //if nothing above matches we show the form 465 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 466 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"monitor\">\r\n"); 467 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 468 fprintf(f,"<TABLE cellspacing=\"0\">"); 469 fprintf(f,"\t<TH> </TH><TH>Edit Monitor Config </TH>"); 470 471 //Port 472 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->mon_port); 473 //ServerIP 474 fprintf(f,"\t<TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"%s\"></TD></TR>\r\n", inet_ntoa(*(struct in_addr *)&cfg->mon_srvip)); 475 //Nocrypt 476 fprintf(f,"\t<TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"50\" maxlength=\"50\" value=\""); 257 } 258 tpl_printf(vars, 0, "MONPORT", "%d", cfg->mon_port); 259 tpl_addVar(vars, 0, "SERVERIP", inet_ntoa(*(struct in_addr *)&cfg->mon_srvip)); 260 tpl_printf(vars, 0, "MONPORT", "%d", cfg->mon_aulow); 261 tpl_printf(vars, 0, "HIDECLIENTTO", "%d", cfg->mon_hideclient_to); 262 tpl_printf(vars, 0, "HTTPPORT", "%d", cfg->http_port); 263 tpl_addVar(vars, 0, "HTTPUSER", cfg->http_user); 264 tpl_addVar(vars, 0, "HTTPPASSWORD", cfg->http_pwd); 265 tpl_addVar(vars, 0, "HTTPCSS", cfg->http_css); 266 tpl_printf(vars, 0, "HTTPREFRESH", "%d", cfg->http_refresh); 267 tpl_addVar(vars, 0, "HTTPTPL", cfg->http_tpl); 268 477 269 struct s_ip *cip; 478 270 char *dot=""; 479 for (cip=cfg->mon_allowed; cip; cip=cip->next){ 480 if (!(cip->ip[0] == cip->ip[1])) 481 fprintf(f,"%s%s-%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0]), inet_ntoa(*(struct in_addr *)&cip->ip[1])); 482 else 483 fprintf(f,"%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 484 } 485 fprintf(f,"\">wrong, see Ticket #265</TD></TR>\r\n"); 486 //aulow 487 fprintf(f,"\t<TR><TD>Aulow:</TD><TD><input name=\"aulow\" type=\"text\" size=\"5\" maxlength=\"1\" value=\"%d\"></TD></TR>\r\n", cfg->mon_aulow); 488 //Monlevel 489 fprintf(f,"<TR><TD>Monlevel:</TD><TD><select name=\"monlevel\" >\r\n"); 490 for(i = 0; i < 5; i++){ 491 if(i == cfg->mon_level) 492 fprintf(f,"\t<option value=\"%d\" selected>%s</option>\r\n", i, monlevel[i]); 493 else 494 fprintf(f,"\t<option value=\"%d\">%s</option>\r\n", i, monlevel[i]); 495 } 496 fprintf(f,"</select></TD></TR>\r\n"); 497 //HTTPport 498 fprintf(f,"\t<TR><TD>Port:</TD><TD><input name=\"httpport\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->http_port); 499 //hideclient_to 500 fprintf(f,"\t<TR><TD>Hideclientto:</TD><TD><input name=\"hideclient_to\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->mon_hideclient_to); 501 //HTTPuser 502 fprintf(f,"<TR><TD>Httpuser:</TD><TD><input name=\"httpuser\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"%s\"></TD></TR>\r\n", cfg->http_user); 503 //HTTPpassword 504 fprintf(f,"<TR><TD>Httppwd:</TD><TD><input name=\"httppwd\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"%s\"></TD></TR>\r\n", cfg->http_pwd); 505 //HTTPcss 506 fprintf(f,"<TR><TD>Httpcss:</TD><TD><input name=\"httpcss\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"%s\"></TD></TR>\r\n", cfg->http_css); 507 //HTTPrefresh 508 fprintf(f,"\t<TR><TD>Httprefresh:</TD><TD><input name=\"httprefresh\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->http_refresh); 509 //Httptpl 510 fprintf(f,"\t<TR><TD>Httptpl:</TD><TD><input name=\"httptpl\" type=\"text\" size=\"50\" maxlength=\"100\" value=\"%s\"></TD></TR>\r\n", cfg->http_tpl); 511 512 //Tablefoot and finish form 513 fprintf(f,"</TABLE>\r\n"); 514 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 515 } 271 for (cip = cfg->rad_allowed; cip; cip = cip->next){ 272 tpl_printf(vars, 1, "NOCRYPT", "%s%s", dot, inet_ntoa(*(struct in_addr *)&cip->ip[0])); 273 if (cip->ip[0] == cip->ip[1]) tpl_printf(vars, 1, "NOCRYPT", "-%s", inet_ntoa(*(struct in_addr *)&cip->ip[1])); 274 dot=","; 275 } 276 277 //Monlevel selector 278 tpl_printf(vars, 0, "TMP", "MONSELECTED%d", cfg->mon_level); 279 tpl_addVar(vars, 0, tpl_getVar(vars, "TMP"), "selected"); 280 281 fputs(tpl_getTpl(vars, "CONFIGMONITOR"), f); 516 282 } 517 283 518 284 #ifdef CS_ANTICASC 519 520 void send_oscam_config_anticasc(FILE *f, struct uriparams *params) { 521 int i; 522 523 fprintf(f,"<BR><BR>"); 524 285 void send_oscam_config_anticasc(struct templatevars *vars, FILE *f, struct uriparams *params) { 286 int i; 525 287 if (strcmp(getParam(params, "action"),"execute") == 0){ 526 //we found the execute flag 527 for(i=0;i<(*params).paramcount;i++){ 288 for(i = 0; i < (*params).paramcount; ++i){ 528 289 if ((strcmp((*params).params[i], "part")) && (strcmp((*params).params[i], "action"))){ 529 fprintf(f,"Parameter: %s set to Value: %s<BR>\r\n", (*params).params[i], (*params).values[i]);290 tpl_printf(vars, 1, "MESSAGE", "Parameter: %s set to Value: %s<BR>\n", (*params).params[i], (*params).values[i]); 530 291 //we use the same function as used for parsing the config tokens 531 292 chk_t_ac((*params).params[i], (*params).values[i]); 532 293 } 533 294 } 534 535 //Disclaimer 536 fprintf(f,"<BR><BR><B>Configuration Anticascading *DONE*</B><BR><BR>"); 295 tpl_addVar(vars, 1, "MESSAGE", "<BR><BR><B>Configuration Anticascading *DONE*</B><BR><BR>"); 537 296 refresh_oscam(REFR_ANTICASC); 538 } else{ 539 540 //if nothing above matches we show the form 541 fprintf(f,"<form action=\"/config.html\" method=\"get\">\r\n"); 542 fprintf(f,"<input name=\"part\" type=\"hidden\" value=\"anticasc\">\r\n"); 543 fprintf(f,"<input name=\"action\" type=\"hidden\" value=\"execute\">\r\n"); 544 fprintf(f,"<TABLE cellspacing=\"0\">"); 545 fprintf(f,"\t<TH> </TH><TH>Edit Anticascading Config </TH>"); 546 547 //Port 548 char *checked=""; 549 if (cfg->ac_enabled > 0) checked="checked"; 550 fprintf(f,"\t<TR><TD>Enabled:</TD><TD><input name=\"enabled\" type=\"checkbox\" value=\"1\" %s>\r\n", checked); 551 //numusers 552 fprintf(f,"\t<TR><TD>Numusers:</TD><TD><input name=\"numusers\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_users); 553 //sampletime 554 fprintf(f,"\t<TR><TD>Sampletime:</TD><TD><input name=\"sampletime\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_stime); 555 //samples 556 fprintf(f,"\t<TR><TD>Samples:</TD><TD><input name=\"samples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_samples); 557 //penalty 558 fprintf(f,"\t<TR><TD>Penalty:</TD><TD><input name=\"penalty\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_penalty); 559 //aclogfile 560 fprintf(f,"\t<TR><TD>AClogfile:</TD><TD><input name=\"aclogfile\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"%s\"></TD></TR>\r\n", cfg->ac_logfile); 561 //fakedelay 562 fprintf(f,"\t<TR><TD>Fakedelay:</TD><TD><input name=\"fakedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_fakedelay); 563 //denysamples 564 fprintf(f,"\t<TR><TD>Denysamples:</TD><TD><input name=\"denysamples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"%d\"></TD></TR>\r\n", cfg->ac_denysamples); 565 566 //Tablefoot and finish form 567 fprintf(f,"</TABLE>\r\n"); 568 fprintf(f,"<input type=\"submit\" value=\"OK\"></form>\r\n"); 569 } 297 } 298 if (cfg->ac_enabled > 0) tpl_addVar(vars, 0, "CHECKED", "checked"); 299 tpl_printf(vars, 0, "NUMUSERS", "%d", "checked"); 300 tpl_printf(vars, 0, "SAMPLETIME", "%d", cfg->ac_stime); 301 tpl_printf(vars, 0, "SAMPLES", "%d", cfg->ac_samples); 302 tpl_printf(vars, 0, "PENALTY", "%d", cfg->ac_penalty); 303 tpl_addVar(vars, 0, "ACLOGFILE", cfg->ac_logfile); 304 tpl_printf(vars, 0, "FAKEDELAY", "%d", cfg->ac_fakedelay); 305 tpl_printf(vars, 0, "DENYSAMPLES", "%d", cfg->ac_denysamples); 306 fputs(tpl_getTpl(vars, "CONFIGANTICASC"), f); 570 307 } 571 308 572 309 #endif 573 310 574 void send_oscam_config(FILE *f, struct uriparams *params) { 575 fprintf(f,"<BR><BR>"); 576 577 /*create submenue*/ 578 fprintf(f, "<TABLE border=0 class=\"menu\">\n"); 579 fprintf(f, " <TR>\n"); 580 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=global\">Global</TD>\n"); 581 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=camd33\">Camd3.3</TD>\n"); 582 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=camd35\">Camd3.5</TD>\n"); 583 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=newcamd\">Newcamd</TD>\n"); 584 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=radegast\">Radegast</TD>\n"); 585 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=cccam\">Cccam</TD>\n"); 586 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=gbox\">Gbox</TD>\n"); 311 void send_oscam_config(struct templatevars *vars, FILE *f, struct uriparams *params) { 312 char *part = getParam(params, "part"); 313 if (!strcmp(part,"camd33")) send_oscam_config_camd33(vars, f, params); 314 else if (!strcmp(part,"camd35")) send_oscam_config_camd35(vars, f, params); 315 else if (!strcmp(part,"newcamd")) send_oscam_config_newcamd(vars, f, params); 316 else if (!strcmp(part,"radegast")) send_oscam_config_radegast(vars, f, params); 317 else if (!strcmp(part,"cccam")) send_oscam_config_cccam(vars, f, params); 318 else if (!strcmp(part,"gbox")) send_oscam_config_gbox(vars, f, params); 587 319 #ifdef CS_ANTICASC 588 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=anticasc\">Anticascading</TD>\n");320 else if (!strcmp(part,"anticasc")) send_oscam_config_anticasc(vars, f, params); 589 321 #endif 590 fprintf(f, " <TD CLASS=\"menu\"><A HREF=\"config.html?part=monitor\">Monitor</TD>\n"); 591 fprintf(f, " </TR>\n"); 592 fprintf(f, "</TABLE>\n"); 593 594 char *part = getParam(params, "part"); 595 if (strlen(part) == 0) 596 send_oscam_config_global(f, params); 597 else { 598 if (!strcmp(part,"global")) 599 send_oscam_config_global(f, params); 600 else if (!strcmp(part,"camd33")) 601 send_oscam_config_camd33(f, params); 602 else if (!strcmp(part,"camd35")) 603 send_oscam_config_camd35(f, params); 604 else if (!strcmp(part,"newcamd")) 605 send_oscam_config_newcamd(f, params); 606 else if (!strcmp(part,"radegast")) 607 send_oscam_config_radegast(f, params); 608 else if (!strcmp(part,"cccam")) 609 send_oscam_config_cccam(f, params); 610 else if (!strcmp(part,"gbox")) 611 send_oscam_config_gbox(f, params); 612 #ifdef CS_ANTICASC 613 else if (!strcmp(part,"anticasc")) 614 send_oscam_config_anticasc(f, params); 615 #endif 616 else if (!strcmp(part,"monitor")) 617 send_oscam_config_monitor(f, params); 618 else 619 send_oscam_config_global(f, params); 620 } 322 else if (!strcmp(part,"monitor")) send_oscam_config_monitor(vars, f, params); 323 else send_oscam_config_global(vars, f, params); 621 324 } 622 325 … … 1191 894 send_headers(f, 200, "OK", NULL, "text/html"); 1192 895 if(pgidx == 8) send_css(f); 1193 else if(pgidx != 0){896 else { 1194 897 time_t t; 1195 898 struct templatevars *vars = tpl_create(); … … 1207 910 tpl_printf(vars, 0, "CURTIME", "%02d:%02d:%02d", lt->tm_hour, lt->tm_min, lt->tm_sec); 1208 911 switch(pgidx){ 1209 case 0: break;912 case 0: send_oscam_config(vars, f, ¶ms); break; 1210 913 case 1: send_oscam_reader(vars, f); break; 1211 914 case 2: send_oscam_entitlement(vars, f, ¶ms); break; … … 1219 922 } 1220 923 tpl_clear(vars); 1221 } else {1222 send_htmlhead(f,0);1223 send_oscam_menu(f);1224 send_oscam_config(f, ¶ms);1225 send_footer(f);1226 fprintf(f, "</BODY></HTML>\r\n");1227 924 } 1228 925 return 0; -
branches/monitor-improvement/oscam-http.h
r1026 r1028 61 61 </TABLE>" 62 62 63 #define TPLCONFIGMENU "\ 64 <BR><BR>\n\ 65 <TABLE border=0 class=\"menu\">\n\ 66 <TR>\n\ 67 <TD CLASS=\"menu\"><A HREF=\"config.html?part=global\">Global</TD>\n\ 68 <TD CLASS=\"menu\"><A HREF=\"config.html?part=camd33\">Camd3.3</TD>\n\ 69 <TD CLASS=\"menu\"><A HREF=\"config.html?part=camd35\">Camd3.5</TD>\n\ 70 <TD CLASS=\"menu\"><A HREF=\"config.html?part=newcamd\">Newcamd</TD>\n\ 71 <TD CLASS=\"menu\"><A HREF=\"config.html?part=radegast\">Radegast</TD>\n\ 72 <TD CLASS=\"menu\"><A HREF=\"config.html?part=cccam\">Cccam</TD>\n\ 73 <TD CLASS=\"menu\"><A HREF=\"config.html?part=gbox\">Gbox</TD>\n\ 74 ##TPLCONFIGMENUANTICASC##\ 75 <TD CLASS=\"menu\"><A HREF=\"config.html?part=monitor\">Monitor</TD>\n\ 76 </TR>\n\ 77 </TABLE>" 78 79 #ifdef CS_ANTICASC 80 #define TPLCONFIGMENUANTICASC "<TD CLASS=\"menu\"><A HREF=\"config.html?part=anticasc\">Anticascading</TD>\n" 81 #endif 82 63 83 #define TPLSTATUS "\ 64 84 ##TPLHEADER##\ … … 378 398 </TR>\n" 379 399 400 #define TPLCONFIGGBOX "\ 401 ##TPLHEADER##\ 402 ##TPLMENU##\n\ 403 ##TPLCONFIGMENU##\n\ 404 <BR><BR>\n\ 405 ##MESSAGE##\ 406 <form action=\"config.html\" method=\"get\">\n\ 407 <input name=\"part\" type=\"hidden\" value=\"gbox\">\n\ 408 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 409 <TABLE cellspacing=\"0\">\n\ 410 <TR><TH> </TH><TH>Edit Gbox Config </TH></TR>\n\ 411 <TR><TD>Password:</TD><TD><input name=\"password\" type=\"text\" size=\"10\" maxlength=\"8\" value=\"##PASSWORD##\"></TD></TR>\n\ 412 <TR><TD>Maxdist:</TD><TD><input name=\"maxdist\" type=\"text\" size=\"5\" maxlength=\"2\" value=\"##MAXDIST##\"></TD></TR>\n\ 413 <TR><TD>Ignorelist:</TD><TD><input name=\"ignorelist\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##IGNORELIST##\"></TD></TR>\n\ 414 <TR><TD>Onlineinfos:</TD><TD><input name=\"onlineinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##ONLINEINFOS##\"></TD></TR>\n\ 415 <TR><TD>Cardinfos:</TD><TD><input name=\"cardinfos\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##CARDINFOS##\"></TD></TR>\n\ 416 <TR><TD>Locals:</TD><TD><input name=\"locals\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##LOCALS##\"></TD></TR>\n\ 417 </TABLE>\n\ 418 <input type=\"submit\" value=\"OK\"></form>\n\ 419 ##TPLFOOTER##" 420 421 #ifdef CS_ANTICASC 422 #define TPLCONFIGANTICASC "\ 423 ##TPLHEADER##\ 424 ##TPLMENU##\n\ 425 ##TPLCONFIGMENU##\n\ 426 <BR><BR>\n\ 427 ##MESSAGE##\ 428 <form action=\"config.html\" method=\"get\">\n\ 429 <input name=\"part\" type=\"hidden\" value=\"anticasc\">\n\ 430 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 431 <TABLE cellspacing=\"0\">\n\ 432 <TR><TH> </TH><TH>Edit Anticascading Config</TH></TR>\n\ 433 <TR><TD>Enabled:</TD><TD><input name=\"enabled\" type=\"checkbox\" value=\"1\" ##CHECKED##>\n\ 434 <TR><TD>Numusers:</TD><TD><input name=\"numusers\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NUMUSERS##\"></TD></TR>\n\ 435 <TR><TD>Sampletime:</TD><TD><input name=\"sampletime\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SAMPLETIME##\"></TD></TR>\n\ 436 <TR><TD>Samples:</TD><TD><input name=\"samples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SAMPLES##\"></TD></TR>\n\ 437 <TR><TD>Penalty:</TD><TD><input name=\"penalty\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PENALTY##\"></TD></TR>\n\ 438 <TR><TD>AClogfile:</TD><TD><input name=\"aclogfile\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##ACLOGFILE##\"></TD></TR>\n\ 439 <TR><TD>Fakedelay:</TD><TD><input name=\"fakedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##FAKEDELAY##\"></TD></TR>\n\ 440 <TR><TD>Denysamples:</TD><TD><input name=\"denysamples\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##DENYSAMPLES##\"></TD></TR>\n\ 441 </TABLE>\n\ 442 <input type=\"submit\" value=\"OK\">\n\ 443 </form>\n\ 444 ##TPLFOOTER##" 445 #endif 446 447 #define TPLCONFIGCCCAM "\ 448 ##TPLHEADER##\ 449 ##TPLMENU##\n\ 450 ##TPLCONFIGMENU##\n\ 451 <BR><BR>\n\ 452 ##MESSAGE##\ 453 <form action=\"config.html\" method=\"get\">\n\ 454 <input name=\"part\" type=\"hidden\" value=\"cccam\">\n\ 455 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 456 <TABLE cellspacing=\"0\">\n\ 457 <TR><TH> </TH><TH>Edit Cccam Config</TH></TR>\n\ 458 </TABLE>\n\ 459 <input type=\"submit\" value=\"OK\">\n\ 460 </form>\n\ 461 <BR><BR>Configuration Cccam not yet implemented<BR><BR>\n\ 462 ##TPLFOOTER##" 463 464 #define TPLCONFIGMONITOR "\ 465 ##TPLHEADER##\ 466 ##TPLMENU##\n\ 467 ##TPLCONFIGMENU##\n\ 468 <BR><BR>\n\ 469 ##MESSAGE##\ 470 <form action=\"config.html\" method=\"get\">\n\ 471 <input name=\"part\" type=\"hidden\" value=\"monitor\">\n\ 472 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 473 <TABLE cellspacing=\"0\">\n\ 474 <TR><TH> </TH><TH>Edit Monitor Config</TH></TR>\n\ 475 <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MONPORT##\"></TD></TR>\n\ 476 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 477 <TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##NOCRYPT##\">wrong, see Ticket #265</TD></TR>\n\ 478 <TR><TD>Aulow:</TD><TD><input name=\"aulow\" type=\"text\" size=\"5\" maxlength=\"1\" value=\"##AULOW##\"></TD></TR>\n\ 479 <TR>\n\ 480 <TD>Monlevel:</TD>\n\ 481 <TD><select name=\"monlevel\">\n\ 482 <option value=\"0\" ##MONSELECTED0##>no access to monitor</option>\n\ 483 <option value=\"1\" ##MONSELECTED1##>only server and own procs</option>\n\ 484 <option value=\"2\" ##MONSELECTED2##>all procs, but viewing only, default</option>\n\ 485 <option value=\"3\" ##MONSELECTED3##>all procs, reload of oscam.user possible</option>\n\ 486 <option value=\"4\" ##MONSELECTED4##>complete access</option>\n\ 487 </select></TD>\n\ 488 </TR>\n\ 489 <TR><TD>Hideclientto:</TD><TD><input name=\"hideclient_to\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HIDECLIENTTO##\"></TD></TR>\n\ 490 <TR><TD>Httpport:</TD><TD><input name=\"httpport\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MONPORT##\"></TD></TR>\n\ 491 <TR><TD>Httpuser:</TD><TD><input name=\"httpuser\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##HTTPUSER##\"></TD></TR>\n\ 492 <TR><TD>Httppwd:</TD><TD><input name=\"httppwd\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"##HTTPPASSWORD##\"></TD></TR>\n\ 493 <TR><TD>Httpcss:</TD><TD><input name=\"httpcss\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##HTTPCSS##\"></TD></TR>\n\ 494 <TR><TD>Httprefresh:</TD><TD><input name=\"httprefresh\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##HTTPREFRESH##\"></TD></TR>\n\ 495 <TR><TD>Httptpl:</TD><TD><input name=\"httptpl\" type=\"text\" size=\"50\" maxlength=\"100\" value=\"##HTTPTPL##\"></TD></TR>\n\ 496 </TABLE>\n\ 497 <input type=\"submit\" value=\"OK\">\n\ 498 </form>\n\ 499 ##TPLFOOTER##" 500 501 #define TPLCONFIGRADEGAST "\ 502 ##TPLHEADER##\ 503 ##TPLMENU##\n\ 504 ##TPLCONFIGMENU##\n\ 505 <BR><BR>\n\ 506 ##MESSAGE##\ 507 <form action=\"config.html\" method=\"get\">\n\ 508 <input name=\"part\" type=\"hidden\" value=\"radegast\">\n\ 509 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 510 <TABLE cellspacing=\"0\">\n\ 511 <TR><TH> </TH><TH>Edit Radegast Config</TH></TR>\n\ 512 <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\ 513 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 514 <TR><TD>Allowed:</TD><TD><input name=\"allowed\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##ALLOWED##\">wrong, see Ticket #265</TD></TR>\n\ 515 <TR><TD>User:</TD><TD><input name=\"user\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##USER##\"></TD></TR>\n\ 516 </TABLE>\n\ 517 <input type=\"submit\" value=\"OK\">\n\ 518 </form>\n\ 519 ##TPLFOOTER##" 520 521 #define TPLCONFIGNEWCAMD "\ 522 ##TPLHEADER##\ 523 ##TPLMENU##\n\ 524 ##TPLCONFIGMENU##\n\ 525 <BR><BR>\n\ 526 ##MESSAGE##\ 527 <form action=\"config.html\" method=\"get\">\n\ 528 <input name=\"part\" type=\"hidden\" value=\"newcamd\">\n\ 529 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 530 <TABLE cellspacing=\"0\">\n\ 531 <TR><TH> </TH><TH>Edit Newcamd Config</TH></TR>\n\ 532 <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"80\" maxlength=\"200\" value=\"##PORT##\"></TD></TR>\n\ 533 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 534 <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\"##KEY##\"></TD></TR>\n\ 535 </TABLE>\n\ 536 <input type=\"submit\" value=\"OK\">\n\ 537 </form>\n\ 538 ##TPLFOOTER##" 539 540 #define TPLCONFIGGLOBAL "\ 541 ##TPLHEADER##\ 542 ##TPLMENU##\n\ 543 ##TPLCONFIGMENU##\n\ 544 <BR><BR>\n\ 545 ##MESSAGE##\ 546 <form action=\"config.html\" method=\"get\">\n\ 547 <input name=\"part\" type=\"hidden\" value=\"global\">\n\ 548 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 549 <TABLE cellspacing=\"0\">\n\ 550 <TR><TH> </TH><TH>Edit Global Config</TH></TR>\n\ 551 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 552 <TR><TD>Logfile:</TD><TD><input name=\"logfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##LOGFILE##\"></TD></TR>\n\ 553 <TR><TD>PID File:</TD><TD><input name=\"pidfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##PIDFILE##\"></TD></TR>\n\ 554 <TR><TD>Usrfile:</TD><TD><input name=\"usrfile\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##USERFILE##\"></TD></TR>\n\ 555 <TR><TD>CWlogdir:</TD><TD><input name=\"cwlogdir\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##CWLOGDIR##\"></TD></TR>\n\ 556 <TR><TD>Clienttimeout:</TD><TD><input name=\"clienttimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CLIENTTIMEOUT##\"></TD></TR>\n\ 557 <TR><TD>Fallbacktimeout:</TD><TD><input name=\"fallbacktimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##FALLBACKTIMEOUT##\"></TD></TR>\n\ 558 <TR><TD>Clientmaxidle:</TD><TD><input name=\"clientmaxidle\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CLIENTMAXIDLE##\"></TD></TR>\n\ 559 <TR><TD>Cachedelay:</TD><TD><input name=\"cachedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##CACHEDELAY##\"></TD></TR>\n\ 560 <TR><TD>Bindwait:</TD><TD><input name=\"bindwait\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##BINDWAIT##\"></TD></TR>\n\ 561 <TR><TD>Netprio:</TD><TD><input name=\"netprio\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NETPRIO##\"></TD></TR>\n\ 562 <TR><TD>Resolvedelay:</TD><TD><input name=\"resolvedelay\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##RESOLVEDELAY##\"></TD></TR>\n\ 563 <TR><TD>Sleep:</TD><TD><input name=\"sleep\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SLEEP##\"></TD></TR>\n\ 564 <TR><TD>Unlockparental:</TD><TD><input name=\"unlockparental\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##UNLOCKPARENTAL##\"></TD></TR>\n\ 565 <TR><TD>Nice:</TD><TD><input name=\"nice\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##NICE##\"></TD></TR>\n\ 566 <TR><TD>Serialreadertimeout:</TD><TD><input name=\"serialreadertimeout\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SERIALTIMEOUT##\"></TD></TR>\n\ 567 <TR><TD>Maxlogsize:</TD><TD><input name=\"maxlogsize\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##MAXLOGSIZE##\"></TD></TR>\n\ 568 <TR><TD>Showecmdw:</TD><TD><input name=\"showecmdw\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##SHOWECMDW##\"></TD></TR>\n\ 569 <TR><TD>Waitforcards:</TD><TD><input name=\"waitforcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##WAITFORCARDS##\"></TD></TR>\n\ 570 <TR><TD>Preferlocalcards:</TD><TD><input name=\"preferlocalcards\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PREFERLOCALCARDS##\"></TD></TR>\n\ 571 </TABLE>\n\ 572 <input type=\"submit\" value=\"OK\">\n\ 573 </form>\n\ 574 <BR><BR>Configuration Global not yet implemented chengings havn't any effect<BR><BR>\n\ 575 ##TPLFOOTER##" 576 577 #define TPLCONFIGCAMD33 "\ 578 ##TPLHEADER##\ 579 ##TPLMENU##\n\ 580 ##TPLCONFIGMENU##\n\ 581 <BR><BR>\n\ 582 ##MESSAGE##\ 583 <form action=\"config.html\" method=\"get\">\n\ 584 <input name=\"part\" type=\"hidden\" value=\"camd33\">\n\ 585 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 586 <TABLE cellspacing=\"0\">\n\ 587 <TR><TH> </TH><TH>Edit Camd33 Config</TH></TR>\n\ 588 <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\ 589 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 590 <TR><TD>Key:</TD><TD><input name=\"key\" type=\"text\" size=\"35\" maxlength=\"28\" value=\"##KEY##\"></TD></TR>\n\ 591 <TR><TD>Passive:</TD><TD><input name=\"passive\" type=\"text\" size=\"3\" maxlength=\"1\" value=\"##PASSIVE##\"></TD></TR>\n\ 592 <TR><TD>Nocrypt:</TD><TD><input name=\"nocrypt\" type=\"text\" size=\"50\" maxlength=\"50\" value=\"##NOCRYPT##\">wrong, see Ticket #265</TD></TR>\n\ 593 </TABLE>\n\ 594 <input type=\"submit\" value=\"OK\">\n\ 595 </form>\n\ 596 <BR><BR>Configuration camd33 not yet implemented<BR><BR>\n\ 597 ##TPLFOOTER##" 598 599 #define TPLCONFIGCAMD35 "\ 600 ##TPLHEADER##\ 601 ##TPLMENU##\n\ 602 ##TPLCONFIGMENU##\n\ 603 <BR><BR>\n\ 604 ##MESSAGE##\ 605 <form action=\"/config.html\" method=\"get\">\n\ 606 <input name=\"part\" type=\"hidden\" value=\"camd35\">\n\ 607 <input name=\"action\" type=\"hidden\" value=\"execute\">\n\ 608 <TABLE cellspacing=\"0\">\n\ 609 <TR><TH> </TH><TH>Edit Camd35 Config</TH></TR>\n\ 610 <TR><TD>Port:</TD><TD><input name=\"port\" type=\"text\" size=\"5\" maxlength=\"5\" value=\"##PORT##\"></TD></TR>\n\ 611 <TR><TD>Serverip:</TD><TD><input name=\"serverip\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"##SERVERIP##\"></TD></TR>\n\ 612 </TABLE>\n\ 613 <input type=\"submit\" value=\"OK\">\n\ 614 </form>\n\ 615 <BR><BR>Configuration camd35 not yet implemented<BR><BR>\n\ 616 ##TPLFOOTER##" 617 380 618 enum refreshtypes {REFR_ACCOUNTS, REFR_READERS, REFR_SERVER, REFR_ANTICASC}; 381 619 … … 401 639 "USEREDITSIDOKBIT", 402 640 "USEREDITSIDNOBIT", 403 "SAVETEMPLATES" 641 "SAVETEMPLATES", 642 "CONFIGMENU", 643 "CONFIGGBOX", 644 "CONFIGCCCAM", 645 "CONFIGMONITOR", 646 "CONFIGRADEGAST", 647 "CONFIGNEWCAMD", 648 "CONFIGGLOBAL", 649 "CONFIGCAMD33", 650 "CONFIGCAMD35" 404 651 #ifdef CS_ANTICASC 405 652 ,"USEREDITANTICASC" 653 ,"CONFIGANTICASC" 654 ,"CONFIGMENUANTICASC" 406 655 #endif 407 656 }; … … 428 677 TPLUSEREDITSIDOKBIT, 429 678 TPLUSEREDITSIDNOBIT, 430 TPLSAVETEMPLATES 679 TPLSAVETEMPLATES, 680 TPLCONFIGMENU, 681 TPLCONFIGGBOX, 682 TPLCONFIGCCCAM, 683 TPLCONFIGMONITOR, 684 TPLCONFIGRADEGAST, 685 TPLCONFIGNEWCAMD, 686 TPLCONFIGGLOBAL, 687 TPLCONFIGCAMD33, 688 TPLCONFIGCAMD35 431 689 #ifdef CS_ANTICASC 432 690 ,TPLUSEREDITANTICASC 691 ,TPLCONFIGANTICASC 692 ,TPLCONFIGMENUANTICASC 433 693 #endif 434 694 }; … … 466 726 int check_auth(char *authstring, char *method, char *path, char *expectednonce); 467 727 void send_headers(FILE *f, int status, char *title, char *extra, char *mime); 468 void send_htmlhead(FILE *f, int refresh);469 728 void send_css(FILE *f); 470 void send_footer(FILE *f);471 void send_oscam_menu(FILE *f);472 729 char *getParam(struct uriparams *params, char *name); 473 730 int tpl_saveIncludedTpls(const char *path);
Note:
See TracChangeset
for help on using the changeset viewer.