Changeset 1292


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

WebIf:

  • changed the Shutdown button. Now a security request appears and have to confirmed
Location:
branches/monitor-improvement
Files:
2 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      }
  • branches/monitor-improvement/oscam-http.h

    r1281 r1292  
    1616A:hover {text-decoration: none; color: red;}\n\
    1717p {color: white; }\n\
     18DIV.warning {width:200px;border:1px solid white;background-color:red;color:white;font-family: Arial; font-size: 12px;font-weight:bold;padding:3px;}\
    1819h2 {color: orange; font-family: Arial; font-size: 14px; line-height: 12px;}\n\
    1920h4 {color: black; font-family: Arial; font-size: 12px; line-height: 9px; }\n\
     
    863864##TPLFOOTER##"
    864865
    865 #define TPLSHUTDOWN "##TPLHEADER##\
     866#define TPLPRESHUTDOWN "\
     867##TPLHEADER##\
     868##TPLMENU##\n\
     869<br><br><br><DIV class = \"warning\">You are really want to shutdown Oscam?<br>\
     870All user will become disconnected.<br>\
     871You will not be able to restart Oscam from Webinterface.<br>\
     872The Webinterface will try to connect oscam 30 seconds after shutdown one time.</b><br>\n\
     873</DIV><br><form action=\"shutdown.html\" method=\"get\">\n\
     874<input type=\"submit\" name=\"action\" value=\"Shutdown\" title=\"Save service and reload services\"></TD>\n\
     875</form>\
     876##TPLFOOTER##"
     877
     878#define TPLSHUTDOWN "\
     879##TPLHEADER##\
    866880##TPLMENU##\n\
    867881<br><b>Oscam Shutdown - Try Reconnect in ##SECONDS## Seconds</b><br>\n\
     
    916930    "SERVICECONFIGSIDBIT",
    917931    "SERVICEEDIT",
     932    "PRESHUTDOWN",
    918933    "SHUTDOWN"
    919934#ifdef HAVE_DVBAPI
     
    981996    TPLSERVICECONFIGSIDBIT,
    982997    TPLSERVICEEDIT,
     998    TPLPRESHUTDOWN,
    983999    TPLSHUTDOWN
    9841000#ifdef HAVE_DVBAPI
Note: See TracChangeset for help on using the changeset viewer.