本文整理汇总了PHP中Inventory::toggle_scan方法的典型用法代码示例。如果您正苦于以下问题:PHP Inventory::toggle_scan方法的具体用法?PHP Inventory::toggle_scan怎么用?PHP Inventory::toggle_scan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Inventory
的用法示例。
在下文中一共展示了Inventory::toggle_scan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
if (is_array($nmap_options) && count($nmap_options) > 0) {
$task_params = $task_params . '#' . implode(' ', $nmap_options);
}
// Clean $task_params for OCS tasks
if ($task_type == 3) {
$task_params = '';
}
if (!Inventory::modify($conn, $task_id, $sensor_id, $task_name, $task_type, $task_period, $task_params, $task_nets)) {
$config_nt['options']['type'] = 'nf_error';
$config_nt['content'] = _('Error! Inventory task could not be updated');
} else {
$config_nt['options']['type'] = 'nf_success';
$config_nt['content'] = _('Inventory task updated successfully');
}
} elseif ($submit == _('Enable / Disable')) {
if (!Inventory::toggle_scan($conn, $task_id)) {
$config_nt['options']['type'] = 'nf_error';
$config_nt['content'] = _('Error! Inventory task could not be updated');
} else {
$config_nt['options']['type'] = 'nf_success';
$config_nt['content'] = _('Inventory task updated successfully');
}
}
}
if (!empty($update)) {
$properties = $sensor_obj->get_properties();
$properties['has_nagios'] = $has_nagios;
$properties['has_ntop'] = $has_ntop;
$properties['has_vuln_scanner'] = $has_vuln_scanner;
$properties['has_kismet'] = $has_kismet;
$sensor_obj->set_properties($properties);