<textarea name="description" id="description" cols="45" rows="5"><?php echo $parameters->description; ?> </textarea></td> </tr> <tr> <td><label for="button"></label> <input type="hidden" name="wpr_form" value="<?php echo $wpr_form; ?> " > <input type="hidden" name="id" value="<?php echo $parameters->id; ?> " /> <input class="button" type="submit" name="button" id="button" value="<?php echo $button_text; ?> " /> <input class="button" type="button" onclick="window.location='<?php echo _wpr_admin_url("newsletter"); ?> '" name="button" id="button" value="Cancel" /></td> <td> </td> </tr> </table> </form></blockquote>
function _wpr_settings_post_handler() { if (check_admin_referer("_wpr_settings")) { update_option("wpr_address", $_POST['address']); update_option("wpr_hourlylimit", $_POST['hourly']); delete_option("wpr_smtpenabled"); add_option("wpr_smtpenabled", isset($_POST['enablesmtp']) ? 1 : 0); do_action("_wpr_settings_form_post"); delete_option("wpr_smtphostname"); add_option("wpr_smtphostname", $_POST['smtphostname']); delete_option("wpr_smtpport"); add_option("wpr_smtpport", $_POST['smtpport']); delete_option("wpr_smtprequireauth"); add_option("wpr_smtprequireauth", $_POST['smtprequireauth'] == 1 ? 1 : 0); delete_option("wpr_smtpusername"); add_option("wpr_smtpusername", $_POST['smtpusername']); delete_option("wpr_smtppassword"); add_option("wpr_smtppassword", $_POST['smtppassword']); delete_option("wpr_smtpsecure"); if ($_POST['securesmtp'] != 'ssl') { $securesmtp = $_POST['securesmtp'] == 'tls' ? "tls" : "none"; } else { $securesmtp = "ssl"; } add_option("wpr_smtpsecure", $securesmtp); //notification settings $currentNotificationValue = get_option("wpr_notification_custom_email"); switch ($_POST['notification_email']) { case 'customemail': $theNotificationEmail = $_POST['notification_custom_email']; delete_option('wpr_notification_custom_email'); add_option('wpr_notification_custom_email', $theNotificationEmail); break; case 'adminemail': delete_option('wpr_notification_custom_email'); add_option('wpr_notification_custom_email', 'admin_email'); break; } if ($_POST['tutorialenable'] == 'enabled' && get_option('wpr_tutorial_active') == 'off') { wpr_enable_tutorial(); } else { if ($_POST['tutorialenable'] == 'disabled' && get_option('wpr_tutorial_active') == 'on') { wpr_disable_tutorial(); } } if ($_POST['updatesenable'] == 'enabled' && get_option('wpr_updates_active') == 'off') { wpr_enable_updates(); } else { if ($_POST['updatesenable'] == 'disabled' && get_option('wpr_updates_active') == 'on') { wpr_disable_updates(); } } $settings_url = _wpr_admin_url("settings"); wp_redirect($settings_url); exit; } }
function _wpr_newsletter_create_form_post_handler() { $info = array(); $errors = array(); _wpr_newsletter_form_validate($info, $errors); if (count($errors) === 0) { _wpr_newsletter_create($info); $newsletter_home = _wpr_admin_url("newsletter"); wp_redirect($newsletter_home); exit; } $info = (object) $info; _wpr_set("parameters", $info); _wpr_set("errors", $errors); }