<?
	#
	# we need to connect to our mysql database - i do it through an include below the webroot.
	#

	include('../includes/init.txt');

	#
	# you can do it right here if you like - just uncomment these lines:
	#

	#$db = mysql_connect("localhost", "database_username", "database_password");
	#mysql_select_db("name_of_database",$db);



	$time = time();
	$now = $time;
	$expire = $time + (365*24*60*60);

	srand ((double) microtime() * 1000000);	

	$priority[0] = 'Unknown';
	$priority[1] = 'Critical!';
	$priority[2] = 'High';
	$priority[3] = 'Medium';
	$priority[4] = 'Low';
	$priority[5] = 'Trivial';

	$type[0] = 'Unknown';
	$type[1] = 'Code - Core';
	$type[5] = 'Code - Optimization';
	$type[10] = 'Interface - Interaction Error';
	$type[15] = 'Interface - Visual Error';
	$type[20] = 'Misc - Behavior Change';
	$type[25] = 'Misc - Feature Request';

	$status[1] = 'Open';
	$status[5] = 'On hold';
	$status[10] = 'Fixed';
	$status[15] = 'Unreproduceable';
	$status[20] = 'Can\'t Fix';
	$status[25] = 'By Design';
	$status[30] = 'Duplicate';
	$status[35] = 'Junk';

	$date_format = 'H:i jS F Y';

	function InsertComment($id,$comment){
		global $db;

		$time = time();
		mysql_query("INSERT INTO software_bugs_comments (bug_id,time,email,system,comment) VALUES ($id,$time,'',1,'$comment')",$db);
	}
?>