Guest User

Untitled

a guest
Jan 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. if($_GET['report'] == "true") {
  4. $poster_name = $_POST['name'];
  5. $post_id = $_POST['post_id'];
  6. $reason = $_POST['reason'];
  7.  
  8. wp_mail(get_bloginfo('admin_email'), "Post Report!", "Poster Name: {$poster_name}\nPoster Id:{$post_id}\n\nReason: {$reason}");
  9. die;
  10. }
  11.  
  12. if($_GET['signup'] == "true") {
  13. $email = $_POST['signupText'];
  14.  
  15. if(file_exists( WP_CONTENT_DIR . '/emails.csv' )) {
  16. $row = 1;
  17. if (($handle = fopen(WP_CONTENT_DIR . '/emails.csv', "a")) !== FALSE) {
  18. fwrite($handle, "\n".$email.','.time());
  19. fclose($handle);
  20. echo "Success!";
  21. }
  22. } else {
  23. echo "Something is wrong, the file doesn't exist.";
  24. }
  25.  
  26. die;
  27. }
Add Comment
Please, Sign In to add comment