當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Utilities::getHostErrorCount方法代碼示例

本文整理匯總了PHP中Utilities::getHostErrorCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utilities::getHostErrorCount方法的具體用法?PHP Utilities::getHostErrorCount怎麽用?PHP Utilities::getHostErrorCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Utilities的用法示例。


在下文中一共展示了Utilities::getHostErrorCount方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: number_format

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',
		'placement': 'auto'
	});
});
開發者ID:blackmoral,項目名稱:blacklistmonitor,代碼行數:30,代碼來源:account.php

示例2: sleep

        exit;
    }
    $rs = $mysql->runQuery("select ipDomain from monitors where beenChecked = 0 limit 1;");
    if ($row = mysqli_fetch_array($rs, MYSQL_ASSOC)) {
        sleep(4);
        //wait 4 seconds for them to finish
    } else {
        break;
    }
}
$m->endWork();
$lastRunTime = (int) $m->runTime;
// mark this one as ran
$mysql->runQuery("update users set beenChecked = 1, lastChecked = '" . date('Y-m-d H:i:s') . "', lastRunTime = {$lastRunTime}");
$hostsChanged = Utilities::getHostChangeCount($mysql);
$errorHosts = Utilities::getHostErrorCount($mysql);
if ($hostsChanged > 0 && $user['disableEmailNotices'] == 0) {
    $table = "";
    $summary = "";
    $summaryText = "";
    $noticeMessage = "";
    $url = Setup::$settings['base_url'];
    $table .= "<br><br><div><a href='{$url}/hosts.php?oc=1'>Hosts with status changes</a> | <a href='{$url}/hosts.php?oc=2'>Blocked Hosts</a> | <a href='{$url}/hosts.php'>All hosts</a></div><br><br>";
    $summary .= "<div><strong>";
    $summary .= "Total: " . number_format($monitorCount) . "<br/>";
    $summary .= "Clean: " . number_format($monitorCount - $errorHosts) . "<br/>";
    $summary .= "Blocked: " . number_format($errorHosts) . "<br/>";
    $summary .= "Changed: " . number_format($hostsChanged) . "<br/>";
    $summary .= '</a>';
    $summary .= "</strong></div>";
    $summaryText .= "Total: " . number_format($monitorCount) . "\n";
開發者ID:beserious,項目名稱:blacklistmonitor,代碼行數:31,代碼來源:userJob.php

示例3: sleep

    $rs = $mysql->runQuery("select ipDomain from monitors where beenChecked = 0 limit 1;");
    if ($row = mysqli_fetch_array($rs, MYSQL_ASSOC)) {
        sleep(4);
        //wait 4 seconds for them to finish
    } else {
        break;
    }
}
$m->endWork();
$lastRunTime = (int) $m->runTime;
// mark this one as ran
$mysql->runQuery("update users set beenChecked = 1, lastChecked = '" . date('Y-m-d H:i:s') . "', lastRunTime = {$lastRunTime}");
// basic stats
$hostsChanged = Utilities::getHostChangeCount($mysql);
$errorHosts = Utilities::getHostErrorCount($mysql);
$newErrorHosts = Utilities::getHostErrorCount($mysql, 0, true);
$newCleanHosts = Utilities::getHostCleanCount($mysql, 0, true);
if ($hostsChanged > 0 && $user['disableEmailNotices'] == 0) {
    $table = "";
    $summary = "";
    $summaryText = "";
    $noticeMessage = "";
    $url = Setup::$settings['base_url'];
    $summary .= "<div><strong>";
    $summary .= "Total: " . number_format($monitorCount) . "<br/>";
    $summary .= "Clean: " . number_format($monitorCount - $errorHosts) . "<br/>";
    $summary .= "Blocked: " . number_format($errorHosts) . "<br/>";
    $summary .= "New Blocked: " . number_format($newErrorHosts) . "<br/>";
    $summary .= "New Clean: " . number_format($newCleanHosts) . "<br/>";
    $summary .= '</a>';
    $summary .= "</strong></div>";
開發者ID:blackmoral,項目名稱:blacklistmonitor,代碼行數:31,代碼來源:userJob.php

示例4: and

    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() {
		$("#reportForm").submit();
開發者ID:blackmoral,項目名稱:blacklistmonitor,代碼行數:31,代碼來源:hosts.php

示例5: and

    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() {
		$("#reportForm").submit();
開發者ID:beserious,項目名稱:blacklistmonitor,代碼行數:31,代碼來源:hosts.php


注:本文中的Utilities::getHostErrorCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。