예제 #1
0
echo "<td class='right'>" . $LANG['stats'][7] . "&nbsp;:</td>";
echo "<td rowspan='2' class='center'>";
echo "<input type='submit' class='button' name='submit' value=\"" . $LANG['buttons'][7] . "\"></td></tr>";
echo "<tr class='tab_bg_2'><td class='right'>" . $LANG['search'][9] . "&nbsp;:</td><td>";
showDateFormItem("date2", $_REQUEST["date2"]);
echo "</td><td class='center'>";
Dropdown::showYesNo('showgraph', $_REQUEST['showgraph']);
echo "</td></tr>";
echo "</table></form></div>";
$val = Stat::getItems($_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST["type"]);
$params = array('type' => $_REQUEST["type"], 'date1' => $_REQUEST["date1"], 'date2' => $_REQUEST["date2"], 'start' => $_REQUEST["start"]);
printPager($_REQUEST['start'], count($val), $CFG_GLPI['root_doc'] . '/front/stat.tracking.php', "date1=" . $_REQUEST["date1"] . "&amp;date2=" . $_REQUEST["date2"] . "&amp;type=" . $_REQUEST["type"] . "&amp;showgraph=" . $_REQUEST["showgraph"], 'Stat', $params);
if (!$_REQUEST['showgraph']) {
    Stat::show($_REQUEST["type"], $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST['start'], $val);
} else {
    $data = Stat::getDatas($_REQUEST["type"], $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST['start'], $val);
    if (isset($data['opened']) && is_array($data['opened'])) {
        foreach ($data['opened'] as $key => $val) {
            $newkey = html_clean($key);
            $cleandata[$newkey] = $val;
        }
        Stat::showGraph(array($LANG['stats'][5] => $cleandata), array('title' => $LANG['stats'][5], 'showtotal' => 1, 'unit' => $LANG['stats'][35], 'type' => 'pie'));
    }
    if (isset($data['solved']) && is_array($data['solved'])) {
        foreach ($data['solved'] as $key => $val) {
            $newkey = html_clean($key);
            $cleandata[$newkey] = $val;
        }
        Stat::showGraph(array($LANG['stats'][11] => $cleandata), array('title' => $LANG['stats'][11], 'showtotal' => 1, 'unit' => $LANG['stats'][35], 'type' => 'pie'));
    }
    if (isset($data['late']) && is_array($data['late'])) {
예제 #2
0
    // echo "Dropdown";
    $type = "comp_champ";
    $val = Stat::getItems($_GET['itemtype'], $_GET["date1"], $_GET["date2"], $_GET["dropdown"]);
    $params = array('type' => $type, 'dropdown' => $_GET["dropdown"], 'date1' => $_GET["date1"], 'date2' => $_GET["date2"], 'start' => $_GET["start"]);
} else {
    //   echo "Device";
    $type = "device";
    $field = $_GET["dropdown"];
    $val = Stat::getItems($_GET['itemtype'], $_GET["date1"], $_GET["date2"], $_GET["dropdown"]);
    $params = array('type' => $type, 'dropdown' => $_GET["dropdown"], 'date1' => $_GET["date1"], 'date2' => $_GET["date2"], 'start' => $_GET["start"]);
}
Html::printPager($_GET['start'], count($val), $CFG_GLPI['root_doc'] . '/front/stat.location.php', "date1=" . $_GET["date1"] . "&amp;date2=" . $_GET["date2"] . "&amp;itemtype=" . $_GET['itemtype'] . "&amp;dropdown=" . $_GET["dropdown"], 'Stat', $params);
if (!$_GET['showgraph']) {
    Stat::showTable($_GET['itemtype'], $type, $_GET["date1"], $_GET["date2"], $_GET['start'], $val, $_GET["dropdown"]);
} else {
    $data = Stat::getDatas($_GET['itemtype'], $type, $_GET["date1"], $_GET["date2"], $_GET['start'], $val, $_GET["dropdown"]);
    if (isset($data['opened']) && is_array($data['opened'])) {
        foreach ($data['opened'] as $key => $val) {
            $cleandata[Html::clean($key)] = $val;
        }
        Stat::showGraph(array(__('Number opened') => $cleandata), array('title' => __('Number opened'), 'showtotal' => 1, 'unit' => __('Tickets'), 'type' => 'pie'));
    }
    if (isset($data['solved']) && is_array($data['solved'])) {
        foreach ($data['solved'] as $key => $val) {
            $cleandata[Html::clean($key)] = $val;
        }
        Stat::showGraph(array(__('Number solved') => $cleandata), array('title' => __('Number solved'), 'showtotal' => 1, 'unit' => __('Tickets'), 'type' => 'pie'));
    }
    if (isset($data['late']) && is_array($data['late'])) {
        foreach ($data['late'] as $key => $val) {
            $cleandata[Html::clean($key)] = $val;
    $type = "comp_champ";
    $val = Stat::getItems($itemtype, $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST["dropdown"]);
    $params = array('type' => $type, 'dropdown' => $_REQUEST["dropdown"], 'date1' => $_REQUEST["date1"], 'date2' => $_REQUEST["date2"], 'start' => $_REQUEST["start"]);
} else {
    //   echo "Device";
    $type = "device";
    $field = $_REQUEST["dropdown"];
    $val = Stat::getItems($itemtype, $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST["dropdown"]);
    $params = array('type' => $type, 'dropdown' => $_REQUEST["dropdown"], 'date1' => $_REQUEST["date1"], 'date2' => $_REQUEST["date2"], 'start' => $_REQUEST["start"]);
}
/*printPager($_REQUEST['start'],count($val),$CFG_GLPI['root_doc'].'/front/stat.location.php',
  "date1=".$_REQUEST["date1"]."&amp;date2=".$_REQUEST["date2"]."&amp;dropdown=".$_REQUEST["dropdown"],
  'Stat',$params);*/
if (!$_REQUEST['showgraph']) {
    PluginMobileStat::show($type, $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST['start'], $val, $_REQUEST["dropdown"]);
} else {
    $data = Stat::getDatas($type, $_REQUEST["date1"], $_REQUEST["date2"], $_REQUEST['start'], $val, $_REQUEST["dropdown"]);
    if (isset($data['opened']) && is_array($data['opened'])) {
        foreach ($data['opened'] as $key => $val) {
            $cleandata[html_clean($key)] = $val;
        }
        PluginMobileStat::showGraph(array($LANG['stats'][5] => $cleandata), array('title' => $LANG['stats'][5], 'showtotal' => 1, 'unit' => $LANG['stats'][35], 'type' => 'pie'));
    }
    if (isset($data['solved']) && is_array($data['solved'])) {
        foreach ($data['solved'] as $key => $val) {
            $cleandata[html_clean($key)] = $val;
        }
        PluginMobileStat::showGraph(array($LANG['stats'][11] => $cleandata), array('title' => $LANG['stats'][11], 'showtotal' => 1, 'unit' => $LANG['stats'][35], 'type' => 'pie'));
    }
}
$common->displayFooter();
예제 #4
0
Html::showDateField("date2", array('value' => $_GET["date2"]));
echo "</td><td class='center'>";
echo "<input type='hidden' name='value2' value='" . $_GET["value2"] . "'>";
Dropdown::showYesNo('showgraph', $_GET['showgraph']);
echo "</td></tr>";
echo "</table>";
// form using GET method : CRSF not needed
echo "</form>";
echo "</div>";
$val = Stat::getItems($_GET["itemtype"], $_GET["date1"], $_GET["date2"], $_GET["type"], $_GET["value2"]);
$params = array('type' => $_GET["type"], 'date1' => $_GET["date1"], 'date2' => $_GET["date2"], 'value2' => $_GET["value2"], 'start' => $_GET["start"]);
Html::printPager($_GET['start'], count($val), $CFG_GLPI['root_doc'] . '/front/stat.tracking.php', "date1=" . $_GET["date1"] . "&amp;date2=" . $_GET["date2"] . "&amp;type=" . $_GET["type"] . "&amp;showgraph=" . $_GET["showgraph"] . "&amp;itemtype=" . $_GET["itemtype"] . "&amp;value2=" . $_GET['value2'], 'Stat', $params);
if (!$_GET['showgraph']) {
    Stat::showTable($_GET["itemtype"], $_GET["type"], $_GET["date1"], $_GET["date2"], $_GET['start'], $val, $_GET['value2']);
} else {
    $data = Stat::getDatas($_GET["itemtype"], $_GET["type"], $_GET["date1"], $_GET["date2"], $_GET['start'], $val, $_GET['value2']);
    if (isset($data['opened']) && is_array($data['opened'])) {
        foreach ($data['opened'] as $key => $val) {
            $newkey = Toolbox::unclean_cross_side_scripting_deep(Html::clean($key));
            $cleandata[$newkey] = $val;
        }
        Stat::showGraph(array(__('Number opened') => $cleandata), array('title' => __('Number opened'), 'showtotal' => 1, 'unit' => $item->getTypeName(Session::getPluralNumber()), 'type' => 'pie'));
    }
    if (isset($data['solved']) && is_array($data['solved'])) {
        foreach ($data['solved'] as $key => $val) {
            $newkey = Toolbox::unclean_cross_side_scripting_deep(Html::clean($key));
            $cleandata[$newkey] = $val;
        }
        Stat::showGraph(array(__('Number solved') => $cleandata), array('title' => __('Number solved'), 'showtotal' => 1, 'unit' => $item->getTypeName(Session::getPluralNumber()), 'type' => 'pie'));
    }
    if (isset($data['late']) && is_array($data['late'])) {