📄 edit_popts.cgi
字号:
#!/usr/local/bin/perl# edit_popts.cgi# Edit print-share specific optionsrequire './samba-lib.pl';&ReadParse();$s = $in{'share'};if ($s eq "global") { &header("Printer Option Defaults", ""); }else { &header("Edit Printer Options", ""); }&get_share($s);print "<hr>\n";print "<form action=save_popts.cgi>\n";print "<input type=hidden name=old_name value=\"$s\">\n";# Printer optionsprint "<table border width=100%>\n";print "<tr $tb> <td><b>Printer Options</b></td> </tr>\n";print "<tr $cb> <td><table>\n";print "<tr> <td><b>Miniumum free space</b></td>\n";printf "<td><input name=min_print_space size=5 value=\"%d\"></td>\n", &getval("min print space");print "<td><b>Force postscript printing</b></td>\n";print "<td>",&yesno_input("postscript"),"</td> </tr>\n";print "<tr> <td><b>Print command</b></td>\n";printf "<td colspan=3>\n";printf "<input type=radio name=print_command_def value=1 %s> Default\n", &getval("print command") eq "" ? "checked" : "";printf " <input type=radio name=print_command_def value=0 %s>\n", &getval("print command") ne "" ? "checked" : "";printf "<input name=print_command size=30 value=\"%s\"></td> </tr>\n", &getval("print command");print "<tr> <td><b>Display queue command</b></td>\n";printf "<td colspan=3>\n";printf "<input type=radio name=lpq_command_def value=1 %s> Default\n", &getval("lpq command") eq "" ? "checked" : "";printf " <input type=radio name=lpq_command_def value=0 %s>\n", &getval("lpq command") ne "" ? "checked" : "";printf "<input name=lpq_command size=30 value=\"%s\"></td> </tr>\n", &getval("lpq command");print "<tr> <td><b>Delete job command</b></td>\n";printf "<td colspan=3>\n";printf "<input type=radio name=lprm_command_def value=1 %s> Default\n", &getval("lprm command") eq "" ? "checked" : "";printf " <input type=radio name=lprm_command_def value=0 %s>\n", &getval("lprm command") ne "" ? "checked" : "";printf "<input name=lprm_command size=30 value=\"%s\"></td> </tr>\n", &getval("lprm command");print "<tr> <td><b>Pause job command</b></td>\n";printf "<td colspan=3>\n";printf "<input type=radio name=lppause_command_def value=1 %s> None\n", &getval("lppause command") eq "" ? "checked" : "";printf " <input type=radio name=lppause_command_def value=0 %s>\n", &getval("lppause command") ne "" ? "checked" : "";printf "<input name=lppause_command size=30 value=\"%s\"></td> </tr>\n", &getval("lppause command");print "<tr> <td><b>Unresume job command</b></td>\n";printf "<td colspan=3>\n";printf "<input type=radio name=lpresume_command_def value=1 %s> None\n", &getval("lpresume command") eq "" ? "checked" : "";printf " <input type=radio name=lpresume_command_def value=0 %s>\n", &getval("lpresume command") ne "" ? "checked" : "";printf "<input name=lpresume_command size=30 value=\"%s\"></td> </tr>\n", &getval("lpresume command");print "<tr> <td><b>Printer Driver</b></td>\n"; print "<td colspan=3>\n";printf "<input type=radio name=printer_driver_def value=1 %s> None\n", &getval("printer driver") eq "" ? "checked" : "";printf " <input type=radio name=printer_driver_def value=0 %s>\n", &getval("printer driver") ne "" ? "checked" : "";printf "<input name=printer_driver size=30 value=\"%s\"></td> </tr>\n", &getval("printer driver");print "</table> </td></tr></table><p>\n";print "<input type=submit value=Save> </form><p>\n";print "<hr>\n";&footer("edit_pshare.cgi?share=".&urlize($s), "printer share");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -