session_write_close(); require_once("common.php"); require_once("loggedinuser.php"); require_once("languages.php"); require_once("contenthandler.php"); session_start(); if (!isset($_POST['content']) && !isset($_POST['lang'])) { ?>
Language:
$result = Language::getLanguages(); while($row = mysql_fetch_row($result)) { echo "
$row[1]
"; } ?>
Title:
} else { $content = $_POST['content']; $lid = $_POST['lid']; $title = $_POST['title']; if (!isVarGood($content, false) || !isVarGood($lid, false) || !isVarGood($title, false)) { die("Form variables incomplete and/or invalid!"); } if (isset($_SESSION['LoggedInUser'])) { $loggedInUser = $_SESSION['LoggedInUser']; $ip = $loggedInUser->getCurrentIP(); } else { $loggedInUser = null; $ip = $_SERVER['REMOTE_ADDR']; } $action = ContentHandler::submitNew($loggedInUser, $ip, $title, $lid, $content); if ($action == ContentHandler::$CONTENT_POSTED) { echo "Submission has been posted."; } else if ($action == ContentHandler::$CONTENT_QUEUED) { echo "Submission has been queued for approval by an administrator."; } else if ($action == ContentHandler::$CONTENT_FAILURE) { echo "There was an error while submitting the new content."; } else { die("Internal error."); } } ?>