Panel/modules/teamspeak3/site/createserver.php
copilot-swe-agent[bot] e44519c030
Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-04-23 14:01:37 +00:00

42 lines
No EOL
1.4 KiB
PHP

<?php
/*
*Copyright (C) 2012-2013 Psychokiller
*
*This program is free software; you can redistribute it and/or modify it under the terms of
*the GNU General Public License as published by the Free Software Foundation; either
*version 3 of the License, or any later version.
*
*This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
*without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*See the GNU General Public License for more details.
*
*You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
if(!defined("SECURECHECK")) {die($lang['error_file_alone']);}
if($hoststatus===false) { echo $lang['nohoster']; } else {
include('screate_config.php');
$error = '';
$noerror = '';
if(isset($_POST['createserver']))
{
$token=$ts3->serverCreate($_POST['newsettings']);
if($token['success']===false)
{
for($i=0; $i+1==count((array)$token['errors']); $i++)
{
$error .= $token['errors'][$i]."<br />";
}
}
else
{
$noerror = $lang['serverid'].": ".$token['data']['sid']."<br />".$lang['port'].": ".$token['data']['virtualserver_port']."<br />".$lang['token'].": ".$token['data']['token'];
}
}
$smarty->assign("error", $error);
$smarty->assign("noerror", $noerror);
$smarty->assign("screate_tmp", $screate_tmp);
} ?>