assign("data", $_POST); $content = $Smarty->fetch('christmas_order.htm'); /*} else if (!check_phone_number($_POST["mobil"])){ $_POST["action"] = $_SERVER['PHP_SELF']."?uj=1"; $_POST["hiba"] = "wrong_phone"; $_POST["spots"] = $UNNEPI_SPOTOK; $Smarty->assign("data", $_POST); $content = $Smarty->fetch('christmas_order.htm');*/ /* } else { if (strstr($_POST["spot_webpage"], "http://")) { $temp = explode("://", $_POST["spot_webpage"]); if (strstr($temp[1], "/")) { $temp1 = explode("/", $temp[1]); $spot_webpage = $temp1[0]; } else { $spot_webpage = $temp[1]; } } elseif (strstr($_POST["spot_webpage"], "/")) { $temp1 = explode("/", $_POST["spot_webpage"]); $spot_webpage = $temp1[0]; } else { $spot_webpage = $_POST["spot_webpage"]; } $array = array("\r\n", "\n\r", "\n", "\r"); $cim = str_replace($array, "
", $_POST["cim"]); $szaml_cim = str_replace($array, "
", $_POST["szaml_cim"]); $note = str_replace($array, "
", $_POST["note"]); $webvizio_note = "A kiválasztott spot azonosítója: ".$UNNEPI_SPOTOK[$_POST["spot"]]." Weboldala: ".$_POST["spot_webpage"]; if ($_SESSION["userId"]) { $sql = "SELECT * FROM ".$_VARIABLES["db_prefix"]."hirlevel_user WHERE id=".$_SESSION["userId"]; $users = $MySql->query($sql); if ($users[0]["partner_id"]){ $partners = "partner_id=".$users[0]["partner_id"].","; } } if ($_SESSION["PID"] && empty($partners)){ $partners = "partner_id=".$_SESSION["PID"].","; } $sql = "INSERT INTO ".$_VARIABLES["db_prefix"]."clients SET vezeteknev=\"".$_POST["vezeteknev"]."\", keresztnev=\"".$_POST["keresztnev"]."\", email=\"".$_POST["email"]."\", mobil=\"".$_POST["mobil"]."\", fax=\"".$_POST["fax"]."\", co_name=\"".$_POST["co_name"]."\", cim=\"".$cim."\", szaml_nev=\"".$_POST["szaml_nev"]."\", szaml_cim=\"".$szaml_cim."\", note=\"".$note."\", webvizio_note=\"".$webvizio_note."\", ajanlat_id=\"".$_POST["ajanlat_id"]."\", nlID=\"".$_SESSION["userId"]."\", ".$partners." status=\"1\", status_date=now(), order_date=now()"; $res = mysql_query($sql); $id = mysql_insert_id(); $sql = "INSERT INTO ".$_VARIABLES["db_prefix"]."client_spots SET client_id=\"".$id."\", webpage=\"".$spot_webpage."\", url=\"http://".$spot_webpage."/webspots/\", spot=\"".$UNNEPI_SPOT_IDS[$_POST["spot"]]."\", pos=\"8\", stickypos=\"1\", session=\"1\", session_timelimit=\"5\", session_exist=\"1\""; $res = mysql_query($sql); $spot_id = mysql_insert_id(); $sql = "INSERT INTO ".$_VARIABLES["db_prefix"]."client_spot_stat SET client_id=\"".$id."\", spot_id=\"".$spot_id."\""; $res = mysql_query($sql); if (isset($_POST["spot"])) { $users[0]["spot"] = $UNNEPI_SPOTOK[$_POST["spot"]]; } else { $users[0]["spot"] = ""; } $users[0]["spot_webpage"] = $_POST["spot_webpage"]; $users[0]["vezeteknev"] = $_POST["vezeteknev"]; $users[0]["keresztnev"] = $_POST["keresztnev"]; $users[0]["email"] = $_POST["email"]; $users[0]["mobil"] = $_POST["mobil"]; $users[0]["fax"] = $_POST["fax"]; $users[0]["co_name"] = $_POST["co_name"]; $users[0]["cim"] = $cim; $users[0]["szaml_nev"] = $_POST["szaml_nev"]; $users[0]["szaml_cim"] = $szaml_cim; $users[0]["note"] = $note; $Smarty->assign("data", $users[0]); $body = $Smarty->fetch("christmas_order_confirm.htm"); $subject = "Webvizio.hu rendelés"; $body = ereg_replace('"', """, $body); $sql = "INSERT INTO ".$_VARIABLES["db_prefix"]."mailqueue SET email=\"".$_POST["email"]."\", subject=\"".$subject."\", body=\"".$body."\""; $MySql->query($sql); $subject = "WebVizio Új rendelés"; $body = " Új rendelés érkezett!

Adatok:
Kiválasztott Ünnepi spot azonosító: ".$UNNEPI_SPOTOK[$_POST["spot"]]."
Weboldal(ahová a spot felkerül): ".$_POST["spot_webpage"]."
Név: ".$_POST["vezeteknev"]." ".$_POST["keresztnev"]."
E-mail: ".$_POST["email"]."
Telefonszám: ".$_POST["mobil"]."
Fax: ".$_POST["fax"]."
Cégnév: ".$_POST["co_name"]."
Postacím: ".$cim."
Számlázási név: ".$_POST["szaml_nev"]."
Számlázási cím: ".$szaml_cim."
Megjegyzés: ".$note."
"; $sql = "INSERT INTO ".$_VARIABLES["db_prefix"]."mailqueue SET email=\"".$_VARIABLES["site_email"]."\", subject=\"".$subject."\", body=\"".$body."\""; $MySql->query($sql); header("Location: message.php?succesful_order=1"); exit; } } else { $_POST["action"] = $_SERVER['PHP_SELF'].""; $_POST["hiba"] = "missing_param"; $_POST["spots"] = $UNNEPI_SPOTOK; $Smarty->assign("data", $_POST); $content = $Smarty->fetch('christmas_order.htm'); } } else { $data["action"] = $_SERVER['PHP_SELF'].""; $data["hiba"] = "valid_link"; if ($_GET["ajanlat_id"]) { $data["ajanlat_id"] = $_GET["ajanlat_id"]; } else { $data["ajanlat_id"] = 0; } if ($_GET["spot"]) { $data["spot"] = $_GET["spot"]; } $data["spots"] = $UNNEPI_SPOTOK; $Smarty->assign("data", $data); $content = $Smarty->fetch('christmas_order.htm'); } $Smarty->assign("content", $content); $column = $Smarty->fetch('column.htm'); //$Smarty->debugging = true; $Smarty->MyDisplay($column);*/ ?>