Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None | 0 0
  1. Oké, akkor ez a kód:
  2.  
  3.  
  4. <?php
  5. ###
  6. ### Find below examples for your custom routines. Do not change the function names.
  7. ###
  8.  
  9. ### my_cforms_logic() : gets triggered throughout cforms, supporting real-time configuration
  10. ###
  11. ### my_cforms_action() : gets triggered just before sending the admin email
  12. ###
  13. ### my_cforms_filter() : after validation, before processing/saving input data (nonAJAX)
  14. ###
  15. ### my_cforms_ajax_filter() : after validation, before processing/saving input data (AJAX)
  16. ###
  17.  
  18.  
  19. ### TO USE THE FUNCTIOS:
  20. ###   >>>   uncomment the functions as required
  21. ###   >>>   and provide your custom code where appropriate
  22.  
  23.  
  24.  
  25. ###
  26. ### Your custom application logic features
  27. ###
  28. ### "successMessage"    $cformsdata = cforms datablock
  29. ### "redirection"       $cformsdata = cforms datablock
  30. ### "filename"          $cformsdata = $_REQUEST
  31. ### "adminTO"           $cformsdata = cforms datablock
  32. ### "nextForm"          $cformsdata = cforms datablock
  33. ###
  34. ### "adminEmailTXT"     $cformsdata = cforms datablock
  35. ### "adminEmailHTML"    $cformsdata = cforms datablock
  36. ### "autoConfTXT"       $cformsdata = cforms datablock
  37. ### "autoConfHTML"      $cformsdata = cforms datablock
  38. ###
  39.  
  40. /*  <--- move or remove this line to uncomment functions below (and check the end as well!)
  41. */
  42. function my_cforms_logic($cformsdata,$oldvalue,$setting) {
  43.         /*
  44.         ### If you're unsure how to reference $cformsdata use the below @mail call to send you the data array
  45.         */
  46.     @mail('jgabor@civir.hu', 'cforms my_action test', print_r($cformsdata,1), 'From: jgabor@civir.hu');
  47.         /*
  48.         ### example: changes the admin email address to "test123 <my@dif..." if placeholder 'placeholder' is found
  49.         */
  50.     if ( $setting == "adminTO" ){
  51.         if ( $oldvalue=='placeholder') {
  52.             return 'gabor@caekcraft.co.uk';
  53.             //return $cformsdata['data']['kapcsolattartó emailcíme'];
  54.             }
  55.         }
  56.     return $oldvalue;
  57.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement