0) { if(!detatch_files($to_remove, $_POST['id'])) { // could not remove attachments // var_dump($to_remove); } } } $result = db_update((int) $_POST['id'], $_POST['content']); if(!$result) { $error = 'Post could not be updated!'; } else { rebuild_feeds(); header('Location: '.$config['url'].'/'.$_POST['id']); die(); } } } // load the actual post $post = db_select_post($id); if(is_numeric($post['post_deleted'])) { if(!$config['logged_in']) { header('Location: '.$config['url']); } } $title_suffix = 'entry #' . $id; require(ROOT.DS.'snippets'.DS.'header.snippet.php'); ?>