Line # Revision Author
1 3 ahitrov@rambler.ru <% $DIGITS_LINE %>\
2 % if (defined $alpha) {
3 %delete $local_params->{alpha};
4 &nbsp;&nbsp;&nbsp;&nbsp;<a href="<% $href %>?<% join('&', map { "$_=$local_params->{$_}" } keys %$local_params) %>">�����</a>\
5 % }
6 <br>
7 <% $EN_ALPHA_LINE %>
8 <br>
9 <% $RU_ALPHA_LINE %>
10
11 <%args>
12 $alpha => undef
13 $href => undef
14 $params => {}
15 $delimiter => ' | '
16 </%args>
17 <%ONCE>
18 my @digits=qw(0 1 2 3 4 5 6 7 8 9);
19 my @en_alpha=qw(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z);
20 my @ru_alpha=qw(� � � � � � � � � � � � � � � � � � � � � � � � � � � � � & ' "); #' - restore vim syntax highlighting
21 </%ONCE>
22
23 <%init>
24 my $local_params={%$params};
25 $local_params->{p}=1;
26 delete $local_params->{search_by} if exists $local_params->{search_by};
27 delete $local_params->{search} if exists $local_params->{search};
28
29 # ���� !$href � ���� �������� �� �������� DirectoryIndex, ����:
30 # .../../gallery.html. � ������ � ��� �������������, ����: <a href="?param=1">,
31 # �� IE �������� �� .../../gallery.html?param=1., � NN (4.x) �������� ��
32 # .../../?param=1.., ��������� ���� ������� � ��������� ������ ��� �����.
33
34 if (!$href)
35 {
36 $href = $r->uri();
37 $href =~ s/\/([\w]{1,}(\.[sp]?html?))//;
38 $href = $1;
39 if ($href =~ /(index|default|main)$2/ ){
40 $href = '';
41 }
42 }
43
44 my @parts=();
45 foreach my $pn (@digits)
46 {
47 $local_params->{alpha} = $pn;
48 push @parts, ($pn eq $alpha) ? $pn : "<a href=\"$href?".join('&', map { "$_=$local_params->{$_}" } keys %$local_params)."\">$pn</a>";
49 }
50 my $DIGITS_LINE=join($delimiter,@parts);
51
52 @parts=();
53 foreach my $pn (@en_alpha)
54 {
55 $local_params->{alpha} = $pn;
56 push @parts, ($pn eq $alpha) ? $pn : "<a href=\"$href?".join('&', map { "$_=$local_params->{$_}" } keys %$local_params)."\">$pn</a>";
57 }
58 my $EN_ALPHA_LINE=join($delimiter,@parts);
59
60 @parts=();
61 foreach my $pn (@ru_alpha)
62 {
63 $local_params->{alpha} = $pn;
64 push @parts, ($pn eq $alpha) ? $pn : "<a href=\"$href?".join('&', map { "$_=".$m->interp->apply_escapes($local_params->{$_}, 'u') } keys %$local_params)."\">$pn</a>";
65 }
66 my $RU_ALPHA_LINE=join($delimiter,@parts);
67
68 </%init>
69
70 <%doc>
71 ����������� ���������� ��������
72 </%doc>