ryxeo-glpi-git / front / setup.mailing.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,01 ko)
1 |
<?php
|
---|---|
2 |
|
3 |
|
4 |
/*
|
5 |
* @version $Id: setup.mailing.php 7763 2009-01-06 18:44:50Z moyo $
|
6 |
-------------------------------------------------------------------------
|
7 |
GLPI - Gestionnaire Libre de Parc Informatique
|
8 |
Copyright (C) 2003-2009 by the INDEPNET Development Team.
|
9 |
|
10 |
http://indepnet.net/ http://glpi-project.org
|
11 |
-------------------------------------------------------------------------
|
12 |
|
13 |
LICENSE
|
14 |
|
15 |
This file is part of GLPI.
|
16 |
|
17 |
GLPI is free software; you can redistribute it and/or modify
|
18 |
it under the terms of the GNU General Public License as published by
|
19 |
the Free Software Foundation; either version 2 of the License, or
|
20 |
(at your option) any later version.
|
21 |
|
22 |
GLPI is distributed in the hope that it will be useful,
|
23 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25 |
GNU General Public License for more details.
|
26 |
|
27 |
You should have received a copy of the GNU General Public License
|
28 |
along with GLPI; if not, write to the Free Software
|
29 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
30 |
--------------------------------------------------------------------------
|
31 |
*/
|
32 |
|
33 |
// ----------------------------------------------------------------------
|
34 |
// Original Author of file:
|
35 |
// Purpose of file:
|
36 |
// ----------------------------------------------------------------------
|
37 |
|
38 |
$NEEDED_ITEMS = array ( |
39 |
"setup",
|
40 |
"ocsng",
|
41 |
"mailing",
|
42 |
"consumable",
|
43 |
"cartridge",
|
44 |
"contract",
|
45 |
"infocom",
|
46 |
"software",
|
47 |
"cron"
|
48 |
); |
49 |
|
50 |
define('GLPI_ROOT', '..'); |
51 |
include (GLPI_ROOT . "/inc/includes.php"); |
52 |
|
53 |
checkRight("config", "w"); |
54 |
$config = new Config(); |
55 |
|
56 |
if (!isset ($_SESSION['glpi_mailconfig'])) |
57 |
$_SESSION['glpi_mailconfig'] = 1; |
58 |
if (isset ($_GET['onglet'])) |
59 |
$_SESSION['glpi_mailconfig'] = $_GET['onglet']; |
60 |
|
61 |
|
62 |
if (!empty ($_POST["test_cron_consumables"])) { |
63 |
addMessageAfterRedirect($LANG["install"][6]); |
64 |
cron_consumable(true);
|
65 |
glpi_header($_SERVER['HTTP_REFERER']); |
66 |
} |
67 |
else if (!empty ($_POST["test_cron_cartridges"])) { |
68 |
addMessageAfterRedirect($LANG["install"][6]); |
69 |
cron_cartridge(true);
|
70 |
glpi_header($_SERVER['HTTP_REFERER']); |
71 |
} |
72 |
else if (!empty ($_POST["test_cron_contracts"])) { |
73 |
addMessageAfterRedirect($LANG["install"][6]); |
74 |
cron_contract(true);
|
75 |
glpi_header($_SERVER['HTTP_REFERER']); |
76 |
} |
77 |
else if (!empty ($_POST["test_cron_infocoms"])) { |
78 |
addMessageAfterRedirect($LANG["install"][6]); |
79 |
cron_infocom(true);
|
80 |
glpi_header($_SERVER['HTTP_REFERER']); |
81 |
} |
82 |
else if (!empty ($_POST["test_cron_softwares"])) { |
83 |
addMessageAfterRedirect($LANG["install"][6]); |
84 |
cron_software(true);
|
85 |
glpi_header($_SERVER['HTTP_REFERER']); |
86 |
} |
87 |
else if (!empty ($_POST["test_smtp_send"])) { |
88 |
testMail(); |
89 |
glpi_header($_SERVER['HTTP_REFERER']); |
90 |
} |
91 |
elseif (!empty ($_POST["update_mailing"])) { |
92 |
$config->update($_POST); |
93 |
glpi_header($_SERVER['HTTP_REFERER']); |
94 |
} |
95 |
elseif (!empty ($_POST["update_notifications"])) { |
96 |
|
97 |
updateMailNotifications($_POST);
|
98 |
glpi_header($_SERVER['HTTP_REFERER']); |
99 |
} |
100 |
|
101 |
|
102 |
|
103 |
|
104 |
commonHeader($LANG["title"][15], $_SERVER['PHP_SELF'],"config","mailing"); |
105 |
$config->showFormMailing($_SERVER['PHP_SELF']); |
106 |
|
107 |
commonFooter(); |
108 |
?>
|