Subversion Repositories VORC

Rev

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

Rev 121 Rev 282
Line 38... Line 38...
38
        $stamp[0]);
38
        $stamp[0]);
Line 39... Line 39...
39
 
39
 
Line 40... Line 40...
40
my $tz = DateTime::TimeZone->new(name => 'America/Los_Angeles');
40
my $tz = DateTime::TimeZone->new(name => 'America/Los_Angeles');
41
 
41
 
42
my $dbh = WebDB::connect;
42
my $dbh = WebDB::connect;
43
my $sth = $dbh->prepare("select * from (select id, date, dayofweek, track as 'location', time, role, teams from v_shift_officiating where RCid = ? union select id, date, dayofweek, track as 'location', time, role, teams from v_shift_announcer where RCid = ? union select id, date, dayofweek, location, time, role, '' as teams from v_shift where RCid = ?) temp order by date, time");
43
my $sth = $dbh->prepare("select * from (select id, date, dayofweek, track as 'location', time, role, teams from v_shift_officiating where RCid = ? union select id, date, dayofweek, track as 'location', time, role, teams from v_shift_announcer where RCid = ? union     select id, date, dayofweek, location, time, 'MVP Class' as role, name as 'teams' from v_class_signup_new where RCid = ? union select id, date, dayofweek, location, time, 'Seminar' as role, name as 'teams' from v_seminar_signup_new where RCid = ? union select id, date, dayofweek, location, time, role, '' as teams from v_shift where RCid = ?) temp order by date, time");
44
$sth->execute($RCid, $RCid, $RCid);
44
$sth->execute($RCid, $RCid, $RCid, $RCid, $RCid);
45
while (my $s = $sth->fetchrow_hashref) {
45
while (my $s = $sth->fetchrow_hashref) {
46
	$s->{role} =~ s/\-\d$//;
46
	$s->{role} =~ s/\-\d$//;
Line 66... Line 66...
66
	
66
	
67
	$event->add_properties(
67
	$event->add_properties(
68
            uid => $uid,
68
            uid => $uid,
69
            summary => "vORC: $S->{role} on $S->{location} - $S->{teams}",
69
            summary => "vORC: $S->{role} on $S->{location} - $S->{teams}",
70
            description => "" ,
70
            description => "" ,
71
            categories => "RollerCon Officiating;RollerCon Schedule;RollerCon Volunteer",
71
            categories => "RollerCon Officiating;RollerCon Schedule;RollerCon Volunteer;RollerCon MVP Class",
72
            location => "$S->{location}",
72
            location => "$S->{location}",
73
            dtstamp => $dstamp,
73
            dtstamp => $dstamp,
74
            dtstart => Date::ICal->new(
74
            dtstart => Date::ICal->new(
75
                            year => $startyear,
75
                            year => $startyear,