mam ja taki kod:
  1. <?php 
  2.  
  3.  
  4. // vwar $Id: nextactions.php,v 1.2 2003/05/03 13:36:44 scott Exp $
  5.  
  6. /* ##############################################################################
    #######
  7.  * VWar
  8.  * Copyright (C) 2001 mabu (Oliver K.)
  9.  * pm@ec-league.com 
  10.  *
  11.  * VWar for postnuke: nextactions.php
  12.  * redline@sas-delta.com
  13.  *
  14.  * display X next actions, for vwar - virtual war, a warscript for online gamers
  15.  * 
  16.  * Copyright Notes:
  17.  * ----------------
  18.  * - All Rights reserved
  19.  * - All rights reserved to their proper authors.
  20.  * - using the script(s) without the owners permission is prohibited
  21.  *
  22.  * NOTE:
  23.  * This script can be used to include nextactions in a menu on your site
  24.  * The output is simply opponent,date,gametype,matchtype!
  25.  *
  26.  * YOU CAN CHANGE HTML OUTPUT BELOW THIS LINE AS NEEDED !!!
  27.  * #############################################################################
    ######## 
  28.  */
  29.  
  30. $blocks_modules['Lastwars'] = array('func_display' => 'blocks_lastwars_block', 
  31.     'text_type' => 'Lastwars', 
  32.     'text_type_long' => 'Lastwars', 
  33.     'allow_multiple' => false, 
  34.     'form_content' => false, 
  35.     'form_refresh' => false, 
  36.     'show_preview' => true);
  37.  
  38. // Security
  39. pnSecAddSchema('Lastwarsblock::', 'Block title::');
  40.  
  41. // Main function
  42. function blocks_lastwars_block($row) {
  43.     // configuration
  44.     // Include the VWar config file for the number of the vwar instances
  45.     include ("_config.inc.php");
  46.     $numlastactions2 = "5"; // limit display to x last actions 
  47.   //$result = mysql_query("SELECT ownscore,oppscore FROM vwar".$n."_scores");
  48.   //$srow = mysql_fetch_array($result);
  49.   //$ownscore = $srow[ownscore];
  50.   //$oppscore = $srow[oppscore];
  51.     $result = mysql_query("SELECT ownnameshort,ownhomepage,waroverlap,longdateformat FROM vwar".$n."_settings");
  52.     $srow = mysql_fetch_array($result);
  53.     $ownnameshort = $srow[ownnameshort];
  54.     $ownhomepage = $srow[ownhomepage];
  55.     $waroverlap = $srow[waroverlap];
  56.     $longdateformat = $srow[longdateformat];
  57.     $content = "<table border="0" cellpadding="0" cellspacing="0" align="center">";
  58.     $result = mysql_query("SELECT COUNT(warid) FROM vwar".$n." WHERE status='1' AND dateline < '".time()."'");
  59.     $srow = mysql_fetch_array($result);
  60.     $numlastwars = $srow[0];
  61.     if ($numlastwars > 0) {
  62.         $result = mysql_query("SELECT vwar".$n.".warid,vwar".$n.".gameid,vwar".$n.".gametypeid,vwar".$n.".matchtypeid,status,dateline,oppnameshort,oppircnetwork,oppircchannel,oppho
    mepage,matchtypename,gametypename,vwar"
    .$n."_games.gameicon,vwar".$n."_games.gamename
  63.                 
  64.                             FROM vwar".$n.",vwar".$n."_matchtype,vwar".$n."_gametype,vwar".$n."_opponents,vwar".$n."_games
  65.                 
  66.                             FROM vwar".$n."_ownscore,vwar".$n."_oppscore".$n."_scores
  67.       
  68.        WHERE vwar".$n.".oppid=vwar".$n."_opponents.oppid
  69.                 
  70.                             AND vwar".$n.".gametypeid=vwar".$n."_gametype.gametypeid
  71.                 
  72.                             AND vwar".$n."_matchtype.matchtypeid=vwar".$n.".matchtypeid
  73.                 
  74.                             AND status='1' AND dateline < '". (time() - ($waroverlap * 60))."'
  75.                 
  76.                             AND vwar".$n.".gameid=vwar".$n."_games.gameid
  77.       
  78.        AND vwar".$n.".ownscore=vwar".$n."_scores.ownscore
  79.                 
  80.                             ORDER BY dateline DESC
  81.                 
  82.                             LIMIT 0,$numlastactions2
  83.                 
  84.                     ");
  85.         while ($srow = mysql_fetch_array($result)) {
  86.             if ($srow["gameicon"] != "" && file_exists("images/icons/".$srow["gameicon"])) {
  87.                 $gameicon = "<img src="images/icons/".$srow["gameicon"]."" alt="".$srow["gamename"]."" align="absmiddle" border="0">";
  88.             } else {
  89.                 $gameicon = "";
  90.             }
  91.             $content.= "<tr>";
  92.             $content.= "    <td align="center"><b>";
  93.             $content.= "        ".date($longdateformat, $srow["dateline"])."";
  94.             $content.= "    </b></td>";
  95.             $content.= "</tr>";
  96.             //$content.= "<tr>";
  97.             //$content.= "    <td align="center">";
  98.             //$content.= "        $gameicon&nbsp;$srow[gamename]";
  99.             //$content.= "    </td>";
  100.             //$content.= "</tr>";
  101.             $content.= "<tr>";
  102.             $content.= "    <td align="center">";
  103.             $content.= "   <img src="http://www.betewu.pl/magical/modules/vwar/images/flags/pl.gif"> <a href="$ownhomepage" target="blank">$ownnameshort</a> vs. <a href="$srow[opphomepage]" target="blank">$srow[oppnameshort]</a> <img src="http://www.betewu.pl/magical/modules/vwar/images/flags/pl.gif"><br>";
  104.             $content.= "    </td>";
  105.             $content.= "</tr>";
  106.    $content.= "<tr>";
  107.             $content.= "    <td align="center">";
  108.           [COLOR=blue]  $content.= "  $ownscore / $oppscore<br><br>";[/COLOR]
  109.             $content.= "    </td>";
  110.             $content.= "</tr>";
  111.             //$content.= "<tr>";
  112.             //$content.= "    <td align="left">- $srow[matchtypename]</td>";
  113.             //$content.= "</tr>";
  114.             //$content.= "<tr>";
  115.             //$content.= "    <td align="left">- $srow[gametypename] <br></td>";
  116.             //$content.= "</tr>";
  117.         }
  118.     } else {
  119.         $content.= "<tr>";
  120.         $content.= "<td align="center">No Last Actions</td>";
  121.         $content.= "</tr>";
  122.     }
  123.     $content.= "</TABLE>";
  124.     $row['content'] = $content;
  125.     return themesideblock($row);
  126. }
  127. ?>



poprawiam
---
nospor



kod ma wyswietlac wyniki ostatnich meczy
na razie wyswietla ino date i druzyny
chce zeby wyswietlal takze wynik

ale jak to zrobic? hmm
kod dziala dopóki nie wstawie tego niebieskiego kodu ktory wg mnie ma odpowiadac za wyswietlenie punktow