Simple help please.

MadKill

Active Member
Sep 1, 2015
190
47
66
Hi r4p3 members,

Someone can tell me what the code that is not connected to ts3 up the error"sorry, join on teamspeak3 to use website"?

In this moment i have my panel 25% ready

-Register account ( 100% )

-Create Channel by order( 100% )
[*spacerbegin]×
[cspacer]PERMANENT CHANNEL

--[cspacer]Team Name
---Channel 1
---Channel 2
---Channel 3
--[*spacer14]×
Other team.
Other .....

[*spacerend]×


-Chosse icons( 0% )

-Steam cs1.6 archivents(amxx connect to website)( 90% )

and i need help to, if client have channel admin on ts3 go to other page on website to edit channel info, pass and ..

Tanks,
R4P3
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
Someone can tell me what the code that is not connected to ts3 up the error"sorry, join on teamspeak3 to use website"?

PHP:
    function getClientIp() {
        if (!empty($_SERVER['HTTP_CLIENT_IP']))
            return $_SERVER['HTTP_CLIENT_IP'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
            return $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED']))
            return $_SERVER['HTTP_X_FORWARDED'];
        else if(!empty($_SERVER['HTTP_FORWARDED_FOR']))
        return $_SERVER['HTTP_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_FORWARDED']))
            return $_SERVER['HTTP_FORWARDED'];
        else if(!empty($_SERVER['REMOTE_ADDR']))
            return $_SERVER['REMOTE_ADDR'];
        else
            return false;
    }


 $connect = "serverquery://".$USER_QUERY.":".$PASS_QUERY."@".$HOST_QUERY.":".$PORT_QUERY."/?server_port=".$SERVER_PORT."";
    $ts3 = TeamSpeak3::factory($connect);
    $ts3->execute("clientupdate", array("client_nickname" => $NICK_QUERY));
    $FLAG = false;
   
    foreach ($ts3->clientList(array('client_type' => '0', 'connection_client_ip' => getClientIp())) as $client) {
        $FLAG = true;
        break;
    }
    if (!$FLAG){
        echo "<p><b>You Need Conected To Ts3.</b></p><br/>";
        header("refresh: 10; url = ./");
        die; 
    }

and i need help to, if client have channel admin on ts3 go to other page on website to edit channel info, pass and ..

For this u need check permission , but how need edit channel ? i think u need set description in channel.

  1. Check user is ChannelAdmin
  2. Find user in channel (For get Channel ID)
  3. Editing Channel
 

MadKill

Active Member
Sep 1, 2015
190
47
66
The player create channel. and web site check on ts3 if client have channel admin, move player to your channel and show on website, channel name(edit), password (edit), channel description.. and like that.

Tanks for the code.
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
The player create channel. and web site check on ts3 if client have channel admin, move player to your channel and show on website, channel name(edit), password (edit), channel description.. and like that.

But then ? he cant edit channel or what ?
 

MadKill

Active Member
Sep 1, 2015
190
47
66
yes xD

"channel name(edit), password (edit), channel description.. and like that."
on website player can edit
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
yes xD

"channel name(edit), password (edit), channel description.. and like that."
on website player can edit

Then that.... its not simple but not impossible.

In think this.

  1. Create Channel (Name , password, order) SET PHONETIC NAME UID FOR CREATOR
  2. Move User & Assing channel Admin
  3. For Edit later user PHONETIC NAME to Search user , if connected , show Editor Box for channel.
  4. Security Remove edit phonetic name for all serversgroups
 

MadKill

Active Member
Sep 1, 2015
190
47
66
SET PHONETIC NAME UID FOR CREATOR ?

where ?

  1. Move User & Assing channel Admin
  2. $ts3_VirtualServer->clientMove($clientid, $top_cid);
  3. ts3_VirtualServer->execute("setclientchannelgroup", array("cldbid" => $clientdb, "cid" => $top_cid, "cgid" => $grupo_do_ca));
 

EscuderoKevin

Well-Known Member
Jul 2, 2015
380
181
130
SET PHONETIC NAME UID FOR CREATOR ?

where ?

  1. Move User & Assing channel Admin
  2. $ts3_VirtualServer->clientMove($clientid, $top_cid);
  3. ts3_VirtualServer->execute("setclientchannelgroup", array("cldbid" => $clientdb, "cid" => $top_cid, "cgid" => $grupo_do_ca));


Api ? , ts3admin.class or Teamspeak3.php ?
 
Top