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

Parašė Lordcraft· 2009 Gru. 21 19:12:13
#1

Sveiki, turiu tokia panel is pinigu_sistemos ir joje rodo banerius bet juos rodo vertikaliai. kaip reikia padaryti kad juos rodytu horizontaliai ir kaip reikia padaryti kad pvz jaigu yra prideti du baneriai o panelej rodo 5, kad rodytu tuos 2 pridetus ir 3 banerius su laisva vieta?

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 "<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/120x60/".$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/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a></center>";
}
closetable();



Parašė edis2· 2009 Gru. 22 17:12:08
#2

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 "<center><a href='".stripinput(htmlspecialchars($baneris[adresas]))."'><img src='".INFUSIONS."pinigu_sistema/banners/120x60/".$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/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a></center><br>";
}
closetable();





Kažkas panašaus?

Parašė Lordcraft· 2009 Gru. 22 18:12:47
#3

tai kad tu nieko nepakeitei... viskas taip kaip ir buvo.

Redagavo Lordcraft· 2009 Gru. 22 18:12:06

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();



Parašė Lordcraft· 2009 Gru. 22 20:12:30
#5

ex-it aciu, tavo kodas veikia. o kaip dabar padaryti pvz jaigu LIMIT yra 5 o baneriai ideti tik 2, tai tuos 2 bannerius ir terodo, kodel neveikia

}else{
echo "<center><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a></center><br>";
}




?
kaip padaryti kad rodytu tas 3 laisvas vietas?

Parašė maxas66· 2009 Gru. 23 14:12:12
#6

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");

$kiek = dbcount("(*)", "money_banners", "tipas='1'");

if ($kiek == '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 if ($kiek == '4') {   
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]."");
}
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
} else if ($kiek == '3') {   
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]."");
}
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
} else if ($kiek == '2') {   
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]."");
}
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
} else if ($kiek == '1') {   
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]."");
}
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
echo "<td><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a>/td>";
}
} else {
echo "<center><a href='".INFUSIONS."pinigu_sistema/banners120.php'><img src='".INFUSIONS."pinigu_sistema/banners/reklama120.gif' border='0'></a></center>";
}
closetable();




Galėjo ir paprasčiau žinoma, tačiau, nedirba šiandien galva, nežinau ar veiks jisai.

Redagavo maxas66· 2009 Gru. 23 14:12:47

Parašė Lordcraft· 2009 Gru. 23 15:12:44
#7

kaip ir veikia bet ten prie td pamirsai padeti <