Public feed
#602756
<?php
require ('../requires.php');
require('../forums/SSI.php');
if(!in_array(GROUP_NEWS, $user_info['groups'])) {
header("Location: $admin[redirect]");
}
else {
}
if(!in_array(GROUP_NEWS, $user_info['groups'])) {
header("Location: $admin[redirect]");
}
$author = $context['user']['name'];
$title = mysql_real_escape_string($_POST['title']);
$content = mysql_real_escape_string($_POST['content']);
$time = date('l, j F, Y - g:i A');
mysql_query ("
INSERT INTO news (news_author, news_title, news_content, news_time)
VALUES ('$author', '$title', '$content', '$time')
");
?>