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


PHP Utilities::getHostCount方法代码示例

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


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

示例1: number_format

    //invalid account
    echo "<script>window.location='login.php?logout=1';</script>";
    exit;
}
include 'header.inc.php';
?>

<?php 
include 'accountSubnav.inc.php';
?>

<div class="row">
	<div class="col-md-3">
	<ul class="nav nav-pills nav-stacked">
		<li>Hosts Total <span class="badge pull-right"><?php 
echo number_format(Utilities::getHostCount($mysql));
?>
</span></li>
		<li>Hosts Blocked <span class="badge pull-right"><?php 
echo number_format(Utilities::getHostErrorCount($mysql));
?>
</span></li>
	</ul>
	</div>
</div>

<script>
$(document).ready(function() {
	$('#apiCallBackAlert').hide();
	$('[data-toggle="popover"]').popover({
		trigger: 'hover',
开发者ID:blackmoral,项目名称:blacklistmonitor,代码行数:31,代码来源:account.php

示例2: switch

switch ($hostType) {
    case 'domains':
        $hostTypeSQL .= " and isDomain = 1 ";
        break;
    case 'ips':
        $hostTypeSQL .= " and isDomain = 0 ";
        break;
}
if ($searchS != '') {
    $searchSQL .= " and (\n\t\tipDomain like '%" . $mysql->escape($searchS) . "%' \n\t\tor rDNS like '%" . $mysql->escape($searchS) . "%'\n\t\tor status like '%" . $mysql->escape($searchS) . "%' ) ";
}
$sql = "\nselect m.isBlocked, m.lastUpdate, m.ipDomain, m.lastStatusChangeTime, m.rDNS, m.status, g.groupName, g.id\nfrom monitors m \n\tinner join monitorGroup g on g.id = m.monitorGroupId\nwhere 1=1 {$hostTypeSQL} {$searchSQL}\n{$orderSQL}\n{$limitSQL}\n";
$rs = $mysql->runQuery($sql);
include 'header.inc.php';
include 'accountSubnav.inc.php';
$hostsCount = Utilities::getHostCount($mysql, $monitorGroupId);
$hostsCountError = Utilities::getHostErrorCount($mysql, $monitorGroupId);
?>

<script src="js/jquery.tablesorter.min.js"></script>

<script>
$(document).ready(function() { 
	$("#hostTable").tablesorter();
	$(".reportType").change(function() {
		$("#reportForm").submit();
	});
	$(".recentFilter").change(function() {
		$("#reportForm").submit();
	});
	$(".hostType").change(function() {
开发者ID:blackmoral,项目名称:blacklistmonitor,代码行数:31,代码来源:hosts.php

示例3: _MeasurePerformance

$m = new _MeasurePerformance();
$mysql = new _MySQL();
$mysql->connect(Setup::$connectionArray);
// get the user data
$user = Utilities::getAccount();
_Logging::appLog("user job started");
// get the accounts blacklists
Utilities::setBlockLists();
if (empty(Utilities::$domainBlacklists) === true && empty(Utilities::$ipBlacklists) === true) {
    _Logging::appLog("no blacklists configured");
    // mark this one as ran
    $mysql->runQuery("update users set beenChecked = 1, lastChecked = '" . date('Y-m-d H:i:s') . "'");
    exit;
}
//anything to monitor?
$monitorCount = Utilities::getHostCount($mysql);
if ($monitorCount == 0) {
    _Logging::appLog("nothing to monitor");
    exit;
}
// reset checks
$mysql->runQuery("update monitors set beenChecked = 0");
// wait for results
while (true) {
    if (!Utilities::is_process_running($parentProcessId)) {
        _Logging::appLog("parent died - userJob exited");
        exit;
    }
    $rs = $mysql->runQuery("select ipDomain from monitors where beenChecked = 0 limit 1;");
    if ($row = mysqli_fetch_array($rs, MYSQL_ASSOC)) {
        sleep(4);
开发者ID:beserious,项目名称:blacklistmonitor,代码行数:31,代码来源:userJob.php

示例4: switch

switch ($hostType) {
    case 'domains':
        $hostTypeSQL .= " and isDomain = 1 ";
        break;
    case 'ips':
        $hostTypeSQL .= " and isDomain = 0 ";
        break;
}
if ($searchS != '') {
    $searchSQL .= " and (\n\t\tipDomain like '%" . $mysql->escape($searchS) . "%' \n\t\tor rDNS like '%" . $mysql->escape($searchS) . "%'\n\t\tor status like '%" . $mysql->escape($searchS) . "%' ) ";
}
$sql = "\nselect isBlocked,lastUpdate,ipDomain,lastStatusChangeTime,rDNS,status\nfrom monitors\nwhere 1=1 {$hostTypeSQL} {$searchSQL}\n{$orderSQL}\n{$limitSQL}\n";
$rs = $mysql->runQuery($sql);
include 'header.inc.php';
include 'accountSubnav.inc.php';
$hostsCount = Utilities::getHostCount($mysql);
$hostsCountError = Utilities::getHostErrorCount($mysql);
?>

<script src="js/jquery.tablesorter.min.js"></script>

<script>
$(document).ready(function() { 
	$("#hostTable").tablesorter();
	$(".reportType").change(function() {
		$("#reportForm").submit();
	});
	$(".recentFilter").change(function() {
		$("#reportForm").submit();
	});
	$(".hostType").change(function() {
开发者ID:beserious,项目名称:blacklistmonitor,代码行数:31,代码来源:hosts.php


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