Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_GET['report'] == "true") {
- $poster_name = $_POST['name'];
- $post_id = $_POST['post_id'];
- $reason = $_POST['reason'];
- wp_mail(get_bloginfo('admin_email'), "Post Report!", "Poster Name: {$poster_name}\nPoster Id:{$post_id}\n\nReason: {$reason}");
- die;
- }
- if($_GET['signup'] == "true") {
- $email = $_POST['signupText'];
- if(file_exists( WP_CONTENT_DIR . '/emails.csv' )) {
- $row = 1;
- if (($handle = fopen(WP_CONTENT_DIR . '/emails.csv', "a")) !== FALSE) {
- fwrite($handle, "\n".$email.','.time());
- fclose($handle);
- echo "Success!";
- }
- } else {
- echo "Something is wrong, the file doesn't exist.";
- }
- die;
- }
Add Comment
Please, Sign In to add comment