- from the site, where this extra is included!
// -> use absolute path if you have it included in files with different directories!
//          (e.g. /home/www/htdocs/mysite.com/vwar/)
// -> if included in your _header.php/_footer.php, it is normally: './'
// -> if not, use: './../'
$vwar_xroot				= "./../";
// limit display to x next actions
$numnextactions		= 3;
// shows the needed and signed up participants for the match
// (1=enabled / 0=disabled)
$showparticipants = 1;
// shows the irc information of a opponent
// (1=enabled / 0=disabled)
$showirc          = 1;
// include header- & footer-information (1=enabled / 0=disabled)
$include          = 0;
// ######################################################################################
// ################################### display nextactions  #############################
// check, if we need to get some global vars or if we need to include them
if( !defined ("VWAR_COMMON_INCLUDED") )
{
	$vwar_root = $vwar_xroot;
	require_once ($vwar_root . "includes/functions_common.php");
}
if ( $include == 1 )
{
	include_once ($vwar_root . "_header.php");
}
//update repeating wars
updateRepeatingDatelines("vwar".$n, "warid", "dateline", 1, $waroverlap);
?>
query_first("
		SELECT COUNT(warid) AS numwars
		FROM vwar".$n."
		WHERE status = '0'
		AND dateline > '$dateline'
		" . getPublicMatchtypes(1)
	);
	$num_nextwars = $result['numwars'];
}
if ($num_nextwars > 0)
{
	$result=$vwardb->query("
		SELECT vwar".$n.".warid, vwar".$n.".gameid, vwar".$n.".gametypeid, vwar".$n.".matchtypeid, status, vwar".$n.".dateline,
			oppnameshort, oppircnetwork, oppircchannel, playerperteam, vwar".$n.".oppid, matchtypename, gametypename,
			gameicon,gamenameshort
		FROM vwar".$n.", vwar".$n."_matchtype, vwar".$n."_gametype, vwar".$n."_opponents, vwar".$n."_games
		WHERE vwar".$n.".oppid = vwar".$n."_opponents.oppid
			AND vwar".$n.".gametypeid = vwar".$n."_gametype.gametypeid
			AND vwar".$n."_matchtype.matchtypeid = vwar".$n.".matchtypeid
			AND status = '0' AND vwar".$n.".dateline > '$dateline'
			AND vwar".$n.".gameid = vwar".$n."_games.gameid
			" . getPublicMatchtypes(1) . "
		GROUP BY vwar".$n.".warid
		ORDER BY dateline ASC
		LIMIT 0, $numnextactions
	");
	while ($row = $vwardb->fetch_array($result))
	{
		dbSelect ($row);
		if ($row['gameicon'] != "" && file_exists($vwar_root . "images/gameicons/".$row['gameicon']))
		{
			$gameicon = makeimgtag($urltovwar . "images/gameicons/".$row['gameicon'], $row['gamename']);
		}
		else
		{
			$gameicon = "";
		}
		?>
		
			| vs. | 
		
			| » | 
		
			
		
			| » IRC: | 
			query_first("
				SELECT COUNT(partid) AS parts
				FROM vwar".$n."_participants
				WHERE available = '1'
					AND warid = '" . $row['warid'] . "'
			");
			$parts = $result2['parts'];
			?>
			
				| » Participants: "> | 
			
		
			| » ">details 
 
 | 
		free_result($result);
	}
	else
	{
	?>
	
		| No Next Actions |