Subversion Repositories VORC

Rev

Rev 222 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 222 Rev 226
Line 9... Line 9...
9
use strict;
9
use strict;
10
use cPanelUserConfig;
10
use cPanelUserConfig;
11
use WebDB;
11
use WebDB;
12
use HTML::Tiny;
12
use HTML::Tiny;
13
use RollerCon;
13
use RollerCon;
14
use CGI qw/param header start_html url/;
14
use CGI qw/param header start_html url url_param/;
15
my $h = HTML::Tiny->new( mode => 'html' );
15
my $h = HTML::Tiny->new( mode => 'html' );
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
my %F;
17
my %F;
Line 98... Line 98...
98
 
98
 
99
my %GETFORM = map { split /=/ } split /&/, $ENV{QUERY_STRING};
99
my %GETFORM = map { split /=/ } split /&/, $ENV{QUERY_STRING};
100
my $choice = param ("choice") || $GETFORM{choice} // "";
100
my $choice = param ("choice") || $GETFORM{choice} // "";
101
if ($choice eq "Save") {
101
if ($choice eq "Save") {
102
	process_form ();
102
	process_form ();
103
} elsif (defined (param ($primary)) || $GETFORM{$primary}) {
103
} elsif (defined (param ($primary) || url_param ($primary)) || $GETFORM{$primary}) {
104
  my $thing = param ($primary) || $GETFORM{$primary};
104
  my $thing = param ($primary) || $GETFORM{$primary}; $thing //= url_param ($primary);
105
  if ($choice eq "Delete") {
105
  if ($choice eq "Delete") {
106
    delete_item ({ $primary => $thing });
106
    delete_item ({ $primary => $thing });
107
  } else {
107
  } else {
108
	  display_form ({ $primary => $thing }, $choice);
108
	  display_form ({ $primary => $thing }, $choice);