| 27 | | |
|---|
| 28 | | if (isset($amp_conf["POST_RELOAD"])) |
|---|
| 29 | | { |
|---|
| 30 | | echo " |
|---|
| 31 | | <style> |
|---|
| 32 | | .clsWait { position: absolute; top:75px; left: 100; width: 700px; text-align:center; border: red solid 1px; background:#f0d0d0; display: block; font-weight: bold } |
|---|
| 33 | | .clsWaitFinishOK{ position: absolute; top:75px; left: 100; width: 700px; text-align:center; border: blue solid 1px; background:#d0d0f0; display: block; } |
|---|
| 34 | | .clsHidden { display: none } |
|---|
| 35 | | </style> |
|---|
| 36 | | "; |
|---|
| 37 | | echo "<div id='idWaitBanner' class='clsWait'> Please wait while applying configuration</div>"; |
|---|
| 38 | | |
|---|
| 39 | | if (!isset($amp_conf["POST_RELOAD_DEBUG"]) || |
|---|
| 40 | | (($amp_conf["POST_RELOAD_DEBUG"]!="1") && |
|---|
| 41 | | ($amp_conf["POST_RELOAD_DEBUG"]!="true")) |
|---|
| 42 | | ) |
|---|
| 43 | | echo "<div style='display:none'>"; |
|---|
| 44 | | |
|---|
| 45 | | echo "Executing post apply script <b>".$amp_conf["POST_RELOAD"]."</b><pre>"; |
|---|
| 46 | | system( $amp_conf["POST_RELOAD"] ); |
|---|
| 47 | | echo "</pre>"; |
|---|
| 48 | | |
|---|
| 49 | | if (!isset($amp_conf["POST_RELOAD_DEBUG"]) || |
|---|
| 50 | | (($amp_conf["POST_RELOAD_DEBUG"]!="1") && |
|---|
| 51 | | ($amp_conf["POST_RELOAD_DEBUG"]!="true")) |
|---|
| 52 | | ) |
|---|
| 53 | | echo "</div><br>"; |
|---|
| 54 | | |
|---|
| 55 | | echo " |
|---|
| 56 | | <script> |
|---|
| 57 | | function hideWaitBanner() |
|---|
| 58 | | { |
|---|
| 59 | | document.getElementById('idWaitBanner').className = 'clsHidden'; |
|---|
| 60 | | } |
|---|
| 61 | | |
|---|
| 62 | | document.getElementById('idWaitBanner').innerHTML = 'Configuration applied'; |
|---|
| 63 | | document.getElementById('idWaitBanner').className = 'clsWaitFinishOK'; |
|---|
| 64 | | setTimeout('hideWaitBanner()',3000); |
|---|
| 65 | | </script> |
|---|
| 66 | | "; |
|---|
| 67 | | } |
|---|
| 68 | | |
|---|
| | 68 | |
|---|
| | 69 | // fix - this will trigger the post reload actions after the "need reload" flag |
|---|
| | 70 | // is down. |
|---|
| | 71 | if (isset($amp_conf["POST_RELOAD"])) |
|---|
| | 72 | { |
|---|
| | 73 | echo " |
|---|
| | 74 | <style> |
|---|
| | 75 | .clsWait { position: absolute; top:75px; left: 25%; width: 50%; text-align:center; border: red solid 1px; background:#f0d0d0; display: block; font-weight: bold } |
|---|
| | 76 | .clsWaitFinishOK{ position: absolute; top:75px; left: 25%; width: 50%; text-align:center; border: blue solid 1px; background:#d0d0f0; display: block; } |
|---|
| | 77 | .clsHidden { display: none } |
|---|
| | 78 | </style> |
|---|
| | 79 | "; |
|---|
| | 80 | echo "<div id='idWaitBanner' class='clsWait'> Please wait while applying configuration</div>"; |
|---|
| | 81 | |
|---|
| | 82 | if (!isset($amp_conf["POST_RELOAD_DEBUG"]) || |
|---|
| | 83 | (($amp_conf["POST_RELOAD_DEBUG"]!="1") && ($amp_conf["POST_RELOAD_DEBUG"]!="true")) |
|---|
| | 84 | ) |
|---|
| | 85 | echo "<div style='display:none'>"; |
|---|
| | 86 | |
|---|
| | 87 | echo "Executing post apply script <b>".$amp_conf["POST_RELOAD"]."</b><pre>"; |
|---|
| | 88 | system( $amp_conf["POST_RELOAD"] ); |
|---|
| | 89 | echo "</pre>"; |
|---|
| | 90 | |
|---|
| | 91 | if (!isset($amp_conf["POST_RELOAD_DEBUG"]) || |
|---|
| | 92 | (($amp_conf["POST_RELOAD_DEBUG"]!="1") && |
|---|
| | 93 | ($amp_conf["POST_RELOAD_DEBUG"]!="true")) |
|---|
| | 94 | ) |
|---|
| | 95 | echo "</div><br>"; |
|---|
| | 96 | |
|---|
| | 97 | echo " |
|---|
| | 98 | <script type='text/javascript'> |
|---|
| | 99 | function hideWaitBanner() |
|---|
| | 100 | { |
|---|
| | 101 | document.getElementById('idWaitBanner').className = 'clsHidden'; |
|---|
| | 102 | } |
|---|
| | 103 | |
|---|
| | 104 | document.getElementById('idWaitBanner').innerHTML = 'Configuration applied'; |
|---|
| | 105 | document.getElementById('idWaitBanner').className = 'clsWaitFinishOK'; |
|---|
| | 106 | setTimeout('hideWaitBanner()',3000); |
|---|
| | 107 | </script> |
|---|
| | 108 | "; |
|---|
| | 109 | } |
|---|
| | 110 | |
|---|