- tag: ## onLoad="getTime()" ## e.g. // path to your main vwar-directory (with final ' / ') // -> 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 = "./../"; // 0 = don't use the body-definitions / 1 = use them $definitions = 1; // include header- & footer-information (1=enabled / 0=disabled) $include = 0; // ###################################################################################### // ################################### display countdown ############################## // 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" ); } updateRepeatingDatelines("vwar".$n, "warid", "dateline", 1, $waroverlap); $dateline = (time() - ($waroverlap * 60)) + ($timezoneoffset * 3600); if (!defined("VWAR_WARS_FROMNOW")) { define("VWAR_WARS_FROMNOW", 1); $result = $vwardb->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) { $row = $vwardb->query_first(" SELECT vwar".$n.".warid, dateline, oppnameshort, vwar".$n.".oppid, vwar".$n.".gameid, gameicon FROM vwar".$n.", vwar".$n."_opponents,vwar".$n."_games WHERE vwar".$n.".oppid = vwar".$n."_opponents.oppid AND vwar".$n.".gameid = vwar".$n."_games.gameid AND status='0' AND dateline > '$dateline' " . getPublicMatchtypes(1) . " ORDER BY dateline ASC LIMIT 0,1 "); dbSelect ($row); if ($row['gameicon'] != "" && file_exists($vwar_root . "images/gameicons/" . $row['gameicon'])) { $gameicon = makeimgtag($urltovwar . "images/gameicons/".$row['gameicon'], $row['gamename']); } else { $gameicon=""; } $date = date("M d Y H:i:00",$row['dateline']); if ($definitions == 1) { echo ' '; } echo ' '; if ( $definitions == 1 ) { echo ' '; } ?>
Match Countdown
 vs.
until Match
'; } } else { ?>
Match Countdown
No upcoming Match