<?php

session_start();

    require_once('../libs/Ultraviolet.php');
	
	require_once('../libs/Database.php');
	
	require_once('../libs/AdminFunctions.php');
		
	$database =& DatabaseConnect::getInstance();
	
	$database->query("SET CHARACTER SET utf8");
	
	$functions =& AdminFunctions::getInstance();


for($i = 0; $i < count($_POST); $i++):

		${key($_POST)} = $_POST[key($_POST)];

		next($_POST);	

	endfor;
	


$database->query("INSERT INTO project(name, parent, project_num, project_year, offerno) VALUES('".$name."', '".$client."', '".$projectnum."', '".date("y")."', '$offerno' )");

if(strlen(mysql_error()) > 0){
	echo mysql_errno().': '.mysql_error();
}
else{
	echo 'success';
}



?>
