lilalo

diff l3-cgi-lite @ 149:40d843395547

fixed bug with login shell -bash
author igor@book.xt.vpn
date Fri Mar 06 13:34:59 2009 +0600 (2009-03-06)
parents c48bd05dca85
children 822b36252d7f
line diff
     1.1 --- a/l3-cgi-lite	Mon Jul 21 16:44:11 2008 +0300
     1.2 +++ b/l3-cgi-lite	Fri Mar 06 13:34:59 2009 +0600
     1.3 @@ -38,7 +38,19 @@
     1.4  my $frontend_css = $l3config::Config{"frontend_css"} ;
     1.5  
     1.6  my $filter=$ENV{QUERY_STRING};
     1.7 -if ($filter !~ /filter=/) {
     1.8 +if ($filter =~ /page=([^&]*)/ ) {
     1.9 +    open(PAGE_NAME, "grep $1 $real_path/sessions-index | tail -1 | sed 's^-<.*^^; s^/[^/]*\$^^'| ");
    1.10 +    my $page_name;
    1.11 +    $page_name=<PAGE_NAME>;
    1.12 +    chomp $page_name;
    1.13 +    my $id="";
    1.14 +    if ($filter =~ /id=([^&]*)/) {
    1.15 +        $id="#$1";
    1.16 +    }
    1.17 +    print "Status: 302 Moved\nLocation: http://xgu.ru/l3/$page_name$id\n\n";
    1.18 +    exit(0);
    1.19 +}
    1.20 +elsif ($filter !~ /filter=/) {
    1.21  #    $filter="";
    1.22  }
    1.23  else {