Location: PHPKode > projects > SnortCenter 2.x > snortcenter-release/vars.php
<?php
    /*
    ** SnortCenter Copyright (C) 2001,2002,2003 Stefan Dens
    **
    ** Author: Stefan Dens <hide@address.com>
    **
    ** This program is free software; you can redistribute it and/or modify
    ** it under the terms of the GNU General Public License as published by
    ** the Free Software Foundation; either version 2 of the License, or
    ** (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
        ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU General Public License for more details.
    **
    ** You should have received a copy of the GNU General Public License
    ** along with this program; if not, write to the Free Software
    ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    */
?>
<?php
     
    include("config.php");
    include_once("list.inc.php");
     
    $db = NewACIDDBConnection($DBlib_path, $DBtype);
    $db->acidConnect($DB_dbname, $DB_host, $DB_port, $DB_user, $DB_password);
     
    if ($do == 'Delete') {
        delete($var, 'vars', $db);
    }
     
    include('top.inc.php');
    echo '<BR>';
    display_list_start($sensor_id, 0);
     
    $result = $db->acidExecute("SELECT id,var_name,var_value, snort_default from vars order by snort_default, var_name");
    $count = 0;
    while ($myrow = $result->acidFetchRow()) {
        list($id, $var_name, $var_value, $snort_default) = $myrow;
        if ($color  != "white") {
            $color = "white";
        } else {
            $color = "#DDDDDD";
        }
        if ($snort_default == 'yes') $color = '#fffaa8';
	echo "<TR border=1 style='border : $color;' bgcolor=$color><TD width=25>";
	if ($snort_default == 'no') {
    	    echo "<INPUT style=\"background-color: $color;\" TYPE=checkbox name=var[$count] value=\"$id\"></TD><TD width=25>";
	}
	else {
	    echo '&nbsp;</TD><TD width=25>';
	}
	echo "<A href=\"edit_vars.php?id=$id&sensor_id=$sensor_id\"><img alt='Edit' border=0 height=15 src='./images/edit_button.png'></A>&nbsp;";
        echo "</TD><TD>var $var_name&nbsp;$var_value</TD></TR>";
        $count++;
    }
     
    display_list_end(2);
    echo '<BR>';
    include('bottom.inc.php');
     
    $result->acidFreeRows();
    $db->acidClose();
?>


Return current item: SnortCenter 2.x