コード例 #1
0
ファイル: main.php プロジェクト: jaranvil/CraftNanny
     $xmlRoot->appendChild(checkForUserVote($dbconn, $xmlDoc, $_REQUEST['post_id'], $_REQUEST['user_id']));
     break;
 case "addComment":
     $xmlRoot->appendChild(addComment($dbconn, $xmlDoc, $_REQUEST['user_id'], $_REQUEST['post_id'], $_REQUEST['comment']));
     break;
 case "getComments":
     $xmlRoot->appendChild(getComments($dbconn, $xmlDoc, $_REQUEST['post_id']));
     break;
 case "addNewUser":
     $xmlRoot->appendChild(addNewUser($dbconn, $xmlDoc, $_REQUEST['username'], $_REQUEST['password'], $_REQUEST['email']));
     break;
 case "signIn":
     $xmlRoot->appendChild(signIn($dbconn, $xmlDoc, $_REQUEST['username'], $_REQUEST['password']));
     break;
 case "getConnections":
     $xmlRoot->appendChild(getConnections($dbconn, $xmlDoc, $_REQUEST['user_id'], $_REQUEST['module_type']));
     break;
 case "logs":
     $xmlRoot->appendChild(getLogs($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "getPlayerData":
     $xmlRoot->appendChild(getPlayerData($dbconn, $xmlDoc, $_REQUEST['ign'], $_REQUEST['token']));
     break;
 case "getUser":
     $xmlRoot->appendChild(getUser($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "load_redstone_controls":
     $xmlRoot->appendChild(loadRedstoneControls($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "setRedstoneOutput":
     $xmlRoot->appendChild(setRedstoneOutput($dbconn, $xmlDoc, $_REQUEST['token'], $_REQUEST['side'], $_REQUEST['value'], $_REQUEST['val_type']));
コード例 #2
0
?>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-lg-12 text-center">
          <div class="panel panel-default">
            <div class="panel-heading"><strong>Datanodes</strong></div>
            <div class="panel-body">
              <?php 
foreach ($arrDBConns as $key => $value) {
    if (strtolower($value['DBXLNode']) == 'datanode') {
        $strPanelColor = 'success';
        // check the number of connections
        $intConnections = getConnections($key);
        $intMaxConnections = getDBSystemParam($key, 'max_connections');
        if ($intMaxConnections >= $intConnections && $intMaxConnections > 0) {
            $perConnections = round($intConnections / $intMaxConnections * 100, 0);
        } else {
            $intConnections = '?';
            $intMaxConnections = '?';
            $perConnections = '???';
            $strPanelColor = 'warning';
        }
        // display number of deadlocks
        $intDeadlocks = getDeadlocks($key);
        if ($intDeadlocks != '0') {
            $strPanelColor = 'warning';
        }
        // try to ping the server
コード例 #3
0
ファイル: connectionView.php プロジェクト: kondrats/Pagetest
<?php

header("Content-type: image/png");
include 'common.inc';
include 'object_detail.inc';
include 'contentColors.inc';
include 'connectionView.inc';
include 'page_data.inc';
$pageData = loadPageRunData($testPath, $run, $cached);
$mime = $_GET['mime'];
// get all of the requests
$secure = false;
$haveLocations = false;
$requests = getRequests($id, $testPath, $run, $cached, $secure, $haveLocations, false);
$mimeColors = requestColors($requests);
$summary = array();
$connections = getConnections($requests, $summary);
$options = array('id' => $id, 'path' => $testPath, 'run' => $run, 'cached' => $cached, 'cpu' => true, 'bw' => true);
$im = drawImage($connections, $summary, $url, $mime, $mimeColors, false, $pageData, $options);
// spit the image out to the browser
imagepng($im);
imagedestroy($im);
コード例 #4
0
    echo $strNode;
    ?>
<small><?php 
    echo $arrDBConns[$strNode]['DBIP'];
    ?>
</small></h1>
        </div>
      </div>
      <div class="row">
        <div class="col-sm-4 text-center">
          <div class="row">
            <div class="col-sm-12">
              <h4>Health</h4>
              <?php 
    // check the number of connections
    $intConnections = getConnections($strNode);
    $intMaxConnections = getDBSystemParam($strNode, 'max_connections');
    $strPanelColor = 'success';
    if ($intMaxConnections >= $intConnections && $intMaxConnections > 0) {
        $perConnections = round($intConnections / $intMaxConnections * 100, 0);
    } else {
        $perConnections = '???';
        $strPanelColor = 'warning';
    }
    // display number of deadlocks
    $intDeadlocks = getDeadlocks($strNode);
    if ($intDeadlocks != '0') {
        $strPanelColor = 'warning';
    }
    // try to ping the server
    if (testPing($value['DBIP'])) {