Changeset 1233


Ignore:
Timestamp:
01/15/10 00:42:36 (11 years ago)
Author:
alno
Message:

WebIf:

  • statustemplate modified to have "Provider : Channel" from oscam.srvid entry
  • Variables avail now in TPLCLIENTSTATUSBIT for own modifications -> ##CLIENTSRVPROVIDER##, ##CLIENTSRVNAME##, ##CLIENTSRVTYPE##, ##CLIENTSRVDESCRIPTION##
Location:
branches/monitor-improvement
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/oscam-http-helpers.c

    r1141 r1233  
    4343
    4444/* Allows to add a char array which has been allocated by malloc. It will automatically get
    45   freed when calling tpl_create(). Please do NOT free the memory yourself or realloc
     45  freed when calling tpl_clear(). Please do NOT free the memory yourself or realloc
    4646  it after having added the array here! */
    4747char *tpl_addTmp(struct templatevars *vars, char *value){
  • branches/monitor-improvement/oscam-http.c

    r1232 r1233  
    926926    struct tm *lt;
    927927
     928
    928929    char *hideidle = getParam(params, "hideidle");
    929930    if(strlen(hideidle) > 0){
     
    985986                tpl_printf(vars, 0, "CLIENTCAID", "%04X", client[i].last_caid);
    986987                tpl_printf(vars, 0, "CLIENTSRVID", "%04X", client[i].last_srvid);
    987                 tpl_addVar(vars, 0, "CLIENTSRVNAME", monitor_get_srvname(client[i].last_srvid, client[i].last_caid));
     988
     989                int j, found = 0;
     990                struct s_srvid *srvid = cfg->srvid;
     991                while ((srvid = srvid->next) && (srvid->next != NULL)){
     992                    if (srvid->srvid == client[i].last_srvid){
     993                        for (j=0; j < srvid->ncaid; j++){
     994                            if (srvid->caid[j] == client[i].last_caid){
     995                                found = 1;
     996                                break;
     997                            }
     998                        }
     999                    }
     1000                    if (found == 1) break;
     1001                }
     1002                if (found == 1){
     1003                    tpl_printf(vars, 0, "CLIENTSRVPROVIDER","%s : ", srvid->prov);
     1004                    tpl_addVar(vars, 0, "CLIENTSRVNAME", srvid->name);
     1005                    tpl_addVar(vars, 0, "CLIENTSRVTYPE", srvid->type);
     1006                    tpl_addVar(vars, 0, "CLIENTSRVDESCRIPTION", srvid->desc);
     1007                }else{
     1008                    tpl_addVar(vars, 0, "CLIENTSRVPROVIDER","");
     1009                    tpl_printf(vars, 0, "CLIENTSRVNAME","");
     1010                    tpl_addVar(vars, 0, "CLIENTSRVTYPE","");
     1011                    tpl_addVar(vars, 0, "CLIENTSRVDESCRIPTION","");
     1012                }
    9881013
    9891014                secs = 0; fullmins =0; mins =0; hours =0;
  • branches/monitor-improvement/oscam-http.h

    r1159 r1233  
    149149  <TD>##CLIENTLOGINSECS##</TD>\n\
    150150  <TD>##CLIENTCAID##:##CLIENTSRVID##</TD>\n\
    151   <TD>##CLIENTSRVNAME##</TD>\n\
     151  <TD>##CLIENTSRVPROVIDER####CLIENTSRVNAME##</TD>\n\
    152152  <TD>##CLIENTIDLESECS##</TD>\n\
    153153  <TD>##CWOK##</TD>\n\
Note: See TracChangeset for help on using the changeset viewer.