Change username

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

    Change username

    Hello, because when I create private room and the first check I write for my nickname, and yet when someone else wrote before me, the check that he created the room?
    PHP Code:
    if($room=="")
    {
    echo 
    addchatmsg($room[0],$text,1,"* $chnick create room private *");

    He should be the nickname of the user who opens a private room, regardless of who first slipping. thanks for the help.

    #2
    Why Not just add that line into the add room script?
    Last edited by something else; 02.08.11, 06:02.

    Comment


      #3
      something else... no, no, I'm interested in the private rooms. But the problem is that when I create a user private room and slipping the first to dive to the room he created .. I do not .. Why?

      Comment


        #4
        Because you need to add it to the add room script rather than the first person to enter the room

        make the room ->
        call to database for id of room just created ->
        addchatmsg($id,$text,1,"* $chnick create room private *");

        Comment


          #5
          but do not even understand. where it is add room script, here?
          admincp.php
          PHP Code:
          //////////////////////////add chatroom//////////////////////////
           
          else if($action=="addchr")
          {
            echo 
          "<head>";
            echo 
          "<title>Admin Tools</title>";
            echo 
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            echo 
          "</head>";
            echo 
          "<body>";
            echo 
          "<p align=\"center\">";
            if(!
          isadmin(getuid_sid($sid)))
            {
            echo 
          "Permission Denied!<br/>";
            }else{
            echo 
          "<b>Add Room</b><br/><br/>";
            echo 
          "<form action=\"admproc.php?action=addchr&amp;sid=$sid\" method=\"post\">";
            echo 
          "Name:<input name=\"chrnm\" maxlength=\"30\"/><br/>";
            echo 
          "Minimum Age:<input name=\"chrage\" style=\"-wap-input-format: '*N'\" maxlength=\"3\" size=\"3\"/><br/>";
            echo 
          "Maximum Age:<input name=\"maxage\" style=\"-wap-input-format: '*N'\" maxlength=\"3\" size=\"3\"/><br/>";
            echo 
          "Minimum Chat Posts:<input name=\"chrpst\" style=\"-wap-input-format: '*N'\" maxlength=\"4\" size=\"4\"/><br/>";
            echo 
          "Permission:<select name=\"chrprm\">";
            echo 
          "<option value=\"0\">Normal</option>";
            echo 
          "<option value=\"1\">Moderators</option>";
            echo 
          "<option value=\"2\">Admins</option>";
            echo 
          "</select><br/>";
            echo 
          "Censored:<select name=\"chrcns\">";
            echo 
          "<option value=\"1\">Yes</option>";
            echo 
          "<option value=\"0\">No</option>";
            echo 
          "</select><br/>";
            echo 
          "Fun:<select name=\"chrfun\">";
            echo 
          "<option value=\"0\">No</option>";
            echo 
          "<option value=\"1\">esreveR</option>";
            echo 
          "<option value=\"2\">chatbot</option>";
            echo 
          "</select><br/>";
            echo 
          "<input type=\"Submit\" Name=\"Submit\" Value=\"Add\">";
            }
            if(
          $room=="")
          {
          echo 
          addchatmsg($id,$text,1,"* $chnick create room private*");
          }

          $uid getuid_sid($sid);
            echo 
          "<br/><b>8 </b><a accesskey=\"8\" href=\"admincp.php?action=chrooms&amp;sid=$sid\"><img src=\"../images/chat.gif\" alt=\"\"/>Chatrooms</a><br/>";
            echo 
          "<b>9 </b><a accesskey=\"9\" href=\"admincp.php?action=admincp&amp;sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin Tools</a><br/>";
            echo 
          "<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>";

          Comment

          Working...
          X