'; } function br($arg=null) { return nl2br($arg); } function pr($arg=null) { echo '
'.print_r($arg,true).'
'; } function prd($arg=null) { pr($arg); die; } function prh($arg=null) { pr($arg); hr(); } function h($arg) { if(is_array($arg)) { return array_map('h', $arg); } if(ini_get('magic_quotes_gpc') == 1) { $arg = stripslashes($arg); } return htmlspecialchars($arg, ENT_QUOTES, 'UTF-8'); } function hiddenParams($data=array()) { $return = null; foreach($data as $key=>$val){ if(is_array($val)) { foreach($val as $val2) { $return .= ''.PHP_EOL; } } else { $return .= ''.PHP_EOL; } } return $return; } /* その他定数・変数(編集不可) ----------------------------------------------------------------------- */ // メール用テンプレート define('EMAIL_TEMPLATE', './inc/mail_template.inc'); define('DS', DIRECTORY_SEPARATOR); define('BASE_DIR', dirname(dirname(__FILE__)).DS); define('INC_DIR', BASE_DIR . 'inc' . DS); お問い合わせ - 4E institute

お問い合わせ

getData(); $name = $data["name"]; $company = $data["company"]; $email = $data["email"]; $subject = $data["subject"]; $body = $data["body"]; //if (empty($phase)) $phase = $_GET['phase']; switch ($phase) { case 'send': if($_SESSION['sent']) { include ('./inc/done.inc'); } else { $error = false; $mailer->to = $data['email']; $mailer->from = array('name'=>FROM_NAME_FOR_CUSTOMER, 'email'=>FROM_EMAIL_FOR_CUSTOMER); $mailer->subject = SUBJECT_FOR_CUSTOMER; $mailer->template = EMAIL_TEMPLATE; $mailer->first = EMAIL_FIRST_FOR_CUSTOMER; $mailer->signature = EMAIL_SIGNATURE_FOR_CUSTOMER; if($mailer->send()) { $mailer->to = TO_EMAIL_FOR_ADMIN; $mailer->from = array('name'=>FROM_NAME_FOR_ADMIN, 'email'=>FROM_EMAIL_FOR_ADMIN); $mailer->subject = SUBJECT_FOR_ADMIN; $mailer->template = EMAIL_TEMPLATE; $mailer->first = EMAIL_FIRST_FOR_ADMIN; $mailer->signature = EMAIL_SIGNATURE_FOR_ADMIN; if($mailer->send()) { $_SESSION['sent'] = true; } else { $error = true; } } else { $error = true; } if($error) { include ('./inc/maintenance.inc'); } else { include ('./inc/done.inc'); } } break; case 'confirm': if($mailer->validate()) { include ('./inc/confirm.inc'); } else{ $errors = $mailer->getErrors(); include ('./inc/error.inc'); include ('./inc/form.inc'); } break; default: if($_SESSION['sent']) { session_destroy(); unset($_SESSION); } include ('./inc/note.inc'); include ('./inc/form.inc'); break; } $_SESSION['mailer'] = serialize($mailer); ?>