blocked sites in wapdesire

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

    blocked sites in wapdesire

    this is the code in core
    Code:
    ///////////////////////////////////////////Is site blocked
    
    function isblocked($str,$sender)
    {
      if(ismod($sender))
      {
        return false;
      }
      $str = str_replace(" ","",$str);
      $str = strtolower($str);
        $res = mysql_query("SELECT site FROM dave_blockedsite");
    while ($row = mysql_fetch_array($res)) 
    {
       $sites[] = $row[0];
    }
      for($i=0;$i<count($sites);$i++)
      {
       $nosf = substr_count($str,$sites[$i]); <<<<<<<<<<<<<<<< line 1485
        if($nosf>0)
        {
          return true;
        }
      }
      return false;
    }
    and this is the error am getting on a few sites from ppl .
    Warning: substr_count() [function.substr-count]: Empty substring in /home/badgirls/public_html/web/core.php on line 1485 Warning: substr_count() [function.substr-count]: Empty substring in /home/badgirls/public_html/web/core.php on line 1485


    anyone got a fix for this bug.
    think its wen they send inboxes and must have a word that in the blocked list or sumat ,
    Wapchat4u


    Topsites4u

    #2
    check the $str and $sender are receiving the info

    Comment


      #3
      The function is good ... You have a problem on inbox probably ... Post inbox code here (sendpm action)..
      whatmp3.name - search mp3 on mobile

      Comment


        #4
        inbox codes

        from inbox.php
        Code:
        if($action=="sendpm")
        {
        
        
          addonline(getuid_sid($sid),"Sending Inbox ","inbox.php?action=main");
              echo "<head>";
              echo "<title>Inbox</title>";
              echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
              echo "</head>";
              echo "<body>";
          echo "<p align=\"center\">";
          $whonick = getnick_uid($who);
          echo "Send Inbox to $whonick<br/><br/>";
          echo "<form action=\"inbxproc.php?action=sendpm&amp;who=$who&amp;sid=$sid\" method=\"post\"><p align=\"center\">";
          echo "<input name=\"pmtext\" maxlength=\"500\"/><br/>";
          echo "<input type=\"Submit\" name=\"send\" value=\"Send\"></form>";
          echo "<br/><br/>";
        
        echo "<a href=\"index.php?action=online&amp;sid=$sid\">Online Users(".getnumonline().")</a><br/>";
          echo "<br/><a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
          echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
          echo forumlink($sid,9);
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
          echo "</p>";
            echo "</body>";
        
        }
        from inboxproc
        Code:
        if($action=="sendpm")
        {
             echo "<head>";
            echo "<title>send pm</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            echo "</head>";
            echo "<body>";
         echo "<p align=\"center\">";
          $whonick = getnick_uid($who);
          $byuid = getuid_sid($sid);
          $tm = time();
          $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM dave_private WHERE byuid='".$byuid."'"));
          $pmfl = $lastpm[0]+getpmaf();
          if($byuid==1)$pmfl=0;
          if($pmfl<$tm)
          {
            if(!isblocked($pmtext,$byuid))
            {
            if((!isignored($byuid, $who))&&(!istrashed($byuid)))
            {
          $res = mysql_query("INSERT INTO dave_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
          }else{
            $res = true;
          }
          if($res)
          {
            $cow = mysql_fetch_array(mysql_query("SELECT plusses FROM dave_users WHERE id='".$uid."'"));
            $cow = $cow[0]+2;
            mysql_query("UPDATE dave_users SET plusses='".$cow."' WHERE id='".$uid."'");
        
            echo "<img src=\"../images/ok.gif\" alt=\"X\"/>";
            echo "PM was sent successfully to $whonick<br/><br/>";
            echo parsepm($pmtext, $sid);
        
          }else{
            echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
            echo "Can't Send Inbox to $whonick<br/><br/>";
          }
        
          $uid = getuid_sid($sid);
          $location = mysql_fetch_array(mysql_query("SELECT placedet FROM dave_online WHERE userid='".$uid."'"));
                     $loca = $location[0];
                     echo "<a href=\"$loca&amp;sid=$sid\">Ok!</a><br/>";
             if($lastloc=="cht"){
             echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid\">Back To $rname</a><br/>";
             }
          echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
        echo "<a href=\"index.php?action=online&amp;sid=$sid\">Online Users(".getnumonline().")</a><br/>";
          echo "<a href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
          echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chat</a><br/>";
          echo forumlink($sid,9);
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
          echo "</p>";
            echo "</body>";
        }}}
        Wapchat4u


        Topsites4u

        Comment

        Working...
        X