################################################################################ # Starburst CMS | Source Code File # ################################################################################ # cgi.lib - Common Gateway Interface Methods sub doQuery { # Parse the query string. foreach my $what ($cgi->param) { my $is = $cgi->param($what); $what = &normalize($what); $is = uri_unescape($is); $query->{$what} = $is; } } sub getCookies { # Get all cookies loaded. foreach my $name ($cgi->cookie) { my $value = $cgi->cookie($name); $root->{cookie}->{$name} = $value; } } sub setCookies { my $cookies = shift; my @sent = (); foreach my $cookie (@{$cookies}) { push (@sent, $cgi->cookie ( @{$cookies->{$cookie}}, )); } # Print them. print $cgi->header ( -content_type => 'text/html', -cookie => [ @sent ], ); $root->{header} = 1; } 1;