Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

glpi / ajax / getVTValue.php @ 79397eb3

History | View | Annotate | Download (676 Bytes)

1 79397eb3 Romain CHOLLET
<?php
2
3
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "getVTValue.php")) {
4
   include ("../../../inc/includes.php");
5
   header("Content-Type: text/html; charset=UTF-8");
6
   Html::header_nocache();
7
}
8
if (!defined('GLPI_ROOT')) {
9
   die("Can not acces directly to this file");
10
}
11
12
$ret = array();
13
$tmp = PluginVigiloVigiloTemplate::getAjaxArrayTemplates();
14
15
foreach ($tmp as $template) {
16
    $ret['results'][] = $template;
17
}
18
19
$ret['count']   = count($ret['results']);
20
21
/*$ret['results'][] = array("id" => 0, "text" => "-----");
22
$ret['results'][] = array("id" => 1, "text" => "linux");
23
$ret['results'][] = array("id" => 2, "text" => "windows");
24
*/
25
echo json_encode($ret);
26
27
?>