Subversion Repositories VORC

Rev

Rev 226 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 226 Rev 247
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 tableViewer qw/inArray/;
14
use CGI qw/param header start_html url url_param/;
15
use CGI qw/param header start_html url url_param/;
15
my $h = HTML::Tiny->new( mode => 'html' );
16
my $h = HTML::Tiny->new( mode => 'html' );
16
my $dbh = WebDB::connect;
17
my $dbh = WebDB::connect;
17
my $homeURL = '/schedule/';
18
my $homeURL = '/schedule/';
18
my $pageTitle = "View MVP Class Comments";
19
my $pageTitle = "View MVP Class Comments";
Line 28... Line 29...
28
 
29
 
29
my $qid = param ("qid"); $qid //= url_param ("qid");
30
my $qid = param ("qid"); $qid //= url_param ("qid");
Line 30... Line 31...
30
error ("No QuestionID.") unless $classid;
31
error ("No QuestionID.") unless $classid;
31
 
32
 
-
 
33
# Limit access to coach-of-the-class, admins, and MVP Leads+
32
# Limit access to coach-of-the-class, admins, and MVP Leads+
34
my ($coachID) = $dbh->selectrow_array ("select coachRCid from v_class_new where id = ?", undef, $classid);
Line 33... Line 35...
33
my ($coachID) = $dbh->selectrow_array ("select coach from class where id = ?", undef, $classid);
35
my @coaches = split " & ", $coachID;
34
error ("You don't have access to view these comments.") unless $coachID == $ORCUSER->{RCid} or $LVL >= RollerCon::ADMIN or $ORCUSER->{department}->{MVP} >= RollerCon::LEAD;
36
error ("You don't have access to view these comments.") unless inArray ($ORCUSER->{RCid}, \@coaches) or $LVL >= RollerCon::ADMIN or $ORCUSER->{department}->{MVP} >= RollerCon::LEAD;
35
 
37
 
36
my ($type, $private) = $dbh->selectrow_array ("select type, private from survey_question where qid = ?", undef, $qid);
38
my ($type, $private) = $dbh->selectrow_array ("select type, private from survey_question where qid = ?", undef, $qid);
Line 118... Line 120...
118
  ]),
120
  ]),
119
  $h->div ({ class => "error" }, $msg),
121
  $h->div ({ class => "error" }, $msg),
120
  $h->close ("html");
122
  $h->close ("html");
Line 121... Line 123...
121
  
123
  
122
  exit;
-
 
123
}
124
  exit;
-
 
125
}