FT3 Posted November 4, 2009 Report Share Posted November 4, 2009 Labdien . te tads jautajums vai jus nevaretu parveidot kodu lai varetu celt max 3 buildingus iepriekš paldies <?php $buildings=buildings($_SESSION["user"][10]); check_c($_GET["town"], $_SESSION["user"][10]); $cq=get_c($_GET["town"]); ?> <font color="#996633" size="-1"> <b> <? if (count($cq)) ":<br \>"; for ($i=0; $i<count($cq); $i++) { $name=explode("-", $buildings[$cq[$i][1]][2]); if ($cq[$i][2]>-1) { $s=1; $l=$land[$cq[$i][1]][$cq[$i][2]]+1; } else { $s=0; $l=$data[$cq[$i][1]]+1; } echo "[<a class='q_link' href='cancel_c.php?town=".$_GET["town"]."&b=".$cq[$i][1]."&subB=".$cq[$i][2]."'>x</a>] ".$name[$s].", ".$lang['level']." ".$l." - <span id='cq".$i."'>".$cq[$i][0]."</span><script type='text/javascript'> var id=new Array(50); timer('cq".$i."', 'town.php?town=".$_GET["town"]."'); </script><br \>"; } echo ""; ?> </b> </font> Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 4, 2009 Report Share Posted November 4, 2009 Par maz informācijas. vispārīgā gadījumā: if(buildings_count()>2){ echo 'Var celt MAX 3 buildingus'; } else { build_a_building(); } Quote Link to comment Share on other sites More sharing options...
FT3 Posted November 4, 2009 Author Report Share Posted November 4, 2009 :? Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 4, 2009 Report Share Posted November 4, 2009 Tieši tā! Quote Link to comment Share on other sites More sharing options...
FT3 Posted November 4, 2009 Author Report Share Posted November 4, 2009 vari iedot uzreiz savenotu kodu ? :D Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 4, 2009 Report Share Posted November 4, 2009 Nē, nevaru, jo ir par maz informācijas. Es nezinu, kas tie par buildingiem (tikai varu minēt), kāda ir tos aprakstošā struktūra un mainošās funkcijas. Quote Link to comment Share on other sites More sharing options...
FT3 Posted November 4, 2009 Author Report Share Posted November 4, 2009 ;(( Quote Link to comment Share on other sites More sharing options...
FT3 Posted November 5, 2009 Author Report Share Posted November 5, 2009 Aleksejs ko teu vjg lai tu varetu salikt ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.