Example #1
0
*
*/
require_once 'av_init.php';
Session::logcheck('report-menu', 'ReportsReportServer');
//Get assets from Session
$assets = '<table class="w100" cellspacing="0" cellpadding="0">';
$cnd_1 = $_SESSION['_user_vision']['host_where'] && !Session::only_ff_host();
$cnd_2 = $_SESSION['_user_vision']['net_where'] && !Session::only_ff_net();
if ($cnd_1 || $cnd_2) {
    $db = new ossim_db();
    $conn = $db->connect();
    $assets .= '<tr>
                    <td style="text-align:left;width:25mm;font-size:10px;color:#535353;" valign="top">' . "Assets Selected:" . '</td>
                    <td class="nobborder" style="padding-left:5px;font-size:10px" valign="top">
                        <table class="w100" cellpadding="0" cellspacing="0">';
    if ($_SESSION['_user_vision']['host_where'] && !Session::only_ff_host()) {
        $_host_list = Asset_host::get_basic_list($conn);
        $hosts = $_host_list[1];
        foreach ($hosts as $host) {
            $assets .= '<tr><td class="nobborder" style="text-align:left;" valign="top">' . _('Host') . ': ' . $host['name'] . ' [' . $host['ips'] . ']</td></tr>';
        }
    }
    if ($_SESSION['_user_vision']['net_where'] && !Session::only_ff_net()) {
        $nets = Asset_net::get_list($conn);
        $_net_list = Asset_net::get_list($conn);
        $nets = $_net_list[0];
        foreach ($nets as $net) {
            $assets .= '<tr><td class="nobborder" style="text-align:left;" valign="top">' . _('Net') . ': ' . $net['name'] . ' [' . $net['ips'] . ']</td></tr>';
        }
    }
    $assets .= '     </table>