blocked sites in wapdesire

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

3 replies · 362 views · started 17 years ago · 1 min read

3 participants
nclemale36 Lead · 537 posts #1

this is the code in core

///////////////////////////////////////////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 ,

ori Lead · 512 posts #2

check the $str and $sender are receiving the info

shad0w Developer · 119 posts #3

The function is good ... You have a problem on inbox probably ... Post inbox code here (sendpm action)..

whatmp3.name - search mp3 on mobile

nclemale36 Lead · 537 posts #4

inbox codes

from inbox.php

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&who=$who&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&sid=$sid\">Online Users(".getnumonline().")</a><br/>";
  echo "<br/><a href=\"inbox.php?action=main&sid=$sid\">Inbox</a><br/>";
  echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a><br/>";
  echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a><br/>";
  echo forumlink($sid,9);
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";

}

from inboxproc

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&sid=$sid\">Ok!</a><br/>";
     if($lastloc=="cht"){
     echo "<a href=\"chat.php?sid=$sid&rid=$rid\">Back To $rname</a><br/>";
     }
  echo "<a href=\"inbox.php?action=main&sid=$sid\">Inbox</a><br/>";
echo "<a href=\"index.php?action=online&sid=$sid\">Online Users(".getnumonline().")</a><br/>";
  echo "<a href=\"lists.php?action=buds&sid=$sid\">BuddyList</a><br/>";
  echo "<a href=\"index.php?action=chat&sid=$sid\">Chat</a><br/>";
  echo forumlink($sid,9);
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}}}    

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close