⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chat.php

📁 wap 程序 手器电脑通用
💻 PHP
📖 第 1 页 / 共 2 页
字号:
                //////////good
                if($chat[0]!=$uid)
                {
                  if($chat[1]!=0)
                  {
                    if($chat[1]!=$uid)
                    {
                      $canc = false;
                    }
                  }
                }
                if($chat[4]=='1' && ismod($uid))
                {
                  $canc = true;
                }
                if($canc)
                {
                   $cmid = mysql_fetch_array(mysql_query("SELECT  chmood FROM ibwf_users WHERE id='".$chat[0]."'"));
                   
                   $iml = "";
                if(($cmid[0]!=0))
                {
                  $mlnk = mysql_fetch_array(mysql_query("SELECT img, text FROM ibwf_moods WHERE id='".$cmid[0]."'"));
                  $iml = "<img src=\"$mlnk[0]\" alt=\"$mlnk[1]\"/>";

                }
                  $chnick = getnick_uid($chat[0]);
                    $optlink = $iml.$chnick;
                  if(($chat[1]!=0)&&($chat[0]==$uid))
                  {
                    ///out
                    $iml = "<img src=\"moods/out.gif\" alt=\"!\"/>";
                    $chnick = getnick_uid($chat[1]);
                    $optlink = $iml."PM to ".$chnick;
                  }
                  if($chat[1]==$uid)
                  {
                    ///out
                    $iml = "<img src=\"moods/in.gif\" alt=\"!\"/>";
                    $chnick = getnick_uid($chat[0]);
                    $optlink = $iml."PM by ".$chnick;
                  }
                    if($chat[4]=='1')
                  {
                    ///out
                    $iml = "<img src=\"moods/point.gif\" alt=\"!\"/>";
                    $chnick = getnick_uid($chat[0]);
                    $tonick = getnick_uid($chat[1]);
                    $optlink = "$iml by ".$chnick." to ".$tonick;
                  }
                  
                  $ds= date("H.i.s", $chat[2]);
                  $text = parsepm($chat[3], $sid);
                  $nos = substr_count($text,"<img src=");
                  if(isspam($text))
                  {
                    $chnick = getnick_uid($chat[0]);
                    echo "<b>Chat system:&#187;<i>*$chnick don't try to spam*</i></b><br/>";
                  }
                  else if($nos>2){
                    $chnick = getnick_uid($chat[0]);
                    echo "<b>Chat system:&#187;<i>*$chnick only two smilies allowed*</i></b><br/>";
                  }else{
                    $sres = substr($chat[3],0,3);
                    
                    if($sres == "/me")
                    {
                        $chco = strlen($chat[3]);
                        $goto = $chco - 3;
                        $rest = substr($chat[3],3,$goto);
                        $tosay = parsepm($rest, $sid);
                        
                        echo "<b>*$chnick $tosay*</b><br/>";
                    }else{
                      
                      $tosay = parsepm($chat[3], $sid);
                      
                      if($rinfo[0]==1)
                      {
                      $tosay = str_replace("fuck","f**k",$tosay);
                        $tosay = str_replace("shit","sh*t",$tosay);
                        $tosay = str_replace("dick","d**k",$tosay);
                        $tosay = str_replace("pussy","pu**y",$tosay);
                        $tosay = str_replace("cock","c**k",$tosay);
                        $tosay = str_replace("ass ","@s* ",$tosay);
                      }
                      
                      if($rinfo[1]==1)
                      {
                          $tosay = htmlspecialchars($chat[3]);
                          $tosay = strrev($tosay);
                        }
                  echo "<a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$chat[0]&amp;rid=$rid&amp;rpw=$rpw\">$optlink</a>&#187;$ds<br/>";
                  echo $tosay."<br/>";
                  }
                }
               
                  $counter++;
                }
                }
            }
            echo "</small>";
            echo "</p>";
        
        echo "<p align=\"center\">";
        $chatters=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline where rid='".$rid."'"));
        echo "<br/><a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">Who's Inside($chatters[0])</a><br/>";
        echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a></p>";
        
        echo "</card>";
}
/////////////////////////////////////////////////////SAY
        else if ($action=="say")                   {
        echo "<card id=\"say\" title=\"wappyCULT\">";
        
        addonline($uid,"Writing Chat Message","");
          
            echo "<p>Message:<input name=\"message\" type=\"text\" value=\"\" maxlength=\"255\"/><br/>";
            echo "<small><anchor>&#171;Say";
            echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
            echo "<postfield name=\"message\" value=\"$(message)\"/>";
            echo "</go></anchor></small><br/>";
            echo "<small><a href=\"lists.php?action=chmood&amp;sid=$sid&amp;page=1\">&#187;Chat mood</a></small><br/>";
            echo "<small><a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#187;Who's Inside</a></small><br/>";
            echo "<small><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#171;Chatroom</a></small></p>";
        //end
        
        echo "<p align=\"center\"><a href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";

        echo "</card>";
                                               }
        ////////////////////////////////////////////
    /////////////////////////////////////////////////////SAY2
        else if ($action=="say2")                   {
        echo "<card id=\"say\" title=\"wappyCULT\">";
        echo "<p align=\"center\">";
        $unick = getnick_uid($who);
        echo "<b>PM to $unick</b>";
        echo "</p>";
        
        addonline($uid,"Writing chat message","");
         
            echo "<p>Message:<input name=\"message\" type=\"text\" value=\" \" maxlength=\"255\"/><br/>";
            echo "<small><anchor>&#171;Private";
            echo "<go href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\" method=\"post\">";
            echo "<postfield name=\"message\" value=\"$(message)\"/>";
            echo "<postfield name=\"who\" value=\"$who\"/>";
            echo "</go></anchor></small><br/>";
            echo "<small><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">&#187;View $unick's Profile</a></small><br/>";
            echo "<small><a href=\"chat.php?action=expose&amp;sid=$sid&amp;who=$who&amp;rid=$rid&amp;rpw=$rpw\">&#187;Expose $unick</a></small><br/>";
            
            echo "<small><a href=\"chat.php?action=inside&amp;sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#187;Who's Inside</a></small><br/>";
            echo "<small><a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#171;Chatroom</a></small></p>";
        //end
        
        echo "<p align=\"center\"><a href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";

        echo "</card>";
                                               }
        ////////////////////////////////////////////
        //////////////////////////////inside//////////
        else if ($action=="inside")           {
          
          addonline($uid,"Chat inside list","");
        echo "<card id=\"main\" title=\"Inside list\">";
        echo "<p align=\"center\"><br/>";
        $inside=mysql_query("SELECT DISTINCT * FROM ibwf_chonline WHERE rid='".$rid."' and uid IS NOT NULL");
        
        while($ins=mysql_fetch_array($inside))
        {
          $unick = getnick_uid($ins[1]);
          $userl = "<small><a href=\"chat.php?action=say2&amp;sid=$sid&amp;who=$ins[1]&amp;rid=$rid&amp;rpw=$rpw\">$unick</a>, </small>";
          echo "$userl";
        }
        echo "<br/><br/>";
        echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#171;Chatroom</a><br/>";
        echo "<br/><a href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";
        
        echo "</card>";
                                           }
        else if ($action=="expose")           {

          addonline($uid,"Chat inside list","");
        echo "<card id=\"main\" title=\"Inside list\">";
        echo "<p align=\"center\"><br/>";
        mysql_query("UPDATE ibwf_chat SET exposed='1' WHERE chatter='".$who."' AND who='".$uid."'");
        $unick = getnick_uid($who);
        echo "$unick messages to you are exposed to the moderation team. We will deal with the matter as soon as possible.";
        echo "<br/><br/>";
        echo "<a href=\"chat.php?sid=$sid&amp;rid=$rid&amp;rpw=$rpw\">&#171;Chatroom</a><br/>";
        echo "<br/><a href=\"index.php?action=chat&amp;sid=$sid\"><img src=\"images/chat.gif\" alt=\"*\"/>Chatrooms</a><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a></p>";

        echo "</card>";
                                           }
        
        
?>
</wml>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -