#!/usr/local/bin/perl # edit_popts.cgi # Edit print-share specific options require './samba-lib.pl'; &ReadParse(); # check acls &error_setup("$text{'eacl_aviol'}"); &error("$text{'eacl_np'} $text{'eacl_pvpopt'}") unless &can('ro', \%access, $in{'share'}); # display $s = $in{'share'}; if ($s eq "global") { &ui_print_header(undef, $text{'print_title1'}, ""); } else { &ui_print_header(undef, $text{'print_title2'}, ""); } &get_share($s); print "
\n"; print "\n"; # Printer options print "\n"; print "\n"; print "
$text{'print_option'}
\n"; print "\n"; printf "\n", &getval("min print space"); print "\n"; print "\n"; print "\n"; printf "\n", &getval("print command"); print "\n"; printf "\n", &getval("lpq command"); print "\n"; printf "\n", &getval("lprm command"); print "\n"; printf "\n", &getval("lppause command"); print "\n"; printf "\n", &getval("lpresume command"); print "\n"; print "\n", &getval("printer driver"); print "
$text{'print_minspace'}$text{'print_postscript'}",&yesno_input("postscript"),"
$text{'print_command'}\n"; printf " $text{'default'}\n", &getval("print command") eq "" ? "checked" : ""; printf "  \n", &getval("print command") ne "" ? "checked" : ""; printf "
$text{'print_queue'}\n"; printf " $text{'default'}\n", &getval("lpq command") eq "" ? "checked" : ""; printf "  \n", &getval("lpq command") ne "" ? "checked" : ""; printf "
$text{'print_delete'}\n"; printf " $text{'default'}\n", &getval("lprm command") eq "" ? "checked" : ""; printf "  \n", &getval("lprm command") ne "" ? "checked" : ""; printf "
$text{'print_pause'}\n"; printf " $text{'config_none'}\n", &getval("lppause command") eq "" ? "checked" : ""; printf "  \n", &getval("lppause command") ne "" ? "checked" : ""; printf "
$text{'print_unresume'}\n"; printf " $text{'config_none'}\n", &getval("lpresume command") eq "" ? "checked" : ""; printf "  \n", &getval("lpresume command") ne "" ? "checked" : ""; printf "
$text{'print_driver'}\n"; printf " $text{'config_none'}\n", &getval("printer driver") eq "" ? "checked" : ""; printf "  \n", &getval("printer driver") ne "" ? "checked" : ""; printf "

\n"; print "" if &can('wO', \%access, $in{'share'}); print "

\n"; &ui_print_footer("edit_pshare.cgi?share=".&urlize($s), $text{'index_printershare'}, "", $text{'index_sharelist'});