-
Notifications
You must be signed in to change notification settings - Fork 1
/
ajax.php
69 lines (64 loc) · 2.43 KB
/
ajax.php
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/* ======================================================================
* This file is part of TelSurvey.
* Copyright © 2012 Université du Maine
*
* TelSurvey 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.
*
* TelSurvey 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 TelSurvey (see COPYING). If not, see <http://www.gnu.org/licenses/>.
*/
require_once('config.php');
if(isset($bInternalUserDb) && $bInternalUserDb){
include('connect.php');
}elseif (isset($_SERVER["REMOTE_USER"])) {
$uid=$_SERVER["REMOTE_USER"];
} elseif (isset($_SERVER["HTTP_CAS_USER"])) {
$uid=$_SERVER["HTTP_CAS_USER"];
}
if (isset($_POST['menu'])) {
if (stristr($_POST['menu'],'publipost')) {include('publipost.php');}
elseif (stristr($_POST['menu'],'enqlister')) {include('enq.php');}
elseif (stristr($_POST['menu'],'enqadd')) {include('enq.php');}
elseif (stristr($_POST['menu'],'enqaddconfirm')) {include('enq.php');}
elseif (stristr($_POST['menu'],'enqsuppr')) {include('enq.php');}
elseif (stristr($_POST['menu'],'enqsupprconfirm')) {include('enq.php');}
elseif (stristr($_POST['menu'],'enqetat')) {include('enq.php');}
elseif (stristr($_POST['menu'],'tel')) {include('tel.php');}
}
if (isset($_POST['enqsupprconfirm'])) {
include('enq.php');
}
if (isset($_POST['rchcp'])) {
include('code_postal.php');
}
if (isset($_POST['reload'])) {
include('reload_champ.php');
}
if (isset($_POST['rappelmel'])) {
include('mel.php');
}
if (isset($_POST['publipost'])) {
include('publipost.php');
}
if (isset($_POST['test_domain'])) {
list($ident, $domain) = explode( "@", $_POST['test_domain']);
if (test_domain($_POST['test_domain'])) {
$Domain="<img class='m' src=images/ok.png width='15px'> (".$domain.")";
$isOK="1";
} else {
$Domain="<font style=color:red;>erreur</font> (".$domain.")";
$isOK="0";
}
$reponse=json_encode(array( 'domain' => utf8_encode($Domain), 'isOK'=>$isOK));
echo $reponse;
}
?>