#!/usr/bin/perl # index.cgi # Display jabber configuration option categories require './jabber-lib.pl'; # Check if config file exists if (!-r $config{'jabber_config'}) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google")); print &text('index_econfig', "<tt>$config{'jabber_config'}</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n"; &ui_print_footer("/", $text{"index"}); exit; } # Check if base directory exists if (!-d $config{'jabber_dir'}) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google")); print &text('index_edir', "<tt>$config{'jabber_dir'}</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n"; &ui_print_footer("/", $text{"index"}); exit; } # Check the version of jabberd $jabberd = $config{'jabber_daemon'} ? $config{'jabber_daemon'} : "$config{'jabber_dir'}/bin/jabberd"; if (!-x $jabberd) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google")); print &text('index_ejabberd', "<tt>$jabberd</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n"; &ui_print_footer("/", $text{"index"}); exit; } $ver = &get_jabberd_version(\$out); if (!$ver) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google")); print &text('index_eversion', "<pre>$out</pre>", "1.4", "<tt>$jabberd -v</tt>"),"<p>\n"; &ui_print_footer("/", $text{"index"}); exit; } elsif ($ver >= 2) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google")); print &text('index_eversion2', "<pre>$out</pre>", "2.0", "<tt>$jabberd -v</tt>"),"<p>\n"; &ui_print_footer("/", $text{"index"}); exit; } &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef, &help_search_link("jabber", "man", "doc", "google"), undef, undef, &text('index_version', $ver)); # Check if the needed Perl module are installed push(@needs, "XML::Parser") if (!$got_xml_parser); push(@needs, "XML::Generator") if (!$got_xml_generator); if (@needs) { $needs = &urlize(join(" ", @needs)); print &text(@needs == 2 ? 'index_emodules' : 'index_emodule', @needs, "/cpan/download.cgi?source=3&cpan=$needs&mode=2&return=/$module_name/&returndesc=".&urlize($text{'index_return'})),"<p>\n"; print "$text{'index_expat'}<p>\n"; print &ui_hr(); &ui_print_footer("/", $text{"index"}); exit; } # Show config category icons $conf = &get_jabber_config(); if (!ref($conf)) { print &text('index_eparse', "<tt>XML::Parser</tt>", $conf),"<p>\n"; print &ui_hr(); &ui_print_footer("/", $text{"index"}); exit; } @cats = ( "general", "messages", "modules", "karma", "ips", "filter", "admin", "file" ); @links = map { "edit_${_}.cgi" } @cats; @titles = map { $text{"${_}_title"} } @cats; @icons = map { "images/${_}.gif" } @cats; &icons_table(\@links, \@titles, \@icons); # Show warning about config file open(CONFIG, "<$config{'jabber_config'}"); while(<CONFIG>) { if (/\s+<!--/) { $has_comment++; last; } } close(CONFIG); print "<b>",&text('index_comments', "<tt>$config{'jabber_config'}</tt>"),"</b><p>\n" if ($has_comment); # Check if jabber is running and show the correct buttons print &ui_hr(); print "<table width=100%>\n"; if (&check_pid_file(&jabber_pid_file())) { # Running .. offer to restart and stop print "<form action=restart.cgi><tr>\n"; print "<td><input type=submit value=\"$text{'index_restart'}\"></td>\n"; print "<td>$text{'index_restartmsg'}</td>\n"; print "</tr></form>\n"; print "<form action=stop.cgi><tr>\n"; print "<td><input type=submit value=\"$text{'index_stop'}\"></td>\n"; print "<td>$text{'index_stopmsg'}</td>\n"; print "</tr></form>\n"; } else { # Not running .. offer to start print "<form action=start.cgi><tr>\n"; print "<td><input type=submit value=\"$text{'index_start'}\"></td>\n"; print "<td>$text{'index_startmsg'}</td>\n"; print "</tr></form>\n"; } print "</table>\n"; close(PID); &ui_print_footer("/", $text{'index'});
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
backup_config.pl | File | 770 B | 0755 |
|
config | File | 152 B | 0644 |
|
config-cobalt-linux | File | 190 B | 0644 |
|
config-coherent-linux | File | 190 B | 0644 |
|
config-debian-linux | File | 166 B | 0644 |
|
config-gentoo-linux | File | 195 B | 0644 |
|
config-mandrake-linux | File | 185 B | 0644 |
|
config-msc-linux | File | 190 B | 0644 |
|
config-openSUSE-Linux-15.0-ALL | File | 186 B | 0644 |
|
config-openmamba-linux | File | 190 B | 0644 |
|
config-redhat-linux | File | 190 B | 0644 |
|
config-suse-linux | File | 190 B | 0644 |
|
config-syno-linux | File | 152 B | 0644 |
|
config-trustix-linux | File | 190 B | 0644 |
|
config-turbo-linux | File | 190 B | 0644 |
|
config-united-linux | File | 202 B | 0644 |
|
config.info | File | 365 B | 0644 |
|
config.info.ca | File | 415 B | 0644 |
|
config.info.cs | File | 344 B | 0644 |
|
config.info.de | File | 413 B | 0644 |
|
config.info.es | File | 340 B | 0644 |
|
config.info.nl | File | 397 B | 0644 |
|
config.info.no | File | 373 B | 0644 |
|
config.info.pl | File | 394 B | 0644 |
|
config.info.ru | File | 580 B | 0644 |
|
config.info.uk | File | 592 B | 0644 |
|
cpan_modules.pl | File | 97 B | 0755 |
|
edit_admin.cgi | File | 1.66 KB | 0755 |
|
edit_file.cgi | File | 699 B | 0755 |
|
edit_filter.cgi | File | 1.37 KB | 0755 |
|
edit_general.cgi | File | 1.7 KB | 0755 |
|
edit_ips.cgi | File | 1.59 KB | 0755 |
|
edit_karma.cgi | File | 2.83 KB | 0755 |
|
edit_messages.cgi | File | 2.46 KB | 0755 |
|
edit_modules.cgi | File | 1.35 KB | 0755 |
|
index.cgi | File | 4.11 KB | 0755 |
|
install_check.pl | File | 609 B | 0755 |
|
jabber-lib.pl | File | 5.13 KB | 0755 |
|
module.info | File | 169 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 106 B | 0644 |
|
module.info.ar | File | 0 B | 0644 |
|
module.info.ar.auto | File | 169 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 189 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 173 B | 0644 |
|
module.info.ca | File | 98 B | 0644 |
|
module.info.ca.auto | File | 15 B | 0644 |
|
module.info.cs | File | 25 B | 0644 |
|
module.info.cs.auto | File | 85 B | 0644 |
|
module.info.da | File | 0 B | 0644 |
|
module.info.da.auto | File | 106 B | 0644 |
|
module.info.de | File | 95 B | 0644 |
|
module.info.de.auto | File | 17 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 201 B | 0644 |
|
module.info.es | File | 42 B | 0644 |
|
module.info.es.auto | File | 90 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 120 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 142 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 115 B | 0644 |
|
module.info.fr | File | 0 B | 0644 |
|
module.info.fr.auto | File | 113 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 153 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 132 B | 0644 |
|
module.info.hu | File | 0 B | 0644 |
|
module.info.hu.auto | File | 119 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 118 B | 0644 |
|
module.info.ja | File | 0 B | 0644 |
|
module.info.ja.auto | File | 148 B | 0644 |
|
module.info.ko | File | 0 B | 0644 |
|
module.info.ko.auto | File | 126 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 130 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 118 B | 0644 |
|
module.info.ms | File | 94 B | 0644 |
|
module.info.ms.auto | File | 15 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 116 B | 0644 |
|
module.info.nl | File | 25 B | 0644 |
|
module.info.nl.auto | File | 93 B | 0644 |
|
module.info.no | File | 25 B | 0644 |
|
module.info.no.auto | File | 85 B | 0644 |
|
module.info.pl | File | 95 B | 0644 |
|
module.info.pl.auto | File | 17 B | 0644 |
|
module.info.pt | File | 0 B | 0644 |
|
module.info.pt.auto | File | 109 B | 0644 |
|
module.info.pt_BR | File | 0 B | 0644 |
|
module.info.pt_BR.auto | File | 118 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 125 B | 0644 |
|
module.info.ru | File | 47 B | 0644 |
|
module.info.ru.auto | File | 150 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 120 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 120 B | 0644 |
|
module.info.sv | File | 0 B | 0644 |
|
module.info.sv.auto | File | 112 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 250 B | 0644 |
|
module.info.tr | File | 0 B | 0644 |
|
module.info.tr.auto | File | 129 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 191 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 146 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 114 B | 0644 |
|
module.info.zh | File | 0 B | 0644 |
|
module.info.zh.auto | File | 94 B | 0644 |
|
module.info.zh_TW | File | 0 B | 0644 |
|
module.info.zh_TW.auto | File | 103 B | 0644 |
|
restart.cgi | File | 274 B | 0755 |
|
save_admin.cgi | File | 1.16 KB | 0755 |
|
save_file.cgi | File | 636 B | 0755 |
|
save_filter.cgi | File | 920 B | 0755 |
|
save_general.cgi | File | 1.75 KB | 0755 |
|
save_ips.cgi | File | 979 B | 0755 |
|
save_karma.cgi | File | 1.26 KB | 0755 |
|
save_messages.cgi | File | 1.29 KB | 0755 |
|
save_modules.cgi | File | 748 B | 0755 |
|
start.cgi | File | 168 B | 0755 |
|
stop.cgi | File | 197 B | 0755 |
|