Subversion Repositories VORC

Rev

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

Rev 108 Rev 112
Line 289... Line 289...
289
 
289
 
Line 290... Line 290...
290
  my $dbh = WebDB::connect ();
290
  my $dbh = WebDB::connect ();
Line 291... Line 291...
291
  
291
  
-
 
292
  my ($class_is_over) = $dbh->selectrow_array ("select 1 from v_class where $primary = ? and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour)", undef, $R->{$primary});
292
  my ($class_is_over) = $dbh->selectrow_array ("select 1 from v_class where $primary = ? and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour)", undef, $R->{$primary});
293
 
Line 293... Line 294...
293
 
294
#  if (($LVL >= RollerCon::ADMIN or $user->{department}->{MVP} >= RollerCon::LEAD) and !$class_is_over) {
294
  if (($LVL >= RollerCon::ADMIN or $user->{department}->{MVP} >= RollerCon::LEAD) and !$class_is_over) {
295
  if ($LVL >= RollerCon::ADMIN or $user->{department}->{MVP} >= RollerCon::LEAD) {
Line 295... Line 296...
295
    my ($count) = $dbh->selectrow_array ("select count from v_class where $primary = ?", undef, $R->{$primary});
296
    my ($count) = $dbh->selectrow_array ("select count from v_class where $primary = ?", undef, $R->{$primary});
296
      
297
      
-
 
298
    if ($F{$DBFields[0]} !~ /^(NEW|COPY)/) {
Line 297... Line 299...
297
    if ($F{$DBFields[0]} !~ /^(NEW|COPY)/) {
299
      my @A = @{$dbh->selectall_arrayref ("select role, official.RCid, derby_name from v_class_signup join official on v_class_signup.RCid = official.RCid where $primary = ? order by role", undef, $R->{$primary})};
298
      my @A = @{$dbh->selectall_arrayref ("select role, official.RCid, derby_name from v_class_signup join official on v_class_signup.RCid = official.RCid where $primary = ? order by role", undef, $R->{$primary})};
300
      
299
      
301
      my $classkey = join '|', $F{date}, $F{start_time}, $F{location};
300
      my $classkey = join '|', $F{date}, $F{start_time}, $F{location};
302
#      my $adduserlink  = (scalar @A < $F{capacity} and ($LVL >= RollerCon::ADMIN or $user->{department}->{MVP} >= RollerCon::LEAD)) ? $h->a ({ style=>"color:unset;font-size:x-small;", onClick=>"window.open('make_shift_change.pl?change=lookup&RCid=$RCid&id=$classkey','Confirm Shift Change','resizable,height=260,width=370'); return false;" }, "[ADD USER]") : "";