"admin", "Password" => "", "Language" => "", "Enabled" => 1, "Stream" => 'View', "Events" => 'Edit', "Control" => 'Edit', "Monitors" => 'Edit', "Devices" => 'Edit', "System" => 'Edit', "MaxBandwidth" => "", "MonitorIds" => false ); function loadConfig( $defineConsts=true ) { global $config; global $configCats; $config = array(); $configCat = array(); $sql = "select * from Config order by Id asc"; $result = mysql_query( $sql ); if ( !$result ) echo mysql_error(); $monitors = array(); while( $row = mysql_fetch_assoc( $result ) ) { if ( $defineConsts ) define( $row['Name'], $row['Value'] ); $config[$row['Name']] = $row; if ( !($configCat = &$configCats[$row['Category']]) ) { $configCats[$row['Category']] = array(); $configCat = &$configCats[$row['Category']]; } $configCat[$row['Name']] = $row; } //print_r( $config ); //print_r( $configCats ); } ?>