Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: banneriu panel

Parašė ex-it· 2009 Gru. 22 19:12:18
#4

opentable("AAA");
if(dbcount("(*)", "money_banners", "tipas='1'") > 0){
$sql = dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE `parodymai` = `kiekis` and tipas='1'");
while ($baneris = dbarray($sql)){
unlink(INFUSIONS."pinigu_sistema/banners/120x60/".$baneris[imgas]);
dbquery("DELETE FROM ".$db_prefix."money_banners WHERE id = '".$baneris[id]."' and tipas='1'");
}
$sql = dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE tipas='1' LIMIT 5");
while ($baneris = dbarray($sql)){
echo "<td><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/120x60/".$baneris[imgas]."' border='0'></a></td>";
$result = dbquery("UPDATE ".$db_prefix."money_banners SET `parodymai` = `parodymai`+ 1 WHERE id=".$baneris[id]."");
}   
}else{
echo "<center><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a></center><br>";
}
closetable();