\nしばらく経ってから再度お願い致します。"; $mailcomp = "お問い合わせいただきましてありがとうございます。後日電話又はメールでご連絡致します。"; $strings = ""; $strings .= "ブランド名"." : " . $tmpDetail["brand"] ."\n"; $strings .= "商品名"." : " . $tmpDetail["itemName"] ."\n"; $strings .= "商品使用状態"." : "; if ($tmpDetail["status"] =="no"){ $strings .= "選択してください";} else if ($tmpDetail["status"] =="a" ){ $strings .= "新品・未使用の状態";} else if ($tmpDetail["status"] =="b" ){ $strings .= "ほとんど使っておらず、使用感がほぼない(新品同様程度)";} else if ($tmpDetail["status"] =="c" ){ $strings .= "普通に使っていたが、状態は良い(Aランク程度)";} else if ($tmpDetail["status"] =="d" ){ $strings .= "普通に使っていたが、多少使用感や傷などある(Bランク程度)";} else if ($tmpDetail["status"] =="e" ){ $strings .= "かなり使っていて、使用感や傷などが多い(Cランク程度)";} $strings .= "\n"; if ($tmpDetail["option01"] <> "") { $strings .= "付属品"." : " . $tmpDetail["option01"] ."\n"; } if ($tmpDetail["option02"] <> "") { $strings .= "付属品"." : " . $tmpDetail["option02"] ."\n"; } if ($tmpDetail["option03"] <> "") { $strings .= "付属品"." : " . $tmpDetail["option03"] ."\n"; } if ($tmpDetail["option04"] <> "") { $strings .= "付属品"." : " . $tmpDetail["option04"] ."\n"; } if ($tmpDetail["option05"] <> "") { $strings .= "付属品"." : " . $tmpDetail["option05"] ."\n"; } $strings .= "付属品その他"." : " . $tmpDetail["optionEtc"] ."\n"; $strings .= "ご購入時期"." : " . $tmpDetail["buyDate"] ."\n"; $strings .= "ご購入金額"." : " . $tmpDetail["buyPrice"] ."\n"; if ($tmpDetail["picture01"] <> ""){ $strings .= "添付画像1"." : " . "http://" . HOST_URL . UP_URL . $tmpDetail["picture01"] ."\n"; } if ($tmpDetail["picture02"] <> ""){ $strings .= "添付画像2"." : " . "http://" . HOST_URL . UP_URL . $tmpDetail["picture02"] ."\n"; } if ($tmpDetail["picture03"] <> ""){ $strings .= "添付画像3"." : " . "http://" . HOST_URL . UP_URL . $tmpDetail["picture03"] ."\n"; } $strings .= "買取希望金額"." : " . $tmpDetail["sellPrice"] ."\n"; $strings .= "お名前"." : " . $tmpDetail["name"] ."\n"; $strings .= "フリガナ"." : " . $tmpDetail["kana"] ."\n"; $strings .= "電話番号"." : " . $tmpDetail["tel"] ."\n"; $strings .= "メールアドレス"." : " . $tmpDetail["email01"] ."\n"; if ($tmpDetail["method"] <> ""){ $strings .= "希望連絡方法"." : ".$tmpDetail["method"] ."\n"; } if ($tmpDetail["comment"] <> ""){ $strings .= "【備考内容】"."\n".$tmpDetail["comment"]."\n\n"; } /******************************* //管理者用メール送信 *******************************/ $fromAddress = $tmpDetail["email01"]; $replyAddress = $tmpDetail["email01"]; $toAddress = MAIL_ADMIN; $subject = "オンライン査定の申し込みがありました"; $strings2 = "下記の方からオンライン査定の申し込みがありました。\n\n"; $strings2 .= $strings; $checkTitle = addslashes("$subject"); $sendMessage = addslashes("$strings2"); $i = 0; if ($tmpDetail["picture01"] <> ""){ $fileName[$i] = UP_DIR . $tmpDetail["picture01"]; $i++; } if ($tmpDetail["picture02"] <> ""){ $fileName[$i] = UP_DIR . $tmpDetail["picture02"]; $i++; } if ($tmpDetail["picture03"] <> ""){ $fileName[$i] = UP_DIR . $tmpDetail["picture03"]; $i++; } // var_dump($fileName); // die(); $res = FucSendMail($fromAddress, $toAddress, $checkTitle, $sendMessage, $fileName, $replyAddress); if ($res <> 0) { $message = $mailfail; } else { $message = $mailcomp; } /******************************* //問い合わせ者メール送信 *******************************/ $fromAddress = MAIL_ADMIN; $replyAddress = MAIL_ADMIN; $toAddress = $tmpDetail["email01"]; $subject = "オンライン査定のお申し込みありがとうございました"; $strings2 = $tmpDetail["name"] . "様\n"; $strings2 .= "" . "\n"; $strings2 .= "この度は【ブランドショップよちか】をご利用頂き誠にありがとうございます。" . "\n"; $strings2 .= "オンライン査定のお申込みを受け付け致しました。" . "\n"; $strings2 .= "お送り頂きました内容を確認し、24時間以内にご連絡いたします。 " . "\n"; $strings2 .= "" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "【お申し込み内容】" . "\n"; $strings2 .= $strings; $strings2 .= "" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "お申し込み内容をご確認のうえ、今しばらくお待ちくださいませ。" . "\n"; $strings2 .= "今後ともブランドショップよちかをよろしくお願い致します。" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "※もし数日中に返事が無い場合は、" . "\n"; $strings2 .= "正しく受信できなかった可能性がありますので、" . "\n"; $strings2 .= "恐れ入りますがお電話(075-257-5844)にてご連絡をお願いします。" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "━【お問合せ先】━━━━━━━━━━━━━━━━━━━━━━━" . "\n"; $strings2 .= " " . "\n"; $strings2 .= " ブランドショップよちか(株式会社よちか)" . "\n"; $strings2 .= " 〒602-0824 京都市上京区今出川通寺町東入ル一真町93" . "\n"; $strings2 .= " TEL:075-257-5844 FAX:075-257-5845" . "\n"; $strings2 .= " 営業時間:10:00~19:00 ※休業日:日曜・夏期休暇・年末年始" . "\n"; $strings2 .= " E-mail:info_yo@yochika-kaitori.com" . "\n"; $strings2 .= " URL:http://www.yochika-kaitori.com/" . "\n"; $strings2 .= "" . "\n"; $strings2 .= "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" . "\n"; $checkTitle = addslashes("$subject"); $sendMessage = addslashes("$strings2"); $res = FucSendMail($fromAddress, $toAddress, $checkTitle, $sendMessage, $fileName, $replyAddress); if ($res <> 0) { $message = $mailfail; } else { $message = $mailcomp; } $itemId = $tmpDetail["itemId"]; $message = "更新しました。"; unset($tmpDetail); } else if ($_POST["postBack"] == "1"){ //確認画面 $post = GetHtmlData(); $itemDetail = $post['itemDetail']; if ($itemDetail["itemId"] == ""){ $itemDetail["itemId"] = sprintf('%05d', rand( 1, 9999999)); } //var_dump($itemDetail); //die($com); //アップロードファイルの名称作成 for ($i = 1; $i <= 3; $i++){ $num = $i; $tmpStr = "itemDetail_picture" . sprintf("%02d", strval($num)); if (strlen(basename(mb_convert_encoding($_FILES[$tmpStr]['name'], PHP_FONT_TYPE, auto))) <> 0) { $uploadfile = $itemDetail["itemId"] . sprintf("%02d", strval($i)); $tmpStr02 = "picture" . sprintf("%02d", strval($num)); $itemDetail[$tmpStr02] = $uploadfile . ".jpg"; } else { $tmpStr = "picture" . sprintf("%02d", strval($num))."h"; $uploadfile = mb_convert_encoding($itemDetail[$tmpStr], PHP_FONT_TYPE, auto); $tmpStr02 = "picture" . sprintf("%02d", strval($num)); $itemDetail[$tmpStr02] = $uploadfile; } } //製品画像アップロード1個 for ($i = 1; $i <= 3; $i++){ $num = $i; $tmpStr = "itemDetail_picture" . sprintf("%02d", strval($num)); if (strlen(TRIM($_FILES[$tmpStr]['tmp_name'])) <> 0){ //パソコン用 $uploadfile = $itemDetail["itemId"] . sprintf("%02d", strval($num)); if (UploadImage($tmpStr, UP_DIR . $uploadfile, "jpg", PIC_MAX) == false) { echo "ショップ用" . $num . "ファイルのアップロードに失敗しました\n"; } } } $itemId = $itemDetail["itemId"]; } else { //情報を更新する $post = GetHtmlData(); $itemDetail = $post['itemDetail']; if ($itemDetail["method"] == ""){ $itemDetail["method"] = "電話"; } } //情報取得 if (is_array($itemDetail)) { $smarty->assign( 'itemDetail', array_map("ConvertHtmlCode", $itemDetail)); } $pageTitle = "オンライン査定"; $baseId = "online"; // 固定設定 $tmp = explode("/",$_SERVER['REQUEST_URI']); $homepage = $tmp[count($tmp)-1]; $smarty->assign( 'homepage', "$homepage"); $smarty->assign( 'message', "$message"); $smarty->assign( 'confmessage', "$confmessage"); $smarty->assign( "scriptName" , "script.js"); $smarty->assign( "pageTitle" , "$pageTitle"); $smarty->assign( "baseId" , "$baseId"); // ページを表示する if ($_POST["postBack"] == "2"){ header("Location: finish.html"); exit(); } else if ($_POST["postBack"] == "1"){ $templateName = basename(dirname(str_replace(BASE_URL, "/", $_SERVER['PHP_SELF']))) . "_" . "confirm" . $com . ".tpl"; } else { $templateName = basename(dirname(str_replace(BASE_URL, "/", $_SERVER['PHP_SELF']))) . "_" . "index" . $com . ".tpl"; } $smarty->assign( "currentPage", BASE_URL . "$templateName"); $smarty->assign( "templateName", $templateName); $smarty->display( 'base.tpl' ); ?>