'; $headercss=' '; } //about $sth = $dbh->prepare("select * from abouttype where abouttype_open = 1 order by abouttype_sort desc"); $sth->execute(); $rs_about = $sth->fetchAll(); //ptype $sth = $dbh->prepare("select * from ptype where ptype_open = 1 order by ptype_sort desc"); $sth->execute(); $rs_ptype = $sth->fetchAll(); //搜尋 if(isset($_POST["search"])) { echo ""; } $abc="/advantek"; $home_css =""; $news_css = ""; $about_css =""; $product_css=""; $contact_css =""; if($_SERVER['PHP_SELF'] == $abc."/index.php") { $home_css = "active"; } else if ($_SERVER['PHP_SELF'] == $abc."/newslist.php" || $_SERVER['PHP_SELF'] == $abc."/news.php") { $news_css = "active"; } else if ($_SERVER['PHP_SELF'] == $abc."/about.php") { $about_css = "active"; } else if ($_SERVER['PHP_SELF'] == $abc."/productlist.php" || $_SERVER['PHP_SELF'] == $abc."/product.php") { $product_css = "active"; } else if ($_SERVER['PHP_SELF'] == $abc."/contact.php") { $contact_css = "active"; } $sql = "select * from translation order by CHAR_LENGTH(translation_find) desc"; $sth = $dbh ->prepare($sql); $sth ->execute(); $translations = $sth->fetchAll(); function callback($buffer) { global $translations; foreach($translations as $key => $value) { $buffer=str_replace($value["translation_find"], $value["translation_".$_SESSION["lang"]], $buffer); } return $buffer; } ob_start("callback"); require "tpl/header.tpl.php"; ?>

正裕起動有限公司 (台灣/總部)

台灣光亮照明企業有限公司

南京方將照明電器有限公司(南京)

廣東得揚燈飾工業廠(廣東)

廈門聲仔電器有限公司(廈門)

東莞鉅盛皮具手袋廠(廣東)

purify($_POST['check']); $_POST['name'] = $purifier->purify($_POST['name']); $_POST['email'] = $purifier->purify($_POST['email']); $_POST['message'] = $purifier->purify($_POST['message']); $_POST['tel'] = $purifier->purify($_POST['tel']); if($_SESSION['check']!="" AND $_SESSION['check']==$_POST['check'] ){ $sql="insert into `contact` ( `contact_name`, `contact_email`, `contact_content`, `contact_dt`, `contact_tel`) values( :contact_name, :contact_email, :contact_content, :contact_dt, :contact_tel)"; $sth=$dbh->prepare($sql); $sth->bindValue(":contact_name",$_POST['name'],PDO::PARAM_STR); $sth->bindValue(":contact_email",$_POST['email'],PDO::PARAM_STR); $sth->bindValue(":contact_content",$_POST['message'],PDO::PARAM_STR); $sth->bindValue(":contact_tel",$_POST['tel'],PDO::PARAM_STR); $sth->bindValue(":contact_dt",date("Y-m-d H:i:s"),PDO::PARAM_STR); $sth->execute(); //Email 寄件處理 $body ="
姓名: ".$_POST['name']."
Email: ".$_POST['email']."
Email: ".$_POST['tel']."
內容: ".$_POST['message']."
"; //發email require("./phpmailer/class.phpmailer.php"); require("./phpmailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsMail(); $mail->IsHTML(true); $mail->CharSet="utf-8"; $from=$settings["from"]; $fromname=$settings["fromname"]; $to = $settings["to"]; $mail->IsSMTP(); // send via SMTP $mail->Host = $settings["host"]; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail -> Port = $settings["port"]; $mail->Username = $from; // SMTP username $mail->Password = $settings["pw"]; $mail->From = $from; $mail->FromName = $fromname; $mail->AddReplyTo($from,$fromname); $mail->AddAddress($to,$to); $mail->Subject = "網站聯絡表單通知"; $mail->Body = $body; $mail->SMTPDebug = 2; $mail->Send(); if (!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; }else { echo ""; echo ""; } }else echo ""; } require "tpl/footer.tpl.php"; ob_end_flush(); ?>