示例#1
0
                        }
                    }
                }
            }
        }
    }
}
/* Printing current date */
echo '<div class="smaller2">' . date('F dS Y h:i:s A') . '<br />';
if ($USER_monitoring == 1) {
    echo ' -- Refreshing every ' . $ossec_refresh_time . ' secs</div><br />';
} else {
    echo '</div><br />';
}
/* Getting all agents. */
$agent_list = os_getagents($ossec_handle);
//echo '<a href="?f=sf">Firewall Search</a> - <a href="?f=s">Alerts Search</a>';
echo "<h2>Alert search options:</h2>\n";
/* Search forms */
echo '
<form name="dosearch" method="post" action="index.php?f=s">
<table><tr valign="top">
    <td><input type="radio" name="monitoring" value="0" checked="checked"/>
    </td>
    <td>From: &nbsp;<input type="text" name="initdate" 
    id="i_date_a" size="17"
    value="' . date('Y-m-d H:i', $u_init_time) . '" maxlength="16" 
    class="formText" />
    <img src="img/calendar.gif" id="i_trigger" title="Date selector"
    alt="Date selector" class="formText" />
    </td><td>&nbsp;&nbsp;
示例#2
0
文件: main.php 项目: jrossi/ossec-wui
 * License (version 3) as published by the FSF - Free Software
 * Foundation
 */
/* OS PHP init */
if (!function_exists('os_handle_start')) {
    echo "<b class='red'>You are not allowed direct access.</b><br />\n";
    return 1;
}
/* Starting handle */
$ossec_handle = os_handle_start($ossec_dir);
if ($ossec_handle == NULL) {
    echo "Unable to access ossec directory.\n";
    return 1;
}
/* Getting all agents */
if (($agent_list = os_getagents($ossec_handle)) == NULL) {
    echo "No agent available.\n";
    return 1;
}
/* Printing current date */
echo '<div class="smaller2">' . date('F dS Y h:i:s A') . '</div><br />';
/* Getting syscheck information */
$syscheck_list = os_getsyscheck($ossec_handle);
echo '<table width="95%"><tr><td width="45%" valign="top">';
/* Available agents */
echo "<h2>Available&nbsp;agents:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h2><br />\n\n";
/* Agent count for java script */
$agent_count = 0;
/* Looping all agents */
foreach ($agent_list as $agent) {
    $atitle = "";