Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

glpi / src / ajax / getVTValue.php @ e0c97dab

History | View | Annotate | Download (583 Bytes)

1 79397eb3 Romain CHOLLET
<?php
2
3
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "getVTValue.php")) {
4 e0c97dab Francois POIROTTE
  include(dirname(dirname(__DIR__)) .
5
          DIRECTORY_SEPARATOR . "inc" .
6
          DIRECTORY_SEPARATOR . "includes.php");
7
8 79397eb3 Romain CHOLLET
   header("Content-Type: text/html; charset=UTF-8");
9
   Html::header_nocache();
10
}
11 8b28e91d Romain CHOLLET
12 79397eb3 Romain CHOLLET
if (!defined('GLPI_ROOT')) {
13
   die("Can not acces directly to this file");
14
}
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);
26
27
?>