<?php
if (!defined("IN_FUSION")) { header("Location: ".BASEDIR."index.php"); }

if (file_exists(INFUSIONS."ti_blog_system/locale/".LOCALESET."createblog.php")) {
	include INFUSIONS."ti_blog_system/locale/".LOCALESET."createblog.php";
	include BASEDIR."locale/".LOCALESET."register.php";
} else {
 	include INFUSIONS."ti_blog_system/locale/English/createblog.php";
}

if (isset($_GET['rowstart'])) $rowstart = $_GET['rowstart'];
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if ($settings['version'] >= 7) include_once INCLUDES."bbcode_include.php";

if (file_exists(INFUSIONS."ti_blog_system/blog_includes.php")) {
	include INFUSIONS."ti_blog_system/blog_includes.php";
	ti_blog_createblog();
} else {
	opentable("Error");
	echo 'Failed loading requested file (blog_include.php)! Please check your files.';
	closetable();
}

echo "<script type='text/javascript'>
function ValidateForm(frm) {
	if (frm.blog_subject.value==\"\") {
		alert('".$needsubject."');
		return false;
	}
	if (frm.blog_text.value==\"\") {
		alert('".$needcontent."');
		return false;
	}
}
</script>\n";
?>