Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 9:47 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Fri Jun 06, 2008 12:28 am 
Offline
Newbie

Joined: Thu Jun 05, 2008 4:38 pm
Posts: 17
Hello,

my feature is a gui to setup which reports display the wanted details.
For example does "Systems Discovered in the last 5 Days" imho needs to display the last audited time,
and the discovered time. Also there might be the need to specify additional reports (read different sql-querys) and not just the provided ones. In order to stay up-to-date with current svn-build, i would also like to have personal additions keept in custom files - maybe like index_data_custom.php, which can override the defaults given.
In the example here is simply an additional column added for "Systems Discovered in the last 5 Days" displaying the last audit time for the listed systems.

Regards Falko


->
file: index_data.php
change: function GetDiscoveredSystemsData($id)
added: 2 lines, altered 3 lines


[code]
// ****** Get systems discovered in the last $system_detected days *****************************************************
// $id = ID of the HTML element that this data is "bound" to
function GetDiscoveredSystemsData($id)
{
global $db, $system_detected;
$tr_class='npb_highlight_row';

$sql = "SELECT system_name, net_ip_address, system_uuid, system_first_timestamp, system_timestamp FROM system ";
$sql .= "WHERE system_first_timestamp > '" . adjustdate(0,0,-$system_detected) . "000000' ";
$sql .= "ORDER BY system_timestamp DESC";

$result = mysql_query($sql, $db);
$count=mysql_numrows($result);

echo "<div class='npb_content_data' id='".$id."' style='display: none;'>";

if ($myrow = mysql_fetch_array($result))
{
echo "<table>";
echo " <tr>";
echo " <th>".__("IP Address")."</td>";
echo " <th>".__("Hostname")."</td>";
echo " <th>".__("Last Audit")."</td>";
echo " <th>".__("Discovered")."</td>";
echo " </tr>";
do
{
echo "<tr class='".alternate_tr_class($tr_class)."'>";
echo " <td>".ip_trans($myrow["net_ip_address"])."</td>";
echo " <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&amp;view=summary\">".$myrow["system_name"]."</a></td>";
echo " <td>".return_date_time($myrow["system_timestamp"])."</td>";
echo " <td>".return_date_time($myrow["system_first_timestamp"])."</td>";
echo "</tr>";
} while ($myrow = mysql_fetch_array($result));
}
echo "</table>";
echo "</div>";
echo "<p class='npb_section_summary'>".__("Systems").": ".$count."</p>";

return;
}
[/code]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group