Hello everybody,
I'm trying for days a user field to build that allows my users to register profile about her and entering the UID you in the added in the respective group are somehow get I do not really go anywhere I'll probably a little mistake.
It may of course be that my plan also does not work like I want it for my TeamSpeak runs on standard SQLite and the transmitted query to be given is mysql.
Now the answers come then make your TeamSpeak but on MariaDB no I would not.
We come just once to the code you'll see that perhaps more than I:
Config:
Code:
require_once('ts3framework/libraries/TeamSpeak3/TeamSpeak3.php');
include LOCALE.LOCALESET."English/user_fields/user_ts3register.php";
// teamspeak3 connection stuff
$server = array(
"tsip" => "xxx.xxx.xxx.xxx",
"tsport" => "xxx",
"ts_query_admin" => "xxx",
"ts_query_password" => "xxx",
"ts_query_port" => "xxx",
"ts_query_user_nick" => "Register Bot"
);
try {
TeamSpeak3::init();
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://".$server["ts_query_admin"].":".$server["ts_query_password"]."@".$server["tsip"].":".$server["ts_query_port"]."/?server_port=".$server["tsport"]."&nickname=".$server["ts_query_user_nick"]."");
foreach($ts3_VirtualServer->clientListDb() as $ts3_Client)
{
if($ts3_Client["client_unique_identifier"] == "".$data['user_ts3register']."")
{
try {
$ts3_VirtualServer->serverGroupClientAdd(162, $ts3_Client["cldbid"]);
echo "".$userdata['user_name']." ".$locale['uf_ts3register003']."";
}
catch( Exception $e)
{
echo "".$locale['uf_ts3register004']." ".$userdata['user_name']." ".$locale['uf_ts3register005']."<br/>".$locale['uf_ts3register006']." <b>". $e->getCode() ."</b>; ".$locale['uf_ts3register007']." <b>". $e->getMessage() ."</b>;";
}
}
}
} catch(Exception $e) {
echo "".$locale['uf_ts3register008']."<br/>".$locale['uf_ts3register006']." <b>". $e->getCode() ."</b>; ".$locale['uf_ts3register007']." <b>". $e->getMessage() ."</b>;";
}
Profilfield:
Code:
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once BASEDIR."ts3framework/ts3_register_config.php";
if ($profile_method == "input") {
// Create the input field for registration and edit profile
echo "<tr>\n";
echo "<td class='tbl'>".$locale['uf_ts3register']."</td>\n";
echo "<td class='tbl'><input type='text' name='user_ts3register' value='".(isset($user_data['user_ts3register']) ? $user_data['user_ts3register'] : "")."' maxlength='250' class='textbox' placeholder='deiKAkJedikOhEpPN1/bdtYBrM4=' style='width:200px;' /></td>\n";
echo "</tr>\n";
} elseif ($profile_method == "display") {
// Create the display for the user profile
if ($user_data['user_ts3register']) {
echo "<tr>\n";
echo "<td class='tbl1' colspan='2'>".$locale['uf_ts3register001']."</td>\n";
} else {
echo "<td class='tbl1' colspan='2'>".$locale['uf_ts3register002']."</td>\n";
}
// Insert and update
} elseif ($profile_method == "validate_insert" || $profile_method == "validate_update") {
// Get input data
if (isset($_POST['user_ts3register']) && ($_POST['user_ts3register'] != "" || $this->_isNotRequired("user_ts3register"))) {
// Set update or insert user data
$this->_setDBValue("user_ts3register", stripinput($_POST['user_ts3register']));
} else {
$this->_setError("user_ts3register", $locale['uf_ts3register_error2']);
}
} else {
$this->_setError("user_ts3register", $locale['uf_ts3register_error'], true);
}
Greeting Pairin