diff --git a/core/trunk/install/class/Class_Install.php b/core/trunk/install/class/Class_Install.php index 8a37ee2d9a50507ee5412dd027b8ca62cc386a66..8d491116129aafe14bde3831839cd040f2e6d306 100755 --- a/core/trunk/install/class/Class_Install.php +++ b/core/trunk/install/class/Class_Install.php @@ -283,6 +283,36 @@ class Install extends functions return false; exit; } + + if (!$this->setConfigXml()) { + return false; + exit; + } + return true; + } + + private function setConfigXml() + { + $xmlconfig = simplexml_load_file('apps/maarch_entreprise/xml/config.xml'); + $CONFIG = $xmlconfig->CONFIG; + + $CONFIG->databaseserver = $_SESSION['config']['databaseserver']; + $CONFIG->databaseserverport = $_SESSION['config']['databaseserverport']; + $CONFIG->databasename = $_SESSION['config']['databasename']; + $CONFIG->databaseuser = $_SESSION['config']['databaseuser']; + $CONFIG->databasepassword = $_SESSION['config']['databasepassword']; + $CONFIG->lang = $_SESSION['lang']; + $res = $xmlconfig->asXML(); + $fp = @fopen("apps/maarch_entreprise/xml/config.xml", "w+"); + if (!$fp) { + return false; + exit; + } + $write = fwrite($fp,$res); + if (!$write) { + return false; + exit; + } return true; } diff --git a/core/trunk/install/final.php b/core/trunk/install/final.php new file mode 100644 index 0000000000000000000000000000000000000000..d9e7962b471c41e9a291354b22dac7e3a03159af --- /dev/null +++ b/core/trunk/install/final.php @@ -0,0 +1,9 @@ +<?php +include_once '../core/init.php'; + +unset($_SESSION); +$_SESSION = array(); +session_unset(); +session_destroy(); +header('Location: ../'); +exit; diff --git a/core/trunk/install/img/wait.gif b/core/trunk/install/img/wait.gif new file mode 100755 index 0000000000000000000000000000000000000000..21c7e74db6eeff618adbe86e4525dae1bebc24f1 Binary files /dev/null and b/core/trunk/install/img/wait.gif differ diff --git a/core/trunk/install/js/ajaxDB.js b/core/trunk/install/js/ajaxDB.js index 142d8daa22cdbe3dc20df7870d65582b6b9dbbf3..ba1c69cbfac4324a7190f7c237a2b5a2f3f0a148 100644 --- a/core/trunk/install/js/ajaxDB.js +++ b/core/trunk/install/js/ajaxDB.js @@ -46,8 +46,10 @@ function ajaxDB( retour_ko.html(''); slide(divRetour); $('.'+divRetour).slideToggle('slow'); + $('.wait').css('display','none'); } else { retour_ko.html(data.text); + $('.wait').css('display','none'); } }); }); diff --git a/core/trunk/install/js/merged_js.js b/core/trunk/install/js/merged_js.js index 9945134763b0bb08599e259104d7e06a53e950c8..38b9255f69f92857376c481f79712279074ee341 100755 --- a/core/trunk/install/js/merged_js.js +++ b/core/trunk/install/js/merged_js.js @@ -301,8 +301,10 @@ function ajaxDB( retour_ko.html(''); slide(divRetour); $('.'+divRetour).slideToggle('slow'); + $('.wait').css('display','none'); } else { retour_ko.html(data.text); + $('.wait').css('display','none'); } }); }); diff --git a/core/trunk/install/view/database_view.php b/core/trunk/install/view/database_view.php index 1ea35094e7c9a5bfb5e24a1d8555a459380883fc..f74022eab7aaeab81404e99785d4ddbd5914d65b 100755 --- a/core/trunk/install/view/database_view.php +++ b/core/trunk/install/view/database_view.php @@ -77,6 +77,7 @@ type="button" value="tester" onClick=" + $('.wait').css('display','block'); checkDatabaseInfo( $('#databaseserver').val(), $('#databaseserverport').val(), @@ -93,11 +94,13 @@ </form> <br /> <div id="ajaxReturn_testConnect_ko"></div> + <div align="center"> + <img src="img/wait.gif" width="100" class="wait" style="display: none; background-color: rgba(0, 0, 0, 0.2);"/> + </div> </p> </div> </div> </div> -<br /> <div class="ajaxReturn_createDB"> <div class="blockWrapper" id="ajaxReturn_testConnect" style="display: none;"> <div class="titleBlock"> @@ -130,18 +133,20 @@ <td></td> <td></td> <td> - <input type="button" onclick="checkCreateDB($('#databasename').val(), 'createdatabase');" value="Créer la base" /> + <input type="button" onclick="$('.wait').css('display','block');checkCreateDB($('#databasename').val(), 'createdatabase');" value="Créer la base" /> </td> </tr> </table> </form> <br /> <div id="ajaxReturn_createDB_ko"></div> + <div align="center"> + <img src="img/wait.gif" width="100" class="wait" style="display: none; background-color: rgba(0, 0, 0, 0.2);"/> + </div> </p> </div> </div> </div> -<br /> <div class="ajaxReturn_loadDatas"> <div class="blockWrapper" id="ajaxReturn_createDB" style="display: none;"> <div class="titleBlock"> @@ -192,7 +197,7 @@ <td></td> <td></td> <td> - <input type="button" onclick="checkLoadDatas($('#dataFilename').val(), 'loadDatas');" value="Charger les datas" /> + <input type="button" onclick="$('.wait').css('display','block');checkLoadDatas($('#dataFilename').val(), 'loadDatas');" value="Charger les datas" /> </td> <td></td> </tr> @@ -200,6 +205,9 @@ </form> <br /> <div id="ajaxReturn_loadDatas_ko"></div> + <div align="center"> + <img src="img/wait.gif" width="100" class="wait" style="display: none; background-color: rgba(0, 0, 0, 0.2);"/> + </div> </p> </div> </div> diff --git a/core/trunk/install/view/resume_view.php b/core/trunk/install/view/resume_view.php index 1f422ab7ffbb1c96c04cdde5f243ce7b0c414cd1..6946e8e592522fd0e87fe081866accd9de42d7cb 100755 --- a/core/trunk/install/view/resume_view.php +++ b/core/trunk/install/view/resume_view.php @@ -15,7 +15,7 @@ </a> </div> <div style="float: right;" class="nextButton" id="start"> - <a href="#" onClick="goTo('../');"> + <a href="#" onClick="goTo('final.php');"> <?php echo _START_MEP_1_3; ?> </a> </div>