Parašė Wiav· 2010 Kov. 3 16:03:19
#8
$numrows = dbrows($result);
$postai = '0';
while ($data = dbarray($result)) {
if ($postai % 3 == 0) { echo "<tr><td height='5' colspan='2'></td></tr><tr style='margin-top:5px'><td class='tbl2' valign='top' style='margin-top:5px'>Reklama</td><td style='margin-top:5px' class='tbl1' align='center'>";
//reklamos modas prasideda
if(dbcount("(*)", "money_banners", "tipas='0'") > 0){
$sql = dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE `parodymai` = `kiekis` and tipas='0'");
while ($baneris = dbarray($sql)){
unlink(INFUSIONS."pinigu_sistema/banners/468x60/".$baneris[imgas]);
dbquery("DELETE FROM ".$db_prefix."money_banners WHERE id = '".$baneris[id]."' and tipas='0'");
}
$sql = dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE tipas='0' ORDER BY RAND() LIMIT 1");
while ($baneris = dbarray($sql)){
echo "<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/468x60/".$baneris[imgas]."' border='0'></a></center>";
$result = dbquery("UPDATE ".$db_prefix."money_banners SET `parodymai` = `parodymai`+ 1 WHERE id=".$baneris[id]."");
}
}else{
echo "<center><a href='".INFUSIONS."pinigu_sistema/banners468.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama468.gif' border='0'></a></center>";
}
//reaklamos modas baiges
echo"</td></tr>"; }
$postai++; $message = $data['post_message'];
Kaip šita kodą įdedu man forumo temoje po viena pranešimą rodo.
Redagavo Wiav· 2010 Kov. 3 16:03:31