Revision 296 (by ahitrov, 2013/03/26 17:59:01) |
Promosite (anthill) project source
|
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
<& "/comps/$prj/header.msn", alias => 'main' &>
% } else {
<& "/comps/header.msn", alias => 'main' &>
% }
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td style="padding:0 32px 0 18px;" width="1%" nowrap>
<!--Menus-->
% if ( $m->comp_exists ("/comps/$prj/left.msn") ) {
<& "/comps/$prj/left.msn" &>
% }
<!--/Menus-->
</td>
<td width="1%"><img src="/i/<% $prj %>/diaton_device.png" width="84" height="334" alt="DIATON tonometer"></td>
<td style="padding:0 30px 20px;" width="98%">
<!--Information-->
% if ( ref $document ) {
<h2><% $document->name %></h2>
% }
% if ( $ok ) {
<p class="std">The order is sent successfully.</p>
% } else {
<script type="text/javascript">
<!--
function check_order ( oForm ) {
oForm.setfill.value = 'Отправить';
return true;
}
//-->
</script>
<p class="std">To place the order please fill in the following application form:</p>
<form action="./order.html" method="post" onsubmit="return check_order(this)">
<table width="100%" cellpadding="0" cellspacing="1" style="border:1px solid gray;">
<tr valign="top"><td width="50%" style="padding:1px 0 0 3px">Number of the devices <font color="red">*</font>
</td><td width="50%"><input type="text" name="devnum" class="plain" value="<% $ARGS{devnum} %>">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The name of the company, country <font color="red">*</font>
</td><td><input type="text" name="company" class="plain">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The contact person authorized to sign the contract <font color="red">*</font>
</td><td><input type="text" name="contact" class="plain">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The company's banking details <font color="red">*</font>
</td><td><textarea name="bank"></textarea>
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The juridical address <font color="red">*</font>
</td><td><textarea name="address"></textarea>
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The address of delivery <font color="red">*</font>
</td><td><textarea name="postaddress"></textarea>
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">Phone, fax numbers <font color="red">*</font>
</td><td><input type="text" name="phone" class="plain">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The way of delivery: DHL, etc.
</td><td><input type="text" name="delivery" class="plain">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">The conditions of delivery according to Incomers 2000
</td><td><input type="text" name="devcond" class="plain">
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 2px 3px">The conditions of payment:
</td><td style="padding:1px 0 2px 3px">
<input type="hidden" name="payment" class="plain" value="100% prepayment">100% prepayment <font color="red">**</font>
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td style="padding:1px 0 0 3px">Additional information: the necessity of the Certificate of Origin, insurance, etc.
</td><td><textarea name="comments"></textarea>
</td></tr>
<tr><td bgcolor="gray" colspan="2"><div style="height:1px"><spacer type="block" height="1"></div></td></tr>
<tr valign="top"><td>
</td><td align="right" style="padding:3px;">
<input type="hidden" name="setfill" value="">
<input type="submit" name="submit" value="Submit form" class="submit">
</td></tr>
</table>
<p class="rem"><font color="red">*</font> These are required fields.<br>
<font color="red">**</font> By sending this form you confirm the conditions of payment.
</p>
% }
<div style="height:5px"><spacer type="block" height="5"></div>
% if ( ref $document ) {
<% $document->body %>
% }
<!--/Information-->
</td></tr>
</table>
% ### Футер
% ##############################################
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
<& "/comps/$prj/footer.msn" &>
% } else {
<& "/comps/footer.msn" &>
% }
% ### /Футер
<%args>
$setfill => undef
$ok => undef
</%args>
<%init>
my $prj = $request->{project};
my $profile = $request->{project_profile};
my $root = $request->{project_section};
my ($document) = $keeper->get_documents (
s => $root->id,
class => 'promosuite::Article',
alias => 'order',
limit => 1,
status => 1,
);
if ( $setfill ) {
my $CP = 'UTF8' if $setfill eq 'Отправить';
$CP = 'ISO' if Convert::Cyrillic::cstocs('ISO', 'UTF8', $setfill) eq 'Отправить';
$CP = 'KOI8' if Convert::Cyrillic::cstocs('KOI8', 'UTF8', $setfill) eq 'Отправить';
$CP = 'WIN' if Convert::Cyrillic::cstocs('WIN', 'UTF8', $setfill) eq 'Отправить';
foreach my $key ( qw( devnum company contact bank address postaddress phone delivery devcond payment comments ) ) {
$ARGS{$key} = Convert::Cyrillic::cstocs($CP, 'UTF8', $ARGS{$key});
}
if ( $ARGS{company} && $ARGS{contact} && $ARGS{phone} ) {
my $sendmail = {
to => 'Marketing <'.$project->params->{mail_to}.'>',
from => 'Diaton Bot <'.$project->params->{mail_from}.'>',
subject => "DIATON-TONOMETER - Order",
body => $m->scomp('/comps/'.$prj.'/letters/order.msn', %ARGS),
};
$m->comp('/subs/sendmail.msn', email => $sendmail);
$m->redirect('?ok=1');
}
}
</%init>