Subversion Repositories VORC

Rev

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

Rev 170 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 111... Line 111...
111
 
111
 
112
my %GETFORM = map { split /=/ } split /&/, $ENV{QUERY_STRING};
112
my %GETFORM = map { split /=/ } split /&/, $ENV{QUERY_STRING};
113
my $choice = param ("choice") || $GETFORM{choice} // "";
113
my $choice = param ("choice") || $GETFORM{choice} // "";
114
if ($choice eq "Save") {
114
if ($choice eq "Save") {
115
	process_form ();
115
	process_form ();
116
} elsif (defined (param ($primary)) || $GETFORM{$primary}) {
116
} elsif (defined (param ($primary)) || $GETFORM{$primary} || url_param ($primary)) {
117
  my $thing = param ($primary) || $GETFORM{$primary};
117
  my $thing = param ($primary) || $GETFORM{$primary}; $thing //= url_param ($primary);
118
  if ($choice eq "Delete") {
118
  if ($choice eq "Delete") {
119
    delete_item ({ $primary => $thing });
119
    delete_item ({ $primary => $thing });
120
  } else {
120
  } else {
121
	  display_form ({ $primary => $thing }, $choice);
121
	  display_form ({ $primary => $thing }, $choice);