-
Notifications
You must be signed in to change notification settings - Fork 4
/
verdanatech_processa_iGZ.php
58 lines (48 loc) · 1.82 KB
/
verdanatech_processa_iGZ.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
<?php
/*
* @Programa iGZ
* @name: iGZ - verdanatech_processa_iGZ.php
* @versao: 0.1
* @Data 10 de Fevereiro de 2017
* @Copyright: Verdanatech Soluções em TI, 2017
* @Author: Halexsandro de Freitas Sales <halexsandro.sales@verdanatech.com>
* --------------------------------------------------------------------------
* LICENSE
*
* iGZ 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.
* iGZ 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.
*
* If not, see <http://www.gnu.org/licenses/>.
* --------------------------------------------------------------------------
*/
require_once dirname(__FILE__).'/include/config.inc.php';
if ($_GET["send"] = 1) {
$glpi_active = $_POST["glpi_active"];
$glpi_url = $_POST["glpi_url"];
$app_token = $_POST["app_token"];
$glpi_user = $_POST["glpi_user"];
$glpi_user_password = $_POST["glpi_user_password"];
$telegram_active = $_POST["telegram_active"];
$telegram_id_user = $_POST["telegram_id_user"];
$telegram_bot_token = $_POST["telegram_bot_token"];
$update = $_POST["update"];
$fp = fopen("./conf/igz.conf.php", "w");
$grava = fwrite($fp, "<?php
\$glpi_active=\"".$glpi_active."\";
\$appToken=\"".$app_token."\";
\$apiURL=\"".$glpi_url."\";
\$userLogin=\"".$glpi_user."\";
\$passwd=\"".$glpi_user_password."\";
\$telegram_active=\"".$telegram_active."\";
\$telegramIdUser=\"".$telegram_id_user."\";
\$telegramBotToken=\"".$telegram_bot_token."\";
");
fclose($fp);
}
header('Location:verdanatech_iGZ.php');