Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- //require_once __DIR__ . "/TeamSpeak3/TeamSpeak3.php";
- try
- {
- $link = mysqli_connect("localhost","flowhost_mar","3181cq61.");
- mysqli_select_db($link,"flowhost_mar") or die ("Ninguna DB seleccionada");
- $qdatos = "SELECT * FROM tsw_config";
- $rdatos = mysqli_query($link,$qdatos) or die(mysql_error());
- while($row = mysqli_fetch_array($rdatos)) {
- $queryda[] = $row;
- }
- $connect = "serverquery://".$queryda['27']['value'].":".$queryda['28']['value']."@".$queryda['24']['value'].":".$queryda['25']['value']."";
- $ts3 = TeamSpeak3::factory($connect);
- $ts3 = $ts3->serverGetByPort($queryda['26']['value']);
- $ts3->execute("clientupdate", array("client_nickname" => $queryda['14']['value']));
- $unixTime = time();
- $realTime = date('[d-m-Y] [H:i]',$unixTime);
- }
- catch(Exception $e) {
- echo "Failed Connect To Server";
- die();
- }
- if (isset($_POST["crearcanal"])){
- $nombre = $_POST['nombrecanal'];
- $password = $_POST['contraseña'];
- $orden = $_POST['seccion'];
- $unixTime = time();
- $realTime = date('[Y-m-d]-[H:i]',$unixTime);
- $channel_admin_group = 13;
- $clib = $usuario['clid'];
- try{
- $cid1 = $ts3->channelCreate(array(
- "channel_name" => '['.$nombrecanaln.'] '.$nombre.'',
- "channel_password" => "$password",
- "channel_flag_permanent" => "1",
- "channel_description" => '[center][b][u]'.$nombre.'[/u][/b][/center][hr][b][list][*]Fecha: '.$realTime.'[*]Dueño: [URL=client://' . $clib . '/' . $clientuid . ']' . $usuario . '[/URL][/list][/b]',
- "channel_order" => $resultadoapertura));
- $spacerbot = $ts3->channelCreate(array(
- "channel_name" => '[spacer*'.$random.']',
- "channel_password" => "$random",
- "channel_flag_permanent" => "1",
- "channel_order" => $cid1));
- }
- catch(Exception $e) {
- echo "[DEBUG] Ha ocurrido un error inesperado <br>";
- echo "[DEBUG] Mensaje de error DEBUG: ".$e->getMessage()."<br>";
- echo "[DEBUG] El codigo de error fue ".$e->getCode()."<br>";
- }
- $ts3->clientGetByUid($clientuid)->setChannelGroup($cid1, $channel_admin_group);
- $ts3->clientMove($clib, $cid1);
- $mensajito = $ts3->clientGetByUid($clientuid);
- $mensajito->message("[B]Hola, [COLOR=#ff0000]".$usuario."[/COLOR]. Gracias por Utilizar nuestro sistema fuiste movido a tu canal.");
- echo "<script language='javascript'>window.location='createchannel.php?created'</script>;";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement