fork download
  1. <?php
  2.  
  3.  
  4. require_once './b2smarty.php';
  5. require_once '../lib/qdmail.php';
  6.  
  7. $smaty = new b2smarty();
  8.  
  9. $from_addr = "xxxx@xxxx.co.jp";
  10. $from_name = "xxxxxxxxxx";
  11. $mail_subject = "お問い合わせ";
  12.  
  13. $error_message = "";
  14.  
  15. $cmd= isset($_POST['cmd'])?$_POST['cmd']:'';
  16.  
  17. $data['name']= isset($_POST['name'])?trim($_POST['name']):'';
  18. $data['rname'] = isset($_POST['rname'])?trim($_POST['rname']):'';
  19. $data['post01']= isset($_POST['post01'])?trim($_POST['post01']):'';
  20. $data['post02'] = isset($_POST['post02'])?trim($_POST['post02']):'';
  21. $data['pref'] = isset($_POST['pref'])?trim($_POST['pref']):'';
  22. $data['add'] = isset($_POST['add'])?trim($_POST['add']):'';
  23. $data['tel']= isset($_POST['tel'])?trim($_POST['tel']):'';
  24. $data['fax']= isset($_POST['fax'])?trim($_POST['fax']):'';
  25. $data['mail'] = isset($_POST['mail'])?trim($_POST['mail']):'';
  26. $data['age']= isset($_POST['age'])?trim($_POST['age']):'';
  27. $data['ctype']= isset($_POST['ctype'])?trim($_POST['ctype']):'';
  28. $data['body1'] = isset($_POST['body1'])?trim($_POST['body1']):'';
  29. $data['body2'] = isset($_POST['body2'])?trim($_POST['body2']):'';
  30. $data['body3'] = isset($_POST['body3'])?trim($_POST['body3']):'';
  31.  
  32. $smaty->assign("data",$data);
  33.  
  34. switch ($cmd){
  35. case 'send':
  36. $mail_body = $smaty->fetch('./mail.html');
  37.  
  38. $mail = new Qdmail();
  39. $mail -> from( $from_addr , $from_name );
  40. $mail -> to($data['mail'] );
  41. $mail -> cc($from_addr );
  42. $mail -> subject($mail_subject);
  43. $mail -> text( $mail_body );
  44.  
  45. $ret = $mail ->send();
  46.  
  47.  
  48. $mail_subject02 = $mail_subject . "【" .$data['body1']. "】";
  49.  
  50. $mail02 = new Qdmail();
  51. $mail02 -> from( $data['mail'] );
  52. $mail02 -> to( $from_addr);
  53. $mail02 -> subject($mail_subject02);
  54. $mail02 -> text( $mail_body );
  55.  
  56. $ret = $mail02 ->send();
  57.  
  58.  
  59. $template = './thanks.html';
  60. break;
  61. case 'check':
  62. $template = './check.html';
  63. break;
  64. default:
  65. $template = './input.html';
  66. break;
  67. }
  68.  
  69. $contents = $smaty->fetch($template);
  70. $smaty->assign("contents",$contents);
  71. $smaty->display('./base.html');
Runtime error #stdin #stdout #stderr 0.01s 20568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  require_once(./b2smarty.php): failed to open stream: No such file or directory in /home/7oYEUq/prog.php on line 4
PHP Fatal error:  require_once(): Failed opening required './b2smarty.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/7oYEUq/prog.php on line 4