コード例 #1
0
$params = array($id);
$asset_list = array();
if ($rs = $conn->Execute($sql, $params)) {
    while (!$rs->EOF) {
        try {
            $ips = Asset_host_ips::get_ips_to_string($conn, $rs->fields['id']);
        } catch (Exception $e) {
            $ips = '';
        }
        $asset_list[] = array('id' => $rs->fields['id'], 'name' => $rs->fields["hostname"], 'ip' => $ips, 'log' => $rs->fields["log"]);
        $rs->MoveNext();
    }
}
try {
    $devices = new Devices($conn);
    $dev_list = $devices->get_devices();
} catch (Exception $e) {
    $dev_list = array();
}
?>
<!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 _("OSSIM Framework");
?>
 </title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    
コード例 #2
0
* 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';
$db = new ossim_db();
$conn = $db->connect();
$device_obj = new Devices($conn);
$devices = $device_obj->get_devices();
$db->close();
?>


/****************************************************
 **************** Device functions ******************
 ****************************************************/
 

var device_types = new Array();
var device_subtypes = new Array();
            
<?php 
foreach ($devices as $dt_id => $dt_data) {
    ?>