#!/usr/bin/perl -Tw # # $Id: part_svc.cgi,v 1.6 1999-01-18 09:41:31 ivan Exp $ # # ivan@sisd.com 97-nov-14 # # Changes to allow page to work at a relative position in server # bmccane@maxbaud.net 98-apr-3 # # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 # # $Log: part_svc.cgi,v $ # Revision 1.6 1999-01-18 09:41:31 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # # Revision 1.5 1998/12/30 23:03:21 ivan # bugfixes; fields isn't exported by derived classes # # Revision 1.4 1998/12/17 06:17:07 ivan # fix double // in relative URLs, s/CGI::Base/CGI/; # # Revision 1.3 1998/11/21 06:43:26 ivan # visual # use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearchs fields); use FS::part_svc; use FS::CGI qw(header menubar popurl table); my($cgi) = new CGI; &cgisuidsetup($cgi); my($part_svc,$action); my($query) = $cgi->keywords; if ( $query && $query =~ /^(\d+)$/ ) { #editing $part_svc=qsearchs('part_svc',{'svcpart'=>$1}); $action='Edit'; } else { #adding $part_svc=create FS::part_svc {}; $action='Add'; } my($hashref)=$part_svc->hashref; my $p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("$action Service Definition", menubar( 'Main Menu' => $p, 'View all services' => "${p}browse/part_svc.cgi", )), '
'; print qq!!, "Service Part #", $hashref->{svcpart} ? $hashref->{svcpart} : "(NEW)"; print < Service Services are items you offer to your customers.