* 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/> */ header("Content-type: text/xml; charset=utf-8"); // Errors destroy the xmlvalidity //error_reporting(0); require_once 'include/app.config.php'; require_once 'autoload.php'; $helpers = new CallAdmin_Helpers(); // Key set and no key given or key is wrong if (!isset($_GET['key']) || !$helpers->keyToServerKeys($access_keys, $_GET['key'])) { $helpers->printXmlError("APP_AUTH_FAILURE", "CallAdmin_Takeover"); } $dbi = new mysqli($host, $username, $password, $database, $dbport); // Oh noes, we couldn't connect if ($dbi->connect_errno != 0) { $helpers->printXmlError("DB_CONNECT_FAILURE", "CallAdmin_Takeover"); } // Set utf-8 encodings $dbi->set_charset("utf8"); // Escape server keys foreach ($access_keys as $key => $value) { if (is_array($value)) { foreach ($value as $serverKey) { $access_keys[$key][$serverKey] = $dbi->escape_string($serverKey); } }
* 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/> */ header("Content-type: text/xml; charset=utf-8"); // Errors destroy the xmlvalidity //error_reporting(0); require_once 'include/app.config.php'; require_once 'autoload.php'; $helpers = new CallAdmin_Helpers(); // Key set and no key given or key is wrong if (!isset($_GET['key']) || !$helpers->keyToServerKeys($access_keys, $_GET['key'])) { $helpers->printXmlError("APP_AUTH_FAILURE", "CallAdmin_Notice"); } $dbi = new mysqli($host, $username, $password, $database, $dbport); // Oh noes, we couldn't connect if ($dbi->connect_errno != 0) { $helpers->printXmlError("DB_CONNECT_FAILURE", "CallAdmin_Notice"); } // Set utf-8 encodings $dbi->set_charset("utf8"); // Escape server keys foreach ($access_keys as $key => $value) { if (is_array($value)) { foreach ($value as $serverKey) { $access_keys[$key][$serverKey] = $dbi->escape_string($serverKey); } }
* 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/> */ header("Content-type: text/xml; charset=utf-8"); // Errors destroy the xmlvalidity //error_reporting(0); require_once "include/app.config.php"; require_once "../include/calladmin_helpers.php"; require_once "include/TeamSpeak3/TeamSpeak3.php"; $helpers = new CallAdmin_Helpers(); // Key set and no key given or key is wrong if (!isset($_GET['key']) || !$helpers->keyToServerKeys($access_keys, $_GET['key'])) { $helpers->printXmlError("APP_AUTH_FAILURE", "CallAdmin_Ts3"); } $ts3 = new TeamSpeak3(); try { $ts3_VirtualServer = TeamSpeak3::factory("serverquery://" . $user . ":" . $password . "@" . $host . ":" . $queryport . "/?server_port=" . $port); $count = 0; $uid = ""; //$name = ""; foreach ($ts3_VirtualServer->clientList() as $ts3_Client) { $uid = (string) $ts3_Client['client_unique_identifier']; //$name = (string)$ts3_Client['client_nickname']; // Is listed as admin, add him to the count if (in_array($uid, $access_keys[$_GET['key']])) { $count++; } }
* 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/> */ header("Content-type: text/xml; charset=utf-8"); // Errors destroy the xmlvalidity //error_reporting(0); require_once 'include/app.config.php'; require_once 'autoload.php'; $helpers = new CallAdmin_Helpers(); // Key set and no key given or key is wrong if (!isset($_GET['key']) || !$helpers->keyToServerKeys($access_keys, $_GET['key'])) { $helpers->printXmlError("APP_AUTH_FAILURE", "CallAdmin_Trackers"); } $dbi = new mysqli($host, $username, $password, $database, $dbport); // Oh noes, we couldn't connect if ($dbi->connect_errno != 0) { $helpers->printXmlError("DB_CONNECT_FAILURE", "CallAdmin_Trackers"); } // Set utf-8 encodings $dbi->set_charset("utf8"); // Escape server keys foreach ($access_keys as $key => $value) { if (is_array($value)) { foreach ($value as $serverKey) { $access_keys[$key][$serverKey] = $dbi->escape_string($serverKey); } }