<?php
include_once("functions/is_login.php");
session_start();
if(!is_login()){
	echo "请您登录系统后，再访问该页面！";
	return;
}
include_once("functions/file_system.php");
	$category_id = $_POST["category_id"];
	$name = $_POST["title"];
	$sql = "insert into category values($category_id,'$name')";
	if(1){
		include_once("functions/database.php");
		get_connection();
		mysql_query($sql);
		close_connection();		
	}	
header("Location:index.php?url=news_list.php&message=$message");
?>
