4) { header("Location: /"); exit; } $curserv=db_fa(db_q("select * from services where vis=1 and onmain=1 order by following limit ".($_GET['active']>0?$_GET['active']-1:0).",1")); if($_POST['serv']>0) { $cs=db_fa(db_q("select * from services where vis=1 and onmain=1 and id='".mysql_escape_string($_POST['serv'])."' order by following limit 0, 1")); $stp2=db_fa(db_q("select * from fastorder2 where id='".mysql_escape_string($_POST['radio'])."'")); $stp31=db_fa(db_q("select * from fastorder3 where id='".mysql_escape_string($_POST['radio1'])."'")); $stp32=db_fa(db_q("select * from fastorder3 where id='".mysql_escape_string($_POST['radio2'])."'")); $mess="Быстрый заказ:\n-------------------\n\n"; $mess.="Услуга: ".$cs['name']."\n"; $mess.="1. Компания: ".$_POST['comp']."\n"; $mess.="2. Шаг 2: ".$stp2['name']."\n"; $mess.="3. Шаг 3: ".$stp31['name'].', '.$stp32['name']."\n"; $mess.="4. Контактное лицо: ".$_POST['fio']." / ".$_POST['contacts']." / ".$_POST['email']."\n"; mail(get_value(5), "Сообщение с сайта", $mess, "From: Сообщение с сайта\nContent-Type: text/plain; charset=utf-8\nContent-Encoding: utf-8\nMIME-version: utf-8\n"); //print_r($_POST); $_SESSION['piu']=1; header("Location: /"); exit; } page_template("main", "block_mainpage.php", array("curserv" => $curserv, "page_title" => $curserv['pagetitle'], "meta_desc" =>$curserv['metadesc'], "meta_key" => $curserv['metakey']));?>