glpi / src / ajax / getVTValue.php @ e809466b
History | View | Annotate | Download (588 Bytes)
1 | 79397eb3 | Romain CHOLLET | <?php
|
---|---|---|---|
2 | |||
3 | if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "getVTValue.php")) { |
||
4 | 077e4de7 | Francois POIROTTE | include(dirname(dirname(__DIR__)) . |
5 | DIRECTORY_SEPARATOR . "inc" . |
||
6 | DIRECTORY_SEPARATOR . "includes.php"); |
||
7 | e0c97dab | Francois POIROTTE | |
8 | 077e4de7 | Francois POIROTTE | header("Content-Type: text/html; charset=UTF-8"); |
9 | Html::header_nocache();
|
||
10 | 79397eb3 | Romain CHOLLET | } |
11 | 8b28e91d | Romain CHOLLET | |
12 | 79397eb3 | Romain CHOLLET | if (!defined('GLPI_ROOT')) { |
13 | 077e4de7 | Francois POIROTTE | die("Can not acces directly to this file"); |
14 | 79397eb3 | Romain CHOLLET | } |
15 | |||
16 | $ret = array(); |
||
17 | $tmp = PluginVigiloVigiloTemplate::getAjaxArrayTemplates(); |
||
18 | |||
19 | foreach ($tmp as $template) { |
||
20 | $ret['results'][] = $template; |
||
21 | } |
||
22 | |||
23 | 8b28e91d | Romain CHOLLET | $ret['count'] = count($ret['results']); |
24 | 79397eb3 | Romain CHOLLET | |
25 | echo json_encode($ret); |