Parašė VeNoM· 2008 Lie. 16 17:07:52
#1
Sveiki, Taigi norejau pas jus paprasyti del vieno mod'o.
Kazkada Manjack sukure Demo mod'a >>>
http://phpfusion.lt/forum/viewthread.php?thread_id=1645&highlight=demo&rowstart=20
Stai kaip viskas atrodo jai as neikeliu demo failo:
Kaip pastebejote nors jaigu as ir neidedu demo failo raso
Demo: Siustis [Dydis: 0.0 MB]
O jaigu ideciau rasytu:
Demo: Siustis [Dydis: 7.4 MB] (Cia pvz.)
Taigi as noreciau kad jaigu as neidedu demo failo rasytu:
Demo: Nera
Cia
demos.php failas:
<?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='23' class='table-cellpic'><center><?php echo "<b>$demo[pirma_salis]</b> vs <b>$demo[antra_salis]</b>";?></center></td></tr></table>
<?php
echo "<center>$demo[data]<br/></center>";
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>Žemė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> [ $demo[pirmos_rezultatas] : $demo[antros_rezultatas] ] <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> [ $demo[pirmos_rezultatas] : $demo[antros_rezultatas] ] <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 "<b>$demo[pirma_salis]:</b> $demo[pirma_sudetis]<br/>
<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);
echo "<B>Demo:</b> <a href =\"images/demos/$demo[demo_url]\" />Siųstis</a> [Dydis: <u>$dydis</u> MB]
";
?>
</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
require_once "side_right.php";
require_once "footer.php";
?>
Redagavo Žmogus· 2008 Lie. 17 22:07:43