Parašė iSound· 2009 Bir. 23 00:06:13
#1
Pagal straipsnį „
Forume Reklama“ bandau indėti ta reklama forume, bet vis kaip indedu tai rodo po reklama tik 1 posta, o kitų nerodo :(
Va tas kodas:
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
$postai = '0';
while ($data = dbarray($result)) {
if ($postai == '1' OR $postai == '9') {
echo "</td></tr></table>";
//reklamos modas prasideda
include INFUSIONS."pinigu_468_panel/pinigu_468_panel.php";
//reaklamos modas baiges
echo"<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>"; }
$postai++;
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."nn<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
pinigu_468_panel.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' LIMIT 4");
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/reklama.jpeg' border='0'></a></center>";
}
?>
Parašė FuturesF1re· 2009 Bir. 23 10:06:11
#3
o jei istrintum OR $postai == '9' , kas gautusi?