Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/*
* Copyright 2008-2012 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @brief class of install tools
*
* @file
* @author Arnaud Veber
* @date $date$
* @version $Revision$
* @ingroup install
*/
$filename = realpath('.').'/custom/cs_'.$_SESSION['config']['databasename'].'/apps/maarch_entreprise/xml/config.xml';
if (file_exists($filename)) {
$xmlconfig = simplexml_load_file(realpath('.').'/custom/cs_'.$_SESSION['config']['databasename'].'/apps/maarch_entreprise/xml/config.xml');
$CONFIG = $xmlconfig->CONFIG;
$databaseserver = (string) $CONFIG->databaseserver;
$databasetype = (string) $CONFIG->databaseserverport;
$databasename = (string) $CONFIG->databasename;
$databaseuser = (string) $CONFIG->databaseuser;
$lang = (string) $CONFIG->lang;
$nblinetoshow = (string) $CONFIG->nblinetoshow;
$debug = (string) $CONFIG->debug;
$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;
}
<div class="blockWrapper">
<div class="titleBlock">
<h2 onClick="slide('configNotificationSendmail');" style="cursor: pointer;">
<?php echo _CONFIG_INFO;?>
</h2>
</div>
<div class="contentBlock" id="docservers">
<p>
<h6>
<?php echo _CONFIG_EXP;?>
</h6>
<form>
<table>
<tr>
<td>
<?php echo _DATABASESERVER;?>
</td>
<td>
:
</td>
<td>
<input type="text" name="databaseserver" id="databaseserver" disabled="disabled" value= <?php echo $databaseserver; ?> />
</td>
</tr>
<tr>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<td>:</td>
<td><input type="text" name="databasetype" id="databasetype" disabled="disabled" value= <?php echo $databasetype; ?> /></td>
</tr>
<tr>
<td><?php echo _DATABASENAME;?></td>
<td>:</td>
<td><input type="text" name="databasename" id="databasename" disabled="disabled" value=<?php echo $databasename; ?> /></td>
</tr>
<tr>
<td><?php echo _USER_BDD;?></td>
<td>:</td>
<td><input type="text" name="databaseuser" id="databaseuser" disabled="disabled" value=<?php echo $databaseuser; ?> /></td>
</tr>
<tr>
<td><?php echo _LANG;?></td>
<td>:</td>
<td><input type="text" name="lang" id="lang" disabled="disabled" value=<?php if($lang == 'fr'){echo 'Français';}elseif($lang == 'en'){echo 'English';} ?> /></td>
</tr>
<!--tr>
<td><?php echo _NBLINETOSHOW;?></td>
<td>:</td>
<td><input type="text" name="nblinetoshow" id="nblinetoshow" disabled="disabled" value=<?php echo $nblinetoshow; ?> /></td>
</tr>
<tr>
<td><?php echo _MODEDEBUG;?></td>
<td>:</td>
<td><input type="text" name="debug" id="debug" disabled="disabled" value=<?php echo $debug; ?> /></td>
</tr-->
<tr>
<td><?php echo _APPLICATIONNAME;?></td>
<td>:</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>
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<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>
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<div id="ajaxReturn_testConnect_ok"></div>
</p>
</div>
</div>
<br />
<div class="blockWrapper">
<div class="contentBlock" id="docservers">
<p>
<div id="buttons">
<!--div style="float: left;" class="previousButton" id="previous">
<a href="#" onClick="goTo('index.php?step=docservers');" style="display:none;">
<?php echo _PREVIOUS;?>
</a>
</div-->
<!--div style="float: left;" class="previousButton" id="next">
<a href="#" onClick="goTo('index.php?step=password');" id="ajaxReturn_testConnect" >
<?php echo "Sauter étape";?>
</a>
</div-->
<!--div style="float: right;" class="nextButton" id="next">
<a href="#" onClick="goTo('index.php?step=password');" id="ajaxReturn_testConnect">
<?php echo _NEXT;?>
</a>
</div-->
<div style="float: right;" class="nextButton" id="next">
<a href="#" onClick="goTo('index.php?step=resume');">
<?php echo _NEXT_INSTALL;?>
</a>
</div>
</div>
<br />
<br />
</p>
</div>
</div>
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
}else{
echo "fichier de configuration non trouvé : vérifier votre custom";
?>
<div class="blockWrapper">
<div class="contentBlock" id="docservers">
<p>
<div id="buttons">
<div style="float: left;" class="previousButton" id="previous">
<a href="#" onClick="goTo('index.php?step=database');" style="display:block;">
<?php echo _PREVIOUS;?>
</a>
</div>
<!--div style="float: left;" class="previousButton" id="next">
<a href="#" onClick="goTo('index.php?step=password');" id="ajaxReturn_testConnect" >
<?php echo "Sauter étape";?>
</a>
</div-->
<!--div style="float: right;" class="nextButton" id="next">
<a href="#" onClick="goTo('index.php?step=password');" id="ajaxReturn_testConnect">
<?php echo _NEXT;?>
</a>
</div-->
<!--div style="float: right;" class="nextButton" id="next">
<a href="#" onClick="goTo('index.php?step=resume');">
<?php echo _NEXT_INSTALL;?>
</a>
</div-->
</div>
<br />
<br />
</p>
</div>
</div>