$cookie->{ 'SESSION_DIR' } = "Sessions";
$cookie->{ 'LIST_PAGES' } = [ qw( clade genome assembly contig browse ) ];
- $cookie->{ 'USER' } = $cgi->param( 'user' );
+ $cookie->{ 'USER' } = $cgi->param( 'user' ) || '';
$cookie->{ 'PASSWORD' } = $cgi->param( 'password' );
$cookie->{ 'SESSION_ID' } = $cgi->param( 'session_id' );
$session = Maasha::BGB::Session::session_restore( "$cookie->{ 'SESSION_DIR' }/sessions.txt" );
- $cookie->{ 'PAGE' } = 'login' if not $cookie->{ 'SESSION_ID' };
- $cookie->{ 'PAGE' } = 'login' if $cookie->{ 'SESSION_ID' } ne $ENV{ 'SSL_SESSION_ID' };
- $cookie->{ 'PAGE' } = 'login' if not exists $session->{ $cookie->{ 'USER' } };
- $cookie->{ 'PAGE' } = 'login' if $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } ne $cookie->{ 'SESSION_ID' };
+ # if ( $cookie->{ 'SESSION_ID' } )
+ # {
+ # if ( $cookie->{ 'SESSION_ID' } ne $ENV{ 'SSL_SESSION_ID' } ) {
+ # $cookie->{ 'PAGE' } = 'login';
+ # print STDERR "HER1"; # DEBUG
+ # }
+ # }
+ # else
+ # {
+ # $cookie->{ 'PAGE' } = 'login';
+ #
+ # print STDERR "HER2"; # DEBUG
+ # }
+
+ if ( exists $session->{ $cookie->{ 'USER' } } and $cookie->{ 'SESSION_ID' } )
+ {
+ if ( $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } ne $cookie->{ 'SESSION_ID' } ) {
+ $cookie->{ 'PAGE' } = 'login';
+ print STDERR "HER3"; # DEBUG
+ }
+ }
+ else
+ {
+ $cookie->{ 'PAGE' } = 'login';
+ print STDERR "HER4"; # DEBUG
+ print STDERR "NO COOKIE SESSION ID\n" if not $cookie->{ 'SESSION_ID' }; # DEBUG
+ print STDERR "NO COOKIE SESSION ID\n" if not $cookie->{ 'USER' }; # DEBUG
+ print STDERR "NO SESSION USER\n" if not exists $session->{ $cookie->{ 'USER' } }; # DEBUG
+ }
}
my ( $session );
+<<<<<<< .mine
+=======
$session = Maasha::BGB::Session::session_restore( "$cookie->{ 'SESSION_DIR' }/sessions.txt" );
+>>>>>>> .r811
if ( $cookie->{ 'USER' } and $cookie->{ 'PASSWORD' } )
{
+ $session = Maasha::BBrowser::Session::session_restore( "$cookie->{ 'SESSION_DIR' }/sessions.txt" );
+
if ( exists $session->{ $cookie->{ 'USER' } } and
$session->{ $cookie->{ 'USER' } }->{ 'PASSWORD' } eq Digest::MD5::md5_hex( $cookie->{ 'PASSWORD' } ) )
{
+<<<<<<< .mine
+ $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } ||= Maasha::BBrowser::Session::session_new();
+ # $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } = $ENV{ 'SSL_SESSION_ID' };
+=======
# $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } ||= Maasha::BGB::Session::session_new();
$session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' } = $ENV{ 'SSL_SESSION_ID' };
+>>>>>>> .r811
$session->{ $cookie->{ 'USER' } }->{ 'TIME' } = Maasha::Common::time_stamp();
$cookie->{ 'SESSION_ID' } = $session->{ $cookie->{ 'USER' } }->{ 'SESSION_ID' };
$cookie->{ 'LOGIN' } = "OK";
- $cookie->{ 'USER' } = $cookie->{ 'USER' };
$cookie->{ 'PAGE' } = 'clade';
Maasha::BGB::Session::session_store( "$cookie->{ 'SESSION_DIR' }/sessions.txt", $session );
push @html, page_taxonomy( $cookie );
}
- push @html, Maasha::XHTML::p( txt => Maasha::XHTML::hidden( name => "session_id", value => "$cookie->{ 'SESSION_ID' }" ) );
+ if ( $cookie->{ 'SESSION_ID' } ) {
+ push @html, Maasha::XHTML::p( txt => Maasha::XHTML::hidden( name => "session_id", value => "$cookie->{ 'SESSION_ID' }" ) );
+ }
return wantarray ? @html : \@html;
}
$beg =~ tr/,//d;
$end =~ tr/,//d;
- $seq = ">$cookie->{ 'CONTIG' }_$beg" . "_$end" . "_$cookie->{ 'STRAND' }\n";
+ $seq = join ";", ">$cookie->{ 'GENOME' }", $cookie->{ 'ASSEMBLY' }, $cookie->{ 'CONTIG' }, $beg, $end, "$cookie->{ 'STRAND' }\n";
$seq .= Maasha::BGB::Track::dna_get( $cookie );
push @html, Maasha::XHTML::h2( txt => "DNA", class => 'center' );