Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2. class home_page extends public_page
  3. {
  4. public function init()
  5. {
  6. $arr_template_models = array();
  7. $arr_template_models['fil_files'] = $this->obj_site->obj_page->carousel_files;
  8. $this->obj_site->obj_smarty->assign('arr_template_models', $arr_template_models);
  9. }
  10. public function init_ajax()
  11. {
  12. if(!isset($_REQUEST['str_action'])) return false;
  13. $this->obj_site->obj_smarty->assign('str_action',$_REQUEST['str_action']);
  14.  
  15. switch($_REQUEST['str_action'])
  16. {
  17. case 'submit_contact_form':
  18. $this->submit_contact_form();
  19. break;
  20. default:
  21. return false;
  22. break;
  23. }
  24. }
  25. private function submit_contact_form()
  26. {
  27. $arr_replacements = array( '##str_name##' => $_POST['str_name'],
  28. '##str_email##' => $_POST['str_email'],
  29. '##str_message##' => $_POST['str_message']);
  30.  
  31.  
  32. ema_email_templates::send_email('contact_form',$_POST['str_name'],cfg::STR_CONTACT_EMAIL,$arr_replacements);
  33. }
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement