Line # Revision Author
1 296 ahitrov % if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
2 <& "/comps/$prj/header.msn", alias => 'main' &>
3 % } else {
4 <& "/comps/header.msn", alias => 'main' &>
5 % }
6
7
8 <table width="100%" cellpadding="0" cellspacing="0" border="0">
9 <tr valign="top"><td style="padding:0 32px 0 18px;" width="1%" nowrap>
10 <!--Menus-->
11 % if ( $m->comp_exists ("/comps/$prj/left.msn") ) {
12 <& "/comps/$prj/left.msn" &>
13 % }
14 <!--/Menus-->
15 </td>
16
17 <td width="1%"><img src="/i/<% $prj %>/diaton_device.png" width="84" height="334" alt="DIATON tonometer"></td>
18 <td style="padding:0 30px 20px;" width="98%">
19 <!--Information-->
20
21 % if ( ref $document ) {
22 <h2><% $document->name %></h2>
23 % }
24
25 % if ( $ok ) {
26 <p class="std">The order is sent successfully.</p>
27 % } else {
28 <script type="text/javascript">
29 <!--
30 function check_order ( oForm ) {
31 oForm.setfill.value = 'Отправить';
32 return true;
33 }
34 //-->
35 </script>
36
37 <p class="std">To place the order please fill in the following application form:</p>
38
39 <form action="./order.html" method="post" onsubmit="return check_order(this)">
40 <table width="100%" cellpadding="0" cellspacing="1" style="border:1px solid gray;">
41 <tr valign="top"><td width="50%" style="padding:1px 0 0 3px">Number of the devices <font color="red">*</font>
42 </td><td width="50%"><input type="text" name="devnum" class="plain" value="<% $ARGS{devnum} %>">
43 </td></tr>
44 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
45 <tr valign="top"><td style="padding:1px 0 0 3px">The name of the company, country <font color="red">*</font>
46 </td><td><input type="text" name="company" class="plain">
47 </td></tr>
48 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
49 <tr valign="top"><td style="padding:1px 0 0 3px">The contact person authorized to sign the contract <font color="red">*</font>
50 </td><td><input type="text" name="contact" class="plain">
51 </td></tr>
52 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
53 <tr valign="top"><td style="padding:1px 0 0 3px">The company's banking details <font color="red">*</font>
54 </td><td><textarea name="bank"></textarea>
55 </td></tr>
56 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
57 <tr valign="top"><td style="padding:1px 0 0 3px">The juridical address <font color="red">*</font>
58 </td><td><textarea name="address"></textarea>
59 </td></tr>
60 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
61 <tr valign="top"><td style="padding:1px 0 0 3px">The address of delivery <font color="red">*</font>
62 </td><td><textarea name="postaddress"></textarea>
63 </td></tr>
64 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
65 <tr valign="top"><td style="padding:1px 0 0 3px">Phone, fax numbers <font color="red">*</font>
66 </td><td><input type="text" name="phone" class="plain">
67 </td></tr>
68 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
69 <tr valign="top"><td style="padding:1px 0 0 3px">The way of delivery: DHL, etc.
70 </td><td><input type="text" name="delivery" class="plain">
71 </td></tr>
72 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
73 <tr valign="top"><td style="padding:1px 0 0 3px">The conditions of delivery according to Incomers 2000
74 </td><td><input type="text" name="devcond" class="plain">
75 </td></tr>
76 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
77 <tr valign="top"><td style="padding:1px 0 2px 3px">The conditions of payment:
78 </td><td style="padding:1px 0 2px 3px">
79 <input type="hidden" name="payment" class="plain" value="100% prepayment">100% prepayment <font color="red">**</font>
80 </td></tr>
81 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
82 <tr valign="top"><td style="padding:1px 0 0 3px">Additional information: the necessity of the Certificate of Origin, insurance, etc.
83 </td><td><textarea name="comments"></textarea>
84 </td></tr>
85 <tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
86 <tr valign="top"><td>
87 </td><td align="right" style="padding:3px;">
88 <input type="hidden" name="setfill" value="">
89 <input type="submit" name="submit" value="Submit form" class="submit">
90 </td></tr>
91 </table>
92 <p class="rem"><font color="red">*</font> These are required fields.<br>
93 <font color="red">**</font> By sending this form you confirm the conditions of payment.
94 </p>
95 % }
96
97 <div style="height:5px"><spacer type="block" height="5"></div>
98
99 % if ( ref $document ) {
100 <% $document->body %>
101 % }
102
103 <!--/Information-->
104 </td></tr>
105 </table>
106
107
108
109 % ### Футер
110 % ##############################################
111 % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
112 <& "/comps/$prj/footer.msn" &>
113 % } else {
114 <& "/comps/footer.msn" &>
115 % }
116 % ### /Футер
117 <%args>
118
119 $setfill => undef
120 $ok => undef
121
122 </%args>
123 <%init>
124
125 my $prj = $request->{project};
126 my $profile = $request->{project_profile};
127 my $root = $request->{project_section};
128
129 my ($document) = $keeper->get_documents (
130 s => $root->id,
131 class => 'promosuite::Article',
132 alias => 'order',
133 limit => 1,
134 status => 1,
135 );
136
137 if ( $setfill ) {
138 my $CP = 'UTF8' if $setfill eq 'Отправить';
139 $CP = 'ISO' if Convert::Cyrillic::cstocs('ISO', 'UTF8', $setfill) eq 'Отправить';
140 $CP = 'KOI8' if Convert::Cyrillic::cstocs('KOI8', 'UTF8', $setfill) eq 'Отправить';
141 $CP = 'WIN' if Convert::Cyrillic::cstocs('WIN', 'UTF8', $setfill) eq 'Отправить';
142
143 foreach my $key ( qw( devnum company contact bank address postaddress phone delivery devcond payment comments ) ) {
144 $ARGS{$key} = Convert::Cyrillic::cstocs($CP, 'UTF8', $ARGS{$key});
145 }
146
147 if ( $ARGS{company} && $ARGS{contact} && $ARGS{phone} ) {
148 my $sendmail = {
149 to => 'Marketing <'.$project->params->{mail_to}.'>',
150 from => 'Diaton Bot <'.$project->params->{mail_from}.'>',
151 subject => "DIATON-TONOMETER - Order",
152 body => $m->scomp('/comps/'.$prj.'/letters/order.msn', %ARGS),
153 };
154 $m->comp('/subs/sendmail.msn', email => $sendmail);
155 $m->redirect('?ok=1');
156 }
157
158 }
159
160 </%init>