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

PHP getStats函数代码示例

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

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



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

示例1: printStats

function printStats($titles)
{
    $columns = array('counter', 'revisions', 'links', 'age');
    $stats = array();
    foreach ($titles as $t) {
        if (!$t) {
            continue;
        }
        $stats[] = getStats($t);
    }
    foreach ($columns as $c) {
        echo "{$c}:\t";
        if (strlen($c) < 6) {
            echo "\t";
        }
        $sum = 0;
        foreach ($stats as $x) {
            $sum += $x[$c];
        }
        if (sizeof($stats) == 0) {
            echo "-\n";
        } else {
            echo number_format($sum / sizeof($stats), 2) . "\n";
        }
    }
    echo "\n\n";
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:27,代码来源:check_google_index.php


示例2: presentUser

function presentUser($user)
{
    echo '<div class="' . (empty($user['shaddow']) ? 'clean' : 'shaddow') . '" style="border: 1px solid #eee; margin: 1em; padding: .5em">';
    echo '<input style="float: right" type="submit" onclick="setUserid(this, \'' . $user['userid'] . '\', \'useridTo\')" value="Map to this" />';
    echo '<input style="float: right" type="submit" onclick="setUserid(this, \'' . $user['userid'] . '\', \'useridFrom\')" value="Map from this" />';
    echo '<h3 style="color: green">' . $user['username'] . '</h3>';
    echo '<dl>
	
		<dt>UserID</dt>
			<dd><tt>' . $user['userid'] . '</tt></dd>

		<dt>realm</dt>
			<dd><tt>' . $user['realm'] . '</tt></dd>

		<dt>email</dt>
			<dd>' . $user['email'] . '</dd>

		<dt>org</dt>
			<dd>' . $user['org'] . '</dd>

		<dt>orgunit</dt>
			<dd>' . $user['orgunit'] . '</dd>

		<dt>idp</dt>
			<dd><tt>' . $user['idp'] . '</tt></dd>

		<dt>shaddow</dt>
			<dd>' . $user['shaddow'] . '</dd>
			
		<dt>Stats</dt>
			<dd>' . getStats($user['stats']) . '</dd>
			
		</dl>';
    echo '</div>';
}
开发者ID:r4mp,项目名称:Foodle,代码行数:35,代码来源:accountmapping.php


示例3: printTotal

function printTotal()
{
    $votes = getStats();
    $total = 0;
    foreach ($votes as $key => $value) {
        $total += $value;
    }
    $totalMoney = $total / 1000 * 1.56 * 3;
    echo "~ \$" . number_format($totalMoney, 2);
}
开发者ID:JackShort,项目名称:Clicksforchange,代码行数:10,代码来源:donated.php


示例4: presentUser

function presentUser($user, $realmTo)
{
    $to = '';
    if (preg_match('/^(.*?)@/', $user['userid'], $matches)) {
        $to = $matches[1] . '@' . $realmTo;
    }
    echo '<div class="' . (empty($user['shaddow']) ? 'clean' : 'shaddow') . '" style="border: 1px solid #eee; margin: 1em; padding: .5em">';
    echo '<input style="float: right" type="submit" onclick="setUserid(this, \'' . $user['userid'] . '\', \'' . $to . '\')" value="Map this user" />';
    echo '<h3 style="color: green">' . $user['username'] . '</h3>';
    echo '<dl>
	
		<dt>UserID</dt>
			<dd><tt>' . $user['userid'] . '</tt></dd>

		<dt>realm</dt>
			<dd><tt>' . $user['realm'] . '</tt></dd>

		<dt>email</dt>
			<dd>' . $user['email'] . '</dd>

		<dt>org</dt>
			<dd>' . $user['org'] . '</dd>

		<dt>orgunit</dt>
			<dd>' . $user['orgunit'] . '</dd>

		<dt>idp</dt>
			<dd><tt>' . $user['idp'] . '</tt></dd>

		<dt>shaddow</dt>
			<dd>' . $user['shaddow'] . '</dd>
			
		<dt>Stats</dt>
			<dd>' . getStats($user['stats']) . '</dd>
			
		</dl>';
    echo '</div>';
}
开发者ID:r4mp,项目名称:Foodle,代码行数:38,代码来源:accountmapping-prepare.php


示例5: generateStats

/**
 * Function generate file with all stats for one region
 */
function generateStats()
{
    global $bdd, $region;
    $stats = array();
    /*** GLOBAL INFO ***/
    $statement = $bdd->prepare('SELECT count(*) FROM `match`
                                        WHERE region = "' . $region . '"');
    $statement->execute();
    $data = $statement->fetchAll()[0][0];
    $stats["info"]["number"] = $data;
    /*** CHAMPION INFO ***/
    $statement = $bdd->prepare('SELECT * FROM champion');
    $statement->execute();
    $data = $statement->fetchAll();
    $numberOfChampions = count($data);
    for ($i = 0; $i < $numberOfChampions; $i++) {
        $champion = $data[$i];
        $stats["champions"][$i] = ["id" => $champion["id"], "stats" => array()];
    }
    getNumberOfGamesPlayed($stats["champions"]);
    getNumberOfGamesBanned($stats["champions"]);
    getNumberOfGamesWon($stats["champions"]);
    getStats($stats["champions"]);
    /*** BLACK MARKET INFO ***/
    $stats["bwmerc"] = array();
    getKrakensSpent($stats["bwmerc"]);
    getBrawlersStats($stats["bwmerc"]);
    getBestCompositionOfBrawlers($stats["bwmerc"]);
    /*** ITEMS INFO ***/
    $stats["items"] = array();
    getItemsStats($stats["items"]);
    echo '<pre>';
    print_r($stats);
    $fp = fopen($region . '.json', 'w');
    fwrite($fp, json_encode($stats));
    fclose($fp);
}
开发者ID:AlexandreRivet,项目名称:RiotApiChallenge,代码行数:40,代码来源:stats.php


示例6: getLastDate

 if ($argv[0] == "update") {
     //This is used to update the table from the last date
     //data was entered until now
     echo "\n\nSTARTING UPDATE\n\n";
     $startDate = getLastDate($dbr);
     if ($argv[1] != null && preg_match('@[^0-9]@', $endDate) == 0) {
         $now = $argv[1] . "000000";
     } else {
         $now = wfTimestamp(TS_MW, time());
     }
     //Grab the old stats so we can compare
     $oldStats = getStats($dbr);
     //update the new stats
     updateStats($dbw, $dbr, $startDate, $now);
     //Grab the new stats
     $newStats = getStats($dbr);
     $editedStats = array();
     $createdStats = array();
     $nabStats = array();
     $patrolStats = array();
     //Compare the stats and output
     foreach ($newStats as $userId => $data) {
         if ($oldStats[$userId] == null) {
             $oldStats[$userId] = array();
             $oldStats[$userId]['edited'] = 0;
             $oldStats[$userId]['created'] = 0;
             $oldStats[$userId]['nab'] = 0;
             $oldStats[$userId]['patrol'] = 0;
         }
         //first check edited
         foreach ($editLevels as $level) {
开发者ID:biribogos,项目名称:wikihow-src,代码行数:31,代码来源:update_editor_stats.php


示例7: getStats

/***************************************
 * http://www.program-o.com
 * PROGRAM O
 * Version: 2.4.7
 * FILE: stats.php
 * AUTHOR: Elizabeth Perreau and Dave Morton
 * DATE: 12-12-2014
 * DETAILS: Displays chatbot statistics for the currently selected chatbot
 ***************************************/
$oneday = getStats("today");
$oneweek = getStats("-1 week");
$onemonth = getStats("-1 month");
$sixmonths = getStats("-6 month");
$oneyear = getStats("1 year ago");
$alltime = getStats("all");
$singlelines = getChatLines(1, 1);
$alines = getChatLines(1, 25);
$blines = getChatLines(26, 50);
$clines = getChatLines(51, 100);
$dlines = getChatLines(101, 1000000);
$avg = getChatLines("average", 1000000);
$upperScripts = '';
$topNav = $template->getSection('TopNav');
$leftNav = $template->getSection('LeftNav');
$main = $template->getSection('Main');
$navHeader = $template->getSection('NavHeader');
$FooterInfo = getFooter();
$errMsgClass = !empty($msg) ? "ShowError" : "HideError";
$errMsgStyle = $template->getSection($errMsgClass);
$noLeftNav = '';
开发者ID:lordmatt,项目名称:Program-O,代码行数:30,代码来源:stats.php


示例8: printFunction

function printFunction()
{
    $stats = getStats();
    $totalWidth = 300 - 16;
    ?>
		<div class="line-owned">
			<div class="box-icone"><i class="fa fa-check"></i></div>
			<div class="box-bar">
				<div class="box-number-result">
					<span class="result-text"><?php 
    echo number_format($stats['ownArchi'] * 100 / $stats['totalArchi'], 0) . '%';
    ?>
</span>
				</div>
				<div class="empty-bar">
					<div
						class="percentage-bar"
						style="width: <?php 
    echo definedWidth($stats['totalArchi'], $stats['ownArchi'], $totalWidth) . 'px';
    ?>
">
					</div>
				</div>
			</div>
			<div class="box-info">
				<div class="box-number-info">
					<?php 
    echo $stats['ownArchi'] . ' / ' . $stats['totalArchi'];
    ?>
				</div>
			</div>
		</div>
		<div class="line-catchable">
			<div class="box-icone"><i class="fa fa-crosshairs"></i></div>
			<div class="box-bar">
				<div class="box-number-result">
					<span class="result-text"><?php 
    echo $stats['catchArchi'];
    ?>
</span>
				</div>
				<div class="empty-bar">
					<div
						class="percentage-bar"
						style="width: <?php 
    echo definedWidth($stats['totalArchi'], $stats['catchArchi'], $totalWidth) . 'px';
    ?>
">
					</div>
				</div>
			</div>
			<div class="box-info">
				<div class="box-number-info">
					<?php 
    echo number_format($stats['priceCatchArchi'], 0, ',', ' ') . 'K';
    ?>
				</div>
				<?php 
    if ($stats['catchNotPrice'] != 0) {
        ?>
<div class="box-alert"><i class="fa fa-exclamation"></i></div><?php 
    }
    ?>
			</div>
		</div>
		<div class="line-buy">
			<div class="box-icone box-icone-kamas"></div>
			<div class="box-bar">
				<div class="box-number-result">
					<span class="result-text"><?php 
    echo $stats['buyArchi'];
    ?>
</span>
				</div>
				<div class="empty-bar">
					<div
						class="percentage-bar"
						style="width: <?php 
    echo definedWidth($stats['totalArchi'], $stats['buyArchi'], $totalWidth) . 'px';
    ?>
">
					</div>
				</div>
			</div>
			<div class="box-info">
				<div class="box-number-info">
					<?php 
    echo number_format($stats['priceBuyArchi'], 0, ',', ' ') . 'K';
    ?>
				</div>
				<?php 
    if ($stats['buyNotPrice'] != 0) {
        ?>
<div class="box-alert"><i class="fa fa-exclamation"></i></div><?php 
    }
    ?>
			</div>
		</div>
		<?php 
}
开发者ID:audric-perrin,项目名称:sitedofus,代码行数:100,代码来源:printFunction.php


示例9: getResults

function getResults($db, $type)
{
    if ($type == 'all') {
        $sql = "SELECT * FROM " . QUIZDB . " WHERE `locked_quiz` = 0 AND `quiz_end_ts` IS NOT NULL ORDER BY `percentage` DESC";
        return $db->fetch_all_array($sql);
    } elseif ($type == 'my_quiz') {
        $sql = "SELECT * FROM " . QUIZDB . " WHERE  `created_by` = '" . $_SESSION['UA_DETAILS']['randid'] . "' AND `quiz_end_ts` IS NOT NULL ORDER BY `percentage` DESC";
        return $db->fetch_all_array($sql);
    } elseif ($type == 'stats') {
        $stat_arr = getStats($db);
        $stat_arr_max = max($stat_arr);
        $stat_arr_mid = floor($stat_arr_max / 2);
        foreach ($stat_arr as $value) {
            $str2 .= $value . ",";
        }
        $str2 = trim($str2, ",");
        $str = "http://chart.apis.google.com/chart?chxl=0:|0|1-9|10-19|20-29|30-39|40-49|50-59|60-69|70-79|80-89|90-99|100|1:|0|" . $stat_arr_mid . "|" . $stat_arr_max . "|2:|Percentage+Ranges&chxp=2,80&chxt=x,y,x&chbh=31&chs=500x400&cht=bvg&chco=76A4FB&chds=0," . ($stat_arr_max + 10) . "&chd=t:" . $str2 . "&chg=100,10";
        return $str;
    } else {
        $sql = "SELECT * FROM " . QUIZDB . " WHERE  `user` = '" . $_SESSION['UA_DETAILS']['randid'] . "' AND `quiz_end_ts` IS NOT NULL ORDER BY `percentage` DESC";
        return $db->fetch_all_array($sql);
    }
}
开发者ID:sangikumar,项目名称:IP,代码行数:23,代码来源:functions.php


示例10: isset

<?php

require_once "getstats.php";
$_settings = $_SERVER["DOCUMENT_ROOT"] . "/avatars/settings/";
$do = isset($_POST['action']) && $_POST['action'] == 'load' ? 'load' : 'save';
$user = isset($_POST['user']) ? strtolower($_POST['user']) : '';
$set['bColor'] = isset($_POST['bColor']) ? $_POST['bColor'] : '666666';
$set['bgColor'] = isset($_POST['bgColor']) ? $_POST['bgColor'] : '979797';
$set['fontColor'] = isset($_POST['fColor']) ? $_POST['fColor'] : 'cccccc';
$set['smile'] = isset($_POST['smile']) ? $_POST['smile'] : 10;
$set['font'] = isset($_POST['font']) ? $_POST['font'] : 1;
$set['pack'] = isset($_POST['pack']) ? $_POST['pack'] : 1;
$set['showuser'] = isset($_POST['showuser']) && $_POST['showuser'] == 1 ? 1 : 0;
for ($i = 1; $i <= 3; $i++) {
    $set['line' . $i]['title'] = str_replace('&amp;', '&', $_POST['line' . $i]);
    $set['line' . $i]['value'] = $_POST['drp' . $i];
}
if (!empty($user) && $do == 'save') {
    print file_put_contents($_settings . $user . ".set", serialize($set)) ? 1 : 0;
    getStats($user);
} else {
    if (file_exists($_settings . $user . ".set")) {
        print json_encode(unserialize(file_get_contents($_settings . $user . ".set")));
    }
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:25,代码来源:save.php


示例11: getPrice

                        <div class="row">
                            <div class="form-and-links-container col-sm-8 col-sm-offset-2">
                                <div class="countdown-label">
                                    <div id="price">
                                        <p class="text-center"><strong>We Buy</strong> : RM<?php 
getPrice('1', 'we_buy');
?>
/g <i class=<?php 
getStats('1', 'we_buy');
?>
></i></p>
                                        <p class="text-center"><strong>We Sell</strong> : RM<?php 
getPrice('1', 'we_sell');
?>
/g <i class=<?php 
getStats('1', 'we_sell');
?>
></i></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /Countdown -->
                <div class="container">
                    <!-- Description -->
                    <div class="row">
                        <p class="description col-sm-8 col-sm-offset-2">— Last update : <?php 
getTime();
?>
开发者ID:anocriny,项目名称:mks-indicative-price,代码行数:31,代码来源:index.php


示例12: getStats

                                <div class="clearfix"></div>
                            </div>
                        </a>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="panel panel-red">
                        <div class="panel-heading special-panel">
                            <div class="row">
                                <div class="row text-center">
                                	<i class="glyphicon glyphicon-piggy-bank dashboard"></i>
                                </div>
                                <div class="col-xs-12 text-center">
                                    <div class="moneysize">
                                        <?php 
getStats("SUM(order_totalprice)", "orders");
?>
                                    </div>
                                    <p>Income</p>
                                </div>
                            </div>
                        </div>
                        <a href="#">
                            <div class="panel-footer">
                                <span class="pull-left">View Details</span>
                                <span class="pull-right"><i class="glyphicon glyphicon-circle-arrow-right"></i></span>
                                <div class="clearfix"></div>
                            </div>
                        </a>
                    </div>
                </div>
开发者ID:Toesmash,项目名称:git-techpoint,代码行数:31,代码来源:index.php


示例13: tarihOku2

            ?>
</td>
                      <td nowrap="nowrap" <?php 
            echo "style=\"background-color: {$row_color};\"";
            ?>
><?php 
            echo tarihOku2($row_eoUsers['calismaTarihi']);
            ?>
</td>
                    </tr>
                    <?php 
        } while ($row_eoUsers = mysql_fetch_assoc($eoUsers));
        ?>
                    <tr>
                      <td colspan="6" class="tabloAlt"><?php 
        printf($metin[189], Sec2Time2(round(getStats(9))));
        ?>
</td>
                    </tr>
                  </table>
                  <?php 
        if ($totalRows_eoUsers > $maxRows_eoUsers) {
            ?>
                  <table border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#CCCCCC" >
                    <tr>
                      <td><div align="center"> <a href="<?php 
            printf("%s?pageNum_eoUsers=%d%s&amp;yonU=dur", $currentPage, 0, $queryString_eoUsers);
            ?>
"><img src="img/page-first.gif" border="0" alt="first" /></a> </div></td>
                      <td><div align="center"> <a href="<?php 
            printf("%s?pageNum_eoUsers=%d%s&amp;yonU=dur", $currentPage, max(0, $pageNum_eoUsers - 1), $queryString_eoUsers);
开发者ID:ergun805,项目名称:eOgr,代码行数:31,代码来源:dataWorkList.php


示例14: strtolower

              <div>&nbsp;</div>
            </div>
            <div class="Post-cr">
              <div>&nbsp;</div>
            </div>
            <div class="Post-cc"></div>
            <div class="Post-body">
              <div class="Post-inner">
                <div class="PostContent">
                  <div class="tekKolon"> <h3><?php 
    echo $metin[584];
    ?>
 :</h3>
                    <?php 
    echo "<strong><a href='profil.php?kim=" . $uID . "' rel='facebox'><span style='text-transform: capitalize;'>" . strtolower(kullGercekAdi($uID)) . "</span></a></strong><br/>";
    echo getStats(12, $uID);
    ?>
                  </div>
                </div>
                <div class="cleared"></div>
              </div>
            </div>
          </div>
          <?php 
}
?>
          <?php 
$dersID = temizle(isset($_GET["kurs"]) ? $_GET["kurs"] : "");
$uID = temizle(isset($_GET["user"]) ? $_GET["user"] : "");
if (!empty($dersID)) {
    ?>
开发者ID:ergun805,项目名称:eOgr,代码行数:31,代码来源:kursDetay.php


示例15: Array

<td id=rightarrow class=arrow></td>
</table>
<div>
<a href="about.php#bigquery">Write your own custom queries!</a>
</div>
</center>

<script type="text/javascript">
// HTML strings for each image
var gaSnippets = new Array();

<?php 
$gLabel = latestLabel();
require_once "stats.inc";
require_once "charts.inc";
$hStats = getStats($gLabel, "All", curDevice());
?>
gaSnippets.push("<?php 
echo bytesContentTypeChart($hStats);
?>
");
gaSnippets.push("<?php 
echo responseSizes($hStats);
?>
");
gaSnippets.push("<?php 
echo percentGoogleLibrariesAPI($hStats);
?>
");
gaSnippets.push("<?php 
echo percentFlash($hStats);
开发者ID:shanshanyang,项目名称:httparchive,代码行数:31,代码来源:index.php


示例16: function

$app = new \Slim\App();
// Create Slim app and fetch DI Container
$container = $app->getContainer();
// Register Entity Manager in the container
$container['entityManager'] = function () {
    $conf = parse_ini_file('../conf/conf.db.ini', true);
    $doctrineSettings = ['connection' => ['driver' => $conf['database']['driver'], 'host' => $conf['database']['host'], 'port' => isset($conf['database']['port']) ? $conf['database']['port'] : '3306', 'user' => $conf['database']['user'], 'password' => $conf['database']['password'], 'dbname' => $conf['database']['db'], 'charset' => 'utf8', 'memory' => true], 'annotation_paths' => ['../Entity/Users.php']];
    return EntityManagerBuilder::build($doctrineSettings);
};
$app->add(new \Slim\Middleware\JwtAuthentication(["path" => "/api", "secret" => "supersecretkeyyoushouldnotcommittogithub"]));
$app->get('/', function (Request $request, Response $response) {
    $result = $this->entityManager->createQueryBuilder()->select('user.email, user.password, user.token')->from('Users', 'user')->getQuery()->getArrayResult();
    return json_encode($result);
});
$app->get('/api', function (Request $request, Response $response) {
    getStats($request, $response);
});
$app->get('/login', function (Request $request, Response $response) {
    $result = Firebase\JWT\JWT::encode("ramdont0k3n", "supersecretkeyyoushouldnotcommittogithub");
    $body = $response->getBody();
    $body->write(json_encode($result));
    return $response;
});
$app->run();
function getStats($request, $response)
{
    //$response = $app->response;
    $response->withHeader('Access-Control-Allow-Origin', '*');
    $response->withHeader('Access-Control-Allow-Headers', 'Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With');
    $response->withHeader('Access-Control-Allow-Credentials', 'true');
    $response->withHeader('Cache-Control', 'no-cache');
开发者ID:jegutierrez,项目名称:api-jwt,代码行数:31,代码来源:index.php


示例17: printImageArrayResult

        if (isOK($response)) {
            printImageArrayResult($response, " ---- GETTING ITEM FAILED ---- ", " ---- GETTING ITEM SUCCESSFULLY COMPLETED ---- ");
        } else {
            echo $response->getMessage();
        }
        break;
    case "getTrackingDatas":
        echo "Getting trackables..." . PHP_EOL;
        $email = getEMail();
        $password = getPassword();
        $dbName = getDbName();
        $response = getTrackingDatas($email, $password, $dbName);
        if (isOK($response)) {
            printImageArrayResult($response, " ---- GETTING TRACKABLES FAILED ---- ", " ---- GETTING TRACKABLES SUCCESSFULLY COMPLETED ---- ", "trackable");
        } else {
            echo $response->getMessage();
        }
        break;
    case "getStats":
        echo "Getting Stats..." . PHP_EOL;
        $email = getEMail();
        $password = getPassword();
        $dbName = getDbName();
        $response = getStats($email, $password, $dbName);
        if (isOK($response)) {
            printResult($response, " ---- GETTING STATS FAILED ---- ", " ---- GETTING STATS SUCCESSFULLY COMPLETED ---- ", true);
        } else {
            echo $response->getMessage();
        }
        break;
}
开发者ID:Mynameisjack2014,项目名称:junaio-quickstarts,代码行数:31,代码来源:metaioCvsHelper.php


示例18: getStats

<?php

//When included as part of a drupal module $manifestfile and $resultsfile is set in the module
//When called as a Jquery enpoint dirctly the manifest file should be specified in the query
//In both modes this output is intended to act as a service endpoint called within yesno.js
//The service returns the url of the next image to return by selecting a random line in the manifest
/**
 *TODO 
 *Work out how this will work with non drupal mode - the same issue needs to be address in the save  
 *Work out how to get the id of the current user in drupal
 */
//Handle non drupal request
if ($_GET["resultsfile"] and $_GET["manifestfile"]) {
    getStats($_GET["manifestfile"], $_GET["resultsfile"]);
}
function getStats($manifestfile, $resultsfile)
{
    //At the moment just read the manifest into an array
    //$urls = file($manifestfile,FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
    //Filename will point to the text file but want to read the mfx file
    $folder = pathinfo($manifestfile, PATHINFO_DIRNAME);
    $base = pathinfo($manifestfile, PATHINFO_FILENAME);
    $mfx = "{$folder}/{$base}.mfx";
    $fp = @fopen($mfx, "r");
    //Read the first $headerlength bytes as the header
    $headerlength = 20;
    list($reclen, $totrecs) = explode(":", fread($fp, $headerlength));
    fclose($fp);
    //Open and load the required
    if ($resultsfile) {
        $doc = new DOMDocument();
开发者ID:rbgeplantsman,项目名称:YesNo,代码行数:31,代码来源:yesnostats.php


示例19: getStats

        return $_GET[$getName];
    }
    return $default;
}
function getStats($one, $two)
{
    $safer = ceil(100 / $one * $two);
    $fatalities = ceil(($two - $one) / 3);
    return [$safer - 100, $fatalities];
}
$start = urlencode(getVar("start"));
$end = urlencode(getVar("end"));
$safe = getVar("safest") == "on" ? true : false;
$congestion = getVar("congestion") == "on" ? true : false;
$routes = getSafestRoute($start, $end, $safe, $congestion);
$stats = getStats($routes[0]["points"], $routes[$routes[0]["points"] == $routes[1]["points"] && count($routes) > 2 ? 2 : 1]["points"]);
$safer = $stats[0];
$fatalities = $stats[1];
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	
	<link rel="shortcut icon" href="images/logo.png">
	
	<script>
		var polylines = [<?php 
foreach ($routes[0]["polylines"] as $key => $polyline) {
    echo "\"{$polyline}\"";
开发者ID:pedal-plan,项目名称:pedal-plan,代码行数:31,代码来源:results.php


示例20: homeInfo

function homeInfo($user)
{
    $msg = getStats($user);
    $rep = sendsockreply('homepage', $msg);
    if ($rep === false) {
        $ans = false;
    } else {
        $ans = repDecode($rep);
    }
    return $ans;
}
开发者ID:nullivex,项目名称:ckpool,代码行数:11,代码来源:db.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getStatus函数代码示例发布时间:2022-05-15
下一篇:
PHP getState函数代码示例发布时间: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