Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: syntax error

Parašė _Tomas· 2008 Rugs. 27 19:09:45
#1

Įsidėjau funkcija iš chipo straipsnio - Reklama forume - Pasidariau, kad butu 5 ir 10 poste bet dabar iškilo problema tokia:

Parse error: syntax error, unexpected '(' in /home/useris/adresas.lt/forum/viewthread.php on line 120

120 eilutė:

if(dbcount("(*)", "money_banners", "tipas='0'") > 0){




Visas 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 == '5' OR $postai == '10') {   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\'>\";

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)){
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/reklama468.png' border='0'></a></center>";
}
   
   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);
      $message = linkas($message);