prepare(<<'_QUERY_') or last; SELECT A.r_id ,A.i_id ,A.node_id ,A.timestamp ,A.priority ,A.flags ,B.profile_id ,B.title ,B.file_a ,B.file_b ,R.node_access_level FROM Ru_T1_A AS A LEFT JOIN Ru_T1_B AS B ON (A.r_id = B.r_id) LEFT JOIN Ru_Node AS N ON (A.node_id = N.node_id) LEFT JOIN Ru_Role AS R ON (R.role_id = ? AND R.node_access_group_id = N.node_access_group_id) WHERE A.i_id = ? AND A.set_b1 <= 1 ORDER BY A.r_id DESC LIMIT 1 _QUERY_ $sth->execute( DBL1::role_id($ENV{'REMOTE_USER'}) ,$HTTP_GET_VARS{'i'} ) or last; unless ($sth->rows) { $ENV{'REDIRECT_STATUS'}=404; include_tmpl($ENV{'DOCUMENT_ROOT'}.'/a0/ru/HTTP_ERROR_HANDLER.thtml'); return 0; } $GLOBALS{'item'}=$sth->fetchrow_hashref; unless (defined $GLOBALS{'item'}->{'node_access_level'}) { $ENV{'REDIRECT_STATUS'}=402; include_tmpl($ENV{'DOCUMENT_ROOT'}.'/a0/ru/HTTP_ERROR_HANDLER.thtml'); return 0; } unpacksqlfile2(\$GLOBALS{'item'}->{'file_a'}, $GLOBALS{'item'}); unpacksqlfile2(\$GLOBALS{'item'}->{'file_b'}, $GLOBALS{'item'}); $rc++; } unless ($rc) { $GLOBALS{'LAST_ERROR'}=$dbh->errstr; $ENV{'REDIRECT_STATUS'}=500; include_tmpl($ENV{'DOCUMENT_ROOT'}.'/a0/ru/HTTP_ERROR_HANDLER.thtml'); return 0; } $rc = defined(my $node_path = DBL1::node_path( { 'role_id' => DBL1::role_id($ENV{'REMOTE_USER'}) ,'node_id' => $GLOBALS{'item'}->{'node_id'} ,'root_node_id' => 0 } )); my $sape = new SAPE::Client(user=>'6686d9702dbb1fa5c05eef869dade7d8'); unless ($rc) { $ENV{'REDIRECT_STATUS'}=410; include_tmpl($ENV{'DOCUMENT_ROOT'}.'/a0/ru/HTTP_ERROR_HANDLER.thtml'); return 0; } unless (defined $node_path->[0]->{'node_access_level'}) { $ENV{'REDIRECT_STATUS'}=402; include_tmpl($ENV{'DOCUMENT_ROOT'}.'/a0/ru/HTTP_ERROR_HANDLER.thtml'); return 0; } $GLOBALS{'nav_path'}=[]; foreach my $hr (reverse @{$node_path}) { push @{$GLOBALS{'nav_path'}}, { 'NODE_TITLE' => $hr->{'node_title'}, 'NODE_TYPE' => $hr->{'node_type'}, 'NODE_ID' => $hr->{'node_id'} }; } shift @{$GLOBALS{'nav_path'}}; push @{$GLOBALS{'nav_path'}}, { 'NODE_TITLE'=>$GLOBALS{'item'}->{'title'} }; $GLOBALS{'node'} = $node_path->[0]; if ($ENV{'QUERY_STRING'}=~m/\Ai=\d+&p=\d+\z/) { $API{'max_age'}=0; $API{'refresh_interval'}=86400 - ((time()+timezone(time())) % 86400); } ?> {'http_meta'} ? print $GLOBALS{'item'}->{'http_meta'} : include_file($ENV{'FILES_ROOT'}.'/a2/htincl/a0/ru/http_meta.ihtml') ); ?> <? ($GLOBALS{'node'}->{'seotitle'} ? print $GLOBALS{'node'}->{'seotitle'} : print join(' - ', map(htmlspecialchars($_->{'NODE_TITLE'}), reverse @{$GLOBALS{'nav_path'}}), htmlspecialchars($GLOBALS{'comvars'}->{'sitename'})) ); ?>
> Продажа шпунта Ларсена, Арселор. Металлопрокат и лом черных металлов.
> {'profile_id'}))if ($GLOBALS{'node'}->{'node_type'} == 1);?>
{'profile_id'})); ?>
get_links; ?>
порно'; } ?>