Advertisement
Guest User

Untitled

a guest
Sep 17th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. <form method="post" action="obratka" id="feedback-form">
  2. Как к Вам обращаться:
  3. <input type="text" name="nameFF" required placeholder="фамилия имя отчество" x-autocompletetype="name">
  4. Email для связи:
  5. <input type="email" name="contactFF" required placeholder="адрес электронной почты" x-autocompletetype="email">
  6. Ваше сообщение:
  7. <textarea name="messageFF" required rows="5" placeholder="Здравствуйте,"></textarea>
  8. <input type="submit" name="obratka" value="Отправить">
  9. </form>
  10.  
  11. function obratka()
  12. {
  13. $this->load->library('form_validation');
  14. $data['pages'] = $this->pages_model->get_pages();
  15. $data['pages_dop'] = $this->pages_model->get_pages_dop();
  16. $data['pages_dop2'] = $this->pages_model->get_pages_dop2();
  17. $data['pages_info'] = $this->pages_model->get_pages_info($title);
  18. $data['categories'] = $this->pages_model->get_cat();
  19. $data['latest_articles'] = $this->pages_model->get_latest_articles();
  20. $data['user'] = $this->session->userdata('user');
  21. $data['user_info']['status'] = $this->session->userdata('status');
  22. $data['user_info']['avatar'] = $this->session->userdata('avatar');
  23. $data['error'] = '';
  24. if($this->input->post('obratka'))
  25. {
  26. $this->load->model('rules_model');
  27. $this->form_validation->set_rules($this->rules_model->obratka);
  28. $check = $this->form_validation->run();
  29. if($check == TRUE)
  30. {
  31. $name2 = $this->input->post('nameFF');
  32. $email2 = $this->input->post('contactFF');
  33. $text2 = $this->input->post('messageFF');
  34.  
  35. $this->load->library('email');
  36.  
  37. $this->email->from($email2, $name2);
  38. $this->email->to('моё_мыло@mail.ru');
  39. $this->email->subject('Тестовое сообщение');
  40. $this->email->message($text2);
  41.  
  42. $this->email->send();
  43.  
  44. $data['error'] = "Ваш вопрос успешно оптравлен владельцу сайта. Спасибо за проявленный интерес. Я отвечу Вам в течении одного рабочего дня!";
  45. $name = 'info';
  46. $this->template->page_view($data,$name);
  47. }
  48. }
  49. else
  50. {
  51. $data['error'] = "вы все ....";
  52. $name = 'obr';
  53. $this->template->page_view($data,$name);
  54. }
  55. }
  56.  
  57. Your message has been successfully sent using the following protocol: mail
  58. From: "llllllll" <llll@mail.ru>
  59. Return-Path: <llll@mail.ru>
  60. Reply-To: "llll@mail.ru" <llll@mail.ru>
  61. X-Sender: llll@mail.ru
  62. X-Mailer: CodeIgniter
  63. X-Priority: 3 (Normal)
  64. Message-ID: <545a735840d40@mail.ru>
  65. Mime-Version: 1.0
  66. Content-Type: text/plain; charset=utf-8
  67. Content-Transfer-Encoding: 8bit
  68. =?utf-8?Q?=d0=a2=d0=b5=d1=81=d1=82=d0=be=d0=b2=d0=be=d0=b5_=d1=81=d0=be?=
  69. =?utf-8?Q?=d0=be=d0=b1=d1=89=d0=b5=d0=bd=d0=b8=d0=b5?=
  70. llllllllll
  71.  
  72. if($this->input->post('obratka'))
  73.  
  74. action="obratka"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement