if (isset($_POST["do_preview_message"]) || isset($_POST["do_post_message"]) || isset($_POST["do_reedit_message"])) { //POSTed. if ($_POST['xsrf_token'] != $_SESSION['xsrf_token']) { trigger_error('XSRF code incorrect', E_USER_ERROR); } //Stuff was posted, AND it's validated. if (isset($_POST['do_preview_message'])) { preview_message(); } elseif (isset($_POST['do_post_message'])) { post_message(); } else { edit_message(); } //Re-edit! } else { edit_message(); //nothing was POSTed (just got here and starting to post a msg), or error occurred in validation. } function edit_message() { //"$post_through"?? $email_checked = array('yes-captains' => '', 'yes-you' => '', 'no' => ''); $email_checked[empty($_POST['email']) ? 'yes-you' : $_POST['email']] = 'checked="checked"'; // Assemble Page ?> <h1><span id="editing-message" style="color:red;font-size:0.6em;"></span> Post a Message</h1> <form id="composeMessage" method="post"> <table class="spacious"> <tr> <td>By:</td> <td>
case 'show_messages': show_messages(); break; case 'edit_message': $result = edit_message(); if ($result === TRUE) { show_messages(); } break; case 'delete_message': delete_message(); show_messages(); break; case 'delete_social': $result = delete_social(); edit_message($result); break; case 'modify': modify(); show_messages(); break; case 'social': social_config(); break; default: show_options(); } /* * Add field page */ function add_field()