1 |
3 |
ahitrov@rambler.ru |
<& "/contenido/components/header.msn" &> |
2 |
|
|
|
3 |
|
|
<blockquote> |
4 |
|
|
<font face="arial" size="-1"> |
5 |
|
|
<form name="form" action="<% $proto->{$action}->[1] %>" method="GET"> |
6 |
|
|
<input type="hidden" name="id" value="<% $id %>"> |
7 |
|
|
<input type="hidden" name="delete" value="1"> |
8 |
|
|
<input type="hidden" name="sure" value="1"> |
9 |
|
|
<input type="hidden" name="from" value="<% $from %>"> |
10 |
|
|
<input type="hidden" name="class" value="<% $class %>"> |
11 |
|
|
% while ( my ($key, $value) = each %filter_params ) { |
12 |
|
|
<input type="hidden" name="<% $key %>" value="<% $value |h %>"> |
13 |
|
|
% } |
14 |
|
|
</form> |
15 |
|
|
<center> |
16 |
|
|
<b>�� � ����� ���� ������ ������� <% $proto->{$action}->[2] %> "<% $obj->name() %>"?</b><br><br> |
17 |
|
|
<input type="button" value=" �� " onclick="javascript:document.form.submit()"> |
18 |
|
|
<input type="button" value=" ��� " onclick="javascript:history.back(-1)"> |
19 |
|
|
</center> |
20 |
|
|
</font> |
21 |
|
|
</blockquote> |
22 |
|
|
|
23 |
|
|
</body> |
24 |
|
|
</html> |
25 |
|
|
|
26 |
|
|
<%args> |
27 |
|
|
$action => undef |
28 |
|
|
$id => undef |
29 |
|
|
$from => undef |
30 |
|
|
$class => undef |
31 |
|
|
</%args> |
32 |
|
|
<%ONCE> |
33 |
|
|
my $proto = { |
34 |
|
|
'documents_deletion' => ['get_document_by_id($id, class=>$class)', 'document.html','��������'], |
35 |
|
|
'sections_deletion' => ['get_section_by_id($id)', 'section.html', '������'], |
36 |
|
|
'users_deletion' => ['get_user_by_id($id)', 'users.html', '������������'], |
37 |
|
|
}; |
38 |
|
|
</%ONCE> |
39 |
|
|
<%init> |
40 |
|
|
unless ( exists $proto->{$action} ) { |
41 |
|
|
$m->clear_buffer; |
42 |
|
|
$m->abort(403); |
43 |
|
|
} |
44 |
|
|
|
45 |
|
|
my %filter_params; |
46 |
|
|
$filter_params{s} = $from if $action eq 'documents_deletion'; |
47 |
|
|
$filter_params{use_section} = $ARGS{use_section} if $ARGS{use_section}; |
48 |
|
|
$filter_params{alpha} = $ARGS{alpha} if $ARGS{alpha}; |
49 |
|
|
$filter_params{alpha_search} = $ARGS{alpha_search} if $ARGS{alpha_search}; |
50 |
|
|
$filter_params{search_by} = $ARGS{search_by} if $ARGS{search_by}; |
51 |
|
|
$filter_params{search} = $ARGS{search} if $ARGS{search}; |
52 |
|
|
$filter_params{p} = $ARGS{p} if $ARGS{p} && $ARGS{p} > 1; |
53 |
|
|
my $return_params = join ('&', map { $_.'='.$filter_params{$_} } grep { $_ ne 's' } keys %filter_params ); |
54 |
|
|
|
55 |
|
|
|
56 |
|
|
my $obj; |
57 |
|
|
eval '$obj = $keeper->'.$proto->{$action}->[0]; |
58 |
|
|
warn $@ if $@; |
59 |
|
|
</%init> |