| 1 | 3 | ahitrov@rambler.ru | <& "/contenido/components/header.msn", title => $PROTOS->{$proto}->[0] &> | 
   
        | 2 |  |  |  | 
   
        | 3 |  |  |  | 
   
        | 4 |  |  |  | 
   
        | 5 |  |  | <br> | 
   
        | 6 |  |  | <table border="0" style="font-size:85%;" width="80%"> | 
   
        | 7 |  |  | <tr> | 
   
        | 8 |  |  | <td width="10"></td> | 
   
        | 9 |  |  | <td> | 
   
        | 10 |  |  | <div style="font-size:130%;"><% $PROTOS->{$proto}->[0] %></div> | 
   
        | 11 |  |  | ����� ������� ������� ������ "���������" � ������� ����������� 5-�� ������ �����. ������ �����������! ��������� ��� �� ������������ �� �����. ��� �������� ������-���� ����� ������ ������� ��� ���������� ������ ��� ��������. | 
   
        | 12 |  |  | <p>� �������� ����� ����������� ����� ���������� ��� ������ perl-����� �������. �� ���� ������ �� ����� ������ ������� ��� ������ �� ������� <a href="dump.html?proto=project" onclick="openWin('dump.html?proto=project','proto',800,600);return false">$project</a>, ������������� �� ������ ��������. | 
   
        | 13 |  |  | <p><% $PROTOS->{$proto}->[1] %> | 
   
        | 14 |  |  | </td> | 
   
        | 15 |  |  | </tr> | 
   
        | 16 |  |  |  | 
   
        | 17 |  |  | <tr><td height="20"></td></tr> | 
   
        | 18 |  |  |  | 
   
        | 19 |  |  | <form action="./options.html" method="post"> | 
   
        | 20 |  |  | <input type="hidden" name="control_charset" value="��������"> | 
   
        | 21 |  |  | <input type="hidden" name="proto" value="<% $proto %>"> | 
   
        | 22 |  |  | <tr> | 
   
        | 23 |  |  | <td></td><td> | 
   
        | 24 |  |  |  | 
   
        | 25 |  |  | %# ### SECTION ALIAS ############################### | 
   
        | 26 |  |  | %	if ($proto eq 's_alias') { | 
   
        | 27 |  |  |  | 
   
        | 28 |  |  | <table border="0" width="60%"> | 
   
        | 29 |  |  | <tr> | 
   
        | 30 |  |  | <th>��������</th> | 
   
        | 31 |  |  | <th>��������</th> | 
   
        | 32 |  |  | </tr> | 
   
        | 33 |  |  | %		if (ref($toopi) eq 'HASH') | 
   
        | 34 |  |  | %		{ | 
   
        | 35 |  |  | %			for my $p (sort { $a cmp $b } (keys(%{ $toopi }))) | 
   
        | 36 |  |  | %			{ | 
   
        | 37 |  |  | <tr> | 
   
        | 38 |  |  | <td width="40%"><% $p %></td> | 
   
        | 39 |  |  | <td> | 
   
        | 40 |  |  | <select style="width:100%;" name="option_<% $p %>"> | 
   
        | 41 |  |  | <option></option> | 
   
        | 42 |  |  | <& "/contenido/components/select_index_tree.msn", selected => $toopi->{$p} &> | 
   
        | 43 |  |  | </select> | 
   
        | 44 |  |  | </td> | 
   
        | 45 |  |  | </tr> | 
   
        | 46 |  |  | %			} | 
   
        | 47 |  |  | %		} | 
   
        | 48 |  |  | %		for (1..5) | 
   
        | 49 |  |  | %		{ | 
   
        | 50 |  |  | <tr> | 
   
        | 51 |  |  | <td width="40%"><input type="text" name="newoption_id_<% $_ %>" value=""></td> | 
   
        | 52 |  |  | <td> | 
   
        | 53 |  |  | <select style="width:100%;" name="newoption_value_<% $_ %>"> | 
   
        | 54 |  |  | <option></option> | 
   
        | 55 |  |  | <& "/contenido/components/select_index_tree.msn" &> | 
   
        | 56 |  |  | </select> | 
   
        | 57 |  |  | </tr> | 
   
        | 58 |  |  | %		} | 
   
        | 59 |  |  | </table> | 
   
        | 60 |  |  |  | 
   
        | 61 |  |  | %# ### DOCUMENTS ALIAS ############################### | 
   
        | 62 |  |  | <%DOC> | 
   
        | 63 |  |  | %	} elsif( $proto eq 'd_alias' ) { | 
   
        | 64 |  |  |  | 
   
        | 65 |  |  |  | 
   
        | 66 |  |  | � �������� | 
   
        | 67 |  |  |  | 
   
        | 68 |  |  | <& "/contenido/components/obj_list_js.msn" &> | 
   
        | 69 |  |  | <table border="0" width="80%"> | 
   
        | 70 |  |  | <tr> | 
   
        | 71 |  |  | <th>��������</th> | 
   
        | 72 |  |  | <th>��������</th> | 
   
        | 73 |  |  | </tr> | 
   
        | 74 |  |  | %		if (ref($toopi) eq 'HASH') | 
   
        | 75 |  |  | %		{ | 
   
        | 76 |  |  | %			for my $p (sort { $a cmp $b } (keys(%{ $toopi }))) | 
   
        | 77 |  |  | %			{ | 
   
        | 78 |  |  | <tr valign="top"> | 
   
        | 79 |  |  | <td width="25%"><% $p %></td> | 
   
        | 80 |  |  | <td><& | 
   
        | 81 |  |  | "/contenido/components/_show_obj_list.msn", | 
   
        | 82 |  |  | name  => 'newoption_value_'.$_, | 
   
        | 83 |  |  | check => $toopi->{$p}, | 
   
        | 84 |  |  |  | 
   
        | 85 |  |  | &></td> | 
   
        | 86 |  |  | </tr> | 
   
        | 87 |  |  | %			} | 
   
        | 88 |  |  | %		} | 
   
        | 89 |  |  | %		for (1..5) | 
   
        | 90 |  |  | %		{ | 
   
        | 91 |  |  | <tr valign="top"> | 
   
        | 92 |  |  | <td width="25%"><input type="text" name="newoption_id_<% $_ %>" value=""></td> | 
   
        | 93 |  |  | <td><& "/contenido/components/_show_obj_list.msn" &></td> | 
   
        | 94 |  |  | </tr> | 
   
        | 95 |  |  | %		} | 
   
        | 96 |  |  | </table> | 
   
        | 97 |  |  | </%DOC> | 
   
        | 98 |  |  | %	} else { | 
   
        | 99 |  |  |  | 
   
        | 100 |  |  |  | 
   
        | 101 |  |  | <table border="0" width="60%"> | 
   
        | 102 |  |  | <tr> | 
   
        | 103 |  |  | <th>��������</th> | 
   
        | 104 |  |  | <th>��������</th> | 
   
        | 105 |  |  | </tr> | 
   
        | 106 |  |  | %		if (ref($toopi) eq 'HASH') | 
   
        | 107 |  |  | %		{ | 
   
        | 108 |  |  | %			for my $p (sort { $a cmp $b } (keys(%{ $toopi }))) | 
   
        | 109 |  |  | %			{ | 
   
        | 110 |  |  | <tr> | 
   
        | 111 |  |  | <td width="40%"><% $p %></td> | 
   
        | 112 |  |  | <td><input type="text" style="width:100%;" name="option_<% $p %>" value="<% $toopi->{$p} %>"></td> | 
   
        | 113 |  |  | </tr> | 
   
        | 114 |  |  | %			} | 
   
        | 115 |  |  | %		} | 
   
        | 116 |  |  | %		for (1..5) | 
   
        | 117 |  |  | %		{ | 
   
        | 118 |  |  | <tr> | 
   
        | 119 |  |  | <td width="40%"><input type="text" name="newoption_id_<% $_ %>" value=""></td> | 
   
        | 120 |  |  | <td><input type="text" style="width:100%;" name="newoption_value_<% $_ %>" value=""></td> | 
   
        | 121 |  |  | </tr> | 
   
        | 122 |  |  | %		} | 
   
        | 123 |  |  | </table> | 
   
        | 124 |  |  |  | 
   
        | 125 |  |  | %	} | 
   
        | 126 |  |  |  | 
   
        | 127 |  |  | </td> | 
   
        | 128 |  |  | </tr> | 
   
        | 129 |  |  |  | 
   
        | 130 |  |  | <tr><td height="20"></td></tr> | 
   
        | 131 |  |  | <tr><td></td><td> | 
   
        | 132 |  |  | <input type="submit" value="��������� ���������" style="font-size:13pt;font-weight:bold; height:40px;margin-bottom: 5px; background-color:#930300;color:#FFFFFF;"> | 
   
        | 133 |  |  | <input type="hidden" name="save" value="1"> | 
   
        | 134 |  |  | </td></tr> | 
   
        | 135 |  |  | </form> | 
   
        | 136 |  |  |  | 
   
        | 137 |  |  | </table> | 
   
        | 138 |  |  | </body> | 
   
        | 139 |  |  | </html> | 
   
        | 140 |  |  |  | 
   
        | 141 |  |  | <%ARGS> | 
   
        | 142 |  |  |  | 
   
        | 143 |  |  | $proto => undef | 
   
        | 144 |  |  | $save => undef | 
   
        | 145 |  |  |  | 
   
        | 146 |  |  | </%ARGS> | 
   
        | 147 |  |  | <%INIT> | 
   
        | 148 |  |  |  | 
   
        | 149 |  |  | use vars qw($keeper $request $sect); | 
   
        | 150 |  |  | my $PROTOS = { | 
   
        | 151 |  |  | 'colors' => ['�������������� �������� ����������','� ���� ���� �������� ��������� ��� ��������� ��������� ����������, �������� ���������, �������� ������ � �.�.'], | 
   
        | 152 |  |  | 'widths' => ['������','� ���� ���� �������� ����������� ��� ����������� ��������� ��������� ��������. ��� ������, �������, ���������� � �.�.'], | 
   
        | 153 |  |  | 'params' => ['�������������� ���������','� ���� ���� �������� ��������� ������������ ���������, �� ���������� � ������ ������.'], | 
   
        | 154 |  |  | 's_alias' => ['�������������� ������','����� ��������� ������ (������) ������������� ����������� ��������� ��������������-�����. ��� �������� ��� ����, ����� ��������� ������ ������������� ���������� � ����������� ���������������� ������'], | 
   
        | 155 |  |  | 'd_alias' => ['�������������� ����������','����� ��������� ���������� ������������� ����������� ��������� ��������������-�����. ��� �������� ��� ����, ����� ��������� ��������� � ����������� ���������������� ������'], | 
   
        | 156 |  |  | 'redirects' => ['�������� �����','����� ������������ ��������� (�� ���� ����������� � �� ��������). � �������� ��������� ��������� �������� ���, � � �������� �������� - ��� URI (<b>������� ��������� ���� /</b>, index.html ��������� �� ����).'], | 
   
        | 157 |  |  | }; | 
   
        | 158 |  |  |  | 
   
        | 159 |  |  | my $toopi = $project->$proto(); | 
   
        | 160 |  |  | if ( ($save) && (exists($PROTOS->{$proto})) ) | 
   
        | 161 |  |  | { | 
   
        | 162 |  |  | my $N = {}; | 
   
        | 163 |  |  | my $V = {}; | 
   
        | 164 |  |  | foreach my $p (keys(%ARGS)) | 
   
        | 165 |  |  | { | 
   
        | 166 |  |  | if ($p =~ /^option_(.+)$/) | 
   
        | 167 |  |  | { | 
   
        | 168 |  |  | if ( (length($ARGS{'option_'.$1})<1) && (exists($toopi->{$1})) ) | 
   
        | 169 |  |  | { | 
   
        | 170 |  |  | delete $toopi->{$1}; | 
   
        | 171 |  |  | } else { | 
   
        | 172 |  |  | $toopi->{$1} = $ARGS{'option_'.$1}; | 
   
        | 173 |  |  | } | 
   
        | 174 |  |  | } elsif ($p =~ /^newoption_id_(.+)$/) | 
   
        | 175 |  |  | { | 
   
        | 176 |  |  | $N->{$1} = $ARGS{'newoption_id_'.$1}; | 
   
        | 177 |  |  | } elsif ($p =~ /^newoption_value_(.+)$/) | 
   
        | 178 |  |  | { | 
   
        | 179 |  |  | $V->{$1} = $ARGS{'newoption_value_'.$1}; | 
   
        | 180 |  |  | } | 
   
        | 181 |  |  | } | 
   
        | 182 |  |  | foreach my $n (keys(%{ $N })) | 
   
        | 183 |  |  | { | 
   
        | 184 |  |  | next	if (length($N->{$n}) < 1); | 
   
        | 185 |  |  | $toopi->{$N->{$n}} = $V->{$n}; | 
   
        | 186 |  |  | } | 
   
        | 187 |  |  |  | 
   
        | 188 |  |  | $project->$proto($toopi); | 
   
        | 189 |  |  | $project->store($keeper); | 
   
        | 190 |  |  |  | 
   
        | 191 |  |  | } elsif ( $proto eq 's_alias' && not defined $save) { | 
   
        | 192 |  |  | #warn Data::Dumper::Dumper($sect)."\n"; | 
   
        | 193 |  |  | } | 
   
        | 194 |  |  |  | 
   
        | 195 |  |  | </%INIT> |