Subversion Repositories ORC

Rev

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

Rev 8 Rev 25
Line 11... Line 11...
11
my $cookie_string = authenticate(2) || die;
11
my $cookie_string = authenticate(2) || die;
12
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
12
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
13
my $user = getUser($EML);
13
my $user = getUser($EML);
14
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
14
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
Line 15... Line 15...
15
 
15
 
16
my $dt = DateTime->now;
16
my $dt = DateTime->now (time_zone => 'America/Los_Angeles');
17
$dt->subtract( hours => 7 );
17
#$dt->subtract( hours => 7 );
18
my $day = $dt->day_name;
18
my $day = $dt->day_name;
19
my $date = $dt->date;
19
my $date = $dt->date;
Line 20... Line 20...
20
my $curtime = $dt->hms;
20
my $curtime = $dt->hms;
Line 42... Line 42...
42
<link rel="stylesheet" type="text/css" href="/rollercon.css">
42
<link rel="stylesheet" type="text/css" href="/rollercon.css">
43
</head>
43
</head>
44
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
44
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
45
output
45
output
Line 46... Line 46...
46
 
46
 
47
my $rnh = $dbh->prepare("select * from v_shift_admin_view where id = (select id from game where date = ? and track = ? and time < now() - interval 3 hour and end_time > now() - interval 3 hour)");
47
my $rnh = $dbh->prepare("select * from v_shift_admin_view where id = (select id from game where date = ? and track = ? and time < CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles') and end_time > CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles'))");
Line 48... Line 48...
48
my $nuh = $dbh->prepare("select * from v_shift_admin_view where id = (select id from game where date = ? and track = ? and time > now() - interval 3 hour order by time limit 1)");
48
my $nuh = $dbh->prepare("select * from v_shift_admin_view where id = (select id from game where date = ? and track = ? and time > CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles') order by time limit 1)");
49
 
49
 
Line 50... Line 50...
50
my $lrnh = $dbh->prepare("select * from v_lead_shift where id in (select id from lead_shift where date = ? and start_time < now() - interval 3 hour and end_time > now() - interval 3 hour) order by track");
50
my $lrnh = $dbh->prepare("select * from v_lead_shift where id in (select id from lead_shift where date = ? and start_time < CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles') and end_time > CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles')) order by track");
51
my $lnuh = $dbh->prepare("select * from v_lead_shift where id in (select id from lead_shift where date = ? and start_time > now() - interval 3 hour order by track, start_time)");
51
my $lnuh = $dbh->prepare("select * from v_lead_shift where id in (select id from lead_shift where date = ? and start_time > CONVERT_TZ(now(), 'America/Chicago', 'America/Los_Angeles') order by track, start_time)");
52
 
52
 
53
#my $gcount = 1; my $tcount = '';
53
#my $gcount = 1; my $tcount = '';