Dont lought

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dont lought

    Im gonna make shout comment system . Like waplive lyrics c0mment . I tryed it with waplive article comment cod . Every things is ok but problem is that when some one comment in any users shout thats comment also showed in all users shout !

    some one please help me .
    PHP Code:
    /* I don't know everything hehe */ 
    
    Find me on facebook

    #2
    show some code here and i will have a look ;)

    PHP Code:
    foreach ($_SERVER as $server => $value)
    {
    echo "$server is $value<br />";
    } 
    

    Comment


      #3
      Originally posted by drwap View Post
      show some code here and i will have a look ;)


      this is in index


      PHP Code:
      echo getshoutbox($sid);
      
      
      
        echo "<br/><input name=\"shtxt\" maxlength=\"420\"/><br/>";
      
        echo "<anchor>Update";
      
        echo "<go href=\"genproc.php?action=shout&amp;sid=$sid&amp;artid=$artid\" method=\"post\">
      
        <postfield name=\"shtxt\" value=\"$(shtxt)\"/></go>";
      
        echo "</anchor><br/>";
      
        
          $who = $_GET["who"];
      
          //////ALL LISTS SCRIPT <<
      
      
      
          if($page=="" || $page<=0)$page=1;
      
          if($who=="")
      
          {
      
          $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts"));
      
          }else{
      
          $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
      
          }
      
          $num_items = $noi[0]; //changable
      
          $items_per_page= 5;
      
          $num_pages = ceil($num_items/$items_per_page);
      
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
      
          $limit_start = ($page-1)*$items_per_page;
      
      
      
          //changable sql
      
          if($who =="")
      
          {
      
              $sql = "SELECT id, shout, shouter, shtime  FROM ibwf_shouts ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
      
      }else{
      
          $sql = "SELECT id, shout, shouter, shtime  FROM ibwf_shouts  WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
      
      }
      
      echo "</p>";
      
          echo "<p>";
      
          $items = mysql_query($sql);
      
          echo mysql_error();
      
          if(mysql_num_rows($items)>0)
      
          {
      
          while ($item = mysql_fetch_array($items))
      
          {
      
              $shnick = getnick_uid($item[2]);
            $sht2 = parsepm($item[1], $sid);
      
              $shdt = date("H:i a", $item[3]);
              
              
              
      
              
      $countpics = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_cwart WHERE artid='".$artid."'"));
      
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$shnick</a> $sht2 <i><small> <a href=\"index.php?&amp;action=artcom&amp;sid=$sid&amp;id=$id&amp;artid=$id&amp;cid=$cid\">Comments($countpics[0])</a> - at $shdt</small></i>"; 
      
      i think problem in shout sql n comment sql adjust . can you help me ?

      to
      comment action
      PHP Code:
      else if($action=="artcom2")
      
      {
      $text = $_POST["text"];
        $artid = $_GET["artid"];
        //$qut = $_POST["qut"];
      addonline(getuid_sid($sid),"Adding Article Comment","index.php?action=main");
      
          echo "<card id=\"main\" title=\"Clubs Menu\">";
              echo "<p align=\"left\">";
      
      $crdate = time();
            $uid = getuid_sid($sid);
            $res = false;
      
            if(trim($text)!="")
            {
              
            $res = mysql_query("INSERT INTO ibwf_cwart SET uid='".$uid."', text='".$text."', crdate='".$crdate."', artid='".$artid."'");
            }
            if($res)
            {
              echo "Comment submitted<br/><br/><br/>";
            }else{
              echo "Error Adding Comment<br/>";
        
        }      
         
      
      
          
          
      
      
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
      
      echo "Home</a>";
      
        echo "</p>";
      
          echo "</card>";
      
      }
      
      
      
      else if($action=="artcom")
      
      {
      $id = $_GET["id"];
      $cid = $_GET["cid"];
      $artid = $_GET["artid"];
          addonline(getuid_sid($sid),"Status Comments","lists.php?action=$action&amp;who=$who&amp;bid=$bid");
           $uid = getuid_sid($sid);
          echo "<card id=\"main\" title=\"Clubs Menu\">";
      
          
      
          echo "<p align=\"left\">";
          
          
           if($page=="" || $page<=0)$page=1;
          $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_cwart WHERE artid='".$artid."'"));
          $num_items = $noi[0]; //changable
          $items_per_page= 5;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
          
            $sql = "SELECT id, artid, text, uid, crdate FROM ibwf_cwart WHERE artid='".$artid."' ORDER BY crdate DESC LIMIT $limit_start, $items_per_page";
            
      
        
          $items = mysql_query($sql);
           $items = mysql_query($sql);
          echo mysql_error();
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
              
                if(isonline($item[3]))
        {
          $iml = "[&#x2022;]";
          
        }else{
          $iml = "[x]";
        }
          $snick = getnick_uid($item[3]);
            $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$iml$snick</a>:";
            
          $tmstamp = $item[4];
          $bs = date("D,dMy-h:i:s a",$tmstamp);
            
            echo "$lnk<br/><small>";
            
      $me = getuid_sid($sid);
      if($who=="$me") {
      $can = "a";
      }else{
      $can = "b";
      }
        if(ismod($uid)||$can=="a")
        {
         $delnk = "<a href=\"articles.php?action=delart&amp;sid=$sid&amp;id=$item[0]\">[x]</a>";
            }else{
              $delnk = "";
            }
            $text = parsepm($item[2], $sid);
            echo "$text $delnk<br/>";
      echo "$bs";
      echo "<br/>";
            echo "</small>";
      
          }
          }
       echo "</p><p align=\"left\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"index.php?action=artcom&amp;page=$ppage&amp;sid=$sid&amp;id=$artid&amp;cid=$cid&amp;artid=$artid&amp;type=send\">«PREV</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"index.php?action=artcom&amp;page=$npage&amp;sid=$sid&amp;id=$artid&amp;cid=$cid&amp;artid=$artid&amp;type=send\">Next»</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
      
         
      $me = getuid_sid($sid);
      if($me!="$id") {
      $artid = $_GET["artid"];
          echo "<form action=\"index.php?action=artcom2&amp;sid=$sid&amp;artid=$artid\" method=\"post\">";
      echo "<input name=\"text\" maxlength=\"3000\"/><br/>";
        
       echo "<input type=\"submit\" value=\"Add Comments\"/>";
                 echo "</form>";
      }
      echo "<a href=\"articles.php?action=viewart&amp;sid=$sid&amp;cid=$cid&amp;artid=$artid&amp;id=$id&amp;browse?\">";
          echo "Back to article</a><br/>";
      
      
      
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
      
      echo "Home</a>";
      
        echo "</p>";
      
          echo "</card>";
      
      } 
      
      and nedded table is

      PHP Code:
      --
      -- Table structure for table `ibwf_cwart`
      --
      
      CREATE TABLE `ibwf_cwart` (
        `id` int(255) NOT NULL auto_increment,
        `artid` int(255) NOT NULL default '0',
        `uid` int(255) NOT NULL default '0',
        `text` varchar(255) NOT NULL default '',
        `crdate` varchar(255) NOT NULL default '',
        PRIMARY KEY  (`id`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=95 ;
      
      --
      -- Dumping data for table `ibwf_cwart`
      --
      
      INSERT INTO `ibwf_cwart` (`id`, `artid`, `uid`, `text`, `crdate`) VALUES
      (94, 91, 10, 'hghjgj', '1256559509');
      
      -- -------------------------------------------------------- 
      
      pleaseeee
      PHP Code:
      /* I don't know everything hehe */ 
      
      Find me on facebook

      Comment


        #4
        the codes are really screwed up as u are mixing wml with xhtml
        the main problem is $artid your not assigning it to to a shout id number

        Comment

        Working...
        X