Ignore:
Timestamp:
01/19/10 21:29:35 (13 years ago)
Author:
alno
Message:

WebIf:

  • changed the Shutdown button. Now a security request appears and have to confirmed
File:
1 edited

Legend:

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

    r1270 r1292  
    11881188}
    11891189
    1190 void send_oscam_shutdown(struct templatevars *vars, FILE *f){
    1191     tpl_printf(vars, 0, "REFRESHTIME", "%d", SHUTDOWNREFRESH);
    1192     tpl_addVar(vars, 0, "REFRESH", tpl_getTpl(vars, "REFRESH"));
    1193     tpl_printf(vars, 0, "SECONDS", "%d", SHUTDOWNREFRESH);
    1194     fputs(tpl_getTpl(vars, "SHUTDOWN"), f);
    1195     running = 0;
     1190void send_oscam_shutdown(struct templatevars *vars, FILE *f, struct uriparams *params){
     1191    if (strcmp(getParam(params, "action"), "Shutdown") == 0){
     1192        tpl_printf(vars, 0, "REFRESHTIME", "%d", SHUTDOWNREFRESH);
     1193        tpl_addVar(vars, 0, "REFRESH", tpl_getTpl(vars, "REFRESH"));
     1194        tpl_printf(vars, 0, "SECONDS", "%d", SHUTDOWNREFRESH);
     1195        fputs(tpl_getTpl(vars, "SHUTDOWN"), f);
     1196        running = 0;
     1197    }else{
     1198        fputs(tpl_getTpl(vars, "PRESHUTDOWN"), f);
     1199    }
    11961200}
    11971201
     
    13321336        case  9: send_oscam_services_edit(vars, f, &params, in); break;
    13331337        case  10: send_oscam_savetpls(vars, f); break;
    1334         case  11: send_oscam_shutdown(vars, f); break;
     1338        case  11: send_oscam_shutdown(vars, f, &params); break;
    13351339        default: send_oscam_status(vars, f, &params, in); break;
    13361340      }
Note: See TracChangeset for help on using the changeset viewer.