diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..559cc4d --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +# If using nconf outside NEMS Linux, simply delete this file and rename the install file and folder to .php instead of .php_ +AuthType Basic +AuthName "NEMS nConf" +AuthUserFile /var/www/htpasswd +Require valid-user diff --git a/README.md b/README.md index 73e9eef..8ccdff9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ NConf README ============ +**NConf is not dead.** It's just no longer developed by the original developer(s). Here is the most current NConf build, maintained by Robbie Ferguson for NEMS Linux. + NConf homepage: http://www.nconf.org/ NEMS homepage: -http://baldnerd.com/nems/ +https://nemslinux.com/ **THIS VERSION HAS BEEN RE-WORKED BY ROBBIE FERGUSON TO OPERATE UNDER PHP 7.0+ / mySQLi** diff --git a/bin/get_items.pl b/bin/get_items.pl index 727a0d5..659cb19 100755 --- a/bin/get_items.pl +++ b/bin/get_items.pl @@ -70,22 +70,25 @@ &logger(4,"Build the list of attributes to display"); my %attr_restrict; if($opt_a){ +# no strict 'refs'; &logger(5,"Reading attribute(s) selection"); my @attr_restrict = (); if($opt_a eq "VISIBLE") { &logger(5,"Keyword 'VISIBLE' found"); - my %conf_attrs = getConfigAttrs(); - foreach my $attr (keys(%{%conf_attrs->{$opt_c}})){ + my $conf_attrs = getConfigAttrs(); + foreach my $attr (keys(%{$conf_attrs->{$opt_c}})){ unless($attr){next} + my %conf_attrs = getConfigAttrs(); if($conf_attrs{$opt_c}->{$attr}->{'visible'} eq "yes"){ push(@attr_restrict, $attr); } } }elsif($opt_a eq "NAGIOS") { &logger(5,"Keyword 'NAGIOS' found"); - my %conf_attrs = getConfigAttrs(); - foreach my $attr (keys(%{%conf_attrs->{$opt_c}})){ + my $conf_attrs = getConfigAttrs(); + foreach my $attr (keys(%{$conf_attrs->{$opt_c}})){ unless($attr){next} + my %conf_attrs = getConfigAttrs(); if($conf_attrs{$opt_c}->{$attr}->{'write_to_conf'} eq "yes"){ push(@attr_restrict, $attr); } @@ -216,7 +219,8 @@ foreach my $item (@csv_items){ my $csv_record = undef; foreach my $attr (keys(%csv_attrs)){ - $csv_record = $csv_record.%{$item}->{$attr}.$csv_separator; +# $csv_record = $csv_record.%{$item}->{$attr}.$csv_separator; + $csv_record = $csv_record.$item->{$attr}.$csv_separator; } $csv_record =~ s/$csv_separator$//; print "$csv_record\n"; diff --git a/design_templates/nconf_fresh/new.css b/design_templates/nconf_fresh/new.css index e9493dc..8d54a17 100644 --- a/design_templates/nconf_fresh/new.css +++ b/design_templates/nconf_fresh/new.css @@ -31,10 +31,11 @@ text-align:left; } #logo { -background-image:url(nc-logo.gif); +background-image:url(/nconf/img/nconf_logo_sm.png); background-repeat:no-repeat; -height:97px; -width:986px; +background-position: left center; +height:97px; /* these are the size of the wrapper */ +width:986px; /* not the image */ } #titlesub { @@ -404,4 +405,4 @@ input[disabled], select[disabled], textarea[disabled] { opacity: .35; filter:Alpha(Opacity=35); background-image: none; -} \ No newline at end of file +} diff --git a/generate_config.php b/generate_config.php index de62c10..e95c6b1 100644 --- a/generate_config.php +++ b/generate_config.php @@ -17,7 +17,7 @@ # but this will prevent lock file to stay there if ( $lock_file_age < 600 ){ # some one other is generating the config - NConf_DEBUG::set('Someone else is already generating the configuration.', 'ERROR'); + NConf_DEBUG::set('Someone else is already generating the configuration. If you believe this is in error, run: sudo nems-quickfix', 'ERROR'); # close page and cancel action diff --git a/img/ajax-loader.gif b/img/ajax-loader.gif new file mode 100644 index 0000000..a5a3046 Binary files /dev/null and b/img/ajax-loader.gif differ diff --git a/img/nconf_logo_sm.png b/img/nconf_logo_sm.png new file mode 100644 index 0000000..1a33e38 Binary files /dev/null and b/img/nconf_logo_sm.png differ diff --git a/include/head.php b/include/head.php index 63a8a83..25ca279 100644 --- a/include/head.php +++ b/include/head.php @@ -155,7 +155,7 @@ ?> -