3 # Display <admin> section options
5 require './jabber-lib.pl';
6 &ui_print_header(undef, $text{'admin_title'}, "", "admin");
8 $conf = &get_jabber_config();
9 $session = &find_by_tag("service", "id", "sessions", $conf);
10 $jsm = &find("jsm", $session);
11 $admin = &find("admin", $jsm);
13 print "<form action=save_admin.cgi>\n";
14 print "<table border width=100%>\n";
15 print "<tr $tb> <td><b>$text{'admin_header'}</b></td> </tr>\n";
16 print "<tr $cb> <td><table width=100%>\n";
18 print "<tr> <td valign=top><b>$text{'admin_read'}</b></td>\n";
19 print "<td><textarea name=read rows=3 cols=50>",
20 join("\n", &find_value("read", $admin)),"</textarea></td> </tr>\n";
22 print "<tr> <td valign=top><b>$text{'admin_write'}</b></td>\n";
23 print "<td><textarea name=write rows=3 cols=50>",
24 join("\n", &find_value("write", $admin)),"</textarea></td> </tr>\n";
26 $reply = &find("reply", $admin);
27 print "<tr> <td valign=top><b>$text{'admin_reply'}</b></td>\n";
28 printf "<td><input type=radio name=reply_def value=1 %s> %s\n",
29 $reply ? "" : "checked", $text{'no'};
30 printf "<input type=radio name=reply_def value=0 %s> %s<br>\n",
31 $reply ? "checked" : "", $text{'yes'};
33 print "<tr> <td><b>$text{'admin_rsubject'}</b></td>\n";
34 printf "<td><input name=rsubject size=40 value='%s'></td> </tr>\n",
35 &find_value("subject", $reply);
36 print "<tr> <td valign=top><b>$text{'admin_rbody'}</b></td>\n";
37 print "<td><textarea name=rbody rows=4 cols=40 wrap=auto>",
38 &find_value("body", $reply),"</textarea></td> </tr>\n";
39 print "</table></td> </tr>\n";
41 print "</table></td></tr></table>\n";
42 print "<input type=submit value='$text{'save'}'></form>\n";
44 &ui_print_footer("", $text{'index_return'});