本文整理汇总了PHP中Asset::get_path_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::get_path_url方法的具体用法?PHP Asset::get_path_url怎么用?PHP Asset::get_path_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::get_path_url方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_error
* 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
*
*/
require_once 'av_init.php';
?>
var __cfg = <?php
echo Asset::get_path_url();
?>
;
function show_error(error)
{
$('#send').removeAttr('disabled');
$('#send').off('click');
$('#send').click(function(){upload_file();});
$('.av_w_overlay').remove();
$('.l_box').remove();
var txt_error = "<div><?php
echo _('The following errors occurred');
?>
示例2: print_form
function print_form($import_type)
{
$config = array('hosts' => array('contexts' => array('show_tree' => Session::show_entities(), 'default_value' => Session::get_default_ctx()), 'chk_iic' => array('show' => TRUE, 'checked' => FALSE), 'help' => array('Version 4.x.x, 5.x.x' => array('format' => _('"IPs(IP1,IP2,...)";"Hostname";"FQDNs(FQDN1,FQDN2,...)";"Description";"Asset Value";"Operating System";"Latitude";"Longitude";"Asset ID";"External Asset";"Device Types(Type1,Type2,...)"'), 'header' => '"IPs";"Hostname";"FQDNs";"Description";"Asset Value";"Operating System";"Latitude";"Longitude";"Asset ID";"External Asset";"Device Type"', 'example' => '"192.168.10.3";"Host-1";"www.example-1.es,www.example-2.es";"' . _('Short description') . '";"2";"Windows";"23.78";"121.45";"379D45C0BBF22B4458BD2F8EE09ECCC2";0;"Server:Mail Server"'), 'Version 3.x.x' => array('format' => _('"IP";"Hostname";"FQDNs(FQDN1,FQDN2,...)";"Description";"Asset Value";"Sensors(Sensor1,Sensor2,...)";"Operating System";"Latitude";"Longitude"'), 'header' => '"IP";"Hostname";"FQDNs";"Description";"Asset Value";"Sensors";"Operating System";"Latitude";"Longitude"', 'example' => '"192.168.10.3";"Host-1";"www.example-1.es,www.example-2.es";"' . _('Short description') . '";"2";"192.168.10.2,192.168.10.3";"Windows";"23.78";"121.45"'))), 'welcome_wizard_hosts' => array('contexts' => array('show_tree' => FALSE, 'default_value' => Session::get_default_ctx()), 'chk_iic' => array('show' => FALSE, 'checked' => TRUE), 'help' => array('Version 4.x.x or higher' => array('format' => _('"IPs(IP1,IP2,...)";"Hostname";"Description";"Operating System";"Device Type(Type1,Type2,...)"'), 'header' => _('"IPs";"Hostname";"Description";"Operating System";"Device Type"'), 'example' => '"192.168.10.3";"Host-1";"' . _('Short description') . '";"Windows";"Server,Network Device"'))));
$paths = Asset::get_path_url(FALSE);
$form_action = $paths['asset']['controllers'] . 'import_all_hosts_ajax.php';
if (!array_key_exists($import_type, $config)) {
echo ossim_error(_('Error! Import Type not found'));
} else {
?>
<div id='av_info'></div>
<form name='form_csv' id='form_csv' method='POST' action='<?php
echo $form_action;
?>
' enctype='multipart/form-data' target='iframe_upload'>
<input type="hidden" name="ctx" id="ctx" value="<?php
echo $config[$import_type]['contexts']['default_value'];
?>
"/>
<input type="hidden" name="import_type" id="import_type" value="<?php
echo $import_type;
?>
"/>
<table id='form_container'>
<?php
//Context
if ($config[$import_type]['contexts']['show_tree'] == TRUE) {
?>
<tr class='left'>
<td class="td_title">
<span><?php
echo _('Select the Entity for the assets');
?>
:</span>
</td>
</tr>
<tr>
<td class='td_content'>
<table id="t_tree">
<tr>
<td class='noborder'>
<div id="tree"></div>
</td>
</tr>
<tr>
<td id='td_es'>
<span class='bold'><?php
echo _('Entity selected');
?>
:</span>
<span id="entity_selected"> - </span>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
//Input File
?>
<tr>
<td class='td_title'>
<span><?php
echo _('Choose a CSV file');
?>
:</span>
</td>
</tr>
<tr>
<td class='td_content'>
<input name='file_csv' id='file_csv' type='file' size='38'/>
<?php
if ($config[$import_type]['chk_iic']['show'] == TRUE) {
$checked_iic = $config[$import_type]['chk_iic']['checked'] == TRUE ? 'checked="checked"' : '';
?>
<span class='ignore_span'>
<input type='checkbox' name='iic' id='iic' <?php
echo $checked_iic;
?>
value='1'/>
<label for='iic' style='margin-left: 2px;'><?php
echo _('Ignore invalid characters (Hostnames)');
?>
</label>
</span>
<?php
} else {
$chk_iic_value = $config[$import_type]['chk_iic']['checked'] == TRUE ? '1' : '0';
?>
<input type='hidden' name='iic' id='iic' value="<?php
echo $chk_iic_value;
?>
"/>
<?php
}
//.........这里部分代码省略.........
示例3: _
require_once 'av_init.php';
Session::useractive();
if (!Session::am_i_admin()) {
Av_exception::throw_error(Av_exception::USER_ERROR, _('You do not have permissions to see this section'));
}
$wizard = Welcome_wizard::get_instance();
if (!$wizard instanceof Welcome_wizard) {
Av_exception::throw_error(Av_exception::USER_ERROR, "There was an error, the Welcome_wizard object doesn't exist");
}
//Getting the scan step to know if we have a scan running
$step = intval($wizard->get_step_data('scan_step'));
//Selected nets
$nets_selected = $wizard->get_step_data('scan_nets');
$nets_selected = is_array($nets_selected) ? $nets_selected : array();
$n_ids = array_fill_keys(array_keys($nets_selected), 1);
$paths = Asset::get_path_url(FALSE);
$iframe_url = $paths['network']['views'] . 'import_all_nets.php?import_type=welcome_wizard_nets';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title> <?php
echo _("AlienVault " . (Session::is_pro() ? "USM" : "OSSIM"));
?>
</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta http-equiv="Pragma" content="no-cache"/>
<?php
//CSS Files
$_files = array(array('src' => 'av_common.css?only_common=1', 'def_path' => TRUE), array('src' => 'home.css', 'def_path' => TRUE), array('src' => 'jquery-ui.css', 'def_path' => TRUE), array('src' => 'lightbox.css', 'def_path' => TRUE), array('src' => 'jquery.dataTables.css', 'def_path' => TRUE), array('src' => '/wizard/wizard.css', 'def_path' => TRUE));
示例4: print_form
function print_form($import_type)
{
$config = array('networks' => array('contexts' => array('show_tree' => Session::show_entities(), 'default_value' => Session::get_default_ctx()), 'chk_iic' => array('show' => TRUE, 'checked' => FALSE), 'help' => array('Version 4.x.x, 5.x.x' => array('format' => _('"Netname";"CIDRs(CIDR1,CIDR2,...)";"Description";"Asset Value";"Net ID"'), 'header' => '"Netname";"CIDRs";"Description";"Asset Value";"Net ID"', 'example' => '"Net-1";"192.168.10.0/24,192.168.9.0/24";"' . _('Short description') . '";"2";"479D45C0BBF22B4458BD2F8EE09ECAC2"'), 'Version 3.x.x' => array('format' => _('"Netname";"CIDRs(CIDR1,CIDR2,...)";"Description";"Asset Value";"Sensors(Sensor1,Sensor2,...)"'), 'header' => '"Netname";"CIDRs";"Description";"Asset Value";"Sensors"', 'example' => '"Net-1";"192.168.10.0/24,192.168.9.0/24";"' . _('Short description') . '";"2";"192.168.10.2,192.168.10.3"'))), 'welcome_wizard_nets' => array('contexts' => array('show_tree' => FALSE, 'default_value' => Session::get_default_ctx()), 'chk_iic' => array('show' => FALSE, 'checked' => TRUE), 'help' => array('Version 4.x.x or higher' => array('format' => _('"Netname";"CIDRs(CIDR1,CIDR2,...)";"Description"'), 'header' => '"Netname";"CIDRs";"Description"', 'example' => '"Net-1";"192.168.10.0/24,192.168.9.0/24";"' . _('Short description') . '"'))));
$paths = Asset::get_path_url(FALSE);
$form_action = $paths['network']['controllers'] . 'import_all_nets_ajax.php';
if (!array_key_exists($import_type, $config)) {
echo ossim_error(_('Error! Import Type not found'));
} else {
?>
<div id='av_info'></div>
<form name='form_csv' id='form_csv' method='POST' action='<?php
echo $form_action;
?>
' enctype='multipart/form-data' target='iframe_upload'>
<input type="hidden" name="ctx" id="ctx" value="<?php
echo $config[$import_type]['contexts']['default_value'];
?>
"/>
<input type="hidden" name="import_type" id="import_type" value="<?php
echo $import_type;
?>
"/>
<table id='form_container'>
<?php
//Context
if ($config[$import_type]['contexts']['show_tree'] == TRUE) {
?>
<tr class='left'>
<td class="td_title">
<span><?php
echo _('Select the Entity for the nets');
?>
:</span>
</td>
</tr>
<tr>
<td class='td_content'>
<table id="t_tree">
<tr>
<td class='noborder'>
<div id="tree"></div>
</td>
</tr>
<tr>
<td id='td_es'>
<span class='bold'><?php
echo _('Entity selected');
?>
:</span>
<span id="entity_selected"> - </span>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
$top_class = $import_type == 'welcome_wizard_nets' ? 'td_top' : '';
//Input File
?>
<tr>
<td class='td_title <?php
echo $top_class;
?>
'>
<span><?php
echo _('Choose a CSV file');
?>
:</span>
</td>
</tr>
<tr>
<td class='td_content'>
<input name='file_csv' id='file_csv' type='file' size='38'/>
<?php
if ($config[$import_type]['chk_iic']['show'] == TRUE) {
$checked_iic = $config[$import_type]['chk_iic']['checked'] == TRUE ? 'checked="checked"' : '';
?>
<span class='ignore_span'>
<input type='checkbox' name='iic' id='iic' <?php
echo $checked_iic;
?>
value='1'/>
<label for='iic' style='margin-left: 2px;'><?php
echo _('Ignore invalid characters (Net names)');
?>
</label>
</span>
<?php
} else {
$chk_iic_value = $config[$import_type]['chk_iic']['checked'] == TRUE ? '1' : '0';
?>
<input type='hidden' name='iic' id='iic' value="<?php
//.........这里部分代码省略.........