1 |
296 |
ahitrov |
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { |
2 |
|
|
<& "/comps/$prj/header.msn", alias => 'main' &> |
3 |
|
|
% } else { |
4 |
|
|
<& "/comps/header_rambler.msn", alias => 'main' &> |
5 |
|
|
% } |
6 |
|
|
|
7 |
|
|
<table class="r--main"> |
8 |
|
|
<tr> |
9 |
|
|
<td class="dev--left-10"><div class="dev--left-10"><!-- --></div></td> |
10 |
|
|
<td class="dev--left-menu r--vtop"> |
11 |
|
|
<div class="dev--left-menu"><!-- --></div> |
12 |
|
|
|
13 |
|
|
<& "/comps/$prj/menus.msn", s => $s, id => $id &> |
14 |
|
|
|
15 |
|
|
</td> |
16 |
|
|
<td class="dev--left-25"><div class="dev--left-25"><!-- --></div></td> |
17 |
|
|
<td class="r--vtop r--normal"> |
18 |
|
|
|
19 |
|
|
<div id="mailform" onmouseover="javascript:showObject(mailform)"> |
20 |
|
|
<h2 class="mb10 mt10">Обратная связь</h2> |
21 |
|
|
|
22 |
|
|
% unless ( $ok ) { |
23 |
|
|
<script type="text/javascript"> |
24 |
|
|
<!-- |
25 |
|
|
function check_fields ( oForm ) { |
26 |
|
|
return true; |
27 |
|
|
if (!oForm.name.value) { |
28 |
|
|
alert ('Необходимо указать имя'); |
29 |
|
|
return false; |
30 |
|
|
} |
31 |
|
|
if (!oForm.lastname.value) { |
32 |
|
|
alert ('Необходимо указать фамилию'); |
33 |
|
|
return false; |
34 |
|
|
} |
35 |
|
|
var email = oForm.email.value; |
36 |
|
|
if ( !email ) { |
37 |
|
|
alert ('Необходимо указать электронный адрес'); |
38 |
|
|
return false; |
39 |
|
|
} |
40 |
|
|
if ( email.indexOf('@') == -1 || email.indexOf('.') == -1 ) { |
41 |
|
|
alert ('Указан неверный электронный адрес'); |
42 |
|
|
return false; |
43 |
|
|
} |
44 |
|
|
if (!oForm.question.value) { |
45 |
|
|
alert ('Необходимо заполнить поле вопроса'); |
46 |
|
|
return false; |
47 |
|
|
} |
48 |
|
|
return false; |
49 |
|
|
} |
50 |
|
|
//--> |
51 |
|
|
</script> |
52 |
|
|
|
53 |
|
|
<div class="error"> |
54 |
|
|
% if ( $errstr ) { |
55 |
|
|
<% $errstr %> |
56 |
|
|
% } |
57 |
|
|
</div> |
58 |
|
|
|
59 |
|
|
<u class=uTop><i class=uLft><!-- --></i><i class=uRgt><!-- --></i></u> |
60 |
|
|
<div id="feedbackcontainer" class="grayBg"> |
61 |
|
|
|
62 |
|
|
|
63 |
|
|
<& "/comps/$prj/feedback_form.msn", id => $id, %ARGS &> |
64 |
|
|
|
65 |
|
|
</div> |
66 |
|
|
<u class="uBtm"><i class="uLft"><!-- --></i><i class="uRgt"><!-- --></i></u> |
67 |
|
|
<div class="mt30"></div> |
68 |
|
|
</div> |
69 |
|
|
|
70 |
|
|
|
71 |
|
|
% } else { |
72 |
|
|
<a href="./">Принято!</a> |
73 |
|
|
% } |
74 |
|
|
|
75 |
|
|
<div class="dev--content"><!-- --></div> |
76 |
|
|
|
77 |
|
|
</td> |
78 |
|
|
</tr> |
79 |
|
|
</table> |
80 |
|
|
|
81 |
|
|
|
82 |
|
|
% ### Футер |
83 |
|
|
% ############################################## |
84 |
|
|
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { |
85 |
|
|
<& "/comps/$prj/footer.msn" &> |
86 |
|
|
% } else { |
87 |
|
|
<& "/comps/footer_rambler.msn" &> |
88 |
|
|
% } |
89 |
|
|
% ### /Футер |
90 |
|
|
<%args> |
91 |
|
|
|
92 |
|
|
$filled => undef |
93 |
|
|
$s => undef |
94 |
|
|
$id => undef |
95 |
|
|
$ok => undef |
96 |
|
|
|
97 |
|
|
</%args> |
98 |
|
|
<%init> |
99 |
|
|
|
100 |
|
|
my $prj = $request->{project}; |
101 |
|
|
my $profile = $request->{project_profile}; |
102 |
|
|
my $root = $request->{project_section}; |
103 |
|
|
|
104 |
|
|
my $errstr; |
105 |
|
|
my ($document, $section); |
106 |
|
|
|
107 |
|
|
my $CP = 'UTF8'; |
108 |
|
|
if ( $filled ) { |
109 |
|
|
$CP = 'ISO' if Convert::Cyrillic::cstocs('ISO', 'UTF8', $filled) eq 'Отправить'; |
110 |
|
|
$CP = 'KOI8' if Convert::Cyrillic::cstocs('KOI8', 'UTF8', $filled) eq 'Отправить'; |
111 |
|
|
$CP = 'WIN' if Convert::Cyrillic::cstocs('WIN', 'UTF8', $filled) eq 'Отправить'; |
112 |
|
|
|
113 |
|
|
$errstr = $m->comp ( '/subs/'.$prj.'/feedback_send.msn', CP => $CP, %ARGS ); |
114 |
|
|
$m->redirect ('./feedback.html?ok=1') unless $errstr; |
115 |
|
|
} |
116 |
|
|
|
117 |
|
|
</%init> |