if($_POST['do'] == "insertentry") { globalize($_POST, array( 'journalid' => INT, 'title' => STR_NOHTML, 'message' => STR, 'private' => INT, 'wcv' => STR_NOHTML, 'mood' => INT, 'allowbudds' => INT )); $vbjverify= new verify(); if($vbjverify->verify_journal('journalist_compare', $journalid) AND $bbuserinfo['userid']!=0) { if($_POST['preview'] == "Preview Entry") { $show['entrypreview']= true; $preview= array(); if(isset($_POST['WYSIWYG_HTML'])) { echo "This is WYSIWYG!"; require_once('./includes/functions_wysiwyg.php'); $message = trim(convert_wysiwyg_html_to_bbcode($_POST['WYSIWYG_HTML'], 0)); } require_once('./includes/functions_newpost.php'); $preview['message_parsed']= convert_url_to_bbcode($message); require_once('./includes/functions_bbcodeparse.php'); $preview['message_parsed']= parse_bbcode2($preview['message_parsed'], 0, $setting['allow_imgcode'], $setting['allow_smilies'], $setting['allow_bbcode']); $preview['message']= htmlspecialchars_uni($message); $preview['title']= $title; $preview['private']= $private; $preview['allowbuddies']= $allowbudds; $preview['whocanview']= $wcv; if($mood != 0) { $getmood= $DB_site->query_first("SELECT mood_name, mood_image FROM " . TABLE_PREFIX . "journal_moods WHERE mood_id=" . $mood . ""); $preview['moodname']= $getmood['mood_name']; $preview['moodimg']= $getmood['mood_image']; $preview['mood']= $mood; $preview['showmood']= true; } eval('$entrypreview = "' . fetch_template('journal_entrypreview')."\";"); $_REQUEST['do']= "addentry"; } else { $journal= array(); $journal['journal_id']= $journalid; $entry= array(); $entry['title']= $title; if (isset($_POST['WYSIWYG_HTML'])) { require_once('./includes/functions_wysiwyg.php'); $entry['message'] = trim(convert_wysiwyg_html_to_bbcode($_POST['WYSIWYG_HTML'], 0)); } else { $entry['message'] = trim($message); } $entry['private']= $private; $entry['whocanview']= trim($wcv); $entry['mood']= $mood; $entry['allowbuddies']= $allowbudds; $vbjcreate= new create(); $vbjcreate->build_new_entry($entry, $journal, true); $url="journal.php?do=showjournal&j=".$journal['journal_id'].""; eval(print_standard_redirect('redirect_journalentryinserted')); } } else { print_no_permission(); } }