$email->subscribe($account['id'], addslashes($must_be_subscribed)); } } } } else { while ($mailbox = array_shift($subscribed)) { if ($mail->unsubscribe($mailbox['name'])) { $email->unsubscribe($account['id'], addslashes($mailbox['name'])); } } } $sent = isset($_POST['sent']) ? smart_addslashes($_POST['sent']) : ''; $draft = isset($_POST['draft']) ? smart_addslashes($_POST['draft']) : ''; $spam = isset($_POST['spam']) ? smart_addslashes($_POST['spam']) : ''; $trash = isset($_POST['trash']) ? smart_addslashes($_POST['trash']) : ''; $email->update_folders($account['id'], $sent, $spam, $trash, $draft); if (isset($_POST['new_name'])) { $new_name = smart_addslashes(trim($_POST['new_name'])); $old_name = smart_addslashes(trim($_POST['old_name'])); $location = smart_addslashes(trim($_POST['location'])); if ($new_name == '') { $feedback = '<p class="Error">' . $error_missing_field . '</p>'; } else { if ($mail->rename_folder($old_name, $location . $new_name)) { $email->rename_folder($account_id, $old_name, $location . $new_name); } } } } if (isset($_POST['close']) && $_POST['close'] == 'true') { header('Location: ' . $return_to);