| 1 |
3 |
ahitrov@rambler.ru |
<& "/contenido/components/header.msn", title => 'XLS2HTML' &> |
| 2 |
|
|
<form action="" method="post" style="width: 100%; height: 200px; padding: 12px;"> |
| 3 |
|
|
<h1>XLS<span style="color: #555">2</span>HTML</h1> |
| 4 |
|
|
<textarea name="code" style="width: 100%; height: 100%;"><% $arg_code %></textarea><br> |
| 5 |
|
|
<input type="submit" value="�������������"> |
| 6 |
|
|
</form> |
| 7 |
|
|
|
| 8 |
|
|
% if (!$code){exit;} |
| 9 |
|
|
|
| 10 |
|
|
<plaintext><table border> |
| 11 |
|
|
<tr> |
| 12 |
|
|
<td><% $code %></td> |
| 13 |
|
|
</tr> |
| 14 |
|
|
</table> |
| 15 |
|
|
|
| 16 |
|
|
<%args> |
| 17 |
|
|
|
| 18 |
|
|
$code => undef |
| 19 |
|
|
|
| 20 |
|
|
</%args> |
| 21 |
|
|
<%init> |
| 22 |
|
|
|
| 23 |
|
|
my $separator = "\t"; # ����������� ����� |
| 24 |
|
|
my $space = ' '; # ���� ��������� ������ ������ |
| 25 |
|
|
my $arg_code = $code; |
| 26 |
|
|
|
| 27 |
|
|
$code =~ s|$separator|</td><td>|g; |
| 28 |
|
|
$code =~ s|[\n\r]+|</td>\n </tr>\n <tr>\n <td>|g; |
| 29 |
|
|
$code =~ s|</td><td>|</td>\n <td>|g; |
| 30 |
|
|
$code =~ s|<td></td>|<td>$space</td>|g; |
| 31 |
|
|
|
| 32 |
|
|
</%init> |