????

Your IP : 3.138.174.45


Current Path : /home/r6536736/public_html/kashiwaya-tosou.com/
Upload File :
Current File : /home/r6536736/public_html/kashiwaya-tosou.com/mail.php

<!-- Global site tag (gtag.js) - Google Ads: 818948687 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-818948687"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-818948687');
</script>
<!-- Event snippet for 柏谷塗装電話問合せ conversion page -->
<script>
window.addEventListener('load', function() {
  document.querySelectorAll('[href*="tel:"]').forEach(function(link){
    link.addEventListener('click', function() { 
gtag('event', 'conversion', {'send_to': 'AW-818948687/Rk36CN2ql-8CEM_UwIYD'});
    });
  });
});
</script>
<!-- Event snippet for 柏谷塗装_お問合せフォーム送信 conversion page -->
<script>
 if(window.location.href == 'https://kashiwaya-tosou.com/mail.php'){
   window.addEventListener('DOMContentLoaded', function(){
   document.querySelector('#wrapper > form > input[type=submit]:nth-child(4)').addEventListener('click', function(e){
 gtag('event', 'conversion', {'send_to': 'AW-818948687/qKNwCML0le8CEM_UwIYD'});
   },false);
   });
   }
</script>
<?php
//HPのアドレス
$site_top = "https://kashiwaya-tosou.com/";

$file_name ="mail.php";

$to = "info@ee-shokunin-homepage.com";
//テスト用
//$to = "ykozawa@gmail.com";

//表示用Noreplyアドレス
$noreply = "no-reply@kashiwaya-tosou.com";

//thanksページの有無(0なし、1あり)
$jpage = 0;

$next = "https://kashiwaya-tosou.com/";
$thanksPage = "https://kashiwaya-tosou.com/thanks.php";

$sbj = "柏谷塗装 ホームページからの問い合わせ";

$chmail = 1;

$from_add = 1;

$remail = 1;

$resbj = "お問い合わせありがとうございました【柏谷塗装】";

$esse = 1;


$sendmail = 0;
foreach($_POST as $key=>$val) {
  if($val == "submit") $sendmail = 1;
}


// 届くメールのレイアウトの編集
// 文字の置き換え
$string_from = "\";
$string_to = "ー";

$body="「".$sbj."」からメールが届きました\n\n";
$body.="■□■□■□■□■□■□■□■□■□■□■□■□■□\n\n";
foreach($_POST as $key=>$val) {
  $key = strtr($key, $string_from, $string_to);

  $out = '';
  if(is_array($val)){
      foreach($val as $item){
        $out .= $item . ',';
      }
      if(substr($out,strlen($out) - 1,1) == ',') {
        $out = substr($out, 0 ,strlen($out) - 1);
      }
    }
    else {
        $out = $val;
    }
    
  //if(get_magic_quotes_gpc()) { $out = stripslashes($out); }
  if($out == "submit") ;

  else $body.="【 ".$key." 】 ".$out."\n";
}
$body.="\n■□■□■□■□■□■□■□■□■□■□■□■□■□\n";
$body.="送信された日時:".date( "Y/m/d (D) H:i:s", time() )."\n";
$body.="送信者のIPアドレス:".$_SERVER["REMOTE_ADDR"]."\n";
$body.="送信者のホスト名:".getHostByAddr(getenv('REMOTE_ADDR'))."\n";
//--- 終了 --->


if($remail == 1) {
$rebody = '';
if(isset($_POST['名前'])){ $rebody = "{$_POST['名前']} 様\n\n";}
$rebody.="お問い合わせありがとうございました。\n";
$rebody.="早急にご返信致しますので今しばらくお待ちください。\n\n";
$rebody.="送信内容は以下になります。\n\n";
$rebody.="■□■□■□■□■□■□■□■□■□■□■□■□■□\n\n";
foreach($_POST as $key=>$val) {
  $key = strtr($key, $string_from, $string_to);

  $out = '';
  if(is_array($val)){
      foreach($val as $item){
        $out .= $item . ',';
      }
      if(substr($out,strlen($out) - 1,1) == ',') {
        $out = substr($out, 0 ,strlen($out) - 1);
      }
    }
    else {
        $out = $val;
    }
  //if(get_magic_quotes_gpc()) { $out = stripslashes($out); }
  if($out == "submit") ;

  else $rebody.="【 ".$key." 】 ".$out."\n";
   
}
$rebody.="\n■□■□■□■□■□■□■□■□■□■□■□■□■□\n\n";
$rebody.="送信日時:".date( "Y/m/d (D) H:i:s", time() )."\n";
$reto = $_POST['メールアドレス'];
$refrom = $noreply;
$rebody=mb_convert_encoding($rebody,"JIS","utf-8");
$resbj="=?iso-2022-jp?B?".base64_encode(mb_convert_encoding($resbj,"JIS","utf-8"))."?=";
$reheader="From: $refrom\nReply-To: ".$to."\nContent-Type: text/plain;charset=iso-2022-jp\nX-Mailer: PHP/".phpversion();

}

$body=mb_convert_encoding($body,"JIS","utf-8");
$sbj="=?iso-2022-jp?B?".base64_encode(mb_convert_encoding($sbj,"JIS","utf-8"))."?=";
if($from_add == 1) {
  $from = $noreply;
  $header="From: $from\nReply-To: ".$to."\nContent-Type:text/plain;charset=iso-2022-jp\nX-Mailer: PHP/".phpversion();
} else {
  $header="Reply-To: ".$to."\nContent-Type:text/plain;charset=iso-2022-jp\nX-Mailer: PHP/".phpversion();
}
if($chmail == 0 || $sendmail == 1) {
  mail($to,$sbj,$body,$header);
  if($remail == 1) { mail($reto,$resbj,$rebody,$reheader); }
}
else { htmlHeader();
?>

<!-- 送信確認画面のレイアウト -->
以下の内容で間違いがなければ、「送信する」ボタンを押してください。<br><br>
<form action="<?php echo $file_name; ?>" method="POST">
<?php echo $err_message; ?>
<table>
<?php
foreach($_POST as $key=>$val) {
  $key = strtr($key, $string_from, $string_to);

  $out = '';
  if(is_array($val)){
  foreach($val as $item){
  $out .= $item . ',';
  }
  if(substr($out,strlen($out) - 1,1) == ',') {
  $out = substr($out, 0 ,strlen($out) - 1);
  }
 }
    else {
        $out = $val;
}

  if(get_magic_quotes_gpc()) { $out = stripslashes($out); }
  $out = htmlspecialchars($out);
  $key = htmlspecialchars($key);
  print("<tr bgcolor=#ffffff><td class=\"l_Cel\">".$key."</td><td>".$out);
?>
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $out; ?>">
<?php
  print("</td></tr>\n");
}
?>
</table>
<br>
<input type="hidden" name="mail_set" value="submit">
<input type="submit" value="送信する">
<input type="button" value="前画面に戻る" onClick="history.back()">
</form>

<?php htmlFooter(); } 

if(($jpage == 0 && $sendmail == 1) || ($jpage == 0 && ($chmail == 0 && $sendmail == 0))) { htmlHeader(); ?>
  <!-------- 送信終了画面のレイアウト---------->  
    <center>
	送信ありがとうございました。<br>
	送信は正常に完了しました。<br><br>

	<a href="<?php echo $site_top ;?>">トップページへ戻る⇒</a>

	</center>

<?php htmlFooter(); } 
    else if(($jpage == 1 && $sendmail == 1) || $chmail == 0) { header("Location: ".$thanksPage); }

function htmlHeader() { ?>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>お問い合わせ</title>
<style type="text/css">
#wrapper{
	width:90%;
	margin:0 auto;
	color:#666;
	font-size:90%;
	line-height:120%;
  padding-bottom:50px;
}
table{
	width:100%;
	margin:0 auto;
	border-collapse:collapse;
}
td{
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 100%;
    color: #232323;
}
td.l_Cel {
    width: 150px;
    background: #e8e8e8;
}
input[type="submit"] {
    font-size: 16px;
    padding: 10px;
}
input[type="button"] {
    font-size: 16px;
    padding: 10px;
}
@media only screen and (max-width: 767px) {
td.l_Cel {
    display: block;
    width: 100%;
    max-width: 94%;
    background: #e8e8e8;
}
td {
    display: block;
    width: 100%;
    max-width: 94%;
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 95%;
    color: #232323;
}
}
@media only screen and (max-width: 767px) {
    td.l_Cel,td {
    max-width: 96%;
    }
}
</style>
</head>
<body>
<div id="wrapper">
<?php } function htmlFooter() { ?>
</div>
</body>
</html>

<?php } ?>



Warning: Cannot modify header information - headers already sent by (output started at /tmp/php2fWgUZ:203) in /home/r6536736/public_html/gaiheki-kyoto.com/wp-includes/pluggable.php on line 1435

Warning: Cannot modify header information - headers already sent by (output started at /tmp/php2fWgUZ:203) in /home/r6536736/public_html/gaiheki-kyoto.com/wp-includes/pluggable.php on line 1438