Code: Alles auswählen
Index: globals.h
===================================================================
--- globals.h (revision 6643)
+++ globals.h (working copy)
@@ -1497,6 +1497,7 @@
char http_script[128];
int32_t http_refresh;
int8_t http_hide_idle_clients;
+ int8_t http_showpicons;
struct s_ip *http_allowed;
int8_t http_readonly;
in_addr_t http_dynip[MAX_HTTP_DYNDNS];
Index: oscam-config.c
===================================================================
--- oscam-config.c (revision 6643)
+++ oscam-config.c (working copy)
@@ -976,6 +976,11 @@
return;
}
+ if (!strcmp(token, "httpshowpicons")) {
+ cfg.http_showpicons = strToIntVal(value, 0);
+ return;
+ }
+
if (!strcmp(token, "httpallowed")) {
if(strlen(value) == 0) {
clear_sip(&cfg.http_allowed);
@@ -2564,6 +2569,8 @@
}
if(cfg.http_hide_idle_clients || cfg.http_full_cfg)
fprintf_conf(f, "httphideidleclients", "%d\n", cfg.http_hide_idle_clients);
+ if(cfg.http_showpicons || cfg.http_full_cfg)
+ fprintf_conf(f, "httpshowpicons", "%d\n", cfg.http_showpicons);
if(cfg.http_readonly || cfg.http_full_cfg)
fprintf_conf(f, "httpreadonly", "%d\n", cfg.http_readonly);
if(cfg.http_full_cfg)
Index: oscam-http.c
===================================================================
--- oscam-http.c (revision 6643)
+++ oscam-http.c (working copy)
@@ -726,6 +726,7 @@
tpl_addVar(vars, TPLADD, "HTTPJSCRIPT", cfg.http_jscript);
if (cfg.http_hide_idle_clients > 0) tpl_addVar(vars, TPLADD, "CHECKED", "checked");
+ if (cfg.http_showpicons > 0) tpl_addVar(vars, TPLADD, "SHOWPICONSCHECKED", "checked");
char *value = mk_t_iprange(cfg.mon_allowed);
tpl_addVar(vars, TPLADD, "NOCRYPT", value);
@@ -2261,6 +2262,8 @@
int32_t casc_users = 0;
int32_t casc_users2 = 0;
+ if (cfg.http_showpicons) tpl_addVar(vars, TPLADD, "PICONHEADER", "<TH>Image</TH>");
+
for (account=cfg.account; (account); account=account->next) {
//clear for next client
total_users++;
@@ -2275,6 +2278,11 @@
tpl_addVar(vars, TPLADD, "CLIENTSRVID", "");
tpl_addVar(vars, TPLADD, "CLIENTPICON", "");
+ if (cfg.http_showpicons) {
+ tpl_addVar(vars, TPLADD, "PICONCOLUMNSTART", "<TD>");
+ tpl_addVar(vars, TPLADD, "PICONCOLUMNEND", "</TD>");
+ }
+
if(account->expirationdate && account->expirationdate < now) {
expired = " (expired)";
classname = "expired";
@@ -2386,9 +2394,12 @@
if(latestclient){
tpl_printf(vars, TPLADD, "CLIENTCAID", "%04X", latestclient->last_caid);
tpl_printf(vars, TPLADD, "CLIENTSRVID", "%04X", latestclient->last_srvid);
- tpl_printf(vars, TPLADD, "CLIENTPICON", "<img class=\"clientpicon\" src=\"image?i=IC_%04X_%04X\">",
+
+ if (cfg.http_showpicons) {
+ tpl_printf(vars, TPLADD, "CLIENTPICON", "<img class=\"clientpicon\" src=\"image?i=IC_%04X_%04X\">",
latestclient->last_caid,
latestclient->last_srvid);
+ }
}
} else {
Index: oscam-http.h
===================================================================
--- oscam-http.h (revision 6643)
+++ oscam-http.h (working copy)
@@ -818,6 +818,7 @@
<TH>Address</TH>\n\
<TH>Protocol</TH>\n\
<TH>Last Channel</TH>\n\
+ ##PICONHEADER##\n\
<TH>Time on Channel</TH>\n\
<TH>Idle</TH>\n\
<TH TITLE=\"Delivered ECM with status OK\">OK</TH>\n\
@@ -888,6 +889,7 @@
<TD class=\"centered\">##CLIENTIP##</TD>\n\
<TD class=\"centered\"><SPAN TITLE=\"##CLIENTPROTOTITLE##\">##CLIENTPROTO##</SPAN></TD>\n\
<TD class=\"centered\">##LASTCHANNEL##</TD>\n\
+ ##PICONCOLUMNSTART####CLIENTPICON####PICONCOLUMNEND##\n\
<TD class=\"centered\" title=\"##CLIENTTIMETOSLEEP##\">##CLIENTTIMEONCHANNEL##</TD>\n\
<TD class=\"centered\">##IDLESECS##</TD>\n\
<TD class=\"centered\">##CWOK##</TD>\n\
@@ -1638,6 +1640,7 @@
<input name=\"part\" type=\"hidden\" value=\"monitor\">\n\
<input name=\"action\" type=\"hidden\" value=\"execute\">\n\
<input name=\"httphideidleclients\" type=\"hidden\" value=\"0\">\n\
+ <input name=\"httpshowpicons\" type=\"hidden\" value=\"0\">\n\
<input name=\"appendchaninfo\" type=\"hidden\" value=\"0\">\n\
<TABLE class=\"config\">\n\
<TR><TH COLSPAN=\"2\">Edit Monitor Config</TH></TR>\n\
@@ -1675,6 +1678,7 @@
<TR><TD>##TPLHELPPREFIX##conf#httptpl##TPLHELPSUFFIX##Http tpl:</A></TD><TD><input name=\"httptpl\" type=\"text\" size=\"63\" maxlength=\"127\" value=\"##HTTPTPL##\"></TD></TR>\n\
<TR><TD>##TPLHELPPREFIX##conf#httpscript##TPLHELPSUFFIX##Http script:</A></TD><TD><input name=\"httpscript\" type=\"text\" size=\"63\" maxlength=\"127\" value=\"##HTTPSCRIPT##\"></TD></TR>\n\
<TR><TD>##TPLHELPPREFIX##conf#httphideidleclients##TPLHELPSUFFIX##Http Hide Idle Clients:</A></TD><TD><input name=\"httphideidleclients\" type=\"checkbox\" value=\"1\" ##CHECKED##>\n\
+ <TR><TD>##TPLHELPPREFIX##conf#httpshowpicons##TPLHELPSUFFIX##Http Show Icons:</A></TD><TD><input name=\"httpshowpicons\" type=\"checkbox\" value=\"1\" ##SHOWPICONSCHECKED##>\n\
<TR><TD>##TPLHELPPREFIX##conf#httpallowed##TPLHELPSUFFIX##Http allowed:</A></TD><TD><input name=\"httpallowed\" type=\"text\" size=\"63\" maxlength=\"200\" value=\"##HTTPALLOW##\"></TD></TR>\n\
<TR><TD>##TPLHELPPREFIX##conf#httpdyndns##TPLHELPSUFFIX##Http dyndns:</A></TD><TD><input name=\"httpdyndns\" type=\"text\" size=\"63\" maxlength=\"200\" value=\"##HTTPDYNDNS##\"></TD></TR>\n\
<TR><TD>##TPLHELPPREFIX##conf#httpsavefullcfg##TPLHELPSUFFIX##Http save full config:</A></TD><TD><SELECT NAME=\"httpsavefullcfg\"><OPTION VALUE=\"0\">NO</OPTION><OPTION VALUE=\"1\" ##HTTPSAVEFULLSELECT##>YES</OPTION></SELECT></TD></TR>\n\