Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Demo komentarai

Parašė VeNoM· 2008 Lie. 20 20:07:41
#21

Sorry uz flooda.

Stai kodas:
include INCLUDES."comments_include.php";
showcomments("D","demos","demo_id",$demo_id,FUSION_SELF."?demo=$demo_id");



Bet jis blogas nes kai bandau rasyti komentara mane meta i news.php faila.
Jaigu zinote kas cia blogai prasau pataysikite.
Stai demos.php:
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
require_once INCLUDES."sendmail_include.php";

$demo = $_GET['demo'];

?>

<?php

       $query = "SELECT * FROM demos where id = '$demo' ORDER BY id desc LIMIT 1";
       $result = mysql_query($query);
       while ($demo = mysql_fetch_array($result)){
?>
<table width='550' cellpadding='0' cellspacing='0'><tr><td class='main-body'>
<table border='0' cellspacing='0' width='550' cellpadding='0'><tr><td height='27' class='table-cellpic'><?php echo "&nbsp;<img src=\"images/flags/$demo[pirma_veliava].gif\"> <b>$demo[pirma_salis]</b> vs. <img src=\"images/flags/$demo[antra_veliava].gif\"> <b>$demo[antra_salis]</b>";?></td></tr></table>
<?php


echo "&nbsp; <B>Kova &#0303;d&#0279;ta:</B> $demo[data]<br/>";
if($demo[zemelapis] == "de_train"){
echo "<img class=\"image\" src=\"images/news/de_train.gif\" style=\"margin:5px;\" border=\"1\" align=\"left\" />";
}
if($demo[zemelapis] == "de_nuke"){
echo "<img class=\"image\" src=\"images/news/de_nuke.gif\" style=\"margin:5px;\" border=\"1\" align=\"left\" />";
}
if($demo[zemelapis] == "de_inferno"){
echo "<img class=\"image\" src=\"images/news/de_inferno.gif\" style=\"margin:5px;\" border=\"1\" align=\"left\" />";
}
if($demo[zemelapis] == "de_dust2"){
echo "<img class=\"image\" src=\"images/news/de_dust2.gif\" style=\"margin:5px;\" border=\"1\" align=\"left\" />";
}
if($demo[zemelapis] == "Best of three"){
echo "<img class=\"image\" src=\"images/news/de_bo3.gif\" style=\"margin:5px;\" border=\"1\" align=\"left\" />";
}

if($demo[tipas] == "5"){$demo[tipas]="5x5";}
if($demo[tipas] == "3"){$demo[tipas]="3x3";}
if($demo[tipas] == "2"){$demo[tipas]="2x2";}
if($demo[tipas] == "1"){$demo[tipas]="1x1";}
if($demo[tipas] == "4"){$demo[tipas]="4x4";}

echo"
<b>Tipas:</b> $demo[tipas]<br/>
<b>&#0381;em&#0279;lapis:</b> $demo[zemelapis]<br/>
<b>Turnyras:</b> $demo[turnyras]<br/>
<b>Rezultatas:</b>";



if($demo[pirmos_rezultatas] < $demo[antros_rezultatas]){
echo " <img src=\"images/flags/$demo[pirma_veliava].gif\"> <font color=\"red\">$demo[pirma_salis]</font> [ <B>$demo[pirmos_rezultatas] : $demo[antros_rezultatas]</b> ] <img src=\"images/flags/$demo[antra_veliava].gif\"> <font color=\"green\">$demo[antra_salis]</font><br/>";
}else{
echo " <img src=\"images/flags/$demo[pirma_veliava].gif\"> <font color=\"green\">$demo[pirma_salis]</font> [ <B>$demo[pirmos_rezultatas] : $demo[antros_rezultatas]</b> ]  <img src=\"images/flags/$demo[antra_veliava].gif\"> <font color=\"red\">$demo[antra_salis]</font><br/>";

}

if($demo[pirma_sudetis] == ""){$demo[pirma_sudetis]="N/A";}
if($demo[antra_sudetis] == ""){$demo[antra_sudetis]="N/A";}

echo "<img src=\"images/flags/$demo[pirma_veliava].gif\"> <b>$demo[pirma_salis]:</b> $demo[pirma_sudetis]<br/>
<img src=\"images/flags/$demo[antra_veliava].gif\"> <b>$demo[antra_salis]:</b> $demo[antra_sudetis]<br/>";

$dydis = filesize("images/demos/$demo[demo_url]");
$dydis = $dydis/1000;
$dydis = $dydis/1000;
$dydis = substr("$dydis",0,3);   
if($dydis > 0.01 ){
echo "<B>Demo:</b> <a href =\"images/demos/$demo[demo_url]\" />Si&#0371;stis</a> [Dydis: <u>$dydis</u> MB]";
}
else if($dydis==0){
echo "<B>Demo:</b> N&#0279;ra";
}
?>
</td></tr></table>
<?php



$sqlDel="update demos set kiek_ziurejo=kiek_ziurejo+1 where id='$demo[id]'";
mysql_query($sqlDel) or die(mysql_error());

                                   }
?>


<?php

include INCLUDES."comments_include.php";
showcomments("D","demos","demo_id",$demo_id,FUSION_SELF."?demo=$demo_id");

require_once "side_right.php";
require_once "footer.php";
?>