Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Scripto iterpimas

Parašė sniuff· 2008 Vas. 12 17:02:33
#3

<?
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";

opentable("Atlinkti keitimai");
echo "<table width='100%'>\n";
$uzklausa=mysql_query("SELECT komanda1, keitimas1, keitimas2, komanda2 from ".$db_prefix."keitimai order by id");
   if (dbrows($uzklausa)) {
      echo "<tr>
  <td class='tbl1'><b>Komanda</b></td>
  <td class='tbl1'><b>rezultatas</b></td>
  <td class='tbl1'><b>rezultatas</b></td>
  <td class='tbl1'><b>Komanda</b></td>
<td class='tbl1'>Skirtumas</td>
</tr>\n";
      $i = 1;
      while ($data = dbarray($uzklausa)) {
         $i = $i+1;
         $tbl = $i%2 == 0 ? "class='tbl2'" : "class='tbl1'";
         echo "<tr>
  <td $tbl>".$data['komanda1']."</td>
  <td $tbl>".$data['rez1']."</td>
  <td $tbl>".$data['rez2']."</td>
  <td $tbl>".$data['komanda2']."</td>
<td $tbl>";

$rez1 = "".$data['rez1']."";
$rez1 = "".$data['rez1']."";

$skirtumas = $rez1 - $rez2;
echo "$skirtumas";



echo "</td>
  </tr>\n";
  }
  }
     echo "</table>\n";
closetable();
   
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>




Pabandyk ;)

Redagavo sniuff· 2008 Vas. 12 17:02:57