• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_stats函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_stats函数的典型用法代码示例。如果您正苦于以下问题:PHP get_stats函数的具体用法?PHP get_stats怎么用?PHP get_stats使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: generate_image

function generate_image($lang, $idx)
{
    global $LANGUAGES;
    $up_to_date = get_stats($idx, $lang, 'uptodate');
    $up_to_date = $up_to_date[0];
    //
    $outdated = @get_stats($idx, $lang, 'outdated');
    $outdated = $outdated[0];
    //
    $missing = get_stats($idx, $lang, 'notrans');
    $missing = $missing[0];
    //
    $no_tag = @get_stats($idx, $lang, 'norev');
    $no_tag = $no_tag[0];
    $data = array($up_to_date, $outdated, $missing, $no_tag);
    $percent = array();
    $total = array_sum($data);
    // Total ammount in EN manual (to calculate percentage values)
    $total_files_lang = $total - $missing;
    // Total ammount of files in translation
    foreach ($data as $value) {
        $percent[] = round($value * 100 / $total);
    }
    $legend = array($percent[0] . '%% up to date (' . $up_to_date . ')', $percent[1] . '%% outdated (' . $outdated . ')', $percent[2] . '%% missing (' . $missing . ')', $percent[3] . '%% without EN-Revision (' . $no_tag . ')');
    $title = 'Details for ' . $LANGUAGES[$lang] . ' PHP Manual';
    $graph = new PieGraph(530, 300);
    $graph->SetShadow();
    $graph->title->Set($title);
    $graph->title->Align('left');
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->legend->Pos(0.02, 0.18, "right", "center");
    $graph->subtitle->Set('(Total: ' . $total_files_lang . ' files)');
    $graph->subtitle->Align('left');
    $graph->subtitle->SetColor('darkred');
    $t1 = new Text(date('m/d/Y'));
    $t1->SetPos(522, 294);
    $t1->SetFont(FF_FONT1, FS_NORMAL);
    $t1->Align("right", 'bottom');
    $t1->SetColor("black");
    $graph->AddText($t1);
    $p1 = new PiePlot3D($data);
    $p1->SetSliceColors(array("#68d888", "#ff6347", "#dcdcdc", "#f4a460"));
    if ($total_files_lang != $up_to_date) {
        $p1->ExplodeAll();
    }
    $p1->SetCenter(0.35, 0.55);
    $p1->value->Show(false);
    $p1->SetLegends($legend);
    $graph->Add($p1);
    $graph->Stroke("../www/images/revcheck/info_revcheck_php_{$lang}.png");
}
开发者ID:phpsource,项目名称:web-doc,代码行数:51,代码来源:gen_picture_info.php


示例2: site_stats

function site_stats($site_name)
{
    global $lang, $config;
    if ($config['generate_statistics']) {
        $ga = new gapi($config['ga_email'], $config['ga_password']);
        //get profile ids
        $ga->requestAccountData();
        foreach ($ga->getResults() as $result) {
            $config[filename((string) $result)]['profile_id'] = $result->getProfileId();
        }
        if (isset($config[$site_name]['profile_id'])) {
            $profile_id = $config[$site_name]['profile_id'];
            //current week visits
            $arr['visits'] = get_visits($ga, $profile_id, $config['from'], $config['to']);
            $arr['prior_visits'] = get_visits($ga, $profile_id, $config['prior_from'], $config['prior_to']);
            $arr['st'] = get_stats($arr['visits'], $arr['prior_visits']);
            $arr['image_path'] = generate_image($lang[$site_name], $arr['visits']);
            $arr['image_name'] = basename($arr['image_path']);
            return $arr;
        }
    }
}
开发者ID:songokas,项目名称:manovalstybe_rss,代码行数:22,代码来源:rss.php


示例3: DAMAGES

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.
*/
header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT");
header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
// HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");
// HTTP/1.0
require_once "guiconfig.inc";
require_once "system.inc";
include_once "includes/functions.inc.php";
echo get_stats();
开发者ID:Toudix,项目名称:core,代码行数:29,代码来源:getstats.php


示例4: get_xhr

 function get_xhr()
 {
     echo json_encode(get_stats());
 }
开发者ID:naozone,项目名称:phx,代码行数:4,代码来源:stats_handler.php


示例5: error_reporting

<?php

error_reporting(E_ALL);
require_once 'fuu.php';
if (isset($_GET['play'])) {
    $id = (int) $_GET['play'];
    increase_nb_play($id);
    play_insult($id);
}
$insult = get_random_insult();
$stats = get_stats();
increase_nb_view($insult['id']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
    <title>Fuu</title>

    <style type="text/css">

      body { 
      background-color: #303030;
      font-family: 'Lucida Grande',sans-serif;
      line-height: 1.5;
      font-size: 0.75em;
      color: #C0C0C0;
      text-align: center;
      }

      #wrapper { 
开发者ID:aimxhaisse,项目名称:fuu,代码行数:31,代码来源:index.php


示例6: get_stats

?>
                        <form action="index.php">
                            <input type="submit" value="back to home" class="btn btn-primary">
                        </form>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="exercises">
                        <h2>Exercises</h2>
                        <ul>
                            <li><a href="llquiz.php">Drug identification</a></li>
                            <li><a href="laskuquiz.php">Drug calculations</a></li>
                            <li><a href="conversionquiz.php">Unit conversions</a></li>
                            <li><a href="examquiz.php">Exam</a></li>
                        </ul>
                    </div>
                    <h2>Statistics</h2>
                    <?php 
get_stats($_SESSION['login_user'], 0);
?>
                </div>
            </div>
        </div>
    </div>
</div>

    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/scripts.js"></script>
  </body>
</html>
开发者ID:jannehakala,项目名称:catastrophic_games,代码行数:31,代码来源:resultview.php


示例7: get

 function get()
 {
     $stats = get_stats();
     include "views/dashboard.php";
 }
开发者ID:sintoris,项目名称:Known,代码行数:5,代码来源:dashboard_handler.php


示例8: iterkeys

function iterkeys($fp, $dumpmode = DUMPMODE_ONLYKEYS)
{
    $slabs = slabs_stats($fp);
    $stats = get_stats($fp, 'stats');
    ksort($slabs);
    printf("      %-40s %20s %10s %8s" . PHP_EOL, 'Key', 'Expire status', 'Size', 'Waste');
    foreach ($slabs as $num => $slab) {
        if ($num == 'total') {
            continue;
        }
        if ($slab['number']) {
            $lines = send_and_receive($fp, "stats cachedump {$num} {$slab['number']}");
            foreach ($lines as $line) {
                $m = array();
                if (preg_match('/^ITEM ([^\\s]+) \\[(\\d+) b; (\\d+) s\\]/', $line, $m)) {
                    $key = $m[1];
                    $size = $m[2];
                    $now = time();
                    $waste = (1.0 - (double) $size / $slab['chunk_size']) * 100;
                    $expiration_time = $m[3];
                    if ($expiration_time == $stats['time'] - $stats['uptime']) {
                        $status = '[never expire]';
                    } elseif ($now > $expiration_time) {
                        $status = '[expired]';
                    } else {
                        $status = $expiration_time - $now . 's left';
                    }
                    printf("ITEM  %-40s %20s %10s %7.0f%%" . PHP_EOL, $key, $status, $size, $waste);
                    // Get value
                    if ($dumpmode == DUMPMODE_KEYVALUES && $status != '[expired]') {
                        $lines = send_and_receive($fp, "get {$key}");
                        if (count($lines)) {
                            $info = $lines[0];
                            $data = $lines[1];
                            preg_match('/^VALUE ([^\\s]+) (\\d+) (\\d+)/', $info, $m);
                            $flags = $m[2];
                            printf("VALUE %-40s flags=%X" . PHP_EOL, $key, $flags);
                            printf("%s" . PHP_EOL, $data);
                        }
                    }
                    // Get value
                    if ($dumpmode == REMOVEMODE_EXPIRED && $status == '[expired]') {
                        $lines = send_and_receive($fp, "get {$key}");
                    }
                }
            }
        }
    }
}
开发者ID:arturmartins,项目名称:memcached-itool,代码行数:49,代码来源:memcached-itool.php


示例9: get_input

<?php

namespace hypeJunction\Interactions;

$comment_guid = get_input('guid');
$comment = get_entity($comment_guid);
/* @var Comment $comment */
if ($comment instanceof Comment && $comment->canEdit()) {
    $entity = $comment->getContainerEntity();
    if ($comment->delete()) {
        if (elgg_is_xhr()) {
            $output = array('guid' => $comment_guid, 'stats' => get_stats($entity));
            echo json_encode($output);
        }
        system_message(elgg_echo('generic_comment:deleted'));
    } else {
        register_error(elgg_echo('generic_comment:notdeleted'));
    }
} else {
    register_error(elgg_echo('generic_comment:notfound'));
}
forward(REFERER);
开发者ID:hypejunction,项目名称:hypeinteractions,代码行数:22,代码来源:delete.php


示例10: str_replace

    echo "Profile Url: {$profileUrl}\n";
    $portraitName = str_replace("http://cdn.dota2.com/apps/dota2/images/heroes/", "", $portraitUrl);
    $portraitArray[$hero] = $portraitName;
    echo "\n";
    foreach ($abilities as $ability) {
        $abilityNameNode = $xPath->evaluate($xpath_query['abilityName'], $ability);
        $abilityNameString = $abilityNameNode->item(0)->nodeValue;
        $abilityDescriptionNode = $xPath->evaluate($xpath_query['abilityDescription'], $ability);
        $abilityDescriptionString = $abilityDescriptionNode->item(0)->nodeValue;
        $abilityArray[$abilityNameString]['Description'] = array($abilityDescriptionString);
        // We can use this array shit to add other things like Mana Cost and numbers
    }
    $heroBio = $xPath->query($xpath_query['heroBio']);
    $heroBioString = trim($heroBio->item(0)->nodeValue);
    $stats = array();
    $stats = get_stats($xPath);
    $outputArray[$hero]['abilities'] = $abilityArray;
    $outputArray[$hero]['bio'] = $heroBioString;
    $outputArray[$hero]['stats'] = $stats;
}
$outputJson = json_encode($outputArray);
$portraitJson = json_encode($portraitArray);
$fp = fopen(DOCUMENT_ROOT . "resources/heroes.json", "w");
$retVal = fwrite($fp, $outputJson);
fclose($fp);
$portFp = fopen(DOCUMENT_ROOT . "resources/portrait.json", "w");
$retVal = fwrite($portFp, $portraitJson);
function get_stats($xPath)
{
    global $xpath_query;
    $attributeArray = array("str", "int", "agi");
开发者ID:Pioneer11X,项目名称:Dota-2-Wiki-Crawler,代码行数:31,代码来源:get_data.php


示例11: create_summary

function create_summary(&$project_table)
{
    global $xml_array_g, $current_session_g;
    # Present executive summary of all issues.  Project table is passed by reference
    print "\n<br /><br /><div id='pageTitle'>Quality Assurance Executive Summary: <strong>" . $current_session_g['project'] . "</strong> Activity for past 30 days</div><center><br />" . "<table border=0 width=300 cellpadding=3 cellspacing=2>\n";
    parse_xml_file(CT_XML_BUGS_FILE, CT_DROP_HISTORY, "PROJECT", CT_ASCENDING);
    $bug_table =& $xml_array_g;
    # Copy by reference, so don't call parse_xml_file again
    $bug_severity = explode(",", CT_BUG_SEVERITIES);
    $bug_status = explode(",", CT_BUG_STATUSES);
    $stats["change_requests_created"] = 0;
    $stats["change_requests_closed"] = 0;
    $stats["change_requests_deferred"] = 0;
    $stats["defect_reports_created"] = 0;
    $stats["defect_reports_closed"] = 0;
    $stats["defects_deferred"] = 0;
    $stats["average_lifespan_of_change_requests"] = 0;
    $mean_cnt["average_lifespan_of_defects"] = 0;
    $stats["average_lifespan_of_defects"] = 0;
    $mean_cnt["average_lifespan_of_change_requests"] = 0;
    foreach ($bug_table as $bug) {
        if ($bug["Project"] != $current_session_g["project"]) {
            continue;
        }
        if (isset($bug["Delete_Bug"])) {
            continue;
        }
        if (strtotime($bug["Submit_Time"]) >= strtotime("-30 days") and strtotime($bug["Submit_Time"]) <= strtotime("now")) {
            if (strstr($bug["Severity"], "Change Req")) {
                $stats["change_requests_created"]++;
            } else {
                $stats["defect_reports_created"]++;
            }
        }
        if (strtotime($bug["Last_Updated"]) >= strtotime("-30 days") and strtotime($bug["Last_Updated"]) <= strtotime("now")) {
            if (strstr($bug["Status"], "Closed")) {
                if (strstr($bug["Severity"], "Change Req")) {
                    $stats["change_requests_closed"]++;
                    $stats["average_lifespan_of_change_requests"] += strtotime($bug["Last_Updated"]) - strtotime($bug["Submit_Time"]);
                    $mean_cnt["average_lifespan_of_change_requests"]++;
                } else {
                    $stats["defect_reports_closed"]++;
                    $stats["average_lifespan_of_defects"] += strtotime($bug["Last_Updated"]) - strtotime($bug["Submit_Time"]);
                    $mean_cnt["average_lifespan_of_defects"]++;
                }
            } elseif (strstr($bug["Status"], "Deferred")) {
                if (strstr($bug["Severity"], "Change Req")) {
                    $stats["change_requests_deferred"]++;
                } else {
                    $stats["defects_deferred"]++;
                }
            }
        }
    }
    print "<tr><td colspan=2 align=left class='rowEven2'><b>" . $current_session_g['project'] . "</b></td></tr>\n";
    $rows = 0;
    foreach ($stats as $stat => $value) {
        if ($mean_cnt[$stat] != 0) {
            print "<tr><td align=right class='" . ($rows % 2 ? "rowOdd" : "rowEven") . "'>" . ucwords(strtr($stat, "_", " ")) . "</td><td class='" . ($rows++ % 2 ? "rowOdd" : "rowEven") . "'>" . (strstr($stat, "lifespan") ? get_stats($value / $mean_cnt[$stat]) : $value) . "</td></tr>\n";
        }
    }
    print "</table>\n</center><br /><br />";
}
开发者ID:nfultz,项目名称:codetrack,代码行数:63,代码来源:codetrack.php


示例12: forward

    forward(REFERER);
}
if (elgg_is_active_plugin('hypeAttachments')) {
    hypeapps_attach_uploaded_files($comment, 'uploads', ['origin' => 'comment', 'container_guid' => $comment->guid, 'access_id' => $comment->access_id]);
}
if ($new_comment) {
    if ($entity->owner_guid != $poster->guid) {
        // Send a notification to the content owner
        $recipient = $entity->getOwnerEntity();
        $language = $recipient->language;
        $messages = (new NotificationFormatter($comment, $recipient, $language))->prepare();
        notify_user($recipient->guid, $poster->guid, $messages->subject, $messages->body, array('object' => $comment, 'action' => 'create', 'summary' => $messages->summary));
    }
    // Add to river
    elgg_create_river_item(array('view' => 'river/object/comment/create', 'action_type' => 'create', 'subject_guid' => $poster->guid, 'object_guid' => $comment->guid, 'target_guid' => $entity->guid));
}
if (elgg_is_xhr()) {
    elgg_push_context('comments');
    if ($comment_guid) {
        // editing a comment
        $view = elgg_view_entity($comment, ['full_view' => true]);
    } else {
        // new comment
        $view = elgg_view('framework/interactions/comments', array('entity' => $entity, 'comment' => $comment));
    }
    $output = array('guid' => $entity->guid, 'view' => $view, 'stats' => get_stats($entity));
    echo json_encode($output);
    elgg_pop_context();
}
system_message(elgg_echo('generic_comment:posted'));
forward($comment->getURL());
开发者ID:hypejunction,项目名称:hypeinteractions,代码行数:31,代码来源:save.php


示例13: array

    $stats = array('*sum' => $first);
    foreach (file($file) as $line) {
        //r5887 | buildmob | 2011-08-23 13:08:25 -0700 (Tue, 23 Aug 2011) | 4 lines
        if (count(list($r, $u, $d, $n) = explode(' | ', $line)) < 4) {
            continue;
        }
        if ($stats[$u]) {
            $stats[$u]['commits']++;
            $stats[$u]['lines'] += (int) $n;
            $stats['*sum']['commits']++;
            $stats['*sum']['lines'] += (int) $n;
        } else {
            $stats[$u] = $first;
        }
    }
    return $stats;
}
function print_stats(array $stats, $sortby)
{
    print "users    commits  commit%  lines    line%  (sorted by {$sortby})\n";
    print "-------  -------  -------  -----  -------\n";
    uasort($stats, function ($a, $b) use($sortby) {
        return $b[$sortby] - $a[$sortby];
    });
    foreach ($stats as $user => $stat) {
        printf("% -10s% 6d% 8.1f%%% 7d% 8.1f%%\n", $user, $stat['commits'], $stat['commits'] / $stats['*sum']['commits'] * 100, $stat['lines'], $stat['lines'] / $stats['*sum']['lines'] * 100);
    }
    print "\n";
}
print_stats(get_stats('php://stdin'), $argc > 1 ? 'lines' : 'commits');
开发者ID:planetminguez,项目名称:shell,代码行数:30,代码来源:svn-stats.php


示例14: write_header

    echo VERSION;
    ?>
</i><br>
<i><a href="http://www.amule-project.net/">http://www.amule-project.net/</a></i><br>
<i>&lt;uberpenguin at hotpop dot com&gt;</i>

</body>
</html>
<?php 
}
/**
 * Write out the stats to the browser. I will probably change this later on
 * to be themable, but for now I lack the motivation...
 */
write_header();
$ret = get_stats();
if (!$ret) {
    echo $text["sigfileerr"];
} else {
    // html strings that are used over and over
    $nastring = "\t\t\t\t\t<td class=\"organize\">" . $text["na"] . "</td>\n\t\t\t\t</tr>\n";
    $titlecolstart = "\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"organize\">";
    $titlecolend = "</td>\n";
    $datacolstart = "\t\t\t\t\t<td class=\"organize\">";
    $datacolend = "</td>\n\t\t\t\t</tr>\n";
    $sectiontablestart = "\t<table class=\"sec\">\n\t\t" . "<tr class=\"secheader\">\n\t\t\t<td class=\"secheader\">";
    $sectiontablenext = "</td>\n\t\t</tr>\n";
    $sectionend = "\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t</table>" . "\n\t<p>\n";
    $innertable = "\t\t<tr class=\"secbody\">\n\t\t\t" . "<td class=\"secbody\">\n";
    $organizetable = "\t\t\t<table class=\"organize\">\n";
    // title
开发者ID:hajuuk,项目名称:R7000,代码行数:31,代码来源:index.php


示例15: get_lang

</style>

<div id="cev_results_header" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
	
<div id="cev_results" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
    <div class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"><?php 
echo get_lang('Statistics');
?>
</div><br />
    <div id="cev_cont_stats">
	

	
 <?php 
if ($result_to_print != "") {
    $rst = get_stats($user_id, $course_code);
    $foo_stats = '<strong>' . get_lang('Total') . ': </strong>' . $rst['total'] . '<br />';
    $foo_stats .= '<strong>' . get_lang('Average') . ': </strong>' . $rst['avg'] . '<br />';
    $foo_stats .= '<strong>' . get_lang('Quantity') . ' : </strong>' . $rst['times'] . '<br />';
    echo $foo_stats;
} else {
    echo Display::display_warning_message(get_lang('NoDataAvailable'));
}
echo '<p> Estadisticas de usuario no.: ' . $user_id . ' curso`: ' . $course_code . '</p>';
//// Conexi�n a la BD e inserci�n de datos //////////////////////
$enlace = mysql_connect('localhost', 'siec', 'siec2013');
if (!$enlace) {
    die('No pudo conectarse: ' . mysql_error());
}
mysql_select_db(siec) or die("Cannot select database!<br>" . mysql_error());
$fecha1 = $_GET['fecha1'];
开发者ID:axomar,项目名称:ITS,代码行数:31,代码来源:statistics_details.php


示例16: print_r

<?php

include "header.php";
include "drugdbinit.php";
?>
            <div id="right">
                <div id="content">
                    <h2>Your stats</h2>                    
                       <?php 
print_r(get_stats($_SESSION['login_user'], 1));
tee_graafi();
echo '<div id="curve_chart" style="width: 900px; height: 500px; float: right" float:right></div>';
?>
      

					</script>					   
                </div >
            </div>
        </div>
    </div>
</body>
</html>
<?php 
function tee_graafi()
{
    echo '   <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load("current", {"packages":["corechart"]});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
开发者ID:jannehakala,项目名称:catastrophic_games,代码行数:31,代码来源:statistics.php


示例17: while

    while ($row = $result->fetch_assoc()) {
        $endpoints[] = $row;
    }
} else {
    printf("error: %s\n", $mysqli->error);
}
$insertquery = "insert into fbpagestats(statname, endtime, stats, title, displaydate) values (?, ?, ?, ?,?)";
if ($stmt = $mysqli->prepare($insertquery)) {
    $stmt->bind_param("ssiss", $statname, $endtime, $stats, $title, $displaydate);
    $mysqli->query("start");
} else {
    printf("error: %s\n", $mysqli->error);
}
foreach ($endpoints as $endpointarray) {
    $endpoint = $endpointarray["endpoint"];
    $stats = get_stats($endpoint, $api_key, $sincedate, $untildate);
    $statarray = json_decode($stats, true);
    foreach ($statarray["data"] as $dataarray) {
        $statname = $dataarray["name"];
        $title = $dataarray["title"];
        foreach ($dataarray["values"] as $statvalue) {
            $stats = $statvalue["value"];
            $endtime = date("Y-m-d H:i:s", strtotime($statvalue["end_time"]));
            $displaydate = date("Y-m-d", strtotime("-1 day", strtotime($statvalue["end_time"])));
            $stmt->execute();
            printf("\ndate %s: stat %s: %s. display as %s.\n", $endtime, $title, $stats, $displaydate);
        }
    }
}
$stmt->close();
$mysqli->query("done");
开发者ID:noelleli,项目名称:documentation,代码行数:31,代码来源:fbpages.php


示例18: array

require '_login.php';
require_once '../conn.php';
$filters = array();
$filters["id_vendedor"] = isset($_POST["filtro-vendedor"]) ? $_POST["filtro-vendedor"] : "";
$filters["type"] = "POSTVENTA";
$oE = new Encuesta();
if (isset($_POST["delete_encuesta"])) {
    $oE->delete($_POST["delete_encuesta"]);
}
$oV = new Vendedor();
$aVendedores = $oV->getVendedores();
$temp = $oE->getAll($filters);
$oE->processStats($filters);
$data = get_stats();
$data_1 = get_stats("resp0001");
$data_7 = get_stats("resp0007");
?>

<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Estadísticas</title>

		<script type="text/javascript" src="external/js/jquery.min.js"></script>
		<script type="text/javascript" src="../assets/js/bootstrap.js"></script>
		<style type="text/css">
${demo.css}
		</style>
		<script type="text/javascript">
$(function () {
开发者ID:pgt7,项目名称:enc,代码行数:31,代码来源:statsgrals-post.php


示例19: row

function row($stat_name, $max_review_no = 0, $title = "")
{
    global $vars;
    global $gather_passes;
    if ($max_review_no >= $gather_passes) {
        print "Can't make row: passes count exceeded for {$stat_name}";
    }
    $title = empty($title) ? $stat_name : $title . " rate";
    printf("%1\$-40s", $title);
    for ($i = 0; $i <= $max_review_no; $i++) {
        print fancy($stat_name, $i) . "\t";
    }
    print "\n";
}
//Obtain live statistics from MySQL server
$vars = get_stats();
// ***** REPORT *****
print "=========================\n";
print "Details and explanations:\nhttp://astellar.com/mysql-health-check/metrics/\n";
print "=========================\n";
printf("%1\$-40s", "Per second averages:");
print "Uptime\tLive#1\tLive#2\n";
print "== Load ==\n";
printf("%1\$-40s", "Questions:");
print fancy("Questions") . "\t" . fancy("Questions", 1) . "\t" . fancy("Questions", 2) . "\n";
printf("%1\$-40s", "Queries:");
print fancy("Queries") . "\t" . fancy("Queries", 1) . "\t" . fancy("Queries", 2) . "\n";
print "== Rates ==\n";
printf("%1\$-40s", "Select rate:");
print fancy("Com_select") . "\t" . fancy("Com_select", 1) . "\t" . fancy("Com_select", 2) . "\n";
printf("%1\$-40s", "Insert rate:");
开发者ID:legobillyjoe,项目名称:mysql-health-check,代码行数:31,代码来源:counters_report.php


示例20: get_lang

$form->addElement('text', 'from', get_lang('From'), array('id' => 'date_from'));
$form->addElement('text', 'to', get_lang('Until'), array('id' => 'date_to'));
$form->addElement('style_submit_button', 'reset', get_lang('Reset'), array('onclick' => "javascript:window.location='access_details.php?course=" . $courseId . "&student=" . $user_id . "&cidReq=" . $course_code . "';"));
$form->display();
?>
<div id="cev_results_header" class="ui-tabs ui-widget ui-widget-content ui-corner-all">

<div id="cev_results" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
    <div class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"><?php 
echo get_lang('Statistics');
?>
</div><br />
    <div id="cev_cont_stats">
        <?php 
if ($result_to_print != "") {
    $rst = get_stats($user_id, $courseId);
    $foo_stats = '<strong>' . get_lang('Total') . ': </strong>' . $rst['total'] . '<br />';
    $foo_stats .= '<strong>' . get_lang('Average') . ': </strong>' . $rst['avg'] . '<br />';
    $foo_stats .= '<strong>' . get_lang('Quantity') . ' : </strong>' . $rst['times'] . '<br />';
    echo $foo_stats;
} else {
    echo Display::display_warning_message(get_lang('NoDataAvailable'));
}
?>
    </div><br />
</div><br />

<div id="container-9">
    <ul>
        <li><a href="<?php 
echo api_get_path(WEB_AJAX_PATH) . 'myspace.ajax.php?a=access_detail&type=day&course=' . $courseId . '&student=' . $user_id;
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:access_details.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_status函数代码示例发布时间:2022-05-15
下一篇:
PHP get_staticroutes函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap