Changeset 7226
- Timestamp:
- 07/30/12 22:56:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-webif.c
r7225 r7226 397 397 398 398 tpl_printf(vars, TPLADD, "LBSAVE", "%d",cfg.lb_save); 399 tpl_printf(vars, TPLADD, "LBSAVEPATH", cfg.lb_savepath?cfg.lb_savepath:"");399 if(cfg.lb_savepath) tpl_addVar(vars, TPLADD, "LBSAVEPATH", cfg.lb_savepath); 400 400 401 401 tpl_printf(vars, TPLADD, "LBNBESTREADERS", "%d",cfg.lb_nbest_readers); 402 402 char *value = mk_t_caidvaluetab(&cfg.lb_nbest_readers_tab); 403 tpl_ printf(vars, TPLADD, "LBNBESTPERCAID", value);403 tpl_addVar(vars, TPLADD, "LBNBESTPERCAID", value); 404 404 free_mk_t(value); 405 405 tpl_printf(vars, TPLADD, "LBNFBREADERS", "%d",cfg.lb_nfb_readers); … … 410 410 411 411 value = mk_t_caidvaluetab(&cfg.lb_retrylimittab); 412 tpl_ printf(vars, TPLADD, "LBRETRYLIMITS", value);412 tpl_addVar(vars, TPLADD, "LBRETRYLIMITS", value); 413 413 free_mk_t(value); 414 414 … … 711 711 tpl_printf(vars, TPLADD, "UPDATEINTERVAL", "%d", cfg.cc_update_interval); 712 712 if (cfg.cc_stealth) 713 tpl_ printf(vars, TPLADD, "STEALTH", "selected");713 tpl_addVar(vars, TPLADD, "STEALTH", "selected"); 714 714 715 715 tpl_printf(vars, TPLADD, "NODEID", "%02X%02X%02X%02X%02X%02X%02X%02X", … … 727 727 728 728 if (cfg.cc_forward_origin_card) 729 tpl_ printf(vars, TPLADD, "FORWARDORIGINCARD", "selected");729 tpl_addVar(vars, TPLADD, "FORWARDORIGINCARD", "selected"); 730 730 731 731 if (cfg.cc_keep_connected) 732 tpl_ printf(vars, TPLADD, "KEEPCONNECTED", "selected");732 tpl_addVar(vars, TPLADD, "KEEPCONNECTED", "selected"); 733 733 734 734 … … 1919 1919 tpl_printf(vars, TPLADD, "TIMELAST", "%dms", stat->time_stat[stat->time_idx]); 1920 1920 else 1921 tpl_ printf(vars, TPLADD, "TIMELAST", "");1921 tpl_addVar(vars, TPLADD, "TIMELAST", ""); 1922 1922 tpl_printf(vars, TPLADD, "COUNT", "%d", stat->ecm_count); 1923 1923 … … 1993 1993 if(cl){ 1994 1994 char *value = get_ecm_historystring(cl); 1995 tpl_ printf(vars, TPLADD, "ECMHISTORY", "%s", value);1995 tpl_addVar(vars, TPLADD, "ECMHISTORY", value); 1996 1996 free_mk_t(value); 1997 1997 } … … 2244 2244 case 3: tmp = "(3) Real DW delayed"; break; 2245 2245 } 2246 tpl_ printf(vars, TPLADD, "CFGPENALTY", "%s", tmp);2246 tpl_addVar(vars, TPLADD, "CFGPENALTY", tmp); 2247 2247 } else { 2248 2248 tpl_printf(vars, TPLADD, "PENALTYVALUE", "%d", account->ac_penalty); … … 2258 2258 tpl_printf(vars, TPLADD, "TMP", "CCCIGNRSHRSELECTED%d", account->cccignorereshare); 2259 2259 tpl_addVar(vars, TPLADD, tpl_getVar(vars, "TMP"), "selected"); 2260 tpl_ printf(vars, TPLADD, "CFGIGNORERESHARE", "%s",2260 tpl_addVar(vars, TPLADD, "CFGIGNORERESHARE", 2261 2261 cfg.cc_ignore_reshare == 0 ? 2262 2262 "0 - use reshare level of Server" : "1 - use reshare level of Reader or User"); … … 2266 2266 tpl_addVar(vars, TPLADD, tpl_getVar(vars, "TMP"), "selected"); 2267 2267 2268 tpl_ printf(vars, TPLADD, "STEALTH", "%s", cfg.cc_stealth ? "enable" : "disable");2268 tpl_addVar(vars, TPLADD, "STEALTH", cfg.cc_stealth ? "enable" : "disable"); 2269 2269 #endif 2270 2270 … … 2677 2677 struct cc_srvid *srv; 2678 2678 n=0; 2679 tpl_ printf(vars, TPLADD, "SERVICESGOOD", "");2679 tpl_addVar(vars, TPLADD, "SERVICESGOOD", ""); 2680 2680 while ((srv=ll_iter_next(&its))) { 2681 2681 tpl_printf(vars, TPLAPPEND, "SERVICESGOOD", "%04X%s", srv->sid, ++n%10==0?"<BR>\n":" "); … … 2684 2684 its = ll_iter_create(card->badsids); 2685 2685 n=0; 2686 tpl_ printf(vars, TPLADD, "SERVICESBAD", "");2686 tpl_addVar(vars, TPLADD, "SERVICESBAD", ""); 2687 2687 while ((srv=ll_iter_next(&its))) { 2688 2688 tpl_printf(vars, TPLAPPEND, "SERVICESBAD", "%04X%s", srv->sid, ++n%10==0?"<BR>\n":" "); … … 2817 2817 tpl_addVar(vars, TPLADD, "READERNAME", "GLOBAL"); 2818 2818 tpl_addVar(vars, TPLADD, "APIHOST", "GLOBAL"); 2819 tpl_ printf(vars, TPLADD, "APIHOSTPORT", "GLOBAL");2819 tpl_addVar(vars, TPLADD, "APIHOSTPORT", "GLOBAL"); 2820 2820 } else { 2821 2821 tpl_addVar(vars, TPLADD, "READERNAME", rdr->label); … … 3214 3214 //load historical values from ringbuffer 3215 3215 char *value = get_ecm_historystring(cl); 3216 tpl_ printf(vars, TPLADD, "CLIENTLASTRESPONSETIMEHIST", "%s", value);3216 tpl_addVar(vars, TPLADD, "CLIENTLASTRESPONSETIMEHIST", value); 3217 3217 free_mk_t(value); 3218 3218 … … 3305 3305 struct tm end_t; 3306 3306 3307 tpl_ printf(vars, TPLADD, "TMPSPAN", "<SPAN>");3307 tpl_addVar(vars, TPLADD, "TMPSPAN", "<SPAN>"); 3308 3308 while((ent = ll_iter_next(&itr))) 3309 3309 { … … 3311 3311 if ((ent->end > now) && (ent->type != 7)) 3312 3312 { 3313 if (active_ent) tpl_ printf(vars, TPLAPPEND, "TMPSPAN", "<BR><BR>");3313 if (active_ent) tpl_addVar(vars, TPLAPPEND, "TMPSPAN", "<BR><BR>"); 3314 3314 active_ent++; 3315 3315 localtime_r(&ent->end, &end_t); … … 3322 3322 if (((total_ent) && (active_ent == 0)) || (total_ent == 0)) 3323 3323 { 3324 tpl_ printf(vars, TPLAPPEND, "TMPSPAN", "No active entitlements found");3324 tpl_addVar(vars, TPLAPPEND, "TMPSPAN", "No active entitlements found"); 3325 3325 } 3326 3326 3327 tpl_ printf(vars, TPLAPPEND, "TMPSPAN", "</SPAN>");3327 tpl_addVar(vars, TPLAPPEND, "TMPSPAN", "</SPAN>"); 3328 3328 3329 3329 if (active_ent) … … 3333 3333 else 3334 3334 { 3335 tpl_ printf(vars, TPLADD, "TMP", "(no entitlements)");3335 tpl_addVar(vars, TPLADD, "TMP", "(no entitlements)"); 3336 3336 3337 3337 } … … 3647 3647 counter = 0; 3648 3648 while(sidtab != NULL) { 3649 tpl_ printf(vars, TPLADD, "SID","");3649 tpl_addVar(vars, TPLADD, "SID",""); 3650 3650 if ((strcmp(getParam(params, "service"), sidtab->label) == 0) && (strcmp(getParam(params, "action"), "list") == 0) ) { 3651 tpl_ printf(vars, TPLADD, "SIDCLASS","sidlist");3652 tpl_ printf(vars, TPLAPPEND, "SID", "<div style=\"float:right;background-color:red;color:white\"><A HREF=\"services.html\" style=\"color:white;text-decoration:none\">X</A></div>");3651 tpl_addVar(vars, TPLADD, "SIDCLASS","sidlist"); 3652 tpl_addVar(vars, TPLAPPEND, "SID", "<div style=\"float:right;background-color:red;color:white\"><A HREF=\"services.html\" style=\"color:white;text-decoration:none\">X</A></div>"); 3653 3653 for (i=0; i<sidtab->num_srvid; i++) { 3654 3654 tpl_printf(vars, TPLAPPEND, "SID", "%04X : %s<BR>", sidtab->srvid[i], xml_encode(vars, get_servicename(cur_client(), sidtab->srvid[i], sidtab->caid[0], channame))); 3655 3655 } 3656 3656 } else { 3657 tpl_ printf(vars, TPLADD, "SIDCLASS","");3657 tpl_addVar(vars, TPLADD, "SIDCLASS",""); 3658 3658 tpl_printf(vars, TPLADD, "SID","<A HREF=\"services.html?service=%s&action=list\">Show Services</A>", urlencode(vars, sidtab->label)); 3659 3659 } … … 4096 4096 4097 4097 tpl_printf(vars, TPLADD, "IPADDRESS", "%s : %d", cs_inet_ntoa(v_ban_entry->v_ip), v_ban_entry->v_port); 4098 tpl_ printf(vars, TPLADD, "VIOLATIONUSER", "%s", v_ban_entry->info?v_ban_entry->info:"unknown");4098 tpl_addVar(vars, TPLADD, "VIOLATIONUSER", v_ban_entry->info?v_ban_entry->info:"unknown"); 4099 4099 struct tm st ; 4100 4100 localtime_r(&v_ban_entry->v_time, &st); … … 4227 4227 //load historical values from ringbuffer 4228 4228 char *value = get_ecm_fullhistorystring(cl); 4229 tpl_ printf(vars, TPLADD, "CLIENTLASTRESPONSETIMEHIST", "%s", value);4229 tpl_addVar(vars, TPLADD, "CLIENTLASTRESPONSETIMEHIST", value); 4230 4230 free_mk_t(value); 4231 4231
Note:
See TracChangeset
for help on using the changeset viewer.