// management of online / offline mode $c_OnOffLine = 'off'; if ($wampConf['status'] == 'online') { $tpl = str_replace('images_off.bmp', 'images_on.bmp',$tpl); $tpl = str_replace($w_serverOffline, $w_serverOnline,$tpl); $tpl = str_replace('onlineOffline.php on', 'onlineOffline.php off', $tpl); $tpl = str_replace($w_putOnline,$w_putOffline,$tpl); $c_OnOffLine = 'on'; } // management of item put online if($wampConf['MenuItemOnline'] == 'on') { $changeServMenu = ';WAMPPUTONLINE '; $changeServMenu .= <<< EOF Type: item; Caption: "${w_putOnline}"; Action: multi; Actions: onlineoffline EOF; $tpl = str_replace(';WAMPPUTONLINE',$changeServMenu,$tpl); $changeServMenu = ';WAMPONLINEOFFLINESTART '; $changeServMenu .= <<< EOF [onlineoffline] Action: run; FileName: "${c_phpExe}"; Parameters: "onlineOffline.php on";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated Action: run; FileName: "${c_phpCli}"; Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated Action: service; Service: ${c_apacheService}; ServiceAction: restart; Action: resetservices; Action: readconfig; EOF; $tpl = str_replace(';WAMPONLINEOFFLINESTART',$changeServMenu,$tpl); }Par :
// management of item put online if($wampConf['MenuItemOnline'] == 'on') { $changeServMenu = ';WAMPPUTONLINE '; $changeServMenu .= <<< EOF Type: item; Caption: "${w_putOnline}"; Action: multi; Actions: onlineoffline EOF; $tpl = str_replace(';WAMPPUTONLINE',$changeServMenu,$tpl); $changeServMenu = ';WAMPONLINEOFFLINESTART '; $changeServMenu .= <<< EOF [onlineoffline] Action: run; FileName: "${c_phpExe}"; Parameters: "onlineOffline.php on";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated Action: run; FileName: "${c_phpCli}"; Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated Action: service; Service: ${c_apacheService}; ServiceAction: restart; Action: resetservices; Action: readconfig; EOF; $tpl = str_replace(';WAMPONLINEOFFLINESTART',$changeServMenu,$tpl); // management of online / offline mode $c_OnOffLine = 'off'; if ($wampConf['status'] == 'online') { $tpl = str_replace('images_off.bmp', 'images_on.bmp',$tpl); $tpl = str_replace($w_serverOffline, $w_serverOnline,$tpl); $tpl = str_replace('onlineOffline.php on', 'onlineOffline.php off', $tpl); $tpl = str_replace($w_putOnline,$w_putOffline,$tpl); $c_OnOffLine = 'on'; } }