3 # Display other options
5 require './samba-lib.pl';
9 &error_setup("<blink><font color=red>$text{'eacl_aviol'}</font></blink>");
10 &error("$text{'eacl_np'} $text{'eacl_pcm'}") unless $access{'conf_misc'};
12 &ui_print_header(undef, $text{'misc_title'}, "");
15 print "<form action=save_misc.cgi>\n";
16 print "<table border width=100%>\n";
17 print "<tr $tb> <td><b>$text{'misc_title'}</b></td> </tr>\n";
18 print "<tr $cb> <td><table width=100%>\n";
20 print "<tr> <td><b>$text{'misc_debug'}</b></td>\n";
21 print "<td><select name=debug_level>\n";
22 foreach $d ("", 0 .. 10) {
23 printf "<option value=\"$d\" %s> %s\n",
24 &getval("debug level") eq $d ? "selected" : "",
25 $d eq "" ? $text{'default'} : $d;
27 print "</select></td>\n";
29 print "<td><b>$text{'misc_cachecall'}</b></td>\n";
30 printf "<td nowrap><input type=radio name=getwd_cache value=yes %s> $text{'yes'}\n",
31 &istrue("getwd cache") ? "checked" : "";
32 printf "<input type=radio name=getwd_cache value=no %s> $text{'no'}</td> </tr>\n",
33 &istrue("getwd cache") ? "" : "checked";
35 print "<tr> <td><b>$text{'misc_lockdir'}</b></td>\n";
36 print "<td colspan=3>\n";
37 printf "<input type=radio name=lock_directory_def value=1 %s> $text{'default'}\n",
38 &getval("lock directory") eq "" ? "checked" : "";
39 printf " <input type=radio name=lock_directory_def value=0 %s>\n",
40 &getval("lock directory") eq "" ? "" : "checked";
41 printf "<input name=lock_directory size=30 value=\"%s\">\n",
42 &getval("lock directory");
43 print &file_chooser_button("lock_directory", 1);
44 print "</td> </tr>\n";
46 print "<tr> <td><b>$text{'misc_log'}</b></td>\n";
47 print "<td colspan=3>\n";
48 printf "<input type=radio name=log_file_def value=1 %s> $text{'default'}\n",
49 &getval("log file") eq "" ? "checked" : "";
50 printf " <input type=radio name=log_file_def value=0 %s>\n",
51 &getval("log file") eq "" ? "" : "checked";
52 printf "<input name=log_file size=30 value=\"%s\">\n",
54 print &file_chooser_button("log_file", 0);
55 print "</td> </tr>\n";
57 print "<tr> <td><b>$text{'misc_maxlog'}</b></td>\n";
58 printf "<td nowrap><input type=radio name=max_log_size_def value=1 %s> $text{'default'}\n",
59 &getval("max log size") eq "" ? "checked" : "";
60 printf "<input type=radio name=max_log_size_def value=0 %s>\n",
61 &getval("max log size") eq "" ? "" : "checked";
62 printf "<input name=max_log_size size=5 value=\"%s\">kB</td>\n",
63 &getval("max log size");
65 print "<tr> <td><b>$text{'misc_rawread'}</b></td>\n";
66 printf "<td nowrap><input type=radio name=read_raw value=yes %s> $text{'yes'}\n",
67 &isfalse("read raw") ? "" : "checked";
68 printf "<input type=radio name=read_raw value=no %s> $text{'no'}</td>\n",
69 &isfalse("read raw") ? "checked" : "";
71 print "<td><b>$text{'misc_rawwrite'}</b></td>\n";
72 printf "<td nowrap><input type=radio name=write_raw value=yes %s> $text{'yes'}\n",
73 &isfalse("write raw") ? "" : "checked";
74 printf "<input type=radio name=write_raw value=no %s> $text{'no'}</td> </tr>\n",
75 &isfalse("write raw") ? "checked" : "";
77 print "<td><b>$text{'misc_overlapread'}</b></td>\n";
78 printf "<td nowrap><input type=radio name=read_size_def value=1 %s> $text{'default'}\n",
79 &getval("read size") eq "" ? "checked" : "";
80 printf "<input type=radio name=read_size_def value=0 %s>\n",
81 &getval("read size") eq "" ? "" : "checked";
82 printf "<input name=read_size size=5 value=\"%s\">$text{'config_bytes'}</td> </tr>\n",
85 print "<tr> <td><b>$text{'misc_chroot'}</b></td>\n";
86 print "<td colspan=3>\n";
87 printf "<input type=radio name=root_directory_def value=1 %s> $text{'config_none'}\n",
88 &getval("root directory") eq "" ? "checked" : "";
89 printf " <input type=radio name=root_directory_def value=0 %s>\n",
90 &getval("root directory") eq "" ? "" : "checked";
91 printf "<input name=root_directory size=30 value=\"%s\">\n",
92 &getval("root directory");
93 print &file_chooser_button("root_directory", 1);
94 print "</td> </tr>\n";
96 print "<tr> <td><b>$text{'misc_smbrun'}</b></td>\n";
97 print "<td colspan=3>\n";
98 printf "<input type=radio name=smbrun_def value=1 %s> $text{'default'}\n",
99 &getval("smbrun") eq "" ? "checked" : "";
100 printf " <input type=radio name=smbrun_def value=0 %s>\n",
101 &getval("smbrun") eq "" ? "" : "checked";
102 printf "<input name=smbrun size=30 value=\"%s\">\n",
104 print &file_chooser_button("smbrun", 0);
105 print "</td> </tr>\n";
107 print "<tr> <td><b>$text{'misc_clienttime'}</b></td>\n";
108 printf "<td><input name=time_offset size=4 value=\"%d\">$text{'config_mins'}</td>\n",
109 &getval("time offset");
111 print "<td><b>$text{'misc_readprediction'}</b></td>\n";
112 printf "<td nowrap><input type=radio name=read_prediction value=yes %s> $text{'yes'}\n",
113 &istrue("read prediction") ? "checked" : "";
114 printf "<input type=radio name=read_prediction value=no %s> $text{'no'}</td> </tr>\n",
115 &istrue("read prediction") ? "" : "checked";
117 print "</table></tr></td></table><p>\n";
118 print "<input type=submit value=$text{'save'}></form>\n";
120 &ui_print_footer("", $text{'index_sharelist'});