+36-25/401-440

Szállítási adatok


Név"; $t["szall_irsz"] = "IRSZ"; $t["szall_varos"] = "Város"; $t["szall_cim"] = "Cím"; $t["szla_nev"] = "

Számlázási adatok


Név"; $t["szla_irsz"] = "IRSZ"; $t["szla_varos"] = "Város"; $t["szla_cim"] = "Cím"; $t["adoszam"] = "Adószám"; if (!isset($t[$key])) return false; return $t[$key]; } function registrate () { if (isset ($_POST["password"])) { global $smarty; global $wpdb; $pass = esc_sql($_POST["password"]); $mail = esc_sql($_POST["email"]); unset ($_POST["password"]); $data = serialize ($_POST); $res = $wpdb->query ("select * from users where email='".$mail."'",ARRAY_A); var_dump ($mail); var_dump ($_POST["email"]); var_dump ($res); if ($res !== 0) { $smarty->assign ("err", "Az email cím már foglalt!!"); foreach ($_POST as $key => $value) { $_SESSION["auth"]["data"][$key] = $value; } //$smarty->display ("regisztracio.tpl"); } else { $wpdb->query ("insert into users (email,password,userdata) values ('".$mail."',password('".$pass."'),'".$data."')"); //$smarty->display ("reg_done.tpl"); $_SESSION["auth"]["data"] = $_POST; $_SESSION["loggedin"] = 1; $smarty->assign ("loggedin", 1); LM_exAddMember(); $data = unserialize($data); foreach ($data as $key => $value) { $d[] = "".$key."".$value.""; } $smarty->assign ("regdata", $d); $m = $smarty->fetch("regmail.tpl"); wp_mail ("csszabolcs@srwtrade.hu", "Vendker regisztráció", $m, "From: Vendker Webshop \r\nContent-type: text/html; charset=utf-8"); wp_mail ("vendker@vendker.hu", "Vendker regisztráció", $m, "From: Vendker Webshop \r\nContent-type: text/html; charset=utf-8"); } } } global $smarty; global $wpdb; if ($_GET["n"] == 2) registrate(); if ($_GET["n"] == 3) { foreach ($_POST as $key => $value) { $_SESSION["auth"]["data"][$key] = $value; } } foreach ($_SESSION["kosar"] as $key => $value) { if ($value == 0) continue; $res = $wpdb->get_results ("select * from products where id=".$key, ARRAY_A); $res[0]["menny"] = $value; if ($res[0]["discount"]!="") $res[0]["price"] = $res[0]["discount"]; $kosar[] = $res[0]; $total += $res[0]["menny"] * $res[0]["price"]; } foreach ($_SESSION["auth"]["data"] as $key => $value) { $key = translatekey($key); if ($key !== false) { $tmp["key"] = $key; $tmp["value"] = $value; $data[] = $tmp; } } $smarty->assign ("kosar", $kosar); $smarty->assign ("total", $total); $smarty->assign ("userdata", $_SESSION["auth"]["data"]); $smarty->assign ("szall_mod", $_SESSION["auth"]["data"]["szall_mod"]); $smarty->assign ("fiz_mod", $_SESSION["auth"]["data"]["fiz_mod"]); $tmp["kosar"] = $kosar; $tmp["total"] = $total; //var_dump ($_SESSION["auth"]["data"]); if (!isset ($_GET["n"])) $_GET["n"] = 1; if ($_GET["n"] < 4) $smarty->display ("kosar_".$_GET["n"].".tpl"); else { mysql_query ("insert into orders values (null,".$_SESSION["auth"]["id"].",'".json_encode($tmp)."')"); $oid = date("Y")."/".str_pad(mysql_insert_id(), 6, "0", STR_PAD_LEFT); $smarty->assign ("nev", (empty($_SESSION["auth"]["data"]["kapcsolattarto"])) ? $_SESSION["auth"]["data"]["szla_nev"] : $_SESSION["auth"]["data"]["kapcsolattarto"]); $smarty->assign ("userdata", $data); $smarty->assign ("order", 1); $smarty->assign("megj", $_POST["megj"]); $cont = $smarty->fetch ("ordermail.tpl"); wp_mail ($_SESSION["auth"]["data"]["email"], "Vendker megrendelés visszaigazolás", $cont,"From: Vendker Webshop \r\nContent-type: text/html; charset=utf-8"); wp_mail ("vendker@vendker.hu", "Vendker webshop rendelés", $cont,"From: Vendker Webshop \r\nContent-type: text/html; charset=utf-8"); $cont = GetContentByCustomField("vendker_box","order_thankyou"); echo "
".$cont["post_content"]."
"; // echo "

Köszönjük az érdeklődést!

"; // echo "

Az árajánlatkérés visszaigozálását elküldtük a ".$_±SESSION["auth"]["data"]["email"]." címre.

"; unset ($_SESSION["kosar"]); } ?>