0) { $message = array( 'status' => 'success', 'message' => 'Successfully posted status #'.$id ); // handle files if(!empty($_FILES['attachments'])) { attach_uploaded_files($_FILES['attachments'], $id); } rebuild_feeds(); if($config['ping'] == true) ping_microblog(); if($config['crosspost_to_twitter'] == true) { $twitter_response = json_decode(twitter_post_status($_POST['content']), true); if(!empty($twitter_response['errors'])) { $message['message'] .= ' (But crossposting to twitter failed!)'; } } header('Location: '.$config['url']); die(); } } $title_suffix = 'new post'; require(ROOT.DS.'snippets'.DS.'header.snippet.php'); ?>