X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fsearch%2Fcust_bill.cgi;h=c849341e311b7e602602126075737f648cf83ec8;hb=8d170c8856aff89704d43ea71224f3602c4e9411;hp=5be84b79e2329788bb7737922702ddf7042c29f6;hpb=cdf65c45fa7e4a290caed33185ece86fdccd2e84;p=freeside.git diff --git a/htdocs/search/cust_bill.cgi b/htdocs/search/cust_bill.cgi index 5be84b79e..c849341e3 100755 --- a/htdocs/search/cust_bill.cgi +++ b/htdocs/search/cust_bill.cgi @@ -1,46 +1,44 @@ #!/usr/bin/perl -Tw # -# cust_bill.cgi: Search for invoices (process form) +# $Id: cust_bill.cgi,v 1.4 1999-02-28 00:03:54 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_bill.cgi # -# Note: Should be run setuid freeside as user nobody. -# # ivan@voicenet.com 97-apr-4 # # Changes to allow page to work at a relative position in server # bmccane@maxbaud.net 98-apr-3 +# +# $Log: cust_bill.cgi,v $ +# Revision 1.4 1999-02-28 00:03:54 ivan +# removed misleading comments +# +# Revision 1.3 1999/01/19 05:14:11 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 09:41:07 ivan +# s/CGI::(Base|Request)/CGI.pm/; +# use strict; -use CGI::Request; +use vars qw ( $cgi $invnum ); +use CGI; +use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); +use FS::CGI qw(popurl idiot); use FS::Record qw(qsearchs); -my($req)=new CGI::Request; -cgisuidsetup($req->cgi); +$cgi = new CGI; +cgisuidsetup($cgi); -$req->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; -my($invnum)=$2; +$cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; +$invnum = $2; if ( qsearchs('cust_bill',{'invnum'=>$invnum}) ) { - $req->cgi->redirect("../view/cust_bill.cgi?$invnum"); #redirect + print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect } else { #error - CGI::Base::SendHeaders(); # one guess - print < - - Invoice Search Error - - -
-

Invoice Search Error

-
- Invoice not found. -
- - -END - + idiot("Invoice not found."); }