当前位置: 首页>>代码示例>>PHP>>正文


PHP Stat::constructEntryValues方法代码示例

本文整理汇总了PHP中Stat::constructEntryValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Stat::constructEntryValues方法的具体用法?PHP Stat::constructEntryValues怎么用?PHP Stat::constructEntryValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stat的用法示例。


在下文中一共展示了Stat::constructEntryValues方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    $values['opensatisfaction'] = Stat::constructEntryValues($_GET['itemtype'], "inter_opensatisfaction", $_GET["date1"], $_GET["date2"]);
    $values['answersatisfaction'] = Stat::constructEntryValues($_GET['itemtype'], "inter_answersatisfaction", $_GET["date1"], $_GET["date2"]);
    $available = array('opensatisfaction' => _nx('survey', 'Opened', 'Opened', 2), 'answersatisfaction' => _nx('survey', 'Answered', 'Answered', 2));
    echo "<div class='center'>";
    foreach ($available as $key => $name) {
        echo "<input type='checkbox' onchange='submit()' name='graph[{$key}]' " . ($show_all || isset($_GET['graph'][$key]) ? "checked" : "") . "> " . $name . "&nbsp;";
    }
    echo "</div>";
    $toprint = array();
    foreach ($available as $key => $name) {
        if ($show_all || isset($_GET['graph'][$key])) {
            $toprint[$name] = $values[$key];
        }
    }
    Stat::showGraph($toprint, array('title' => __('Satisfaction survey'), 'showtotal' => 1, 'unit' => __('Tickets')));
    $values['avgsatisfaction'] = Stat::constructEntryValues($_GET['itemtype'], "inter_avgsatisfaction", $_GET["date1"], $_GET["date2"]);
    $available = array('avgsatisfaction' => __('Satisfaction'));
    echo "<div class='center'>";
    foreach ($available as $key => $name) {
        echo "<input type='checkbox' onchange='submit()' name='graph[{$key}]' " . ($show_all || isset($_GET['graph'][$key]) ? "checked" : "") . "> " . $name . "&nbsp;";
    }
    echo "</div>";
    $toprint = array();
    foreach ($available as $key => $name) {
        if ($show_all || isset($_GET['graph'][$key])) {
            $toprint[$name] = $values[$key];
        }
    }
    Stat::showGraph($toprint, array('title' => __('Satisfaction')));
}
// form using GET method : CRSF not needed
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:stat.global.php

示例2: show

 function show($itemtype, $type, $date1, $date2, $start, array $value, $value2 = "")
 {
     global $LANG, $CFG_GLPI;
     // Set display type for export if define
     $output_type = Search::HTML_OUTPUT;
     if (isset($_GET["display_type"])) {
         $output_type = $_GET["display_type"];
     }
     //printCleanArray($value);
     if (is_array($value)) {
         $end_display = $start + $_SESSION['plugin_mobile']['rows_limit'];
         $numrows = count($value);
         if (isset($_GET['export_all'])) {
             $start = 0;
             $end_display = $numrows;
         }
         $nbcols = 8;
         if ($output_type != Search::HTML_OUTPUT) {
             // not HTML display
             $nbcols--;
         }
         echo PluginMobileSearch::showHeader($output_type, $end_display - $start + 1, $nbcols);
         Search::showNewLine($output_type);
         $header_num = 1;
         if ($output_type == Search::HTML_OUTPUT) {
             // HTML display - massive modif
             $search_config = "";
             echo PluginMobileSearch::showHeaderItem($output_type, $search_config, $header_num, "", 0, array());
         }
         echo "<div data-type='horizontal' data-role='controlgroup' class='mobile_list_header'>";
         $header_num = 1;
         echo PluginMobileSearch::showHeaderItem($output_type, "&nbsp;", $header_num, '#', 0, '', 3);
         /*if ($output_type==Search::HTML_OUTPUT) { // HTML display
              echo PluginMobileSearch::showHeaderItem($output_type,"&nbsp;",$header_num, '#', 0, '', 7);
           }*/
         //stevenes
         echo PluginMobileSearch::showHeaderItem($output_type, $LANG['stats'][13], $header_num, '#', 0, '', 3);
         echo PluginMobileSearch::showHeaderItem($output_type, $LANG['stats'][11], $header_num, '#', 0, '', 3);
         //  echo PluginMobileSearch::showHeaderItem($output_type,$LANG['stats'][11],$header_num, '#', 0, '', 7);
         /*  echo PluginMobileSearch::showHeaderItem($output_type,$LANG['stats'][15],$header_num, '#', 0, '', 7);
                  echo PluginMobileSearch::showHeaderItem($output_type,$LANG['stats'][25],$header_num, '#', 0, '', 7);
                  echo PluginMobileSearch::showHeaderItem($output_type,$LANG['stats'][27],$header_num, '#', 0, '', 7);
                  echo PluginMobileSearch::showHeaderItem($output_type,$LANG['stats'][30],$header_num, '#', 0, '', 7);
         		*/
         echo "</div>";
         // End Line for column headers
         echo PluginMobileSearch::showEndLine($output_type);
         $itemtype = "Ticket";
         //echo $start;
         //echo $value[0]['id'];
         //echo $value[0]['link'];
         $row_num = 1;
         for ($i = $start; $i < $numrows && $i < $end_display; $i++) {
             $value[$i]['link'] = preg_replace('#<a.*>(.*)</a>#isU', '$1', $value[$i]['link']);
             $value[$i]['link'] = "<a href='stat.graph.php?id=" . $value[$i + 1]['id'] . "&amp;date1={$date1}&amp;date2=" . "{$date2}&amp;type={$type}" . (!empty($value2) ? "&amp;champ={$value2}" : "") . "'>" . $value[$i]['link'] . "</a>";
             $row_num++;
             $item_num = 1;
             echo PluginMobileSearch::showNewLine($output_type, $i % 2);
             echo PluginMobileSearch::showItem($output_type, $value[$i]['link'], $item_num, $row_num, '', 3);
             //echo PluginMobileSearch::showItem($output_type,$link,$item_num,$row_num, '', 7);
             /*if ($output_type==Search::HTML_OUTPUT) { // HTML display
                  $link="";
                  if ($value[$i]['id']>0) {
                     $link="<a href='stat.graph.php?id=".$value[$i]['id']."&amp;date1=$date1&amp;date2=".
                           "$date2&amp;type=$type".(!empty($value2)?"&amp;champ=$value2":"")."'>".
                           "<img src=\"".$CFG_GLPI["root_doc"]."/pics/stats_item.png\" alt='' title=''>".
                           "</a>";
                  }
                  echo PluginMobileSearch::showItem($output_type,$link,$item_num,$row_num, '', 7);
               }*/
             //le nombre d'intervention - the number of intervention
             $opened = Stat::constructEntryValues($itemtype, "inter_total", $date1, $date2, $type, $value[$i]["id"], $value2);
             $nb_opened = array_sum($opened);
             echo PluginMobileSearch::showItem($output_type, $nb_opened, $item_num, $row_num, '', 3);
             $export_data['opened'][$value[$i]['link']] = $nb_opened;
             //le nombre d'intervention resolues - the number of resolved intervention
             $solved = Stat::constructEntryValues($itemtype, "inter_solved", $date1, $date2, $type, $value[$i]["id"], $value2);
             $nb_solved = array_sum($solved);
             echo PluginMobileSearch::showItem($output_type, $nb_solved, $item_num, $row_num, '', 3);
             $export_data['solved'][$value[$i]['link']] = $nb_solved;
             //dados chamados
             //Le temps moyen de resolution - The average time to resolv
             /*          
                         $data=Stat::constructEntryValues($itemtype,"inter_avgsolvedtime",$date1,$date2,$type,$value[$i]["id"],$value2);
                         foreach ($data as $key2 => $val2) {
                            $data[$key2]*=$solved[$key2];
                         }
                         if ($nb_solved>0) {
                            $nb=array_sum($data)/$nb_solved;
                         } else {
                            $nb=0;
                         }
                         $timedisplay = $nb*HOUR_TIMESTAMP;
                         if ($output_type==Search::HTML_OUTPUT
                            || $output_type==Search::PDF_OUTPUT_LANDSCAPE
                            || $output_type==Search::PDF_OUTPUT_PORTRAIT) {
                            $timedisplay=mobileTimestampToString($timedisplay,0);
                         }
                         echo PluginMobileSearch::showItem($output_type,$timedisplay,$item_num,$row_num, '', 7);
             
//.........这里部分代码省略.........
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:101,代码来源:stat.class.php

示例3: array

$values['opensatisfaction'] = Stat::constructEntryValues("inter_opensatisfaction", $_REQUEST["date1"], $_REQUEST["date2"]);
$values['answersatisfaction'] = Stat::constructEntryValues("inter_answersatisfaction", $_REQUEST["date1"], $_REQUEST["date2"]);
$available = array('opensatisfaction' => $LANG['satisfaction'][13], 'answersatisfaction' => $LANG['satisfaction'][14]);
echo "<div class='center'>";
foreach ($available as $key => $name) {
    echo "<input type='checkbox' onchange='submit()' name='graph[{$key}]' " . ($show_all || isset($_REQUEST['graph'][$key]) ? "checked" : "") . "> " . $name . "&nbsp;";
}
echo "</div>";
$toprint = array();
foreach ($available as $key => $name) {
    if ($show_all || isset($_REQUEST['graph'][$key])) {
        $toprint[$name] = $values[$key];
    }
}
Stat::showGraph($toprint, array('title' => $LANG['satisfaction'][3], 'showtotal' => 1, 'unit' => $LANG['stats'][35]));
$values['avgsatisfaction'] = Stat::constructEntryValues("inter_avgsatisfaction", $_REQUEST["date1"], $_REQUEST["date2"]);
$available = array('avgsatisfaction' => $LANG['satisfaction'][7]);
echo "<div class='center'>";
foreach ($available as $key => $name) {
    echo "<input type='checkbox' onchange='submit()' name='graph[{$key}]' " . ($show_all || isset($_REQUEST['graph'][$key]) ? "checked" : "") . "> " . $name . "&nbsp;";
}
echo "</div>";
$toprint = array();
foreach ($available as $key => $name) {
    if ($show_all || isset($_REQUEST['graph'][$key])) {
        $toprint[$name] = $values[$key];
    }
}
Stat::showGraph($toprint, array('title' => $LANG['satisfaction'][7]));
echo "</form>";
commonFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:stat.global.php

示例4: preg_replace

    }
}
if (!empty($_POST["date1"]) && !empty($_POST["date2"]) && strcmp($_POST["date2"], $_POST["date1"]) < 0) {
    $tmp = $_POST["date1"];
    $_POST["date1"] = $_POST["date2"];
    $_POST["date2"] = $tmp;
}
$itemtype = "Ticket";
PluginMobileStat::getVal($val1, $val2, $next, $prev, $title);
echo "<div data-role='content'>";
$target = preg_replace("/&/", "&amp;", $_SERVER["REQUEST_URI"]);
PluginMobileStat::showDateSelector($target);
///////// Stats nombre intervention
// Total des interventions
$entrees_total = PluginMobileStat::constructEntryValues($itemtype, "inter_total", $_POST["date1"], $_POST["date2"], $_GET["type"], $val1, $val2);
PluginMobileStat::showGraph(array($LANG['stats'][5] => $entrees_total), array('title' => $LANG['stats'][5], 'showtotal' => 1, 'unit' => $LANG['stats'][35]));
// Total des interventions resolues
$entrees_solved = Stat::constructEntryValues($itemtype, "inter_solved", $_POST["date1"], $_POST["date2"], $_GET["type"], $val1, $val2);
PluginMobileStat::showGraph(array($LANG['stats'][11] => $entrees_solved), array('title' => $LANG['stats'][11], 'showtotal' => 1, 'unit' => $LANG['stats'][35]));
//Temps moyen de resolution d'intervention
$entrees_avgsolvedtime = Stat::constructEntryValues($itemtype, "inter_avgsolvedtime", $_POST["date1"], $_POST["date2"], $_GET["type"], $val1, $val2);
PluginMobileStat::showGraph(array($LANG['stats'][6] => $entrees_avgsolvedtime), array('title' => $LANG['stats'][6], 'unit' => $LANG['job'][21]));
//Temps moyen d'intervention reel
$entrees_avgrealtime = Stat::constructEntryValues($itemtype, "inter_avgrealtime", $_POST["date1"], $_POST["date2"], $_GET["type"], $val1, $val2);
PluginMobileStat::showGraph(array($LANG['stats'][25] => $entrees_avgrealtime), array('title' => $LANG['stats'][25], 'unit' => $LANG['job'][21]));
//Temps moyen de prise en compte de l'intervention
$entrees_avgtaketime = Stat::constructEntryValues($itemtype, "inter_avgtakeaccount", $_POST["date1"], $_POST["date2"], $_GET["type"], $val1, $val2);
PluginMobileStat::showGraph(array($LANG['stats'][30] => $entrees_avgtaketime), array('title' => $LANG['stats'][30], 'unit' => $LANG['job'][21]));
PluginMobileStat::displayFooterNavBar2($val1, $val2, $next, $prev, $title);
echo "</div>";
$common->displayFooter();
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:31,代码来源:stat.graph.php


注:本文中的Stat::constructEntryValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。