Skip to content
Snippets Groups Projects
Commit e45fdfd3 authored by Henri Queneau's avatar Henri Queneau
Browse files

FEAT #3321 up the config view and others modifications

parent 320564aa
No related branches found
No related tags found
No related merge requests found
Showing
with 209 additions and 14 deletions
......@@ -35,7 +35,7 @@
$longTitle = _CONFIG_INSTALL;
//PROGRESS
$stepNb = 6;
$stepNb = 8;
$stepNbTotal = 9;
//VIEW
......
......@@ -39,7 +39,7 @@
//PROGRESS
$stepNb = 5;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'database';
......@@ -36,7 +36,7 @@
//PROGRESS
$stepNb = 6;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'docservers';
......@@ -38,7 +38,7 @@
//PROGRESS
$stepNb = 1;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'language';
......@@ -48,7 +48,7 @@
//PROGRESS
$stepNb = 3;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'licence';
......@@ -36,7 +36,7 @@
//PROGRESS
$stepNb = 7;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'password';
......@@ -38,7 +38,7 @@
//PROGRESS
$stepNb = 4;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'prerequisites';
......@@ -35,8 +35,8 @@
$longTitle = _RESUME;
//PROGRESS
$stepNb = 8;
$stepNbTotal = 8;
$stepNb = 9;
$stepNbTotal = 9;
//VIEW
$view = 'resume';
......@@ -36,7 +36,7 @@
//PROGRESS
$stepNb = 2;
$stepNbTotal = 8;
$stepNbTotal = 9;
//VIEW
$view = 'welcome';
......@@ -25,6 +25,12 @@ if (!defined('_DESC_INSTALL')) {
//LICENCE
if (!defined('_SET_CONFIG')) {
define('_SET_CONFIG', "set");
}
if (!defined('_LICENCE')) {
define('_LICENCE', "Licence");
}
......@@ -69,6 +75,15 @@ if (!defined('_SMTP_USER_CONNECT')) {
define('_SMTP_USER_CONNECT', "User who is connect on the server");
}
if (!defined('_SET_CONFIG_OK')) {
define('_SET_CONFIG_OK', "Done");
}
if (!defined('_SET_CONFIG_KO')) {
define('_SET_CONFIG_KO', "no set done : there is a bug");
}
if (!defined('_SENDER_TYPE')) {
define('_SENDER_TYPE', "smtp: Transfert message; sendmail: mail server service");
}
......@@ -84,6 +99,9 @@ if (!defined('_SMTP_INFORMATION')) {
if (!defined('_CONFIG_EXP')) {
define('_CONFIG_EXP', "Here, you can see the software configuration");
}
if (!defined('_CONFIG_SMTP_EXP')) {
define('_CONFIG_SMTP_EXP', "Here, you can see the software configuration for smtp");
}
if (!defined('_CONFIG_INFO')) {
define('_CONFIG_INFO', "Configuration File");
}
......
......@@ -25,6 +25,10 @@ if (!defined('_DESC_INSTALL')) {
//LICENCE
if (!defined('_SET_CONFIG')) {
define('_SET_CONFIG', "modifier");
}
if (!defined('_LICENCE')) {
define('_LICENCE', "Licence");
}
......@@ -37,6 +41,14 @@ if (!defined('_SMTP_ERROR')) {
define('_SMTP_ERROR', "Information : Authentication SMTP incorrect");
}
if (!defined('_SET_CONFIG_OK')) {
define('_SET_CONFIG_OK', "Modification faite");
}
if (!defined('_SET_CONFIG_KO')) {
define('_SET_CONFIG_KO', "Aucune modification réalisée : un problème est survenu");
}
if (!defined('_OK_WITH_LICENCE')) {
define('_OK_WITH_LICENCE', "J'accepte les termes de la licence");
......@@ -203,6 +215,9 @@ if (!defined('_APPLICATIONNAME')) {
if (!defined('_CONFIG_EXP')) {
define('_CONFIG_EXP', "Ici, vous pouvez visualiser les informations qui ont été renseignées dans le fichier de configuration de l'application");
}
if (!defined('_CONFIG_SMTP_EXP')) {
define('_CONFIG_SMTP_EXP', "Ici, vous pouvez visualiser les informations qui ont été renseignées dans le fichier de configuration pour le smtp");
}
if (!defined('_CONFIG_INFO')) {
define('_CONFIG_INFO', "Fichier de configuration");
}
......
<?php
function setConfigXmlofApps($applicationname)
{
$xmlconfig = simplexml_load_file(realpath('.').'/custom/cs_'.$_SESSION['config']['databasename'].'/apps/maarch_entreprise/xml/config.xml');
$CONFIG = $xmlconfig->CONFIG;
$CONFIG->applicationname = $applicationname;
$res = $xmlconfig->asXML();
$fp = @fopen(realpath('.').'/custom/cs_'.$_SESSION['config']['databasename'].'/apps/maarch_entreprise/xml/config.xml', "w+");
if (!$fp) {
return false;
exit;
}
$write = fwrite($fp,$res);
if (!$write) {
return false;
exit;
}
}
if (empty($_REQUEST['applicationname'])) {
$return2['status'] = 2;
$return2['text'] = _SET_CONFIG_KO;
$jsonReturn = json_encode($return2);
echo $jsonReturn;
exit;
//echo("<p>" . $mail->getMessage() . "</p>");
} else {
require_once 'install/class/Class_Install.php';
setConfigXmlofApps($_REQUEST['applicationname']);
//setConfigNotification_batch_config_Xml($from,$to,$host,$user,$pass,$_REQUEST['smtpType'],$port,$auth,$charset,$smtpSecure);
$return2['status'] = 2;
$return2['text'] = _SET_CONFIG_OK;
$jsonReturn = json_encode($return2);
echo $jsonReturn;
exit;
}
?>
......@@ -42,18 +42,64 @@
$lang = (string) $CONFIG->lang;
$nblinetoshow = (string) $CONFIG->nblinetoshow;
$debug = (string) $CONFIG->debug;
$applicationname = (string) $CONFIG->applicationname;
$applicationname = $CONFIG->applicationname;
// var_dump((string) $CONFIG->applicationname);
// var_dump($applicationname);
$COLLECTION = $xmlconfig->COLLECTION;
$path_to_lucene_index = (string) $COLLECTION->path_to_lucene_index;
$xmlconfigSMTP = simplexml_load_file(realpath('.').'/custom/cs_'.$_SESSION['config']['databasename'].'/modules/notifications/batch/config/config.xml');
$MAILER = $xmlconfigSMTP->MAILER;
$type = (string) $MAILER->type;
$smtp_host = (string) $MAILER->smtp_host;
$smtp_port = (string) $MAILER->smtp_port;
$smtp_user = (string) $MAILER->smtp_user;
$smtp_auth = (string) $MAILER->smtp_auth;
$smtp_secure = (string) $MAILER->smtp_secure;
?>
<script>
function setconfig(url,applicationname){
// alert(url);
// alert(applicationname);
$(document).ready(function() {
var oneIsEmpty = false;
if (applicationname.length < 1) {
var oneIsEmpty = true;
}
if (oneIsEmpty) {
$('#ajaxReturn_testConnect_ko').html('<?php echo _ONE_FIELD_EMPTY;?>');
return;
}
$('.wait').css('display','block');
$('#ajaxReturn_testConnect_ko').html('');
//alert("ok");
ajaxDB(
'setConfig',
'applicationname|'+applicationname,
'ajaxReturn_testConnect',
'false'
);
if (oneIsEmpty) {
$('#ajaxReturn_testConnect_ok').html('<?php echo "connexion ok";?>');
return;
}
});
}
?>
</script>
<div class="blockWrapper">
<div class="titleBlock">
<h2 onClick="slide('configNotificationSendmail');" style="cursor: pointer;">
......@@ -111,19 +157,84 @@
<tr>
<td><?php echo _APPLICATIONNAME;?></td>
<td>:</td>
<td><input type="text" name="applicationname" id="applicationname" disabled="disabled" value=<?php echo $applicationname; ?> /></td>
<td><input type="text" name="applicationname" id="applicationname" value="<?php echo (string) $applicationname; ?> "/></td>
</tr>
<tr>
<td><?php echo _PATH_TO_DOCSERVER;?></td>
<td>:</td>
<td><input type="text" name="smtpPassword" id="smtpPassword" disabled="disabled" value=<?php echo $path_to_lucene_index; ?> /></td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<input type="button" id="ajaxReturn_testConnect_button" onClick="setconfig('setConfig', $('#applicationname').val())"; value="<?php echo _SET_CONFIG;?>"/>
</td>
</tr>
</table>
</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>
<div id="ajaxReturn_testConnect_ok"></div>
</p>
<p>
<h6>
<?php echo _CONFIG_SMTP_EXP;?>
</h6>
<form>
<table>
<tr>
<td>
<?php echo _TYPE;?>
</td>
<td>
:
</td>
<td>
<input type="text" name="smtptype" id="smtptype" disabled="disabled" value= <?php echo $type; ?> />
</td>
</tr>
<tr>
<td><?php echo _SMTP_HOST;?></td>
<td>:</td>
<td><input type="text" name="smtphost" id="smtphost" disabled="disabled" value= <?php echo $smtp_host; ?> /></td>
</tr>
<tr>
<td><?php echo _SMTP_PORT;?></td>
<td>:</td>
<td><input type="text" name="smtpport" id="smtpport" disabled="disabled" value=<?php echo $smtp_port; ?> /></td>
</tr>
<tr>
<td><?php echo _SMTP_USER;?></td>
<td>:</td>
<td><input type="text" name="smtpuser" id="smtpuser" disabled="disabled" value=<?php echo $smtp_user; ?> /></td>
</tr>
<tr>
<td><?php echo _SMTP_AUTH;?></td>
<td>:</td>
<td><input type="text" name="smtpauth" id="smtpauth" disabled="disabled" value=<?php echo $smtp_auth; ?> /></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</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>
<div id="ajaxReturn_testConnect_ok"></div>
</p>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment