示例#1
0
$system_stats = load_overall_stats_system();
?>
      <tbody>
      <?php 
foreach ($system_stats as $so) {
    $so_system->AddStats($so);
    _stats_overall_table_row($so, 'system-action-menu', true);
}
?>
      </tbody>
      <tfoot>
      <?php 
_stats_overall_table_row($so_system, null, true);
unset($system_stats);
$so_total = new StatsOverall(array('domain' => 'Grand Total'));
$so_total->AddStats($so_trades);
$so_total->AddStats($so_system);
_stats_overall_table_row($so_total, null, true);
?>
      </tfoot>
    </table>
    <!-- SYSTEM TRADE STATS END -->



    <!-- TOOLBAR START -->
    <div id="toolbar">
      <div id="toolbar-content">
        <div id="toolbar-icons">
          <a href="_xTradesAddShow" class="dialog" title="Add Trade"><img src="images/add-32x32.png" border="0" /></a>
          <img src="images/toolbar-separator-2x32.png"/>
示例#2
0
$so_total = new StatsOverall(array('domain' => 'Network Totals'));
$db->AddFilter('owner', $_REQUEST['owner']);
$db->AddFilter('category', $_REQUEST['category']);
foreach ($db->RetrieveAll() as $site) {
    if (!$site['flag_stats']) {
        continue;
    }
    if (isset($cache[$site['domain']]) && $cache[$site['domain']]['timestamp'] >= time() - 300) {
        $so = $cache[$site['domain']]['so'];
    } else {
        $all_cached = false;
        $so = new StatsOverall($site);
        $so->SetUnknown();
    }
    _stats_network_table_row($so, $site);
    $so_total->AddStats($so);
}
?>
      </tbody>
      <tfoot>
      <?php 
if (!$all_cached) {
    $so_total->SetUnknown();
}
_stats_network_table_row($so_total, null, null);
?>
      </tfoot>
    </table>
    <!-- NETWORK STATS END -->

示例#3
0
文件: xhr.php 项目: hackingman/TradeX
function _xNetworkStatsTotalGet()
{
    require_once 'stats.php';
    $so_total = new StatsOverall(array('domain' => 'Network Totals'));
    $cache = unserialize(file_get_contents(FILE_NETWORK_SITES_CACHE));
    if (is_array($cache)) {
        foreach ($cache as $domain => $data) {
            $so_total->AddStats($data['so']);
        }
    }
    JSON::Success(array('response' => $so_total));
}