本文整理汇总了PHP中Util::get_utc_unixtime方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::get_utc_unixtime方法的具体用法?PHP Util::get_utc_unixtime怎么用?PHP Util::get_utc_unixtime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::get_utc_unixtime方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_note
function add_note($conn, $type)
{
$validate = array('asset_id' => array('validation' => 'OSS_HEX', 'e_message' => 'illegal:' . _('Asset ID')), 'txt' => array('validation' => 'OSS_TEXT, OSS_PUNC_EXT', 'e_message' => 'illegal:' . _('Note text')));
$validation_errors = validate_form_fields('POST', $validate);
if (is_array($validation_errors) && !empty($validation_errors)) {
Av_exception::throw_error(Av_exception::USER_ERROR, _('Error! Note could not be added'));
}
$asset_id = POST('asset_id');
$txt = POST('txt');
// Check Asset Type
$asset_types = array('asset' => 'asset_host', 'network' => 'asset_net', 'group' => 'asset_group', 'net_group' => 'net_group');
// Note type
$type_tr = array('group' => 'host_group', 'network' => 'net', 'asset' => 'host', 'net_group' => 'net_group');
$class_name = $asset_types[$type];
$asset_type = $type_tr[$type];
// Check Asset Permission
if (method_exists($class_name, 'is_allowed') && !$class_name::is_allowed($conn, $asset_id)) {
$error = sprintf(_('Error! %s is not allowed'), ucwords($type));
Av_exception::throw_error(Av_exception::USER_ERROR, $error);
}
$note_id = Notes::insert($conn, $asset_type, gmdate('Y-m-d H:i:s'), $asset_id, $txt);
if (intval($note_id) > 0) {
$tz = Util::get_timezone();
$data['msg'] = _('Note added successfully');
$data['id'] = $note_id;
$data['note'] = $txt;
$data['date'] = gmdate('Y-m-d H:i:s', Util::get_utc_unixtime(gmdate('Y-m-d H:i:s')) + 3600 * $tz);
$data['user'] = Session::get_session_user();
$data['editable'] = 1;
} else {
Av_exception::throw_error(Av_exception::USER_ERROR, _('Error! Note could not be added'));
}
return $data;
}
示例2: normalize_date
/**
*
* License:
*
* Copyright (c) 2003-2006 ossim.net
* Copyright (c) 2007-2013 AlienVault
* All rights reserved.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 dated June, 1991.
* You may not use, modify or distribute this program under any other version
* of the GNU General Public License.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this package; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
function normalize_date($from_date, $to_date)
{
// Format correction
$from_date = preg_replace("/(\\d\\d)\\/(\\d\\d)\\/(\\d\\d\\d\\d)/", "\\3-\\2-\\1", $from_date);
$to_date = preg_replace("/(\\d\\d)\\/(\\d\\d)\\/(\\d\\d\\d\\d)/", "\\3-\\2-\\1", $to_date);
// Timezone correction
$tz = Util::get_timezone();
if ($tz != 0) {
$from_date = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime("{$from_date} 00:00:00") + -3600 * $tz);
$to_date = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime("{$to_date} 23:59:59") + -3600 * $tz);
}
if (!preg_match("/\\d+\\:\\d+:\\d+/", $from_date)) {
$from_date .= " 00:00:00";
}
if (!preg_match("/\\d+\\:\\d+:\\d+/", $to_date)) {
$to_date .= " 23:59:59";
}
return array($from_date, $to_date);
}
示例3: ossim_query
$query = ossim_query("SELECT report_id, scantime, report_key FROM vuln_nessus_reports t1 WHERE t1.report_id={$report_id} LIMIT 1");
if (!($rs =& $dbconn->Execute($query))) {
print $dbconn->ErrorMsg();
} else {
if (!$rs->EOF) {
$report_id = $rs->fields['report_id'];
$scantime = $rs->fields['scantime'];
$key = $rs->fields['report_key'];
}
}
//Seperates the parts of the date so it doesn't just display it as one big number
$tz = Util::get_timezone();
if ($tz == 0) {
$localtime = $scantime;
} else {
$localtime = gmdate("YmdHis", Util::get_utc_unixtime($scantime) + 3600 * $tz);
}
$scanyear = substr($localtime, 0, 4);
$scanmonth = substr($localtime, 4, 2);
$scanday = substr($localtime, 6, 2);
$scanhour = substr($localtime, 8, 2);
$scanmin = substr($localtime, 10, 2);
$scansec = substr($localtime, 12);
}
if (empty($report_id)) {
echo _("Report not found");
exit(0);
}
$query = "select count(scantime) from vuln_nessus_results t1\n where report_id in ({$report_id}) and falsepositive='N'";
$result = $dbconn->execute($query);
list($numofresults) = $result->fields;
示例4: get_timestamp
function get_timestamp($dbconn, $login, $datetime)
{
$user_timezone = $dbconn->GetOne("SELECT timezone FROM users WHERE login='" . $login . "'");
$tz = Session::get_timezone($user_timezone);
return gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($datetime) + 3600 * $tz);
}
示例5: gmdate
$s_sid_name = $s_plugin_sid_list[0]->get_name();
$s_sid_priority = $s_plugin_sid_list[0]->get_priority();
} else {
$s_sid_name = "Unknown (id={$s_id} sid={$s_sid})";
$s_sid_priority = "N/A";
}
$s_last = Util::timestamp2date($s_alarm->get_last());
$timestamp_utc = Util::get_utc_unixtime($s_last);
$s_last = gmdate("Y-m-d H:i:s", $timestamp_utc + 3600 * $tz);
$s_event_count = Alarm::get_total_events($conn, $s_backlog_id);
$aux_date = Util::timestamp2date($s_alarm->get_timestamp());
$timestamp_utc = Util::get_utc_unixtime($s_alarm->get_timestamp());
$s_date = gmdate("Y-m-d H:i:s", $timestamp_utc + 3600 * $tz);
if ($s_backlog_id && $s_id == 1505 && $s_event_count > 0) {
$aux_date = Util::timestamp2date($s_alarm->get_since());
$timestamp_utc = Util::get_utc_unixtime($aux_date);
$s_since = gmdate("Y-m-d H:i:s", $timestamp_utc + 3600 * $tz);
} else {
$s_since = $s_date;
}
$s_risk = $s_alarm->get_risk();
$s_alarm_link = "alarm_detail.php?backlog=" . $s_backlog_id;
/* Alarm name */
$s_alarm_name = ereg_replace("directive_event: ", "", $s_sid_name);
$s_alarm_name = Util::translate_alarm($conn, $s_alarm_name, $s_alarm);
$event_ocurrences = Alarm::get_total_events($conn, $s_backlog_id);
if ($event_ocurrences != 1) {
$ocurrences_text = strtolower(gettext("Events"));
} else {
$ocurrences_text = strtolower(gettext("Event"));
}
示例6: foreach
if (!empty($allowed_users) && is_array($allowed_users)) {
foreach ($allowed_users as $user) {
if ($user->get_id() == $my_session) {
$me = "style='font-weight: bold;'";
$action = "<img class='info_logout dis_logout' src='../pixmaps/menu/logout.gif' alt='" . $user->get_login() . "' title='" . $user->get_login() . "'/>";
} else {
$action = "<a onclick=\"logout('" . $user->get_id() . "');\">\n\t\t\t\t\t\t\t <img class='info_logout' src='../pixmaps/menu/logout.gif' alt='" . _('Logout') . " " . $user->get_login() . "' title='" . _('Logout') . " " . $user->get_login() . "'/>\n\t\t\t\t\t\t\t </a>";
$me = NULL;
}
$_country_aux = $geoloc->get_country_by_host($conn, $user->get_ip());
$s_country = strtolower($_country_aux[0]);
$s_country_name = $_country_aux[1];
$geo_code = get_country($s_country);
$flag = !empty($geo_code) ? "<img src='" . $geo_code . "' border='0' align='top'/>" : '';
$logon_date = gmdate('Y-m-d H:i:s', Util::get_utc_unixtime($user->get_logon_date()) + 3600 * Util::get_timezone());
$activity_date = Util::get_utc_unixtime($user->get_activity());
$background = Session_activity::is_expired($activity_date) ? 'background:#FFD8D6;' : '';
$expired = Session_activity::is_expired($activity_date) ? "<span style='color:red'>(" . _('Expired') . ")</span>" : "";
$agent = explode('###', $user->get_agent());
if ($agent[1] == 'av report scheduler') {
$agent = array('AV Report Scheduler', 'wget');
}
$host = @array_shift(Asset_host::get_name_by_ip($conn, $user->get_ip()));
$host = $host == '' ? $user->get_ip() : $host;
echo " <tr id='" . $user->get_id() . "'>\n\t\t\t\t\t\t\t\t\t<td class='ops_user' {$me}><img class='user_icon' src='" . get_user_icon($user->get_login(), $pro) . "' alt='" . _('User icon') . "' title='" . _('User icon') . "' align='absmiddle'/> " . $user->get_login() . "</td>\n\t\t\t\t\t\t\t\t\t<td class='ops_ip'>" . $user->get_ip() . "</td>\n\t\t\t\t\t\t\t\t\t<td class='ops_host'>" . $host . $flag . "</td>\n\t\t\t\t\t\t\t\t\t<td class='ops_agent'><a title='" . htmlentities($agent[1]) . "' class='info_agent'>" . htmlentities($agent[0]) . "</a></td>\n\t\t\t\t\t\t\t\t\t<td class='ops_id'>" . $user->get_id() . " {$expired}</td>\n\t\t\t\t\t\t\t\t\t<td class='ops_logon'>" . $logon_date . "</td>\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<td class='ops_activity'>" . _(TimeAgo($activity_date, gmdate('U'))) . "</td>\n\t\t\t\t\t\t\t\t\t<td class='ops_actions'>{$action}</td>\t\n\t\t\t\t\t\t\t\t</tr>";
}
}
?>
</tbody>
</table>
</div>
示例7: gettext
?>
</td>
<td style='text-align: center; background-color:#9DD131;font-weight:bold' width='7%'><?php
echo gettext("Status");
?>
</td>
<td width='7%' style='text-decoration: none; background-color:#9DD131;font-weight:bold'><?php
echo gettext("Action");
?>
</td>
</tr>
<?php
// Timezone correction
$tz = Util::get_timezone();
foreach ($alarm_group as $group) {
$group['date'] = $group['date'] != "" ? gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($conn, $group['date']) + 3600 * $tz) : "";
$group_id = $group['group_id'];
$_SESSION[$group_id] = $group['name'];
$ocurrences = $group['group_count'];
//if($group_type=="similar" && $ocurrences>1) { $ocurrences = $ocurrences-1; }
$max_risk = $group['max_risk'];
$id_tag = $group['id_tag'];
if ($group['date'] != $lastday) {
$lastday = $group['date'];
list($year, $month, $day) = split("-", $group['date']);
$date = Util::htmlentities(strftime("%A %d-%b-%Y", mktime(0, 0, 0, $month, $day, $year)));
$show_day = $group_type == "name" || $group_type == "similar" ? 0 : 1;
} else {
$show_day = 0;
}
$descr = $db_groups[$group_id]['descr'];
示例8: get_timestamps
function get_timestamps($dbconn, $login, $scan_START, $scan_SUBMIT, $body)
{
$user_timezone = $dbconn->GetOne("SELECT timezone FROM users WHERE login='" . $login . "'");
$tz = get_timezone($user_timezone);
if ($tz != 0) {
$scan_START = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($scan_START) + 3600 * $tz);
$scan_SUBMIT = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($scan_SUBMIT) + 3600 * $tz);
}
$body_part_with_timestamp = str_replace("SCAN_SUBMIT", $scan_SUBMIT, $body);
$body_part_with_timestamp = str_replace("SCAN_START", $scan_START, $body_part_with_timestamp);
return $body_part_with_timestamp;
}
示例9: in
// select report ids
if (!empty($arruser)) {
$query_onlyuser = " AND username in ({$user})";
}
if ($freport != '' && $sreport != '') {
$query = "SELECT report_id, name, scantime FROM vuln_nessus_reports where 1=1 {$query_onlyuser} ORDER BY scantime DESC";
} else {
$query = "SELECT report_id, name, scantime FROM vuln_nessus_reports where report_id!={$freport} {$query_onlyuser} ORDER BY scantime DESC";
}
$result = $dbconn->Execute($query);
$tz = Util::get_timezone();
while (!$result->EOF) {
if ($tz == 0) {
$date = preg_replace('/(\\d\\d\\d\\d)(\\d+\\d+)(\\d+\\d+)(\\d+\\d+)(\\d+\\d+)(\\d+\\d+)/i', '$1-$2-$3 $4:$5:$6', $result->fields["scantime"]);
} else {
$date = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($result->fields['scantime']) + 3600 * $tz);
}
$result->fields['name'] = preg_replace('/\\d+\\s-\\s/', '', $result->fields['name']);
$reports[$result->fields['report_id']] = $date . " - " . $result->fields['name'];
$result->MoveNext();
}
if (count($reports) == 0 && GET("submit") != '') {
?>
<script type="text/javascript">
parent.GB_close();
</script>
<?php
} else {
if ($freport != '' && $sreport != '' && array_key_exists($freport, $reports) && array_key_exists($sreport, $reports)) {
?>
<script type="text/javascript">
示例10: reportsummary
function reportsummary()
{
//GENERATE REPORT SUMMARY
global $user, $border, $report_id, $scantime, $scantype, $fp, $nfp, $output, $filterip, $query_risk, $dbconn, $pluginid;
global $treport, $sid, $ipl;
$tz = Util::get_timezone();
$htmlsummary = '';
$user_filter = $user != '' ? "AND t1.username in ({$user})" : "";
$query = "SELECT t2.id, t1.username, t1.name as job_name, t2.name as profile_name, t2.description \n FROM vuln_jobs t1\n LEFT JOIN vuln_nessus_settings t2 on t1.meth_VSET=t2.id\n WHERE t1.report_id in ({$report_id}) {$user_filter}\n order by t1.SCAN_END DESC";
$result = $dbconn->execute($query);
$id_profile = $result->fields['id'];
$query_uid = $result->fields['username'];
$job_name = $result->fields['jobname'];
$profile_name = $result->fields['profile_name'];
$profile_desc = $result->fields['description'];
if ($job_name == '') {
// imported report
$query_imported_report = "SELECT name FROM vuln_nessus_reports WHERE scantime='{$scantime}'";
$result_imported_report = $dbconn->execute($query_imported_report);
$job_name = $result_imported_report->fields["name"];
}
if ($tz == 0) {
$localtime = gen_strtotime($scantime, "");
} else {
$localtime = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($scantime) + 3600 * $tz);
}
$htmlsummary .= "<table border=\"5\" width=\"900\" style=\"margin: 9px 0px 0px 0px;\"><tr><th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n \n <b>" . _("Scan time") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:9px;\">" . $localtime . " </td>";
//Generated date
$gendate = gmdate("Y-m-d H:i:s", gmdate("U") + 3600 * $tz);
$htmlsummary .= "<th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Generated") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">{$gendate}</td></tr>";
$htmlsummary .= "<tr><th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Profile") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">";
$htmlsummary .= "{$profile_name} - {$profile_desc} </td>\n <th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Job Name") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">{$job_name}</td></tr>";
$htmlsummary .= "</table>";
return "<center>" . $htmlsummary . "</center>";
}
示例11: GET
require_once 'av_init.php';
require_once '../alarm_common.php';
Session::logcheck("analysis-menu", "ControlPanelAlarms");
$backlog = GET('backlog');
ossim_valid($backlog, OSS_HEX, OSS_NULLABLE, 'illegal:' . _("Backlog"));
// Maybe nullable from Logger resolves
if (ossim_error()) {
die(ossim_error());
}
$geoloc = new Geolocation("/usr/share/geoip/GeoLiteCity.dat");
$db = new ossim_db(TRUE);
$conn = $db->connect();
$tz = Util::get_timezone();
list($alarm, $event) = Alarm::get_alarm_detail($conn, $backlog);
$stats = $alarm->get_stats();
$timestamp_utc = Util::get_utc_unixtime(Util::timestamp2date($alarm->get_timestamp()));
$last = gmdate("Y-m-d H:i:s", $timestamp_utc + 3600 * $tz);
$alarm_time = get_alarm_life($alarm->get_since(), $alarm->get_last());
preg_match_all("/(\\d+)\\s(\\w+)/", strip_tags(trim($alarm_time)), $found);
$alarm_time_number = $found[1][0];
$alarm_time_unit = $found[2][0];
$alarm_life = get_alarm_life($alarm->get_since(), gmdate("Y-m-d H:i:s"));
preg_match_all("/(\\d+)\\s(\\w+)/", strip_tags(trim($alarm_life)), $found);
$alarm_life_number = $found[1][0];
$alarm_life_unit = $found[2][0];
$show_total = false;
$removable = $alarm->get_removable();
$backlog_id = $alarm->get_backlog_id();
$event_id = $alarm->get_event_id();
/* Buttons */
$alarm_detail_url = empty($stats) ? "load_alarm_detail('{$event_id}', 'event')" : "load_alarm_detail('{$backlog_id}', 'alarm')";
示例12: gmdate
<?php
} else {
$href = "";
echo " {$name}";
}
?>
</td>
<!-- end id & name event -->
<!-- risk -->
<?php
$orig_date = $alarm->get_timestamp();
$date = Util::timestamp2date($orig_date);
$orig_date = $date;
$event_date = $date;
$event_date_uut = Util::get_utc_unixtime($conn, $event_date);
$date = gmdate("Y-m-d H:i:s", $event_date_uut + 3600 * $tz);
$event_date = gmdate("Y-m-d H:i:s", $event_date_uut + 3600 * $alarm->get_tzone());
$src_ip = $alarm->get_src_ip();
$dst_ip = $alarm->get_dst_ip();
$src_port = $alarm->get_src_port();
$dst_port = $alarm->get_dst_port();
if ($have_scanmap) {
fwrite($backlog_file, "{$orig_date},{$src_ip},{$src_port},{$dst_ip},{$dst_port}\n");
}
$src_port = Port::port2service($conn, $src_port);
$dst_port = Port::port2service($conn, $dst_port);
if ($risk > 7) {
echo "<td bgcolor=\"red\"><b>";
if ($href) {
echo "<a href=\"{$href}\">";
示例13: ossim_db
$db = new ossim_db();
$conn = $db->connect();
$info = Alarm::get_similar_info($conn, $similar);
if (count($info) != 0) {
$tz = Util::get_timezone();
?>
<table class="transparent">
<tr><td class="nobborder" width="55"><strong><?php
echo _("Min date: ");
?>
</strong></td>
<td class="nobborder"><?php
echo gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($conn, $info["min_date"]) + 3600 * $tz);
?>
</td>
</tr>
<tr><td class="nobborder" width="55"><strong><?php
echo _("Max date: ");
?>
</strong></td>
<td class="nobborder"><?php
echo gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($conn, $info["max_date"]) + 3600 * $tz);
?>
</td>
</tr>
</table>
<?php
} else {
echo "<strong>{$similar}</strong> not found in alarms";
}
$db->close($conn);
示例14: reportsummary
function reportsummary()
{
//GENERATE REPORT SUMMARY
global $user, $border, $report_id, $scantime, $scantype, $fp, $nfp, $output, $filterip, $query_risk, $dbconn, $pluginid;
global $treport, $sid, $ipl;
$tz = Util::get_timezone();
$htmlsummary = "";
if ($treport == "latest" || $ipl != "") {
$query = "SELECT t2.id, t1.username, t1.name, t2.name, t2.description, t4.hostname as host_name \n FROM vuln_nessus_latest_reports t1\n LEFT JOIN vuln_nessus_settings t2 on t1.sid=t2.id\n LEFT JOIN host t4 ON t4.ip=inet_ntoa(t1.report_id)\n WHERE " . ($ipl != "all" ? "t1.report_id in ({$report_id}) and " : "") . "t1.sid in ({$sid}) AND t1.username in ('{$user}')\n order by t1.scantime DESC";
} else {
$query = "SELECT t2.id, t1.username, t1.name, t2.name, t2.description \n FROM vuln_jobs t1\n LEFT JOIN vuln_nessus_settings t2 on t1.meth_VSET=t2.id\n WHERE t1.report_id in ({$report_id}) AND t1.username in('{$user}')\n order by t1.SCAN_END DESC";
}
$result = $dbconn->execute($query);
//print_r($query);
if ($treport == "latest" || $ipl != "") {
//list( $id_profile, $query_uid, $job_name, $profile_name, $profile_desc, $host_name ) =$result->fields;
$lprofiles = array();
$tmp_profiles = array();
while (list($id_profile, $query_uid, $job_name, $profile_name, $profile_desc, $host_name) = $result->fields) {
if ($host_name != "" && $host_name != long2ip($report_id)) {
$phost_name = "{$host_name} (" . long2ip($report_id) . ")";
} else {
$phost_name = long2ip($report_id);
}
$lprofiles[] = "{$profile_name} - {$profile_desc}";
$tmp_profiles[] = $id_profile;
$result->MoveNext();
}
$profiles = implode("<br>", $lprofiles);
$id_profile = implode(", ", $tmp_profiles);
} else {
list($id_profile, $query_uid, $job_name, $profile_name, $profile_desc) = $result->fields;
if ($job_name == "") {
// imported report
$query_imported_report = "SELECT name FROM vuln_nessus_reports WHERE scantime='{$scantime}'";
$result_imported_report = $dbconn->execute($query_imported_report);
$job_name = $result_imported_report->fields["name"];
}
}
if ($tz == 0) {
$localtime = gen_strtotime($scantime, "");
} else {
$localtime = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($dbconn, $scantime) + 3600 * $tz);
}
$htmlsummary .= "<table border=\"5\" width=\"900\"><tr><th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n \n <b>" . _("Scan time") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">" . $localtime . " </td>";
//Generated date
$gendate = date("Y-m-d H:i:s");
$htmlsummary .= "<th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Generated") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">{$gendate}</td></tr>";
if ($ipl != "all") {
if ($treport == "latest" || $ipl != "") {
$htmlsummary .= "<tr><th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . (count($lprofiles) > 1 ? _("Profiles") : _("Profile")) . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">";
$htmlsummary .= "{$profiles} </td>\n <th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . ($treport == "latest" || $ipl != "" ? _("Host - IP") : _("Job Name")) . ":</b></th><td class=\"noborder\" valign=\"top\" style=\"text-align:left;padding-left:10px;\">" . ($treport == "latest" || $ipl != "" ? "{$phost_name}" : "{$job_name}") . "</td></tr>";
} else {
$htmlsummary .= "<tr><th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Profile") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">";
$htmlsummary .= "{$profile_name} - {$profile_desc} </td>\n <th class=\"noborder\" valign=\"top\" style=\"text-align:left;font-size:12px;\" nowrap>\n <b>" . _("Job Name") . ":</b></th><td class=\"noborder\" style=\"text-align:left;padding-left:10px;\">{$job_name}</td></tr>";
}
}
$htmlsummary .= "</table>";
/*
if($pluginid!="") {
if($fp!=""){
$dbconn->execute("UPDATE vuln_nessus_settings_plugins SET enabled='N' WHERE sid in ($id_profile) and id='$pluginid'");
}
else {
$dbconn->execute("UPDATE vuln_nessus_settings_plugins SET enabled='Y' WHERE sid in ($id_profile) and id='$pluginid'");
}
}
*/
return "<center>" . $htmlsummary . "</center>";
}
示例15: gmdate
?>
</td>
</tr>
</table>
</td>
<td class="nobborder" width="2%">
</td>
<td class="noborder" width="49%">
<table style="margin:auto;border: 0pt none;" width="100%" cellspacing="0" cellpadding="0">
<tr>
<?php
if ($tz == 0) {
$slocaltime = $sreport_scantime;
} else {
$slocaltime = gmdate("Y-m-d H:i:s", Util::get_utc_unixtime($sreport_scantime) + 3600 * $tz);
}
?>
<td class="headerpr_no_bborder"><?php
echo $sreport_name;
?>
<span style="font-size : 9px;"><?php
echo " (" . $slocaltime . ")";
?>
</span></td>
</tr>
</table>
<table style="margin:auto;background: transparent;" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="noborder" style="padding-bottom:10px;"><?php
echo vulnbreakdown($dbconn, $sreport, $perms_where);