Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reklama forume

Parašė Jaunelis· 2008 Gru. 28 14:12:08
#1

Taigi noriu pasidaryti reklama forume ir man bibis gaunas noriu su button panel padaryti bet nežinau kai čia ka daryt:
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 == \'3\') {   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
Cia visas banerio kodas, gali buti ir kokio nors button_panel baneriu rodymo kodas....
//reaklamos modas baiges
   
   echo\"</td></tr>\"; }
   $postai++;
      $message = $data[\'post_message\'];
      if ($data[\'post_showsig\']) { $message = $message.\"\\n\\n<hr>\".$data[\'user_sig\']; }
      if ($data[\'post_smileys\']) { $message = parsesmileys($message); }
      $message = parseubb($message);
      $message = nl2br($message);




i ta vieta paryškinta reikia gal ir ne visa šitą koda bet iterpti nes be jo nerodo banneriu:
$bresult2 = dbquery("select * from ".$db_prefix."banner WHERE status='1' ORDER BY RAND() limit 0,3");
while($banner = dbarray($bresult2)) {

$banner_display = '<center><a target="_banner" href="'.INFUSIONS.'banner_panel/click.php?bid='.$banner['bid'].'"><img src="'.$banner['imageurl'].'" border="0" height="60'.$bannerheight.'" width="486'.$bannerwidth.'"></a><br></center>';


//check ownership user to client id
if($banner['cid']!=$userdata['user_id'])
{
//add the impression
dbquery("update ".$db_prefix."banner set impmade=impmade+1 where bid=$banner[bid]");
}


if($banner['impmade'] >= $banner['imptotal'] && $banner['imptotal']!='0')
{
dbquery("UPDATE ".$db_prefix."banner SET enddate=NOW( ) , status = '0' WHERE bid =$banner[bid] LIMIT 1 ;");
}

echo $banner_display;

}



Redagavo Jaunelis· 2008 Gru. 28 15:12:32