Line # Revision Author
1 3 ahitrov@rambler.ru <table border="0" width="60%">
2 <tr>
3 <th>��������</th>
4 <th>��������</th>
5 </tr>
6 % foreach my $p (sort { $a cmp $b } keys %$set) {
7 % $start++;
8 <tr>
9 <td width="40%"><% $p %></td>
10 <td>\
11 <input type="text" style="width:100%;" name="<% $name %>_value_<% $start %>" value="<% $set->{$p} %>">\
12 <input type="hidden" name="<% $name %>_key_<% $start %>" value="<% $p %>">\
13 </td>
14 </tr>
15 % }
16 % for (1..3) {
17 % $start++;
18 <tr>
19 <td width="40%">\
20 <input type="text" style="width:100%;" name="<% $name %>_key_<% $start %>">\
21 </td>
22 <td>\
23 <input type="text" style="width:100%;" name="<% $name %>_value_<% $start %>">\
24 </td>
25 </tr>
26 % }
27 </table>
28
29 <%args>
30 $name => undef
31 $check => undef
32 </%args>
33
34 <%INIT>
35 use vars qw($VAR1);
36 my $set={};
37 if ($check) {
38 eval ($check);
39 if ($@) {
40 warn "cannot eval $name with value '$check'";
41 } else {
42 $set=$VAR1;
43 }
44 }
45 my $start=0;
46 </%INIT>