Simple & Clean Channel Creator. [Web]

Discussion in 'Web scripts' started by EscuderoKevin, Jun 29, 2016.

  1. defraqq

    defraqq New Member

    Guys.. I hope its okay to say this in this section... if u want a other PHP Version of this, i can give u these, its from Bluescream, edited: Kelaze, und re-edit from me.
    this is a link to PASTEBIN because my Text is a little bit too mutch for these 1000x here...
    __________________________________________________________________________________________________________________________
    Leute... Ich hoffe es ist inordnung, dass hier in dieser Sektion zu Posten..
    Wenn ihr eine andere Version des "Channel_Create" .php Scripts haben wollt, die MEINER Meinung einfach viel besser funktioniert...
    RELEASE: von Bluescream, edited: Kelaze, und re-edit von mir.
    Dieser Link wird euch direkt auf pastebin leiten, dort habe ich alles "idioten-Sicher" ausgeschrieben....

    Einfach mal in den PASTEBIN LINK reinschauen, ihr werdet es nicht bereuen :p
    __________________________________________________________________________________________________________________________
    PASTEBIN-DL-LINK:
    Virustotal
    because someone is feared to click on my links:
    https://www.virustotal.com/de/url/4...10e722d9d093e15a31ee0f99/analysis/1481235028/
    __________________________________________________________________________________________________________________________
    - šĭɱρlĕ - ĕăšў - ŵĕlčŏɱĕ tŏ tĕăɱšρĕăƙ třŏllž :Э -
    -
    fŏř ɱŏřĕ ɗĕtăĭlš, ĭňfŏřɱătĭŏň ăƅŏŭt tɦĕšĕ ρlŭğĭňš, ŵřĭtĕ ɱĕ ă ρň :э - ğřĕĕtĭňğš ɗĕfřăỡỡ! -
    __________________________________________________________________________________________________________________________
    #UPDATED_08.12.2016-23:16_Berlin_Timezone | @KELAZEDZN&ME
     
    Last edited: Dec 8, 2016
  2. Ruinous

    Ruinous Member

    How t disable spam ??
     
  3. KELAZEDZN

    KELAZEDZN VIP

    You cant disable.. :c
     
  4. Roberto

    Roberto Member

    How can i change the time to Germany i write `Berlin`it doesent work :D
     
  5. Roberto

    Roberto Member

    When i create a channel i get this Message : Error (ID 2560) invalid group ID
    The script create the channel but it dont move me in to the Channel and i dont get Channel Admin
     
  6. Alligatoras

    Alligatoras Super Mod

    Then there is an issue with the code for sure!
    would you like the stuff you have added so we can find the issue?
     
  7. Roberto

    Roberto Member

    Code:
    <?php session_start(); ?>
    <?php
        if(!isset($_SESSION['ts3_last_query']))
        $_SESSION['ts3_last_query'] = microtime(true);
        
        if($_SESSION['ts3_last_query'] >= microtime(true))
        die('You Need Wait 10 Seconds To Create Channel Again / Du musst 10 Sekeunden warten um noch einen Channel erstellen zu können');
        
        $_SESSION['ts3_last_query'] = microtime(true)+10.0;
        
        date_default_timezone_set('Berlin'); //Change Here!
        require_once("libraries/TeamSpeak3/TeamSpeak3.php");
        include 'data/config.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) {
            $clientuid = $client->client_unique_identifier;
            $client_nickname = $client->client_nickname;
            $client_clid = $client->clid;
            $FLAG = true;
            break;
        }
        if (!$FLAG){
            echo "<p><b>".$lang['f_connectts'].".</b></p><br/>";
            header("refresh: 10; url = ./");
            die; 
        }
     
        if (isset($_POST["create"])) {
            
            $channelname = $_POST['channelname'];
            $password = $_POST['password'];
            $unixTime = time();
            $realTime = date('[Y-m-d]-[H:i]',$unixTime);
            $channel_admin_group = 9;
    
            try
            {
                $cid1 = $ts3->channelCreate(array(
                "channel_name" => "$channelname",
                "channel_password" => "$password",
                "channel_flag_permanent" => "1",
                "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Datum: '.$realTime.'[*]Ersteller: ' . $client_nickname . '[/list][/b]',
                "channel_order" => "$order"));
                
                $ts3->clientGetByUid($clientuid)->setChannelGroup($cid1, $channel_admin_group);
                $ts3->clientMove($client_clid, $cid1);
                
            }
            catch(Exception $e)
            {
                echo "Error (ID " . $e->getCode() . ") <b>" . $e->getMessage() . "</b>";
            }
        }
    ?>
    <!DOCTYPE html>
    <html lang="en" class="no-js">
        <head>
            <meta charset="UTF-8" />
            <title>Simple Channel Create</title>
            <link rel="stylesheet" type="text/css" href="css/demo.css" />
            <link rel="stylesheet" type="text/css" href="css/style.css" />
            <link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
        </head>
        <body>
            <div class="container">
                <header>
                    <h1><span> Channel Creator/Ersteller</span></h1>
                </header>
                <section>               
                    <div id="container_demo" >
                        <div id="wrapper">
                            <div id="login" class="animate form">
                                <form  method="post" autocomplete="on">
                                    <h1>Einstellungen/Settings</h1>
                                    <p>
                                        <label  class="uname" data-icon="u" > Hallo, <?php echo $client_nickname; ?></label>
                                        <input  readonly type="text" value="<?php echo $clientuid; ?>"/>
                                    </p>
                                    <p>
                                        <label  class="uname" data-icon="u" > Channel Name </label>
                                        <input  name="channelname" required="required" type="text" placeholder="Mein Eigener Channel."/>
                                    </p>
                                    <p>
                                        <label class="youpasswd" data-icon="p"> Channel Password</label>
                                        <input name="password" required="required" type="text" placeholder="zum Beispiel X8df!90EO" />
                                    </p>
                                    <p class="login button">
                                        <input type="submit" name="create" value="Erstellen!" />
                                    </p>
                                </form>
                                <?php echo $client_clid; ?></br>
                            </div>
                            
                        </div>
                    </div> 
                </section>
            </div>
        </body>
    </html>    
     
  8. defraqq

    defraqq New Member

    $Time_zone:Berlin
     
    Last edited by a moderator: Dec 11, 2016
  9. EscuderoKevin

    EscuderoKevin Active Member

    WTF ITS THIS ? , Pls Mod Move..
     
  10. EscuderoKevin

    EscuderoKevin Active Member

    Add RCaptcha to FORM.
     
  11. 3rKaN_BRATTE

    3rKaN_BRATTE New Member

    Could you make a Anti Spam so if somebody already have a Channel (ore is in a specified channelgroup id, that is gone be added after creating the channel) that he is not possible to creat a another channel. Only if he loses his channel (the specified channelgroup id).

    Would be nice if you could do that!
     
  12. AmellRa89

    AmellRa89 Member

    Error (ID 779) invalid channel order
     
  13. Alligatoras

    Alligatoras Super Mod

    The selected channel has to be a spacer! (not sub-channel or channel)
     
    Nikellas and AmellRa89 like this.
  14. AmellRa89

    AmellRa89 Member

    now???
    Error (ID 2560) invalid group ID
     
  15. Mr_omar

    Mr_omar Contributing Member

    The group id is wrong just correct it
     
    AmellRa89 likes this.
  16. koshei

    koshei New Member

    Can you modify to create channel with 3 subchannels? if yes, please paste code here.
     
  17. DeadSecret

    DeadSecret New Member

    Can some one help me with spam system and a system to create only one channel for one user?
    Because If you change the teamspeak username, you can create one more channel.. .:(
     
  18. Alligatoras

    Alligatoras Super Mod

    This specific stuff you request already exists. search the scripts section and you will find it there.
     
    Nikellas likes this.
  19. Alligatoras

    Alligatoras Super Mod

    you can just set spam protection - after x minutes the user can create a channel again
     
    Nikellas likes this.
  20. DeadSecret

    DeadSecret New Member

    The user should create only one channel.. (Sorry for my very bad english!)..
    But If you change your name in teamspeak, you can create one more channel and thats my problem..
    The next Problem is, after you clicked the submit button, you get no Confirmation message and I dont know how do change the line where the submit button is.
     

Share This Page