Change username

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

4 replies · 560 views · started 15 years ago · 1 min read

2 participants
Leviathan73 Senior · 260 posts #1

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?

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.

something else Fellow · 2,296 posts #2

Why Not just add that line into the add room script?

Leviathan73 Senior · 260 posts #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? :(🙁

something else Fellow · 2,296 posts #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 *");

Leviathan73 Senior · 260 posts #5

but do not even understand. where it is add room script, here? admincp.php

//////////////////////////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&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&sid=$sid\"><img src=\"../images/chat.gif\" alt=\"\"/>Chatrooms</a><br/>";
  echo "<b>9 </b><a accesskey=\"9\" href=\"admincp.php?action=admincp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Admin Tools</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  echo "</body>";
}

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