in reply to Re: mod_perl and multi user environment - clashes with other users's data
in thread mod_perl and multi user environment - clashes with other users's data
#! /usr/cisco/bin/perl -w #use strict; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use HTML::Template; use Data::Dumper; use hiGuiStatus; # my own module # send the obligatory Content-Type print "Content-Type: text/html\n\n"; #$q = new CGI; #print $q->Dump(); our $status = hiGuiStatus->new(); our $userid = $status->get_ldap_user_name(); print $userid; my $err_msg; ($err_msg, %hoh) = $status->read_file($userid); #print Dumper \%hoh; if(param('sort')) { my $sort_sel = param('sort_option'); ($err_msg, @sort_keys) = $status->jobs_sort($sort_sel); #print $err_msg; } if(param('terminate')) { my @del_ids = param('check_del'); ($err_msg) = $status->jobs_terminate(\@del_ids, $userid, \%hoh); ($err_msg, %hoh) = $status->read_file($userid); } if(param('publish')) { my $ddts = param('ddts_no'); my @del_ids = param('check_del'); $status->jobs_publish($ddts, \@del_ids); } if(param('delete')) { my @del_ids = param('check_del'); ($err_msg) = $status->jobs_delete(\@del_ids, $userid, \%hoh); ($err_msg, %hoh) = $status->read_file($userid); } @loop = $status->jobs_loop(); #print Dumper \@loop; my $template = HTML::Template->new(filename => 'hiGuiStatus.tmpl'); # call param to fill in the loop with the loop data by reference. $template->param(err_msg => $err_msg, job_loop => \@loop); # print the template print $template->output;
|
---|