本文整理汇总了PHP中Util::js_entities方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::js_entities方法的具体用法?PHP Util::js_entities怎么用?PHP Util::js_entities使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::js_entities方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_unresolved_alarms
function get_unresolved_alarms($conn)
{
$alarms = intval(Alarm::get_count($conn, '', '', 1, TRUE));
$alarms_prev = intval($_SESSION['_unresolved_alarms']);
if ($alarms != $alarms_prev && $alarms_prev > 0) {
$new_alarms = $alarms - $alarms_prev;
} else {
$new_alarms = 0;
}
$_SESSION['_unresolved_alarms'] = $alarms;
$data['alarms'] = $alarms;
$data['new_alarms'] = $new_alarms;
$data['new_alarms_desc'] = '';
if ($new_alarms > 0) {
$criteria = array('src_ip' => '', 'dst_ip' => '', 'hide_closed' => 1, 'order' => 'ORDER BY a.timestamp DESC', 'inf' => 0, 'sup' => $new_alarms, 'date_from' => '', 'date_to' => '', 'query' => '', 'directive_id' => '', 'intent' => 0, 'sensor' => '', 'tag' => '', 'num_events' => '', 'num_events_op' => 0, 'plugin_id' => '', 'plugin_sid' => '', 'ctx' => '', 'host' => '', 'net' => '', 'host_group' => '');
list($alarm_list, $count) = Alarm::get_list($conn, $criteria);
$alarm_string = '';
foreach ($alarm_list as $alarm) {
$desc_alarm = Util::translate_alarm($conn, $alarm->get_sid_name(), $alarm);
$desc_alarm = html_entity_decode(str_replace("'", "\\'", $desc_alarm));
$desc_alarm = str_replace('"', """, $desc_alarm);
$desc_alarm = str_replace('—', "-", $desc_alarm);
$desc_alarm = Util::js_entities($desc_alarm);
if ($alarm_string != '') {
$alarm_string .= '|';
}
$alarm_string .= $desc_alarm;
}
$data['new_alarms_desc'] = $alarm_string;
}
$return['error'] = FALSE;
$return['output'] = $data;
return $return;
}
示例2: bind_nmap_actions
/****************************************************
********************* Tooltips *********************
****************************************************/
if ($(".more_info").length >= 1)
{
$(".more_info").tipTip({maxWidth: "auto", attribute: 'data-title'});
}
bind_nmap_actions();
<?php
if ($close) {
$msg = sprintf(_('Asset scan in progress for %s assets'), count($targets));
echo 'hide_window("' . Util::js_entities($msg) . '", "nf_success");';
}
?>
});
</script>
</head>
<body>
<!-- Asset form -->
<div id='c_info'>
<?php
if (!empty($e_msg)) {
$disable_scan = TRUE;
示例3: function
?>
" , 'nf_info', false, true, 'padding: 3px; width: 90%; margin: 12px auto 12px auto; text-align: center;');
}
//var h = document.body.scrollHeight || 1000000;window.scrollTo(0,document.body.scrollHeight);
//window.scrollTo(0,h);
flag = 0;
},
error: function (request, status, error) {
flag = 0;
}
});
}
else {
alert("<?php
echo Util::js_entities(_("At least one target needed!"));
?>
");
}
}
}
function disable_button()
{
$("#mjob").attr("disabled","disabled");
}
function display_smethod_div()
{
var type = $('#scheduleM').attr('value');
var id;
示例4: refresh_page
function refresh_page() {
if(refresh) {
location.reload();
}
}
//
function cancelScan(id) {
$('#working').toggle();
$.ajax({
type: "GET",
url: "manage_jobs.php",
data: { disp: "kill", sid: id },
success: function(msg) {
alert("<?php
echo Util::js_entities(_("Cancelling job, please wait a few seconds. Server will stop current scan as soon as possible."));
?>
");
document.location.reload();
}
});
}
function deleteTask(id) {
if (confirmDelete()) {
$.ajax({
type: "GET",
url: "manage_jobs.php",
data: { disp: 'delete_task', job_id: id },
success: function(msg) {
$.ajax({
示例5: print_upgrade_link
function print_upgrade_link($file, $type, $label, $version, $required)
{
echo "{$file} (";
if (!$required) {
$confirm = Util::js_entities(_('This will force only this upgrade and ' . 'may cause unexpected results. Use the \\\'Apply Changes\\\' ' . 'button instead.\\n\\nContinue anyway?'));
echo "<a href=\"?version={$version}&type={$type}&force=1\" class='av_l_main' onClick=\"return confirm('{$confirm}')\">{$label}</a>)";
} else {
echo "{$label})";
}
}
示例6: alert
echo Util::js_entities(_("Database server unselected"));
?>
');
}
}
if (com=='modify')
{
if (typeof(id) != 'undefined')
{
document.location.href = 'newdbsform.php?id='+id;
}
else
{
alert('<?php
echo Util::js_entities(_("Database server unselected"));
?>
');
}
}
if (com=='new')
{
document.location.href = 'newdbsform.php'
}
}
$(document).ready(function(){
<?php
示例7: function
"name" : "<?php
echo Util::js_entities(_('Netflow'));
?>
",
"href" : this.cfg.common.templates + "tpl_dt_netflows.php",
"hide" : !this.perms.netflows,
"load_callback": function()
{
__self.av_sections.load_netflows();
}
},
{
"id" : "tab_history",
"name" : "<?php
echo Util::js_entities(_('History'));
?>
",
"href" : this.cfg.common.templates + "tpl_dt_history.php",
"load_callback": function()
{
__self.av_sections.load_history();
}
}
]
};
//Section Tabs
this.actions =
[
{
示例8: alert
echo Util::js_entities(_('Remote interface unselected'));
?>
');
}
}
if (com == 'modify')
{
if (typeof(id) != 'undefined')
{
document.location.href = 'new_ri_form.php?id='+urlencode(id);
}
else
{
alert('<?php
echo Util::js_entities(_('Remote interface unselected'));
?>
');
}
}
if (com == 'new')
{
document.location.href = 'new_ri_form.php'
}
}
$(document).ready(function(){
<?php
if (GET('msg') == 'saved') {
示例9: function
{
"id" : "tab_properties",
"name" : "<?php
echo Util::js_entities(_('Properties'));
?>
",
"href" : this.cfg.common.templates + "tpl_dt_properties.php",
"load_callback": function()
{
__self.av_sections.load_properties();
}
},
{
"id" : "tab_netflow",
"name" : "<?php
echo Util::js_entities(_('Netflow'));
?>
",
"href" : this.cfg.common.templates + "tpl_dt_netflows.php",
"hide" : !this.perms.netflows,
"load_callback": function()
{
__self.av_sections.load_netflows();
}
}
]
};
this.actions =
[
示例10: function
//Insert
$('#button_insert').on('click', function()
{
document.location.href = 'newpluginsidform.php?plugin_id=<?php
echo $plugin_id;
?>
';
});
//Apply
$('#button_apply').on('click', function()
{
var msg = "<?php
echo Util::js_entities(_('The server will be restarted and all correlation data will be lost. Are you sure?'));
?>
";
var opts = {"yes": "<?php
echo _('Yes');
?>
", "no": "<?php
echo _('No');
?>
"}
av_confirm(msg, opts).done(function()
{
document.location.href = '/ossim/conf/reload.php?what=plugins&back=<?php
echo $back_url;
?>
';
示例11: array_values
if ($days > 6) {
$days = 6;
}
@$ttl_groups[$days]++;
}
$datay = array_values($ttl_groups);
foreach ($datay as $dy) {
$links[] = Menu::get_menu_url("../incidents/index.php?status=Closed", 'analysis', 'tickets', 'tickets');
}
if (is_array($links)) {
$links = "'" . implode("','", $links) . "'";
}
$aux_labels = array(_("1 Day"), _("2 Days"), _("3 Days"), _("4 Days"), _("5 Days"), _("6+ Days"));
$size = count($aux_labels);
for ($i = 0; $i < $size; $i++) {
$labelx[$i] = Util::js_entities($aux_labels[$i]);
}
break;
case 'ticketsClosedByMonth':
$type_graph = 'barCumulative';
$placement = 'insideGrid';
$num_columns = 3;
$legend = empty($_GET['legend']) ? "ne" : GET('legend');
$final_values = array();
$ticket_closed_by_month = Incident::incidents_closed_by_month($conn, null, $user);
if (is_array($ticket_closed_by_month) && !empty($ticket_closed_by_month)) {
foreach ($ticket_closed_by_month as $event_type => $months) {
$label[] = "{label: '" . $event_type . "'}";
$final_values[$event_type] = implode(",", $months);
}
for ($i = 0; $i < 12; $i++) {
示例12: if
place_holder = "<?php
echo Util::js_entities(_('Select Vendor'));
?>
";
}
else if (name == 'model')
{
place_holder = "<?php
echo Util::js_entities(_('Select Model'));
?>
";
}
else if (name == 'version')
{
place_holder = "<?php
echo Util::js_entities(_('Select Version'));
?>
";
}
$(elem).select2(
{
placeholder : place_holder,
allowClear : true
});
if (name == 'vendor' && selected != '')
{
/* Vendor list does not duplicate the cpe type (o, h, a) so we need to figure out if there is a matching */
/* DEPRECATED
示例13: go_template
}
function go_template(action) {
if (action == "edit" || action == "new")
{
save_inputs();
if (action == "edit")
{
var template_id = $('#template_id').val();
if (template_id == '')
{
alert("<?php
echo Util::js_entities(_("No template selected"));
?>
");
return;
}
var url = '../acl/template_form.php?id='+template_id+'&goback=1&callback=users';
url += '&m_opt=configuration&sm_opt=administration&h_opt=users&l_opt=templates';
}
else if (action == "new")
{
var url = '../acl/template_form.php?goback=1&callback=users';
url += '&m_opt=configuration&sm_opt=administration&h_opt=users&l_opt=templates';
}
示例14: gettext
?>
');$('#file').val('<?php
echo $category['xml_file'];
?>
');$('#actionform').submit();return false;" style="marging-left:20px; cursor:pointer" title="<?php
echo gettext("Disable this directive");
?>
" class="info"><img src="../pixmaps/tick.png" border="0"></img></a>
<?php
}
?>
<a href="" id="clone_directive_touser_button_<?php
echo $directive_id;
?>
" onclick="if (confirm('<?php
echo Util::js_entities(gettext("Are you sure you want to clone this directive to user category ?"));
?>
')) { $('#touser_directive_id').val('<?php
echo $directive_id;
?>
');$('#file').val('<?php
echo $category['xml_file'];
?>
');$('#actionform').submit(); } return false;" style="marging-left:20px; cursor:pointer" title="<?php
echo gettext("Clone this directive to user");
?>
" class="info"><img src="../pixmaps/copy.png" border="0"></img></a>
<a href="" onclick="return false;" style="marging-left:20px; cursor:pointer" title="<?php
echo gettext("This directive is part of the AlienVault Feed and therefore it can not be modified. Clone it in order to make changes.");
?>
" class="info"><img src="../pixmaps/delete.gif" border="0" class="disabled"/></a>
示例15: av_window_open
?>
";
av_window_open(url,
{
width: 800,
height: 750,
title: 'otxwindow'
})
});
$('#otx_data_link').on('click', function()
{
params = {
caption : "<?php
echo Util::js_entities(_('Open Threat Exchange Sample Data'));
?>
",
url : '/wizard/extra/otx_data.php',
height : 500,
width : 750
};
LB_show(params);
});
}
function show_otx_step_1()
{