#!/usr/bin/perl
use CGI qw(:standard);
print "Content-type: text/html; charset=utf8\n\n";
#$str = "?";
$i = "1";
$total = "0";
print "
Оформление заказа
";
$act = param("act");
$lname = param("lname");
$fname = param("fname");
$tname = param("tname");
$phone = param("phone");
$address = param("address");
$idop = param("dop");
if ($act eq "")
{
print "
№ | Наименование | Количество | Дополнительно | Цена | Сумма |
";
print "
ИТОГО: $total РУБЛЕЙ
";
print "
";
}
if ($act eq "send")
{
if ($lname ne "" and $fname ne "" and $phone ne "" and $address ne "") {$ok = "ok";}
print "
№ | Наименование | Количество | Дополнительно | Цена | Сумма |
";
$str = "Content-type: text/html; charset=utf8\n\nЗаказ
№ | Наименование | Количество | Дополнительно | Цена | Сумма |
";
print "
ИТОГО: $total РУБЛЕЙ
";
$str = sprintf ("%s
ИТОГО: $total РУБЛЕЙ
", $str);
if ($ok ne "ok")
{
print "
Заполнены не все поля, помеченные \" * \"
";
}
else
{
print "
Заказ принят
Фамилия | $lname |
Имя | $fname |
Отчество | $tname |
Контактный телефон | $phone |
Адрес доставки | $address |
Дополнительно | $idop |