Reporting Spam Help

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

    Reporting Spam Help

    ok here pop up coding i want to add if isspam option so that spam words gets reported in modlog anyone help please add it

    Code:
    <?php
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo("<?xml version=\"1.0\"?>");
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    ?>
    <wml>
    <?php
    include("config.php");
    include("core.php");
    connectdb();
    $action = $_GET[&#39;action&#39;];
    $sid = $_GET[&#39;sid&#39;];
    $page = $_GET[&#39;page&#39;];
    $who = $_GET[&#39;who&#39;];
    $pmid = $_GET[&#39;pmid&#39;];
    if(islogged($sid)==false)
    {
        echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "You are not logged in
    ";
          echo "Or Your session has been expired
    
    ";
          echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
    }
    $uid = getuid_sid($sid);
    if(isbanned($uid))
        {
            echo "<card id=\"main\" title=\"$sitename\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
          echo "You are [b]Banned[/b]
    ";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
          $remain = $banto[0]- time();
          $rmsg = gettimemsg($remain);
          echo "Time to finish your penalty: $rmsg
    
    ";
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
    
    
    else if($action=="send")
    {
    addonline(getuid_sid($sid),"Sending pop-up MSG","");
    echo "<card id=\"main\" title=\"sent!!\">";
    echo "<p align=\"center\">";
    $whonick = getnick_uid($who);
    $byuid = getuid_sid($sid);
    $tm = time();
    
    $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
    
    
    
        echo "<img src=\"images/sent.gif\" alt=\"O\"/>
    ";
        echo "Popup Message Sent to $whonick!
    ";
    
        
    echo "
    ---
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
    
    }
    else if($action=="sendto"){
    
    $who = $_get[&#39;who&#39;];
    
    addonline(getuid_sid($sid),"Sending pop-up MSG","");
    echo "<card id=\"main\" title=\"popups\">";
    echo "<p align=\"center\">";
    echo "$getbuttons 
    ";
    
    $who = $_get[&#39;who&#39;];
    
    
    $whonick = getnick_uid($who);
    $byuid = getuid_sid($sid);
    
    echo "<input name=\"msg\" maxlength=\"150\"/>
    ";
    echo "<anchor>SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
    echo "</go></anchor>
    ";
    
    
    echo "
    
    -
    
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>
    ";
    }
    echo "</p>";
    echo "</card>";
    ?>
    </wml>
    
    
    
    ///////////////////////////////////////////////////
    
    
    else if($action=="sendto"){
    
    addonline(getuid_sid($sid),"Sending pop-up MSG","");
    echo "<card id=\"main\" title=\"popups\">";
    echo "<p align=\"center\">";
    echo "$getbuttons 
    
    ";
    $whonick = getnick_uid($who);
    $byuid = getuid_sid($sid);
    echo "Sending to ".$whonick."
    ";
    echo "<input name=\"msg\" maxlength=\"150\"/>
    ";
    echo "<anchor>SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
    echo "<postfield name=\"who\" value=\"$(who)\"/>";
    echo "</go></anchor>
    ";
    
    
    echo "
    
    -
    
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>
    ";
    echo "</p>";
    echo "</card>";
    }
    
    
    ////////////////////////////////////////////////////////
    
    
    <?php
    $uid = getuid_sid($sid);
    $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_pops WHERE touid=&#39;".$uid."&#39; AND unread=&#39;1&#39;"));
      if($nopop[0]>0)
    {
    $sql ="SELECT * FROM fun_pops where touid=&#39;".$uid."&#39; AND unread = &#39;1&#39; ORDER BY id LIMIT  1";
    $pd = mysql_query($sql);
    while ($pop = mysql_fetch_array($pd))
      {
    $id = mysql_fetch_array(mysql_query("SELECT touid FROM fun_pops WHERE touid=&#39;".$uid."&#39;"));
      if($uid==$id[0])
      {
        $chread = mysql_query("UPDATE fun_pops SET unread=&#39;0&#39; WHERE id=&#39;".$pop[0]."&#39;");
      }
    $dtop = date("d/m/y - H:i:s",$pop[5]);
    $by = getnick_uid($pop[2]);
    $msg = htmlspecialchars($pop[1]);
    echo "
    [b]$by:[/b] $msg - $dtop
    ";
    echo "<a href=\"lists.php?action=sendto&amp;sid=$sid&amp;who=$pop[2]\">RELPY</a>";
    echo "
    ---";
      }
    }
    ?>
    Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

    <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>


    #2
    i am little confused on where to add the is spam function and how to.
    Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

    <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

    Comment


      #3
      Please add your database table structure.. Or if you have reported column in table do this inserting data to database

      Code:
      if(isspam($msg)){
      $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;, reported=&#39;1&#39;");
      }else{
      $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
      }
      Where reported=1 hope it can help.. In lavalair script they report spam PM after the recipient reads the message in that code the message is reported right after the message has been sent

      Comment


        #4
        Please add your database table structure.. Or if you have reported column in table do this inserting data to database

        Code:
        if(isspam($msg)){
        $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;, reported=&#39;1&#39;");
        }else{
        $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
        }
        Where reported=1 hope it can help.. In lavalair script they report spam PM after the recipient reads the message in that code the message is reported right after the message has been sent [/b]
        this is better
        Code:
        $msg = mysql_real_escape_string($_POST["msg"]);
        if(isspam($msg)){
        $res = mysql_query("INSERT INTO fun_pops SET text=&#39;[b](forwarded spam via popups)[/b][br/]".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;1&#39;, timesent=&#39;".$tm."&#39;");
        }else{
        $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
        }
        no need to add reported sql row unless its visibility in the modlog

        Comment


          #5
          this is better
          Code:
          $msg = mysql_real_escape_string($_POST["msg"]);
          if(isspam($msg)){
          $res = mysql_query("INSERT INTO fun_pops SET text=&#39;[b](forwarded spam via popups)[/b][br/]".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;1&#39;, timesent=&#39;".$tm."&#39;");
          }else{
          $res = mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
          }
          no need to add reported sql row unless its visibility in the modlog[/b]
          If im not mistaken he is asking for
          i want to add if isspam option so that spam words gets reported in modlog anyone help please add it[/b]

          Comment


            #6
            here bros

            Code:
            -- 
            -- Table structure for table &#39;fun_pops&#39;
            -- 
            
            DROP TABLE IF EXISTS fun_pops;
            CREATE TABLE fun_pops (
              id int(100) NOT NULL auto_increment,
              `text` blob NOT NULL,
              byuid int(100) NOT NULL default &#39;0&#39;,
              touid int(100) NOT NULL default &#39;0&#39;,
              unread char(1) NOT NULL default &#39;1&#39;,
              timesent int(100) NOT NULL default &#39;0&#39;,
              PRIMARY KEY  (id)
            ) ENGINE=MyISAM;
            and yes i want spaming get report brus
            Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

            <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

            Comment


              #7
              something like this

              Code:
              echo "$ptxt $bylnk
              ";
                $tmstamp = $pminfo[2];
                $tmdt = date("d m Y - H:i:s", $tmstamp);
                echo "$tmdt
              
              ";
                $pmtext = parsepm($pminfo[0], $sid);
                  $pmtext = str_replace("/llfaqs","<a href=\"lists.php?action=faqs&amp;sid=$sid\">$sitename F.A.Qs</a>", $pmtext);
                  $pmtext = str_replace("/reader",getnick_uid($pminfo[3]), $pmtext);
                  if(isspam($pmtext))
                  {
                    if(($pminfo[4]=="0") && ($pminfo[1]!=1))
                    {
                      mysql_query("UPDATE ibwf_private SET reported=&#39;1&#39; WHERE id=&#39;".$pmid."&#39;");
                    }
                  }
                  echo $pmtext;
                echo "</p>";
              Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

              <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

              Comment


                #8
                If im not mistaken he is asking for[/b]
                ah, I did not notice that modlog report asking.

                report=1 will never report in modlog until the additional codes are being added in the modcp and modproc files

                Comment


                  #9
                  rukiya bru plz help with spam in the above coding
                  Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                  <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                  Comment


                    #10
                    add this row in fun_pops
                    Code:
                    reported tinyint(1) NOT NULL default &#39;0&#39;,
                    then use this code in popup.php
                    Code:
                    $msg = mysql_real_escape_string($_POST["msg"]);
                    if(isspam($msg)){
                    mysql_query("INSERT INTO fun_pops SET text=&#39;[b](forwarded spam via popups)[/b][br/]".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;1&#39;, timesent=&#39;".$tm."&#39;,reported=&#39;1&#39;");
                    }else{
                    mysql_query("INSERT INTO fun_pops SET text=&#39;".$msg."&#39;, byuid=&#39;".$byuid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
                    }
                    make a code to link in modcp.cp->($action=="main")
                    Code:
                     $nrpm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_pops WHERE reported=&#39;1&#39;"));
                        echo "<a href=\"modcp.php?action=rpop&sid=$sid\">»Pr. PopUp Messages($nrpm[0])</a>
                    ";
                    make $action like ($action=="rpm") in modcp.php and in modproc.php($action=="hpm") using correct mysql_fetch_array() function for fun_pops SQL table
                    and in index.php
                    replace this code in index.php->($action=="main")
                    Code:
                     if(ismod($uid))
                      {
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported=&#39;1&#39;"));
                        $tot = $tnor[0];
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported=&#39;1&#39;"));
                        $tot += $tnor[0];
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported=&#39;1&#39;"));
                        $tot += $tnor[0];
                        $tnol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog"));
                        $tol = $tnol[0];
                        if($tol+$tot>0)
                        {
                          echo "<a href=\"modcp.php?action=main&amp;sid=$sid\">»Mod R/L ($tot/$tol)</a>
                    ";
                          }
                    
                      }
                    with
                    Code:
                    if(ismod($uid))
                      {
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_private WHERE reported=&#39;1&#39;"));
                        $tot = $tnor[0];
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM fun_pops WHERE reported=&#39;1&#39;"));
                        $tot += $tnor[0];
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_posts WHERE reported=&#39;1&#39;"));
                        $tot += $tnor[0];
                        $tnor = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_topics WHERE reported=&#39;1&#39;"));
                        $tot += $tnor[0];
                        $tnol = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_mlog"));
                        $tol = $tnol[0];
                        if($tol+$tot>0)
                        {
                          echo "<a href=\"modcp.php?action=main&sid=$sid\">»Mod R/L ($tot/$tol)</a>
                    ";
                          }
                    
                      }

                    Comment

                    Working...
                    X