/////////////////////////////////////////////////////////////////////////////// // if we get this far, we're going to be displaying some HTML, so let's kick // off here... $page = array(); //figure out some nice defaults $page['current_format'] = $CONF['default_highlighter']; $page['expiry'] = $CONF['default_expiry']; $page['remember'] = ''; //see if we can come up with a better default using the subdomain if (strlen($CONF['subdomain']) && isset($CONF['all_syntax'][$CONF['subdomain']])) { //cool, domain is something like ruby.pastebin.com, so lets go with that //as a default $page['current_format'] = $CONF['subdomain']; } //are we remembering the user? $cookie = $pastebin->extractCookie(); if ($cookie) { //initialise bits of page with cookie data $page['remember'] = 'checked="checked"'; $page['current_format'] = $cookie['last_format']; $page['poster'] = $cookie['poster']; $page['expiry'] = $cookie['last_expiry']; } //add list of recent posts $list = isset($_REQUEST["list"]) ? intval($_REQUEST["list"]) : 10; $page['recent'] = $pastebin->getRecentPosts($list); //send feedback mail? if (isset($_POST['feedback']) && strlen($_POST['msg'])) { $matches = array(); $spam = false; //more than two links?