Solved Web Channel Creator

Ruinous

Member
Nov 15, 2016
36
1
40
Hey ..

i have proplem


When you started running http://prnt.sc/dh9sd3

this code after edit
PHP:
<?php session_start(); ?>
<?php
    if(!isset($_SESSION['ts3_last_query']))
    $_SESSION['ts3_last_query'] = microtime(true);
    
    if($_SESSION['ts3_last_query'] >= microtime(true))
    die('تم انشاء الروم');
    
    $_SESSION['ts3_last_query'] = microtime(true)+10.0;
    
    date_default_timezone_set('Asia/Riyadh'); //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]-[g:i]',$unixTime);
        $channel_admin_group = 1;

        try
        {
            $cid1 = $ts3->channelCreate(array(
            "channel_name" => "$channelname",
            "channel_password" => "$password",
            "channel_flag_Temporary" => "1",
            "channel_description" => '[center][b][u]'.$channelname.'[/u][/b][/center][hr][b][list][*]Date: '.$realTime.'[*]Owner: ' . $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>انشاء روم خاص بك</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> خاص بك</span></h1>
            </header>
            <section>               
                <div id="container_demo" >
                    <div id="wrapper">
                        <div id="login" class="animate form">
                            <form  method="post" autocomplete="on">
                                <h1>الاعدادات</h1>
                                <p>
                                    <label  class="uname" data-icon="u" > مرحبا, <?php echo $client_nickname; ?></label>
                                    <input  readonly type="text" value="<?php echo $clientuid; ?>"/>
                                </p>
                                <p>
                                    <label  class="uname" data-icon="u" > اسم الروم </label>
                                    <input  name="channelname" required="required" type="text" placeholder="My Super Channel."/>
                                </p>
                                <p>
                                    <label class="youpasswd" data-icon="p"> باسورد الروم</label>
                                    <input name="password" required="required" type="text" placeholder="eg. X8df!90EO" />
                                </p>
                                <p class="login button">
                                    <input type="submit" name="! انشاء" value="! انشاء" />
                                </p>
                            </form>
                            <?php echo $client_clid; ?></br>
                        </div>
                        
                    </div>
                </div> 
            </section>
        </div>
    </body>
</html>

this post web creator channel
 

Alligatoras

Administrator
Mar 31, 2016
2,570
12
2,857
381
So your issue is that the channel you set the code reads it as wrong.
In this specific code the parent channel you set it has to be a spacer.
 
Top