Parašė adulis· 2008 Spa. 25 14:10:55
#14
Vienu žodžiu pasidariau pats bet kaip dbr padaryt kad nemestų šito erroro?
Fatal error: Call to undefined function dbcount() in /home/blabla/adresatas.lt/reklama/infusions/pinigu_468_panel/reklama.php on line 3
Reklama.php:
<?
include INFUSIONS."pinigu_468_panel/lang.php";
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 3");
while ($baneris = dbarray($sql)){
$text = array("<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/468x60/".$baneris[imgas]."' border='0' style='opacity:0.4;filter:alpha(opacity=40)'
onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100'
onmouseout='this.style.opacity=0.4;this.filters.alpha.opacity=40'></a></center>","<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/468x60/".$baneris[imgas]."' border='0' style='opacity:0.4;filter:alpha(opacity=40)'
onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100'
onmouseout='this.style.opacity=0.4;this.filters.alpha.opacity=40'></a></center>","<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/468x60/".$baneris[imgas]."' border='0' style='opacity:0.4;filter:alpha(opacity=40)'
onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100'
onmouseout='this.style.opacity=0.4;this.filters.alpha.opacity=40'></a></center>");
$cc = count($text) ;
$cl = $cc-1;
$rand = rand(0,$cl);
echo"$text[$rand]";
$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' style='opacity:0.4;filter:alpha(opacity=40)'
onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100'
onmouseout='this.style.opacity=0.4;this.filters.alpha.opacity=40'></a></center>";
}
?>