本文整理汇总了PHP中Util::number_format_locale方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::number_format_locale方法的具体用法?PHP Util::number_format_locale怎么用?PHP Util::number_format_locale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::number_format_locale方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_ip_reputation_summary
function get_ip_reputation_summary()
{
$data = POST('data');
$type = intval($data['type']);
//Initialization of Vars
$ips = array();
$top = array();
$chart = array();
$total = 0;
$date = _('Unknown');
$Reputation = new Reputation();
if ($Reputation->existReputation()) {
list($ips, $cou, $order, $total) = $Reputation->get_data($type, 'All');
session_write_close();
//Getting IPs by Country
$cou = array_splice($cou, 0, 10);
foreach ($cou as $c => $value) {
$info = explode(";", $c);
$flag = '';
if ($info[1] != '') {
$flag = "<img src='/ossim/pixmaps/" . ($info[1] == "1x1" ? "" : "flags/") . strtolower($info[1]) . ".png'>";
}
$top[] = array('flag' => $flag, 'name' => $info[0], 'occurrences' => Util::number_format_locale($value, 0));
}
//Getting IPs by Activity
$order = array_splice($order, 0, 10);
foreach ($order as $type => $ocurrences) {
$chart[] = array($type . ' [' . Util::number_format_locale($ocurrences, 0) . ']', $ocurrences);
}
//Getting total of IPs
$total = Util::number_format_locale($total, 0);
//Getting Date of the last Update.
$date = gmdate("Y-m-d H:i:s", filemtime($Reputation->rep_file) + 3600 * Util::get_timezone());
}
return array('ips' => $ips, 'top_countries' => $top, 'ip_by_activity' => $chart, 'total' => $total, 'last_updated' => $date);
}
示例2: function
</td></tr>
<tr>
<td style="height:106px" align="center">
<div id="graph2" style="text-align:center;margin:0px;height:104px;width:98%"></div>
</td>
</tr>
<script language="javascript" type="text/javascript">
$( function () {
$.plot($("#graph2"), [
<?php
$i = 0;
foreach ($list2 as $l) {
$ip = $l[0];
$occurrences = Util::number_format_locale($l[1], 0);
$hostname = Host::ip2hostname($conn, $ip);
$os_pixmap = Host_os::get_os_pixmap($conn, $ip);
$label = str_replace("'", "\\'", "[<b>{$occurrences}</b>] {$hostname} {$os_pixmap}");
//if (strlen($label)>31) $label = substr($label, 0, 30)."..";
?>
<?php
echo $i++ == 0 ? "" : ",";
?>
{ label: '<?php
echo $label;
?>
', data: <?php
echo $l[1];
?>
}
示例3: qroPrintEntryHeader
if ($country) {
$country_img = " <img src=\"/ossim/pixmaps/flags/" . $country . ".png\" alt=\"{$country_name}\" title=\"{$country_name}\">";
$slnk = $current_url . "/pixmaps/flags/" . $country . ".png";
} else {
$country_img = "";
$slnk = "";
}
/* Print out */
qroPrintEntryHeader($i);
$tmp_rowid = $device_id;
echo ' <TD><INPUT TYPE="checkbox" NAME="action_chk_lst[' . $i . ']" VALUE="' . $tmp_rowid . '">';
echo ' <INPUT TYPE="hidden" NAME="action_lst[' . $i . ']" VALUE="' . $tmp_rowid . '"></TD>';
qroPrintEntry($sensor_ip, 'center', 'middle');
qroPrintEntry($sname . $country_img . $homelan, 'center', 'middle');
qroPrintEntry($device_ip, 'center', 'middle');
qroPrintEntry('<A HREF="base_qry_main.php?new=1&sensor=' . $device_id . '&num_result_rows=-1&submit=' . gettext("Query DB") . '">' . Util::number_format_locale($event_cnt, 0) . '</A>', 'center', 'middle');
qroPrintEntry('<div id="ua' . $device_id . '" class="sens">' . $unique_event_cnt . '</div>', 'center', 'middle', 'nowrap');
qroPrintEntry('<div id="sa' . $device_id . '">' . $num_src_ip . '</div>', 'center', 'middle', 'nowrap');
qroPrintEntry('<div id="da' . $device_id . '">' . $num_dst_ip . '</div>', 'center', 'middle', 'nowrap');
/*qroPrintEntry(BuildUniqueAlertLink("?sensor=" . $device_id) . $unique_event_cnt . '</A>');
qroPrintEntry(BuildUniqueAddressLink(1, "&sensor=" . $device_id) . $num_src_ip . '</A>');
qroPrintEntry(BuildUniqueAddressLink(2, "&sensor=" . $device_id) . $num_dst_ip . '</A>');*/
qroPrintEntryFooter();
$i++;
// report_data
$report_data[] = array($sname, $slnk, $num_src_ip, $num_dst_ip, "", "", $sensor_ip, $device_ip, "", "", "", 0, $event_cnt, $unique_event_cnt);
}
$result->baseFreeRows();
$dbo->close($_conn);
$qro->PrintFooter();
$qs->PrintBrowseButtons();
示例4: array
$report_data = array();
// data to fill report_data
if (is_array($_SESSION["server"]) && $_SESSION["server"][0] != "") {
$_conn = $dbo->custom_connect($_SESSION["server"][0], $_SESSION["server"][2], $_SESSION["server"][3]);
} else {
$_conn = $dbo->connect();
}
while (($myrow = $result->baseFetchRow()) && $i < $qs->GetDisplayRowCnt()) {
$ctx = $myrow["ctx"];
$product_type = GetSourceType($myrow["product_type"], $db);
$total_occurances = $myrow["events"];
$urlp = "base_qry_main.php?new=1&submit=" . gettext("Query DB") . "&sourcetype=" . urlencode($myrow["product_type"]);
//$urlp = "base_stat_ptypes.php?sort=occur_d&sourcetype=".urlencode($myrow["product_type"]);
qroPrintEntryHeader($i);
qroPrintEntry('  <a href="' . $urlp . '">' . $product_type . '</a>', 'left', "", "nowrap");
qroPrintEntry(' <a href="' . $urlp . '">' . Util::number_format_locale($total_occurances, 0) . '</a>', "center", "", "");
qroPrintEntry(Session::show_entities() && !empty($entities[$ctx]) ? $entities[$ctx] : (Session::show_entities() ? _("Unknown") : GetSensorName($ctx, $db)), "center", "", "");
qroPrintEntry(" <A class='usig' id='sg" . $myrow["product_type"] . "-{$ctx}' HREF='{$urlp}'>-</a>", "left", "", "");
qroPrintEntry("<div id='ts" . $myrow["product_type"] . "-{$ctx}'>-</div>", "center", "", "nowrap");
qroPrintEntryFooter();
$i++;
$prev_time = null;
}
$result->baseFreeRows();
$dbo->close($_conn);
$qro->PrintFooter();
$qs->PrintBrowseButtons();
$qs->PrintAlertActionButtons();
$qs->SaveState();
echo "\n</FORM>\n";
PrintBASESubFooter();
示例5: ImportHTTPVar
** (see the file 'base_main.php' for license details)
**
** Built upon work by Roman Danyliw <rdd@cert.org>, <roman@danyliw.com>
** Built upon work by the BASE Project Team <kjohnson@secureideas.net>
*/
require "base_conf.php";
require "vars_session.php";
require_once 'classes/Util.inc';
require "{$BASE_path}/includes/base_constants.inc.php";
require "{$BASE_path}/includes/base_include.inc.php";
include_once "{$BASE_path}/base_db_common.php";
include_once "{$BASE_path}/base_qry_common.php";
include_once "{$BASE_path}/base_stat_common.php";
if ($_SESSION['_siem_sensor_query'] == "") {
echo "-##-##-";
die;
}
$device_id = ImportHTTPVar("id", VAR_DIGIT);
$sql = str_replace("DEVICEID", $device_id, $_SESSION['_siem_sensor_query']);
session_write_close();
$qs = new QueryState();
$db = NewBASEDBConnection($DBlib_path, $DBtype);
$db->baseDBConnect($db_connect_method, $alert_dbname, $alert_host, $alert_port, $alert_user, $alert_password);
$rs = $qs->ExecuteOutputQueryNoCanned($sql, $db);
if ($row = $rs->baseFetchRow()) {
$unique_addrs = BuildUniqueAlertLink("?sensor=" . urlencode($device_id)) . Util::number_format_locale($row[0], 0) . '</A>';
$src_addrs = BuildUniqueAddressLink(1, "&sensor=" . urlencode($device_id)) . Util::number_format_locale($row[1], 0) . '</A>';
$dst_addrs = BuildUniqueAddressLink(2, "&sensor=" . urlencode($device_id)) . Util::number_format_locale($row[2], 0) . '</A>';
}
$rs->baseFreeRows();
echo "{$unique_addrs}##{$src_addrs}##{$dst_addrs}";
示例6: PrintTimeProfile
function PrintTimeProfile($time)
{
global $cnt, $label_lst, $value_lst, $value_POST_lst;
$time_str = "&time_range=day";
/* find max value */
$max_cnt = $value_lst[0];
for ($i = 0; $i < $cnt; $i++) {
if ($value_lst[$i] > $max_cnt) {
$max_cnt = $value_lst[$i];
}
}
echo '<TABLE BORDER=0 WIDTH="100%">
<TR><TD CLASS="header" width="25%">' . gettext("Time") . '</TD>
<TD CLASS="header" width="15%"># ' . gettext("of events") . '</TD>
<TD CLASS="header">' . gettext("Event") . '</TD></TR>';
$total = 0;
for ($i = 0; $i < $cnt; $i++) {
if ($value_lst[$i] == 0) {
$entry_width = 0;
} else {
$entry_width = round($value_lst[$i] / $max_cnt * 100);
}
$total += $value_lst[$i];
$cc = $i % 2 == 0 ? "#eeeeee" : "#ffffff";
//if ($entry_width > 0) $entry_color = "#BF8385";
if ($entry_width > 0) {
$entry_color = "#84C973";
} else {
$entry_color = $cc;
}
echo '<TR bgcolor="' . $cc . '">
<TD ALIGN=CENTER>';
if ($value_lst[$i] == 0) {
echo $label_lst[$i];
} else {
// Hourly
if (preg_match("/(\\d\\d)\\/(\\d\\d)\\/(\\d\\d\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) - (\\d\\d):(\\d\\d):(\\d\\d)/", $label_lst[$i], $found)) {
//$time_str = "&time[0][1]=%3E%3D&time[0][2]=".$found[2]."&time[0][3]=".$found[1]."&time[0][4]=".$found[3]."&time[0][5]=".$found[4]."&time[0][6]=".$found[5]."&time[0][7]=".$found[6]."&time[1][0]=&time[1][1]=%3E%3D&time[1][2]=".$found[2]."&time[1][3]=".$found[1]."&time[1][4]=".$found[3]."&time[1][5]=".$found[7]."&time[1][6]=".$found[8]."&time[1][7]=".$found[9];
} elseif (preg_match("/(\\d\\d)\\/(\\d\\d)\\/(\\d\\d\\d\\d)/", $label_lst[$i], $found)) {
//$time_str = "&time[0][1]=%3E%3D&time[0][2]=".$found[2]."&time[0][3]=".$found[1]."&time[0][4]=".$found[3]."&time[1][0]=&time[1][1]=%3E%3D&time[1][2]=".$found[2]."&time[1][3]=".$found[1]."&time[1][4]=".$found[3];
} elseif (preg_match("/(\\d\\d)\\/(\\d\\d\\d\\d)/", $label_lst[$i], $found)) {
//$time_str = "&time[0][1]=%3E%3D&time[0][2]=".$found[1]."&time[0][3]=&time[0][4]=".$found[2]."&time[1][0]=&time[1][1]=%3E%3D&time[1][2]=".$found[1]."&time[1][3]=&time[1][4]=".$found[2];
}
echo '<A HREF="' . $value_POST_lst[$i] . $time_str . '">' . $label_lst[$i] . '</A>';
}
echo '</TD>
<TD ALIGN=CENTER>' . Util::number_format_locale((int) $value_lst[$i], 0) . '</TD>
<TD><TABLE WIDTH="100%">
<TR>
<TD BGCOLOR="' . $entry_color . '" WIDTH="' . $entry_width . '%"> </TD>
<TD></TD>
</TR>
</TABLE>
</TD>
</TR>';
}
echo '<TR><TD CLASS="total"> </TD>
<TD CLASS="total">' . Util::number_format_locale((int) $total, 0) . '</TD>
<TD CLASS="total"> </TD></TR>
</TABLE>';
}
示例7: format_notif_number
function format_notif_number($number)
{
$formated = array();
$formated['number'] = $number;
$formated['text'] = Util::number_format_locale($number);
$formated['readable'] = Util::number_format_readable($number);
return $formated;
}
示例8: BuildSrcIPFormVars
$url_criteria = BuildSrcIPFormVars($currentIP);
}
} else {
if ($addr_type == 2) {
if ($no_ip) {
$url_criteria = BuildDstIpFormVars(NULL_IP);
} else {
$url_criteria = BuildDstIPFormVars($currentIP);
}
}
}
$sens = Session::show_entities() && !empty($entities[$ctx]) ? $entities[$ctx] : (Session::show_entities() ? _("Unknown") : GetSensorName($ctx, $db));
qroPrintEntry($sens, "center", "middle");
qroPrintEntry('<A HREF="' . $tmp_iplookup . $url_criteria . '">' . Util::number_format_locale($num_events, 0) . '</A>', "center", "middle");
qroPrintEntry('<A HREF="' . $tmp_iplookup2 . $url_criteria . '">' . Util::number_format_locale($num_sig, 0) . '</A>', "center", "middle");
qroPrintEntry(Util::number_format_locale($num_ip, 0), "center", "middle");
if (file_exists("../kml/GoogleEarth.php") && $currentIP != "0.0.0.0" && $currentIP != "::") {
qroPrintEntry("<a href='' onclick='window.open(\"../kml/TourConfig.php?type={$addr_type_name}&ip={$currentIP}\",\"IP {$currentIP} " . ($addr_type == 2 ? _("sources") : _("destinations")) . " - Goggle Earth API\",\"width=1024,height=700,scrollbars=NO,toolbar=1\");return false'><img align='absmiddle' title='" . _("Geolocation Tour") . "' src='../pixmaps/google_earth_icon.png' border='0'></a> <a href='' onclick='window.open(\"../kml/IPGoogleMap.php?type={$addr_type_name}&ip={$currentIP}\",\"IP {$currentIP} " . ($addr_type == 2 ? _("sources") : _("destinations")) . " - Goggle Maps API\",\"width=1024,height=700,scrollbars=NO,toolbar=1\");return false'><img title='" . _("Geolocation Map") . "' align='absmiddle' src='../pixmaps/google_maps_icon.png' border='0'></a>");
} else {
qroPrintEntry('');
}
qroPrintEntryFooter();
++$i;
// report_data
$report_data[] = array($currentIP, '', $num_sig, $num_ip, "", "", "", "", "", "", $sens, intval($_GET['addr_type']), 0, $num_events, $country_img);
}
$result->baseFreeRows();
$dbo->close($_conn);
$qro->PrintFooter();
$qs->PrintBrowseButtons();
$qs->PrintAlertActionButtons();
示例9: PrintEstimatedResultCnt
function PrintEstimatedResultCnt($displaying = "")
{
global $show_rows, $db;
echo "<table class='container' style='height:30px'><tr><td>";
if ($displaying == "") {
$displaying = gettext("Displaying %d to %d of <span id='eventselected'>%s</span> events.");
}
if ($this->num_result_rows != 0) {
if ($this->isCannedQuery()) {
echo "<div class='siem_display_msg' style='text-align:left;margin:auto;padding:3px 0px'>" . gettext("Displaying") . " " . $this->GetCurrentCannedQueryDesc() . "</div>";
} else {
// Total rows
if (Session::am_i_admin()) {
$rt = $db->baseExecute("SELECT sum(cnt) from ac_acid_event");
// from ac_ table => faster way
if ($rt) {
$rows = $rt->baseFetchRow();
$this->num_acid_event_rows = $rows[0];
}
$rt->baseFreeRows();
}
$from = $this->current_view * $show_rows + 1;
$to = $this->current_view * $show_rows + $show_rows - 1 < $this->num_result_rows ? $this->current_view * $show_rows + $show_rows : $this->num_result_rows;
$rows = $this->num_query_rows <= $show_rows && $this->current_view == 0 ? $this->num_query_rows : ($to > $from + $this->num_query_rows ? $from + $this->num_query_rows - 1 : $to);
printf("<div class='siem_display_msg' style='text-align:left;float:left;margin:auto;padding:4px 0px'>" . $displaying . "</div>\n", $from, $rows, $this->EstimateNumber($this->num_result_rows, $this->num_query_rows, $show_rows, $rows));
if (Session::am_i_admin()) {
$pinfo = "PG:" . $this->current_view . ",RR:" . $this->num_result_rows . ",QR:" . $this->num_query_rows . ",SR:" . $show_rows;
printf("<div class='siem_display_msg' style='float:right;margin:auto;padding:4px 0px'>" . gettext(" <b>%s</b> total events in database.") . "</div>\n", Util::number_format_locale($this->num_acid_event_rows, 0));
}
}
} else {
printf("<B>" . _("No events matching your search criteria have been found. Try fewer conditions.") . "</B> <a style='color:white' href='base_qry_main.php?clear_allcriteria=1&num_result_rows=-1&submit=Query+DB¤t_view=-1&sort_order=time_d'>[..." . _("Clear All Criteria") . "...]</a>\n");
// Disable buttons
echo '<script>$("#actions_link").prop("disabled",true);</script>';
}
echo "</td></tr></table>";
}
示例10: _
if ($launch_status > 0) {
$response['status'] = 'success';
$response['message'] = _('The backup process is purging events...');
} else {
$response['status'] = 'error';
$response['message'] = _('Sorry, operation was not completed due to an error when purging events');
}
} else {
$response['status'] = 'error';
$response['message'] = _('Please, select the dates you want to purge');
}
break;
// Ajax status interval check
// Ajax status interval check
case 'status':
$db = new ossim_db();
$conn = $db->connect();
list($is_running, $mode, $progress) = Backup::is_running($conn);
$db->close();
if ($is_running > 0) {
$response['status'] = 'success';
$response['message'] = $mode == 'insert' ? _('The backup process is inserting events...') : _('The backup process is purging events...');
$response['progress'] = Util::number_format_locale($progress);
} elseif ($is_running < 0) {
$response['message'] = _('Bad response from frameworkd. Please, check the logs for more info');
$response['status'] = 'error';
}
break;
}
}
echo json_encode($response);
示例11: PrintResultCnt
function PrintResultCnt($sqlgraph = "", $tr = array(), $displaying = "")
{
global $show_rows, $db;
if ($displaying == "") {
$displaying = gettext("Displaying events %d-%d of <b>%s</b> matching your selection.");
if (Session::am_i_admin()) {
$displaying .= gettext(" <b>%s</b> total events in database.");
}
}
if ($this->num_result_rows != 0) {
if ($this->isCannedQuery()) {
echo "<div style='text-align:left;margin:auto'>" . gettext("Displaying") . " " . $this->GetCurrentCannedQueryDesc() . "</div>";
} else {
// Total rows
$rt = $db->baseExecute("SELECT count(*) from acid_event");
if ($rt) {
$rows = $rt->baseFetchRow();
$this->num_acid_event_rows = $rows[0];
}
$rt->baseFreeRows();
//
printf("<div style='text-align:left;margin:auto'><table><tr><td><img src='../pixmaps/arrow_green.gif'></td><td>" . $displaying . "</td>\n", $this->current_view * $show_rows + 1, $this->current_view * $show_rows + $show_rows - 1 < $this->num_result_rows ? $this->current_view * $show_rows + $show_rows : $this->num_result_rows, Util::number_format_locale($this->num_result_rows, 0), Util::number_format_locale($this->num_acid_event_rows, 0));
if ($sqlgraph != "") {
global $db, $graph_report_type;
list($x, $y, $xticks, $xlabels) = range_graphic($tr);
//echo "SQLG:$sqlgraph -->";
$res = $this->ExecuteOutputQueryNoCanned($sqlgraph, $db);
//echo " COUNT:".$res->baseRecordCount()."<br>";
while ($rowgr = $res->baseFetchRow()) {
//print_r($rowgr);
$label = trim($rowgr[1] . " " . $rowgr[2]);
if (isset($y[$label]) && $y[$label] == 0) {
$y[$label] = $rowgr[0];
}
//echo "$label = $rowgr[0] <br>";
}
// Report data
$gdata = array();
foreach ($y as $label => $val) {
$gdata[] = array($label, "", "", "", "", "", "", "", "", "", "", $val, 0, 0);
}
$this->SaveReportData($gdata, $graph_report_type);
//print_r($xlabels);
//print_r($xticks);
//print_r ($x);
//print_r ($y);
$plot = plot_graphic("plotareaglobal", 50, 400, $x, $y, $xticks, $xlabels, true);
//echo "PLOT:".Util::htmlentities($plot).".";
echo "<td class=axis>{$plot}</td>";
}
echo "</tr></table></div>\n";
}
} else {
printf("<P style='color:#22971F'><B>" . _("No events matching your search criteria have been found. Try fewer conditions.") . "</B> <a href='base_qry_main.php?clear_allcriteria=1&num_result_rows=-1&submit=Query+DB¤t_view=-1&sort_order=time_d'>[..." . _("Clear All Criteria") . "...]</a><P>\n");
}
}
示例12: array_splice
<?php
$cou = array_splice($cou, 0, 10);
foreach ($cou as $c => $value) {
$info = explode(";", $c);
$flag = '';
if ($info[1] != '') {
$flag = "<img src='../pixmaps/" . ($info[1] == "1x1" ? "" : "flags/") . strtolower($info[1]) . ".png' border='0' width='16' height='11' title='" . $info[0] . "'> ";
}
?>
<tr>
<td class="gr"><?php
echo $flag . $info[0];
?>
</td>
<td class="grb"><?php
echo Util::number_format_locale($value, 0);
?>
</td>
</tr>
<?php
}
?>
</table>
<?php
} else {
?>
<div class="gray center" style="padding-top: 100px;"><?php
echo _("No data available");
?>
</div>
示例13: qroPrintEntry
/* Check for a NULL IP which indicates an event (e.g. portscan)
* which has no IP
*/
qroPrintEntry(BuildIDMLink($currentIP, $addr_type) . $currentIP . '</A> ', 'center', '', 'nowrap');
/* Print # of Occurances */
$tmp_iplookup = 'base_qry_main.php?num_result_rows=-1' . '&submit=' . gettext("Query DB") . '¤t_view=-1';
$tmp_iplookup2 = 'base_stat_alerts.php?num_result_rows=-1' . '&submit=' . gettext("Query DB") . '¤t_view=-1&sort_order=occur_d';
$url_criteria = BuildIDMVars($currentIP, $addr_type);
$url_criteria_src = BuildIDMVars($currentIP, $addr_type, "src");
$url_criteria_dst = BuildIDMVars($currentIP, $addr_type, "dst");
qroPrintEntry(Session::show_entities() && !empty($entities[$ctx]) ? $entities[$ctx] : (Session::show_entities() ? _("Unknown") : GetSensorName($ctx, $db)), 'center', 'middle');
qroPrintEntry('<A HREF="' . $tmp_iplookup . $url_criteria . '">' . Util::number_format_locale($num_events, 0) . '</A>', 'center', 'middle');
qroPrintEntry('<A HREF="' . $tmp_iplookup2 . $url_criteria_src . '">' . Util::number_format_locale($num_sig_src, 0) . '</A>', 'center', 'middle');
qroPrintEntry('<A HREF="' . $tmp_iplookup2 . $url_criteria_dst . '">' . Util::number_format_locale($num_sig_dst, 0) . '</A>', 'center', 'middle');
qroPrintEntry(Util::number_format_locale($num_sip, 0), 'center', 'middle');
qroPrintEntry(Util::number_format_locale($num_dip, 0), 'center', 'middle');
qroPrintEntryFooter();
++$i;
}
$result->baseFreeRows();
$qro->PrintFooter();
$qs->PrintBrowseButtons();
$qs->PrintAlertActionButtons();
$qs->SaveState();
ExportHTTPVar("addr_type", $addr_type);
echo "\n</FORM><br>\n";
$et->Mark("Get Query Elements");
$et->PrintTiming();
PrintBASESubFooter();
$db->baseClose();
echo "</body>\r\n</html>";
示例14: _
$data['events'], $data['srcnum'], $data['dstnum'], $data['flagr']
);
}
if ($country_uhn['Unknown']>0 && count($countries)>0) {
$country = _("Unresolved Country or Local IPs");
?>
<tr>
<td style="padding:7px;text-align:left"><?=$country?></td>
<td align="center"><?=Util::number_format_locale($country_uhn['Unknown'],0)?></td>
<td align="center">
<? if ($country_uhn['srcnum']>0) { ?><?=Util::number_format_locale($country_uhn['srcnum'],0)?>
<? } else echo "0" ?>
</td>
<td align="center">
<? if ($country_uhn['dstnum']>0) { ?><?=Util::number_format_locale($country_uhn['dstnum'],0)?>
<? } else echo "0" ?>
</td>
<td></td>
</TR>
</TABLE>
</TD>
</tr>
<?
$report_data[] = array (
$country, "", "", "", "", "", "", "", "", "", "",
$country_uhn['Unknown'], $country_uhn['srcnum'], $country_uhn['dstnum'], ""
);
}
echo '</TABLE>';
示例15: foreach
$i = 0;
foreach ($event_pulses as $pulse_id => $otx_data)
{
if ($max_cnt == 1 && $otx_data['events'] > 0) $max_cnt = $otx_data['events'];
$entry_width = round($otx_data['events'] / $max_cnt * 100);
$otx_link = str_replace('__PULSEID__',urlencode(strtolower($pulse_id)),$otx_pulse_url);
$link = "base_qry_main.php?new=1&submit=" . gettext("Query DB") . "&num_result_rows=-1&otx%5B0%5D=" . urlencode($pulse_id);
?>
<tr>
<td style="padding:7px;text-align:left;font-size:10px">
<a class="pulse_link" href="<?=$otx_link?>" target="_blank"><?=$otx_data["name"]?></a>
</td>
<td align="center">
<a href="<?=$link?>"><?=Util::number_format_locale($otx_data['events'],0)?></a>
</td>
<td align="center"><?=Util::number_format_locale($otx_data['iocs'],0)?></td>
<TD width="30%"><TABLE class="transparent bar" cellpadding="0" cellspacing="0" WIDTH="100%">
<TR>
<TD style="background-color:#84C973;width:<?php echo ($entry_width > 0) ? $entry_width."%" : "1px" ?>"><img src="../pixmaps/1x1.png"/></TD>
<TD> </TD>
</TR>
</TABLE>
</TD>
</tr>
<?
$i++;
/* report_data
$report_data[] = array (
$country, '',
"$entry_width", "", "", "", "", "", "", "", "",