Help club chat room

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

    Help club chat room

    I do not understand why the photo does not go well in the chat room, I tried to write the query but not
    index.php
    PHP Code:
    $clnm htmlspecialchars($clinfo[0]);
        echo 
    "<head>";
        echo 
    "<title>$clnm</title>";
        echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
        echo 
    "</head>";
        echo 
    "<body>";
        echo 
    "<p align=\"center\">";
        echo 
    "<b>$clnm</b><br/>";
        if(
    trim($clinfo[4])=="")
        {
          echo 
    "<img src=\"../images/logo.gif\" alt=\"logo\"/>";
        }else{
            echo 
    "<img src=\"$clinfo[4]\" width=\"100\" height=\"100\" alt=\"logo\"/>";
        }
        echo 
    "</p>";
        echo 
    "<p>";
        echo 
    "Club ID: <b>$clid</b><br/>";
        
    $uid getuid_sid($sid);
        
    $cango mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$uid."' AND accepted='1'"));
        echo 
    "Owner: <a href=\"index.php?action=viewuser&amp;who=$clinfo[1]&amp;sid=$sid\">".getnick_uid($clinfo[1])."</a><br/>";
          
    $mems mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'"));
          echo 
    "Utenti: <a href=\"lists.php?action=clmem&amp;sid=$sid&amp;clid=$clid\">$mems[0]</a><br/>";
          echo 
    "Creato il: ".date("d/m/y"$clinfo[6])."<br/>";
          echo 
    "Plus crediti: $clinfo[5]<br/>";
          
    $fid mysql_fetch_array(mysql_query("SELECT id FROM ibwf_forums WHERE clubid='".$clid."'"));
          
    $rid mysql_fetch_array(mysql_query("SELECT id FROM ibwf_rooms WHERE clubid='".$clid."'"));
          
    $tps mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$fid[0]."'"));
          
    $pss mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$fid[0]."'"));
          
        if((
    $cango[0]>0)||isadmin($uid))
        {
              if(
    $clid==161) {
          echo 
    "<a href=\"http://www.$sitename/clubs/royal/index.php?sid=$sid&amp;site=wap\">Royal X Uploader</a><br/>";
     }
            
    $noa mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE clid='".$clid."'"));
            echo 
    "<br/><b>1 </b><a accesskey=\"1\" href=\"lists.php?action=annc&amp;sid=$sid&amp;clid=$clid\"><img src=\"../images/annc.gif\" alt=\"!\"/>Annunci($noa[0])</a><br/>";
    $noa mysql_fetch_array(mysql_query("SELECT COUNT(*)  FROM ibwf_chat WHERE rid='".$rid[0]."'"));
            echo 
    "<b>2 </b><a accesskey=\"2\" href=\"chat.php?sid=$sid&amp;rid=$rid[0]\"><img src=\"../images/chat.gif\" alt=\"*\"/>$clnm Chat($noa[0])</a><br/>";
            echo 
    "<b>3 </b><a accesskey=\"3\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid[0]\"><img src=\"../images/1.gif\" alt=\"*\"/>$clnm Forum($tps[0]/$pss[0])</a><br/><br/>";
      
    $ismem mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".getuid_sid($sid)."'"));
      
      if(
    $ismem[0]>0)
      {
       
    //unjoin 
       
    if($clinfo[1]!=$uid
    genproc.php
    PHP Code:
    //////////////////// add club
    else if($action=="addcl")
    {
        
    addonline(getuid_sid($sid),"Adding Club","");
        
    $clnm trim($_POST["clnm"]);
        
    $clnm str_replace("$"""$clnm);
        
    $clds trim($_POST["clds"]);
        
    $clds str_replace("$"""$clds);
        
    $clrl trim($_POST["clrl"]);
        
    $clrl str_replace("$"""$clrl);
        
    $cllg trim($_POST["cllg"]);
        
    $cllg str_replace("$"""$cllg);
          echo 
    "<head>";
          echo 
    "<title>$sitename</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
        echo 
    "<p align=\"center\">";
        
    $uid getuid_sid($sid);
        if(
    getplusses($uid)>=500)
        {
        
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
          if(
    $noi[0]<3)
          {
            if((
    $clnm=="")||($clds=="")||($clrl==""))
            {
              echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>Please be sure to fill, club name, description and rules";
            }else{
              
    $nmex mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE name LIKE '".$clnm."'"));
              if(
    $nmex[0]>0)
              {
                echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>Club Name Already exist";
              }else{
                
    $res mysql_query("INSERT INTO ibwf_clubs SET name='".$clnm."', owner='".$uid."', description='".$clds."', rules='".$clrl."', logo='".$cllg."', plusses='0', created='".time()."'");
                if(
    $res)
                {
                  
    $clid mysql_fetch_array(mysql_query("SELECT id FROM ibwf_clubs WHERE owner='".$uid."' AND name='".$clnm."'"));
                    echo 
    "<img src=\"../images/ok.gif\" alt=\"O\"/>Congratulations! you have your own club, your own rules, message board, chatroom, announcements board, 50 club points also for you";
                    
    mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid[0]."', accepted='1', points='50', joined='".time()."'");
                    
    //$ups = getplusses($uid);
                    //$ups += 5;
                    //mysql_query("UPDATE ibwf_users SET plusses='".$ups."' WHERE id='".$uid."'");
                    
    $fnm $clnm;
                    
    $cnm $clnm;
                     if(
    getplusses($uid)>=500)
        {
        
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
          if(
    $noi[0]<3)
          {
            if((
    $clnm=="")||($clds=="")||($clrl==""))
            {
                    
    mysql_query("INSERT INTO ibwf_forums SET name='".$fnm."', position='0', cid='0', clubid='".$clid[0]."'");
                    
    $res mysql_query("INSERT INTO ibwf_rooms SET name='".$cnm."', pass='', static='1', mage='0', chposts='0', perms='0', censord='0', freaky='0', lastmsg='".time()."', clubid='".$clid[0]."', pic='".$clpic."'");
                }else{
                    echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
                }
              }
            }
          }else{
            echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>You already have 3 clubs";
          }
          }else{
          echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>You cant add clubs";
          }
        
    echo 
    "<br/><br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p>";
        echo 
    "</body>";

Working...
X