As some uta members may already have noticed, I've started working on a new layout for the ]UAS[ site. At the moment I'm stuck with an irritating table problem and with Miner nowhere to be seen, I'm hoping that someone else could help me.
I stumbled on this small irritating problem which occured during the layout changing for our clansite. Below the flash banner i've made two seperate table's which will show the nextactions.php bit. The different backgrounds of those two tables are for the different gametypes the nextactions command is going to be used. Now everything worked fine, untill i went to news.php:
http://www.clan-uas.com/member.php
http://www.clan-uas.com/news.php
For some reason, the table width below the flash banner changes as soon as i go to news.php. Any other page, member, calandar, downloads, etc, etc, the background is at its supposed to be. I've tried to find the problem, diving into the template code and changing the next.actions.php bit, but nothing helped.
Now there is something you need to know, the lastactions.php bit has been modified by Miner so that the number of signed up members for the war is shown (2/6) , with 2 the number of signed up members, 6 the total number of players needed.
You guys are my only hope. Please....help me
I stumbled on this small irritating problem which occured during the layout changing for our clansite. Below the flash banner i've made two seperate table's which will show the nextactions.php bit. The different backgrounds of those two tables are for the different gametypes the nextactions command is going to be used. Now everything worked fine, untill i went to news.php:
http://www.clan-uas.com/member.php
http://www.clan-uas.com/news.php
For some reason, the table width below the flash banner changes as soon as i go to news.php. Any other page, member, calandar, downloads, etc, etc, the background is at its supposed to be. I've tried to find the problem, diving into the template code and changing the next.actions.php bit, but nothing helped.
Now there is something you need to know, the lastactions.php bit has been modified by Miner so that the number of signed up members for the war is shown (2/6) , with 2 the number of signed up members, 6 the total number of players needed.
<?php
@error_reporting(7);
/* #####################################################################################
*
* $Id: nextactions.php,v 1.2 2003/03/12 21:37:26 mabu Exp $
*
* This notice must remain untouched at all times.
*
* Modifications to the script, except the official addons or hacks,
* without the owners permission are prohibited.
* All rights reserved to their proper authors.
*
* Get the latest version at http://www.vwar.de - Copyright (C) 2001-2003
*
* #####################################################################################
*/
// configuration
$numnextactions = "2"; // limit display to x next actions
$pathtovwar = ""; // relative or absolute path to your vwar directory (with / at the end!)
// ################################### display nextactions ############################
include($pathtovwar."_config.inc.php");
require_once($pathtovwar."_class_db.php");
$db = new db($sql["hostname"],$sql["username"],$sql["password"],$sql["database"]);
$result = $db->query_first("SELECT ownnameshort,ownhomepage,waroverlap,longdateformat FROM vwar".$n."_settings");
$ownnameshort=$result['ownnameshort'];
$ownhomepage=$result['ownhomepage'];
$waroverlap=$result['waroverlap'];
$longdateformat=$result['longdateformat'];
?>
<style type="text/css">
<!--
.style1 {
font-size: 10px;
font-family: Tahoma, Arial, sans-serif;
}
.style2 {
font-size: 11px;
font-family: Tahoma, Arial, sans-serif;
color: #FFFFFF;
}
-->
</style>
<table width="242" border="0" align="center" cellpadding="0" cellspacing="0">
<?
$result=$db->query_first("SELECT COUNT(warid) FROM vwar".$n." WHERE status='0' AND dateline > '".time()."'");
$numnextwars=$result[0];
$db->free_result($result);
if($numnextwars > 0) {
$result=$db->query("
SELECT vwar".$n.".warid,vwar".$n.".gameid,vwar".$n.".gametypeid,vwar".$n.".matchtypeid,status,dateline,oppnameshort,oppircnetwork,oppircchannel,opphomepage,matchtypename,gametypename,vwar".$n."_games.gameicon,vwar".$n."_games.gamename
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 dateline > '".(time()-($waroverlap*60))."'
AND vwar".$n.".gameid=vwar".$n."_games.gameid
ORDER BY dateline ASC
LIMIT 0,$numnextactions
");
while($row=$db->fetch_array($result)) {
if($row["gameicon"]!="" && file_exists($pathtovwar."images/icons/".$row["gameicon"]))
$gameicon="<img src=\"".$pathtovwar."images/icons/".$row["gameicon"]."\" alt=\"".$row["gamename"]."\" align=\"absmiddle\" border=\"0\">";
else
$gameicon="";
?>
<tr>
<td align="center">
<div align="left"><span class="style2"> <?= date("dS M G:i",$row["dateline"]); ?>
<a href="<?= $ownhomepage; ?>" target="blank"><b>
<?= $ownnameshort; ?>
</b></a><b> vs. <a href="<?= $row["opphomepage"]; ?>" target="blank">
<?= $row["oppnameshort"]; ?>
</a>
<a href="<?= $pathtovwar; ?>war.php?action=nextaction&formgame=<?= $row["gameid"]; ?>#<?= $row["warid"]; ?>">
<?php
// Miner's Hack for Getting Number of Players
$parts2=$db->query_first("
SELECT COUNT(partid)
FROM vwar".$n."_participants
WHERE warid='".$row["warid"]."'
AND available='1'");
$available=$parts2[0];
?><?="(".$available."/6)"; ?>
</a></b></span></div></td>
</tr>
<?
}
$db->free_result($result);
}
else
{
?>
<tr>
<td align="center">No Next Actions</td>
</tr>
<?
}
?>
</TABLE>
You guys are my only hope. Please....help me