diff --git a/.gitignore b/.gitignore index a9b723e0..7f9e085e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ - .project +stuff/config.php +stuff/keyphrasefile.php \ No newline at end of file diff --git a/install/install.php b/install/install.php index 2e708c1d..0fe361f0 100644 --- a/install/install.php +++ b/install/install.php @@ -85,13 +85,13 @@ if ($currentStep == 0) {
- +
@@ -100,10 +100,10 @@ if ($currentStep == 0) { "; if (!$json or ($developer == 'N' and !is_object($json)) or ($developer == 'Y' and !is_array($json)) or ($developer == 'N' and property_exists($json, 'tag_name') and $easyWiVersion == $json->tag_name) or ($developer == 'Y' and is_object($json[0]) and property_exists($json[0], 'name') and $easyWiVersion == $json[0]->name )) { - $displayToUser .= "

{$languageObject->welcome_header}

{$languageObject->welcome_text}

"; + $displayToUser .= "

{$languageObject->welcome_header}

{$languageObject->welcome_text}

"; } else { $apiVersion = ($developer == 'Y') ? $json[0]->name : $json->tag_name; - $displayToUser .= "
{$languageObject->welcome_old_version}{$apiVersion}

{$languageObject->welcome_header}

{$languageObject->welcome_text}

"; + $displayToUser .= "
{$languageObject->welcome_old_version}{$apiVersion}

{$languageObject->welcome_header}

{$languageObject->welcome_text}

"; } } else { @@ -171,19 +171,19 @@ if ($currentStep == 0) { ); foreach ($folderArray as $folder) { - if (is_dir(EASYWIDIR . "/${folder}")) { - $handle = @fopen(EASYWIDIR . "/${folder}test.txt", "w+"); + if (is_dir(EASYWIDIR . "/{$folder}")) { + $handle = @fopen(EASYWIDIR . "/{$folder}test.txt", "w+"); if ($handle) { fclose($handle); - unlink(EASYWIDIR . "/${folder}test.txt"); - $systemCheckOk['folders'][] = "{$languageObject->system_check_ok_folder_1} ${folder} {$languageObject->system_check_ok_folder_2}"; + unlink(EASYWIDIR . "/{$folder}test.txt"); + $systemCheckOk['folders'][] = "{$languageObject->system_check_ok_folder_1} {$folder} {$languageObject->system_check_ok_folder_2}"; } else { - $systemCheckError['folders'][] = "{$languageObject->system_check_error_folder_not_writable_1} ${folder} {$languageObject->system_check_error_folder_not_writable_2}"; + $systemCheckError['folders'][] = "{$languageObject->system_check_error_folder_not_writable_1} {$folder} {$languageObject->system_check_error_folder_not_writable_2}"; } } else { - $systemCheckError['folders'][] = "{$languageObject->system_check_error_folder_not_exist_1} ${folder} {$languageObject->system_check_error_folder_not_exist_2}"; + $systemCheckError['folders'][] = "{$languageObject->system_check_error_folder_not_exist_1} {$folder} {$languageObject->system_check_error_folder_not_exist_2}"; } } @@ -192,31 +192,31 @@ if ($currentStep == 0) { if ($currentStep == 1) { if (count($systemCheckError) == 0) { - $displayToUser .= ""; + $displayToUser .= ""; } foreach ($systemCheckError as $v) { if (is_array($v)) { foreach ($v as $v2) { - $displayToUser .= "
${v2}
"; + $displayToUser .= "
{$v2}
"; } } else { - $displayToUser .= "
${v}
"; + $displayToUser .= "
{$v}
"; } } foreach ($systemCheckOk as $v) { if (is_array($v)) { foreach ($v as $v2) { - $displayToUser .= "
${v2}
"; + $displayToUser .= "
{$v2}
"; } } else { - $displayToUser .= "
${v}
"; + $displayToUser .= "
{$v}
"; } } if (count($systemCheckError) == 0) { - $displayToUser .= ""; + $displayToUser .= ""; } } @@ -237,35 +237,35 @@ if ($currentStep == 2 and count($systemCheckError) == 0) { } $displayToUser = " - +
- +
- +
- +
- +
- +

{$languageObject->aeskey2}

{$languageObject->aeskey3}

@@ -284,7 +284,7 @@ if ($currentStep == 2 and count($systemCheckError) == 0) { try { - $sql = new PDO("mysql:host=${_POST['host']};dbname=${_POST['db']}", $_POST['user'], $_POST['pwd'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); + $sql = new PDO("mysql:host={$_POST['host']};dbname={$_POST['db']}", $_POST['user'], $_POST['pwd'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $configFp = @fopen(EASYWIDIR . '/stuff/config.php', "w+"); @@ -356,7 +356,7 @@ $aeskey = "' . addcslashes($_POST['aeskey'], "'") . '"; try { - $sql = new PDO("mysql:host=${host};dbname=${db}", $user, $pwd, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); + $sql = new PDO("mysql:host={$host};dbname={$db}", $user, $pwd, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $error) { @@ -383,7 +383,7 @@ $aeskey = "' . addcslashes($_POST['aeskey'], "'") . '"; if ($currentStep == 3 and count($systemCheckError) == 0) { $displayToUser .= "
{$languageObject->ok_files_created}
"; $displayToUser .= "
{$languageObject->ok_db_connect}
"; - $displayToUser .= ""; + $displayToUser .= ""; } if ($currentStep == 4 and count($systemCheckError) == 0) { @@ -412,7 +412,7 @@ if ($currentStep == 4 and count($systemCheckError) == 0) { $displayToUser .= "
{$languageObject->ok_db_tables_create}
"; } - $displayToUser .= ""; + $displayToUser .= ""; } catch(PDOException $error) { $systemCheckError['tables_add.php'] = "
{$error->getMessage()}" . implode("\r\n", $tables->getExecutedSql()) . "
"; @@ -451,7 +451,7 @@ if ($currentStep == 5 and count($systemCheckError) == 0) { $displayToUser .= "
{$languageObject->ok_db_tables_check}
"; } - $displayToUser .= ""; + $displayToUser .= ""; } @@ -501,17 +501,17 @@ if ($currentStep == 6 and count($systemCheckError) == 0) { if (!isset($_POST['passw1']) or strlen($displayToUser) > 0) { $displayToUser .= " - +
- +
- +
@@ -552,7 +552,7 @@ if ($currentStep == 6 and count($systemCheckError) == 0) { $query->execute(); $displayToUser .= "
{$languageObject->ok_admin_user}
"; - $displayToUser .= ""; + $displayToUser .= ""; } catch(PDOException $error) { @@ -634,7 +634,7 @@ if ($currentStep == 7 and count($systemCheckError) == 0) { $dirs = scandir(EASYWIDIR . "/languages/default/"); foreach ($dirs as $row) { if (preg_match("/^[a-z]{2}+$/", $row)) { - $languages[] = ($row == $menuLanguage) ? "" : ""; + $languages[] = ($row == $menuLanguage) ? "" : ""; } } } @@ -644,11 +644,11 @@ if ($currentStep == 7 and count($systemCheckError) == 0) { if (!isset($_POST['email']) or strlen($displayToUser) > 0) { $displayToUser .= " - +
- +
@@ -667,19 +667,19 @@ if ($currentStep == 7 and count($systemCheckError) == 0) {
- +
- +
- +

{$languageObject->email2}

@@ -688,7 +688,7 @@ if ($currentStep == 7 and count($systemCheckError) == 0) {

{$languageObject->captcha_2}

@@ -696,14 +696,14 @@ if ($currentStep == 7 and count($systemCheckError) == 0) {
- +

{$languageObject->faillogins2}

- +

{$languageObject->brandname2}

@@ -712,14 +712,14 @@ if ($currentStep == 7 and count($systemCheckError) == 0) {
- +

{$languageObject->prefix2}

@@ -756,7 +756,7 @@ if ($currentStep == 7 and count($systemCheckError) == 0) { $query = $sql->prepare("INSERT INTO `traffic_settings` (`id`,`type`) VALUES (1,'mysql') ON DUPLICATE KEY UPDATE `type`=`type`"); $query->execute(); - $query = $sql->prepare("INSERT INTO `easywi_version` (`id`,`version`,`de`,`en`) VALUES (1,'${easyWiVersion}','','') ON DUPLICATE KEY UPDATE `id`=`id`"); + $query = $sql->prepare("INSERT INTO `easywi_version` (`id`,`version`,`de`,`en`) VALUES (1,'{$easyWiVersion}','','') ON DUPLICATE KEY UPDATE `id`=`id`"); $query->execute(); $query = $sql->prepare("INSERT INTO `page_pages` (`id`,`authorid`,`type`) VALUES (1,0,'about') ON DUPLICATE KEY UPDATE `id`=`id`"); @@ -809,7 +809,7 @@ if ($currentStep == 7 and count($systemCheckError) == 0) { } $displayToUser .= "
{$languageObject->ok_configuration}
"; - $displayToUser .= ""; + $displayToUser .= ""; } catch(PDOException $error) { @@ -825,7 +825,7 @@ if ($currentStep == 8 and count($systemCheckError) == 0) { $displayToUser .= "
{$languageObject->games_insert}
"; $displayToUser .= " - +
@@ -840,7 +840,7 @@ if ($currentStep == 8 and count($systemCheckError) == 0) { include(EASYWIDIR . '/stuff/data/gameslist.php'); - $displayToUser .= ""; + $displayToUser .= ""; $displayToUser .= "
{$languageObject->ok_gameserver_data}
"; $query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `servertypes` WHERE `shorten`=? AND `resellerid`=0 LIMIT 1"); @@ -866,7 +866,7 @@ if ($currentStep == 8 and count($systemCheckError) == 0) { } } else { - $displayToUser .= "
{$languageObject->error_game_insert} " . count($image) . " ${image[':description']}
"; + $displayToUser .= "
{$languageObject->error_game_insert} " . count($image) . " {$image[':description']}
"; } } @@ -915,7 +915,7 @@ if ($currentStep == 8 and count($systemCheckError) == 0) { } } - $displayToUser .= ""; + $displayToUser .= ""; } catch(PDOException $error) { @@ -978,11 +978,11 @@ if ($currentStep == 9 and count($systemCheckError) == 0) { $displayToUser .= "

{$languageObject->cron_internal} (/etc/crontab)

{$languageObject->cron_internal_text}
-0 */1 * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 300 php ./reboot.php >/dev/null 2>&1
-*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./statuscheck.php >/dev/null 2>&1
-*/1 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./startupdates.php >/dev/null 2>&1
-*/5 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./jobs.php >/dev/null 2>&1
-*/10 * * * * ${displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./cloud.php >/dev/null 2>&1
"; +0 */1 * * * {$displayPHPUser} cd " . EASYWIDIR . " && timeout 300 php ./reboot.php >/dev/null 2>&1
+*/5 * * * * {$displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./statuscheck.php >/dev/null 2>&1
+*/1 * * * * {$displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./startupdates.php >/dev/null 2>&1
+*/5 * * * * {$displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./jobs.php >/dev/null 2>&1
+*/10 * * * * {$displayPHPUser} cd " . EASYWIDIR . " && timeout 290 php ./cloud.php >/dev/null 2>&1
"; $displayToUser .= "

{$languageObject->cron_internal} (crontab -e)

{$languageObject->cron_internal_text}
@@ -998,19 +998,19 @@ if ($currentStep == 9 and count($systemCheckError) == 0) { $displayToUser .= "

{$languageObject->cron_external} (/etc/crontab)

{$languageObject->cron_external_text}
-0 */1 * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}reboot.php >/dev/null 2>&1
-*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}statuscheck.php >/dev/null 2>&1
-*/1 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}startupdates.php >/dev/null 2>&1
-*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}jobs.php >/dev/null 2>&1
-*/10 * * * * ExternalSSH2User wget -q --no-check-certificate -O - ${pageUrl}cloud.php >/dev/null 2>&1
"; +0 */1 * * * ExternalSSH2User wget -q --no-check-certificate -O - {$pageUrl}reboot.php >/dev/null 2>&1
+*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - {$pageUrl}statuscheck.php >/dev/null 2>&1
+*/1 * * * * ExternalSSH2User wget -q --no-check-certificate -O - {$pageUrl}startupdates.php >/dev/null 2>&1
+*/5 * * * * ExternalSSH2User wget -q --no-check-certificate -O - {$pageUrl}jobs.php >/dev/null 2>&1
+*/10 * * * * ExternalSSH2User wget -q --no-check-certificate -O - {$pageUrl}cloud.php >/dev/null 2>&1
"; $displayToUser .= "

{$languageObject->cron_external} (crontab -e)

{$languageObject->cron_external_text}
-0 */1 * * * wget -q --no-check-certificate -O - ${pageUrl}reboot.php >/dev/null 2>&1
-*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}statuscheck.php >/dev/null 2>&1
-*/1 * * * * wget -q --no-check-certificate -O - ${pageUrl}startupdates.php >/dev/null 2>&1
-*/5 * * * * wget -q --no-check-certificate -O - ${pageUrl}jobs.php >/dev/null 2>&1
-*/10 * * * * wget -q --no-check-certificate -O - ${pageUrl}cloud.php >/dev/null 2>&1
"; +0 */1 * * * wget -q --no-check-certificate -O - {$pageUrl}reboot.php >/dev/null 2>&1
+*/5 * * * * wget -q --no-check-certificate -O - {$pageUrl}statuscheck.php >/dev/null 2>&1
+*/1 * * * * wget -q --no-check-certificate -O - {$pageUrl}startupdates.php >/dev/null 2>&1
+*/5 * * * * wget -q --no-check-certificate -O - {$pageUrl}jobs.php >/dev/null 2>&1
+*/10 * * * * wget -q --no-check-certificate -O - {$pageUrl}cloud.php >/dev/null 2>&1
"; } @@ -1018,10 +1018,10 @@ if (strlen($displayToUser) == 0 and count($systemCheckError) > 0) { foreach ($systemCheckError as $v) { if (is_array($v)) { foreach ($v as $v2) { - $displayToUser .= "
${v2}
"; + $displayToUser .= "
{$v2}
"; } } else { - $displayToUser .= "
${v}
"; + $displayToUser .= "
{$v}
"; } } } diff --git a/reboot.php b/reboot.php index 9c083390..ac182c03 100644 --- a/reboot.php +++ b/reboot.php @@ -347,7 +347,7 @@ if (true or !isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_ar } } else if ($autorestart == 'Y') { - print "

Do not restart TS3/TSDNS ${queryip} since failcount is only ${ts3masternotified} and ${down_checks} is required for restart \r\n"; + print "

Do not restart TS3/TSDNS {$queryip} since failcount is only {$ts3masternotified} and {$down_checks} is required for restart \r\n"; } } diff --git a/startupdates.php b/startupdates.php index d868ad97..49c72e48 100644 --- a/startupdates.php +++ b/startupdates.php @@ -80,7 +80,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, $currentHour = date('G'); $currentMinute = (int) date('i'); - echo "Start Syncs and Updates. Hour is ${currentHour} and minute is ${currentMinute}\r\n"; + echo "Start Syncs and Updates. Hour is {$currentHour} and minute is {$currentMinute}\r\n"; if ($allRoots) { @@ -98,13 +98,13 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, $query = $sql->prepare("UPDATE `settings` SET `lastUpdateRun`=? WHERE `resellerid`=0 LIMIT 1"); $query->execute(array($currentMinute)); - echo "Checking for servers to be updated and or synced at hour ${currentHour} and between minutes ${lastUpdateRun} and ${currentMinute}\r\n"; + echo "Checking for servers to be updated and or synced at hour {$currentHour} and between minutes {$lastUpdateRun} and {$currentMinute}\r\n"; // avoid less/more OR equal in SQL. We want only less/more to eliminate the OR comparison $currentMinute++; $lastUpdateRun--; - echo "Altered minutes for running a more efficient query will be updateMinute > ${lastUpdateRun} AND updateMinute < ${currentMinute}\r\n"; + echo "Altered minutes for running a more efficient query will be updateMinute > {$lastUpdateRun} AND updateMinute < {$currentMinute}\r\n"; $query = $sql->prepare("SELECT `id`,`updates` FROM `rserverdata` WHERE (`alreadyStartedAt` IS NULL OR `alreadyStartedAt`!=?) AND `updateMinute`>? AND `updateMinute`execute(array($currentHour, $lastUpdateRun, $currentMinute)); diff --git a/statuscheck.php b/statuscheck.php index 32e253ae..f4d5c502 100644 --- a/statuscheck.php +++ b/statuscheck.php @@ -721,7 +721,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, } else { - print "TSDNS ${row['ssh2ip']} is up and running\r\n"; + print "TSDNS {$row['ssh2ip']} is up and running\r\n"; $query3 = $sql->prepare("UPDATE `voice_tsdns` SET `notified`=0 WHERE `id`=? LIMIT 1"); $query3->execute(array($row['id'])); @@ -1117,7 +1117,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, if (isset($ts3id, $lendserver) and (($lendserver == 'N' and $slots < $server['virtualserver_maxclients']) or ($lendserver == 'Y' and $lendslots < $server['virtualserver_maxclients']))) { $showSlots = ($lendserver == 'Y') ? $lendslots : $slots; - print $vrow['type'] . " server $address virtualserver_maxclients ${sd['virtualserver_maxclients']}!= " . $showSlots . ". The name converted to ISO-8859-1 is " . iconv('UTF-8','ISO-8859-1//TRANSLIT', $server['virtualserver_name']) . "\r\n"; + print $vrow['type'] . " server $address virtualserver_maxclients {$sd['virtualserver_maxclients']}!= " . $showSlots . ". The name converted to ISO-8859-1 is " . iconv('UTF-8','ISO-8859-1//TRANSLIT', $server['virtualserver_name']) . "\r\n"; if (isset($rulebreak)) { $rulebreak .= '
virtualserver_maxclients ' . $vosprache->isnot . ' ' . $showSlots; @@ -1140,7 +1140,7 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, if (isset($changeSlots)) { - print $vrow['type'] . " server $address Changing Flex Slots to ${changeSlots}. The name converted to ISO-8859-1 is " . iconv('UTF-8','ISO-8859-1//TRANSLIT', $server['virtualserver_name']) . "\r\n"; + print $vrow['type'] . " server $address Changing Flex Slots to {$changeSlots}. The name converted to ISO-8859-1 is " . iconv('UTF-8','ISO-8859-1//TRANSLIT', $server['virtualserver_name']) . "\r\n"; $connection->ImportModServer($virtualserver_id, $changeSlots, $vrow2['ip'], $vrow2['port'], array()); diff --git a/stuff/admin/addons.php b/stuff/admin/addons.php index a78b9958..e8c0c45e 100644 --- a/stuff/admin/addons.php +++ b/stuff/admin/addons.php @@ -90,7 +90,7 @@ if ($ui->w('action',4, 'post') and !token(true)) { if (isset($addon)) { header("Cache-Control: public"); header("Content-Description: File Transfer"); - header("Content-Disposition: attachment; filename = ${addon}.xml"); + header("Content-Disposition: attachment; filename = {$addon}.xml"); header("Content-Type: text/xml; charset=UTF-8"); header("Content-Transfer-Encoding: binary"); $xml->formatOutput = true; diff --git a/stuff/admin/images.php b/stuff/admin/images.php index b5f201cb..37b8032a 100644 --- a/stuff/admin/images.php +++ b/stuff/admin/images.php @@ -43,7 +43,6 @@ if ((!isset($admin_id) or $main != 1) or (isset($admin_id) and !$pa['gimages'])) include(EASYWIDIR . '/stuff/keyphrasefile.php'); include(EASYWIDIR . '/third_party/gameq/GameQ/Autoloader.php'); -include(EASYWIDIR . '/third_party/gameq_v2/GameQ.php'); include(EASYWIDIR . '/stuff/methods/functions_gs.php'); $sprache = getlanguagefile('images', $user_language, $resellerLockupID); @@ -94,7 +93,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { header("Cache-Control: public"); header("Content-Description: File Transfer"); - header("Content-Disposition: attachment; filename = ${shorten}.xml"); + header("Content-Disposition: attachment; filename = {$shorten}.xml"); header("Content-Type: text/xml; charset=UTF-8"); header("Content-Transfer-Encoding: binary"); diff --git a/stuff/admin/lendserver.php b/stuff/admin/lendserver.php index 305e423d..afc89fc6 100644 --- a/stuff/admin/lendserver.php +++ b/stuff/admin/lendserver.php @@ -62,15 +62,14 @@ if ($reseller_id == 0) { if ($ui->w('action', 4, 'post') and !token(true)) { $template_file = $spracheResponse->token; -} else if ($ui->st('d', 'get')=="se" and $pa['lendserverSettings']) { +} else if ($ui->st('d', 'get') == "se" and $pa['lendserverSettings']) { if ($ui->w('activeGS', 1, 'post') or $ui->w('activeVS', 1, 'post')) { $query = $sql->prepare("UPDATE `lendsettings` SET `activeGS`=?,`activeVS`=?,`mintime`=?,`maxtime`=?,`timesteps`=?,`minplayer`=?,`maxplayer`=?,`playersteps`=?,`mintimeRegistered`=?,`maxtimeRegistered`=?,`timestepsRegistered`=?,`minplayerRegistered`=?,`maxplayerRegistered`=?,`playerstepsRegistered`=?,`vomintime`=?,`vomaxtime`=?,`votimesteps`=?,`vominplayer`=?,`vomaxplayer`=?,`voplayersteps`=?,`vomintimeRegistered`=?,`vomaxtimeRegistered`=?,`votimestepsRegistered`=?,`vominplayerRegistered`=?,`vomaxplayerRegistered`=?,`voplayerstepsRegistered`=?,`shutdownempty`=?,`shutdownemptytime`=?,`ftpupload`=?,`ftpuploadpath`=AES_ENCRYPT(?,?),`lendaccess`=? WHERE `resellerid`=? LIMIT 1"); - $query->execute(array($ui->w('activeGS', 1, 'post'), $ui->w('activeVS', 1, 'post'), $ui->id('mintime',3, 'post'), $ui->id('maxtime',4, 'post'), $ui->id('timesteps',3, 'post'), $ui->id('minplayer',3, 'post'), $maxplayer = $ui->id('maxplayer',3, 'post'), $ui->id('playersteps',3, 'post'), $ui->id('mintimeRegistered',3, 'post'), $ui->id('maxtimeRegistered',4, 'post'), $ui->id('timestepsRegistered',3, 'post'), $ui->id('minplayerRegistered',3, 'post'), $ui->id('maxplayerRegistered',3, 'post'), $ui->id('playerstepsRegistered',3, 'post'), $vomintime = $ui->id('vomintime',3, 'post'), $ui->id('vomaxtime',4, 'post'), $ui->id('votimesteps',3, 'post'), $ui->id('vominplayer',3, 'post'), $ui->id('vomaxplayer',3, 'post'), $ui->id('voplayersteps',3, 'post'), $ui->id('vomintimeRegistered',3, 'post'), $ui->id('vomaxtimeRegistered',4, 'post'), $ui->id('votimestepsRegistered',3, 'post'), $ui->id('vominplayerRegistered',3, 'post'), $ui->id('vomaxplayerRegistered',3, 'post'), $ui->id('voplayerstepsRegistered',3, 'post'), $ui->active('shutdownempty', 'post'), $ui->id('shutdownemptytime',4, 'post'), $ui->w('ftpupload',1, 'post'), $ui->url('ftpuploadpath', 'post'), $aeskey, $ui->id('lendaccess',1, 'post'), $resellerLockupID)); + $query->execute(array($ui->w('activeGS', 1, 'post'), $ui->w('activeVS', 1, 'post'), $ui->id('mintime', 3, 'post'), $ui->id('maxtime', 4, 'post'), $ui->id('timesteps', 3, 'post'), $ui->id('minplayer', 3, 'post'), $maxplayer = $ui->id('maxplayer', 3, 'post'), $ui->id('playersteps', 3, 'post'), $ui->id('mintimeRegistered', 3, 'post'), $ui->id('maxtimeRegistered', 4, 'post'), $ui->id('timestepsRegistered', 3, 'post'), $ui->id('minplayerRegistered', 3, 'post'), $ui->id('maxplayerRegistered', 3, 'post'), $ui->id('playerstepsRegistered', 3, 'post'), $vomintime = $ui->id('vomintime', 3, 'post'), $ui->id('vomaxtime', 4, 'post'), $ui->id('votimesteps', 3, 'post'), $ui->id('vominplayer', 3, 'post'), $ui->id('vomaxplayer', 3, 'post'), $ui->id('voplayersteps', 3, 'post'), $ui->id('vomintimeRegistered', 3, 'post'), $ui->id('vomaxtimeRegistered', 4, 'post'), $ui->id('votimestepsRegistered', 3, 'post'), $ui->id('vominplayerRegistered', 3, 'post'), $ui->id('vomaxplayerRegistered', 3, 'post'), $ui->id('voplayerstepsRegistered', 3, 'post'), $ui->active('shutdownempty', 'post'), $ui->id('shutdownemptytime', 4, 'post'), $ui->w('ftpupload', 1, 'post'), $ui->url('ftpuploadpath', 'post'), $aeskey, $ui->id('lendaccess', 1, 'post'), $resellerLockupID)); $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_add : $spracheResponse->error_table;; - } else { $query = $sql->prepare("SELECT *,AES_DECRYPT(`ftpuploadpath`,?) AS `decyptedftpuploadpath` FROM `lendsettings` WHERE `resellerid`=? LIMIT 1"); @@ -111,7 +110,6 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $template_file = 'admin_lendserver_settings.tpl'; } - } else if ($ui->st('d', 'get') == 'st' and $pa['lendserver']) { $statistic = array(); @@ -132,20 +130,19 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $statistic[$row['lenddate']][$shorten] = 1; } } - foreach ($statistic as $key=>$value) { - foreach ($value as $key2=>$value2) { - $stats .="$key: $value2 ($key2)
"; + foreach ($statistic as $key => $value) { + foreach ($value as $key2 => $value2) { + $stats .= "$key: $value2 ($key2)
"; } } $template_file = $stats; - } else if ($pa['lendserver']) { if ($ui->id('id', 19, 'post')) { $query = $sql->prepare("SELECT `serverid`,`servertype` FROM `lendedserver` WHERE `id`=? AND `resellerid`=? LIMIT 1"); - $query->execute(array($ui->id('id',19, 'post'), $resellerLockupID)); + $query->execute(array($ui->id('id', 19, 'post'), $resellerLockupID)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $id = $row['serverid']; $servertype = $row['servertype']; @@ -161,7 +158,6 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $appServer->stopApp(); $appServer->execute(); } - } else if (isset($servertype) and $servertype == 'v') { $query = $sql->prepare("SELECT v.`localserverid`,m.`ssh2ip`,m.`rootid`,m.`addedby`,m.`queryport`,AES_DECRYPT(m.`querypassword`,?) AS `decryptedquerypassword` FROM `voice_server` v LEFT JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`id`=? AND v.`resellerid`=? LIMIT 1"); @@ -181,9 +177,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $queryip = $query2->fetchColumn(); } - $connection = new TS3($queryip, $queryport,'serveradmin', $querypassword); + $connection = new TS3($queryip, $queryport, 'serveradmin', $querypassword); $errorcode = $connection->errorcode; - if (strpos($errorcode,'error id=0') !== false) { + if (strpos($errorcode, 'error id=0') !== false) { $connection->StopServer($localserverid); } @@ -191,10 +187,9 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } } $query = $sql->prepare("DELETE FROM `lendedserver` WHERE `id`=? AND `resellerid`=? LIMIT 1"); - $query->execute(array($ui->id('id',19, 'post'), $resellerLockupID)); + $query->execute(array($ui->id('id', 19, 'post'), $resellerLockupID)); $template_file = ($query->rowCount() > 0) ? $spracheResponse->table_del : $spracheResponse->error_table; - } else { $htmlExtraInformation['css'][] = ''; @@ -248,7 +243,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $slots = $row3['slots']; $timeleft = round($row3['lendtime'] - (strtotime($row3['now']) - strtotime($row3['started'])) / 60); - $time = ($timeleft <= 0) ? 0 : $timeleft . '/'. $row3['lendtime']; + $time = ($timeleft <= 0) ? 0 : $timeleft . '/' . $row3['lendtime']; if ($time == 0 or ($shutDownEmpty == 'Y' and ($row3['lendtime'] - $timeleft) > $shutDownEmptyTime and $row['queryNumplayers'] < 1)) { @@ -268,16 +263,31 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } } - $lendGameServers[] = array('id' => $lendID, 'password' => $password, 'rcon' => $rcon, 'ip' => $row['serverip'], 'port' => (int) $row['port'], 'queryName' => htmlentities($row['queryName'], ENT_QUOTES, 'UTF-8'), 'queryMap' => htmlentities($row['queryMap'], ENT_QUOTES, 'UTF-8'), 'runningGame' => $runningGame, 'games' => $installedShorten, 'slots' => (int) $slots,'usedslots' => (int) $row['queryNumplayers'], 'timeleft' => $time); + $lendGameServers[] = array('id' => $lendID, 'password' => $password, 'rcon' => $rcon, 'ip' => $row['serverip'], 'port' => (int) $row['port'], 'queryName' => htmlentities($row['queryName'], ENT_QUOTES, 'UTF-8'), 'queryMap' => htmlentities($row['queryMap'], ENT_QUOTES, 'UTF-8'), 'runningGame' => $runningGame, 'games' => $installedShorten, 'slots' => (int) $slots, 'usedslots' => (int) $row['queryNumplayers'], 'timeleft' => $time); } if (!isset($nextfree)) { $nextfree = 0; } - $query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`queryName`,v.`dns`,v.`usedslots`,v.`slots` AS `availableSlots`,l.`password`,l.`slots`,l.`started`,l.`lendtime`,CURRENT_TIMESTAMP AS `now`,l.`id` AS `lend_id` FROM `voice_server` v LEFT JOIN `lendedserver` l ON v.`id`=l.`serverid` AND l.`servertype`='v' WHERE v.`lendserver`='Y' AND v.`active`='Y' AND v.`resellerid`=0"); - $query2 = $sql->prepare("SELECT v.`localserverid`,m.`ssh2ip`,m.`rootid`,m.`addedby`,m.`queryport`,AES_DECRYPT(m.`querypassword`,?) AS `decryptedquerypassword` FROM `voice_server` v LEFT JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`id`=? AND v.`resellerid`=? LIMIT 1"); + $encryptionKey = ''; + $serverId = ''; + $resellerId = ''; + + $query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`queryName`,v.`dns`,v.`usedslots`,v.`slots` AS `availableSlots`,l.`password`,l.`slots`,l.`started`,l.`lendtime`,CURRENT_TIMESTAMP AS `now`,l.`id` AS `lend_id` + FROM `voice_server` v + LEFT JOIN `lendedserver` l ON v.`id`=l.`serverid` AND l.`servertype`='v' + WHERE v.`lendserver`='Y' AND v.`active`='Y' AND v.`resellerid`=? + "); $query->execute(array($resellerLockupID)); + + $query2 = $sql->prepare("SELECT v.`localserverid`,m.`ssh2ip`,m.`rootid`,m.`addedby`,m.`queryport`,AES_DECRYPT(m.`querypassword`,?) AS `decryptedquerypassword` + FROM `voice_server` v + LEFT JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` + WHERE v.`id`=? AND v.`resellerid`=? + LIMIT 1"); + $query2->execute(array($encryptionKey, $serverId, $resellerId)); + while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $time = 0; @@ -291,7 +301,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $timeleft = round($row['lendtime'] - (strtotime($row['now']) - strtotime($row['started'])) / 60); $slots = $row['slots']; - $time = ($timeleft <= 0) ? 0 : $timeleft . '/'. $row['lendtime']; + $time = ($timeleft <= 0) ? 0 : $timeleft . '/' . $row['lendtime']; if ($time == 0 or ($shutDownEmpty == 'Y' and ($row['lendtime'] - $timeleft) > $shutDownEmptyTime and $row['usedslots'] < 1)) { @@ -310,10 +320,10 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $queryip = $query4->fetchColumn(); } - $connection = new TS3($queryip, $queryport,'serveradmin', $querypassword); + $connection = new TS3($queryip, $queryport, 'serveradmin', $querypassword); $errorcode = $connection->errorcode; - if (strpos($errorcode,'error id=0') !== false) { + if (strpos($errorcode, 'error id=0') !== false) { $connection->StopServer($localserverid); } @@ -346,4 +356,4 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $template_file = 'admin_lendserver_list.tpl'; } -} \ No newline at end of file +} diff --git a/stuff/admin/page_downloads.php b/stuff/admin/page_downloads.php index be04fe77..6c6c8574 100644 --- a/stuff/admin/page_downloads.php +++ b/stuff/admin/page_downloads.php @@ -253,7 +253,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("DELETE FROM `translations` WHERE `type`='pd' AND `transID`=? AND `resellerID`=?"); $query->execute(array($id, $reseller_id)); - @unlink(EASYWIDIR . "/downloads/${id}/${fileExtension}"); + @unlink(EASYWIDIR . "/downloads/{$id}/{$fileExtension}"); $template_file = $spracheResponse->table_del; } else { diff --git a/stuff/admin/panel_settings_columns.php b/stuff/admin/panel_settings_columns.php index b4836a2e..6d98f938 100644 --- a/stuff/admin/panel_settings_columns.php +++ b/stuff/admin/panel_settings_columns.php @@ -95,14 +95,14 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query->execute(array($ui->active('active', 'post'), $ui->w('item',1, 'post'), $ui->w('type',1, 'post'), $ui->id('length',10, 'post'), $name)); $id = $sql->lastInsertId(); - $loguseraction = "%add% Custom Column ${name}"; + $loguseraction = "%add% Custom Column {$name}"; } else if ($ui->id('id', 10, 'get') and $ui->st('d', 'get') == 'md') { $query = $sql->prepare("UPDATE `custom_columns_settings` SET `active`=?,`item`=?,`type`=?,`length`=?,`name`=? WHERE `customID`=? LIMIT 1"); $query->execute(array($ui->active('active', 'post'), $ui->w('item',1, 'post'), $ui->w('type',1, 'post'), $ui->id('length',10, 'post'), $name, $id)); - $loguseraction = "%mod% Custom Column ${name}"; + $loguseraction = "%mod% Custom Column {$name}"; } else { $template_file = 'admin_404.tpl'; @@ -228,7 +228,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("DELETE FROM `translations` WHERE `type`='cc' AND `transID`=?"); $query->execute(array($id)); - $loguseraction = "%del% Custom Column ${name}"; + $loguseraction = "%del% Custom Column {$name}"; $insertlog->execute(); $template_file = $spracheResponse->table_del; diff --git a/stuff/admin/system_check.php b/stuff/admin/system_check.php index 4aa4e340..39dca7fa 100644 --- a/stuff/admin/system_check.php +++ b/stuff/admin/system_check.php @@ -65,14 +65,14 @@ foreach ($modules as $module) { } $functions = array('fopen'); +$systemCheckOk = array(); +$systemCheckError = array(); foreach ($functions as $function) { if (function_exists($function)) { - $okField = "system_ok_$function"; - $systemCheckOk[$function] = $function->$okField; + $systemCheckOk[$function] = true; } else { - $errorField = "error_system_$function"; - $systemCheckError[$function] = $sprache->$errorField; + $systemCheckError[$function] = "The function $function does not exist."; } } @@ -106,19 +106,19 @@ $folderArray = array( ); foreach ($folderArray as $folder) { - if (is_dir(EASYWIDIR . "/${folder}")) { - $handle = @fopen(EASYWIDIR . "/${folder}test.txt", "w+"); + if (is_dir(EASYWIDIR . "/{$folder}")) { + $handle = @fopen(EASYWIDIR . "/{$folder}test.txt", "w+"); if ($handle) { fclose($handle); - unlink(EASYWIDIR . "/${folder}test.txt"); - $systemCheckOk['folders'][] = "Folder exists and can write to: ${folder}"; + unlink(EASYWIDIR . "/{$folder}test.txt"); + $systemCheckOk['folders'][] = "Folder exists and can write to: {$folder}"; } else { - $systemCheckError['folders'][] = "Folder exists but cannot edit files: ${folder}"; + $systemCheckError['folders'][] = "Folder exists but cannot edit files: {$folder}"; } } else { - $systemCheckError['folders'][] = "Folder does not exist or cannot access: ${folder}"; + $systemCheckError['folders'][] = "Folder does not exist or cannot access: {$folder}"; } } diff --git a/stuff/admin/tickets.php b/stuff/admin/tickets.php index 7d18a092..80144929 100644 --- a/stuff/admin/tickets.php +++ b/stuff/admin/tickets.php @@ -520,8 +520,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $temp=' AND ('; $i = 0; foreach ($selected as $get) { - if ($i==0) $temp.="`state`='${get}'"; - else $temp.=" OR `state`='${get}'"; + if ($i==0) $temp.="`state`='{$get}'"; + else $temp.=" OR `state`='{$get}'"; if (!in_array($get,$selected)) $selected[] = $get; $i++; } diff --git a/stuff/admin/tickets_reseller.php b/stuff/admin/tickets_reseller.php index 8c52608d..3894e2f4 100644 --- a/stuff/admin/tickets_reseller.php +++ b/stuff/admin/tickets_reseller.php @@ -235,8 +235,8 @@ if ($ui->st('d', 'get') == 'ad') { $temp=' AND ('; $i = 0; foreach ($selected as $get) { - if ($i==0) $temp.="`state`='${get}'"; - else $temp.=" OR `state`='${get}'"; + if ($i==0) $temp.="`state`='{$get}'"; + else $temp.=" OR `state`='{$get}'"; $selected[] = $get; $i++; } diff --git a/stuff/admin/voice_tsdns.php b/stuff/admin/voice_tsdns.php index 98432483..65e7b0f2 100644 --- a/stuff/admin/voice_tsdns.php +++ b/stuff/admin/voice_tsdns.php @@ -342,43 +342,43 @@ if ($ui->w('action',4, 'post') and !token(true)) { foreach ($dnsList as $dns) { $lookUp = str_replace('.', '_', $dns); - $ex = explode(':', $ui->ipport("${lookUp}-address", 'post')); + $ex = explode(':', $ui->ipport("{$lookUp}-address", 'post')); - if ($ui->active("${lookUp}-import", 'post') == 'Y' and isset($ex[1]) and port($ex[1])) { + if ($ui->active("{$lookUp}-import", 'post') == 'Y' and isset($ex[1]) and port($ex[1])) { $ip = $ex[0]; $port = $ex[1]; - $customer = $ui->id("${lookUp}-customer", 19, 'post'); + $customer = $ui->id("{$lookUp}-customer", 19, 'post'); if ($customer == 0 or $customer == false or $customer == null) { $usernew = true; - if ($ui->username("${lookUp}-username",50, 'post') and $ui->ismail("${lookUp}-email", 'post')) { + if ($ui->username("{$lookUp}-username",50, 'post') and $ui->ismail("{$lookUp}-email", 'post')) { $query = $sql->prepare("SELECT `id` FROM `userdata` WHERE `cname`=? AND `mail`=? AND `resellerid`=? LIMIT 1"); - $query->execute(array($ui->username("${lookUp}-username",50, 'post'), $ui->ismail("${lookUp}-email", 'post'), $reseller_id)); + $query->execute(array($ui->username("{$lookUp}-username",50, 'post'), $ui->ismail("{$lookUp}-email", 'post'), $reseller_id)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $usernew = false; $customer = $row['id']; - $cnamenew = $ui->username("${lookUp}-username",50, 'post'); + $cnamenew = $ui->username("{$lookUp}-username",50, 'post'); } if ($usernew == true) { - $newHash = passwordCreate($ui->username("${lookUp}-username",50, 'post'), passwordgenerate(10)); + $newHash = passwordCreate($ui->username("{$lookUp}-username",50, 'post'), passwordgenerate(10)); if (is_array($newHash)) { $query = $sql->prepare("INSERT INTO `userdata` (`cname`,`security`,`salt`,`mail`,`accounttype`,`resellerid`) VALUES (?,?,?,?,'u',?)"); - $query->execute(array($ui->username("${lookUp}-username",50, 'post'), $newHash['hash'], $newHash['salt'], $ui->ismail("${lookUp}-email", 'post'), $reseller_id)); + $query->execute(array($ui->username("{$lookUp}-username",50, 'post'), $newHash['hash'], $newHash['salt'], $ui->ismail("{$lookUp}-email", 'post'), $reseller_id)); } else { $query = $sql->prepare("INSERT INTO `userdata` (`cname`,`security`,`mail`,`accounttype`,`resellerid`) VALUES (?,?,?,'u',?)"); - $query->execute(array($ui->username("${lookUp}-username",50, 'post'), $newHash, $ui->ismail("${lookUp}-email", 'post'), $reseller_id)); + $query->execute(array($ui->username("{$lookUp}-username",50, 'post'), $newHash, $ui->ismail("{$lookUp}-email", 'post'), $reseller_id)); } $query = $sql->prepare("SELECT `id` FROM `userdata` WHERE `cname`=? AND `mail`=? AND `resellerid`=? ORDER BY `id` DESC LIMIT 1"); - $query->execute(array($ui->username("${lookUp}-username",50, 'post'), $ui->ismail("${lookUp}-email", 'post'), $reseller_id)); + $query->execute(array($ui->username("{$lookUp}-username",50, 'post'), $ui->ismail("{$lookUp}-email", 'post'), $reseller_id)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $customer = $row['id']; - $cnamenew = $ui->username("${lookUp}-username",50, 'post'); + $cnamenew = $ui->username("{$lookUp}-username",50, 'post'); sendmail('emailuseradd', $customer, $cnamenew, $initialpassword); } } diff --git a/stuff/cms/page_download.php b/stuff/cms/page_download.php index d1cc3ef9..843e6df7 100644 --- a/stuff/cms/page_download.php +++ b/stuff/cms/page_download.php @@ -63,7 +63,7 @@ if (isset($downloadID)) { while ($row = $query->fetch(PDO::FETCH_ASSOC)) { - if (($row['show'] == 'E' or ($row['show'] == 'A' and isset($admin_id)) or ($row['show'] == 'R' and (isset($user_id) or isset($admin_id)))) and ($row['external'] == 'Y' or ($row['external'] == 'N' and file_exists(EASYWIDIR . "/downloads/${row['fileID']}.${row['fileExtension']}")))) { + if (($row['show'] == 'E' or ($row['show'] == 'A' and isset($admin_id)) or ($row['show'] == 'R' and (isset($user_id) or isset($admin_id)))) and ($row['external'] == 'Y' or ($row['external'] == 'N' and file_exists(EASYWIDIR . "/downloads/{$row['fileID']}.{$row['fileExtension']}")))) { if (isset($startDownload)) { @@ -74,26 +74,26 @@ if (isset($downloadID)) { if ($row['external'] == 'N') { - $fileWithPath = EASYWIDIR . "/downloads/${row['fileID']}.${row['fileExtension']}"; + $fileWithPath = EASYWIDIR . "/downloads/{$row['fileID']}.{$row['fileExtension']}"; $finfo = finfo_open(FILEINFO_MIME_TYPE); $contentType = finfo_file($finfo, $fileWithPath); finfo_close($finfo); - header("Content-Type: ${contentType}"); + header("Content-Type: {$contentType}"); if (strpos(strtolower($ui->server['SERVER_SOFTWARE']),'nginx') !== false) { header('Content-Length: ' . (string) (filesize($fileWithPath))); header('Cache-Control: public, must-revalidate'); header('Pragma: no-cache'); - header("Content-Disposition: attachment; filename=\"${row['fileName']}.${row['fileExtension']}\""); + header("Content-Disposition: attachment; filename=\"{$row['fileName']}.{$row['fileExtension']}\""); header('Content-Transfer-Encoding: binary'); - header("X-Accel-Redirect: /downloads/${row['fileID']}.${row['fileExtension']}"); + header("X-Accel-Redirect: /downloads/{$row['fileID']}.{$row['fileExtension']}"); } else { - header("Content-Disposition: attachment; filename=\"${row['fileName']}.${row['fileExtension']}\""); + header("Content-Disposition: attachment; filename=\"{$row['fileName']}.{$row['fileExtension']}\""); set_time_limit(0); - $fp = @fopen(EASYWIDIR . "/downloads/${row['fileID']}.${row['fileExtension']}","rb"); + $fp = @fopen(EASYWIDIR . "/downloads/{$row['fileID']}.{$row['fileExtension']}","rb"); while(!feof($fp)) { print(@fread($fp, 1024)); ob_flush(); @@ -101,7 +101,7 @@ if (isset($downloadID)) { } } } else { - header("location: ${row['externalURL']}"); + header("location: {$row['externalURL']}"); } die; @@ -123,7 +123,7 @@ if (isset($downloadID)) { $query = $sql->prepare("SELECT d.*,t.`text` FROM `page_downloads` d LEFT JOIN `translations` t ON t.`type`='pd' AND t.`transID`=d.`fileID` AND t.`lang`=? ORDER BY d.`order`,d.`fileID`"); $query->execute(array($user_language)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { - if (($row['show'] == 'E' or ($row['show'] == 'A' and isset($admin_id)) or ($row['show'] == 'R' and (isset($user_id) or isset($admin_id)))) and ($row['external'] == 'Y' or ($row['external'] == 'N' and file_exists(EASYWIDIR . "/downloads/${row['fileID']}.${row['fileExtension']}")))) { + if (($row['show'] == 'E' or ($row['show'] == 'A' and isset($admin_id)) or ($row['show'] == 'R' and (isset($user_id) or isset($admin_id)))) and ($row['external'] == 'Y' or ($row['external'] == 'N' and file_exists(EASYWIDIR . "/downloads/{$row['fileID']}.{$row['fileExtension']}")))) { $table[] = array('id' => $row['fileID'], 'description' => $row['description'], 'link' => (isset($seo) and $seo == 'Y') ? $page_data->pages['downloads']['link'].'get/'.$row['fileID'].'/' : $page_data->pages['downloads']['link'].'&action=get&id='.$row['fileID'], 'text' => $row['text']); } } diff --git a/stuff/methods/class_app.php b/stuff/methods/class_app.php index 57698342..6d4e9da4 100644 --- a/stuff/methods/class_app.php +++ b/stuff/methods/class_app.php @@ -438,7 +438,7 @@ class AppServer { $this->shellScripts['user'] .= 'CONFIGUSERID=' . $this->appMasterServerDetails['configUserID'] . "\n"; $this->shellScripts['user'] .= 'USER=`ls -la /var/run/screen | grep S-' . $userName . ' | head -n 1 | awk \'{print $3}\'`' . "\n"; $this->shellScripts['user'] .= 'if [ "$USER" != "" -a $USER -eq $USER 2> /dev/null ]; then CONFIGUSERID=$USER; fi' . "\n"; - $this->shellScripts['user'] .= 'USERID=`getent passwd | cut -f3 -d: | sort -un | awk \'BEGIN { id=\'${CONFIGUSERID}\' } $1 == id { id++ } $1 > id { print id; exit }\'`' . "\n"; + $this->shellScripts['user'] .= 'USERID=`getent passwd | cut -f3 -d: | sort -un | awk \'BEGIN { id=\'{$CONFIGUSERID}\' } $1 == id { id++ } $1 > id { print id; exit }\'`' . "\n"; $this->shellScripts['user'] .= 'if [ "`ls -la /var/run/screen | awk \'{print $3}\' | grep $USERID`" == "" -a "`grep \"x:$USERID:\" /etc/passwd`" == "" ]; then' . "\n"; $this->shellScripts['user'] .= 'if [ "`lsb_release -i 2> /dev/null | grep \'Distributor\' | awk \'{print tolower($3)}\'`" == "centos" ] || [ "`grep \'\bNAME=\b\' /etc/os-release | sed -n \'s/^.*NAME=//p\' | sed -e \'s/\(.*\)/\L\1/\'`" == "slackware" ]; then' . "\n"; $this->shellScripts['user'] .= 'sudo /usr/sbin/useradd -m -p `perl -e \'print crypt("\'' . $password . '\'","Sa")\'` -d ' . $this->removeSlashes($this->appServerDetails['homeDir'] . '/' . $userNameHome) . ' -g ' . $this->appMasterServerDetails['ssh2User'] . ' -s /bin/false $USERID ' . $userName . ' 2>/dev/null' . "\n"; @@ -481,7 +481,7 @@ class AppServer { private function linuxDeleteUserGenerate ($userName) { $this->shellScripts['user'] .= 'sudo pkill -u ' . $userName . "\n"; $this->shellScripts['user'] .= 'if [ "`id ' . $userName . ' 2>/dev/null`" != "" ]; then' . "\n"; - $this->shellScripts['user'] .= '${IONICE}nice -n +19 sudo /usr/sbin/userdel -fr ' . $userName . ' > /dev/null 2>&1 ' . "\n"; + $this->shellScripts['user'] .= '{$IONICE}nice -n +19 sudo /usr/sbin/userdel -fr ' . $userName . ' > /dev/null 2>&1 ' . "\n"; $this->addLogline('user.log', 'User ' . $userName . ' deleted'); $this->shellScripts['user'] .= 'fi' . "\n"; @@ -605,7 +605,7 @@ class AppServer { // Migrate old folder structure with ip_port as sub folder to structure without $script .= 'if [ -d ' . $absolutePath . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . ' ]; then' . "\n"; $script .= 'mv ' . $absolutePath . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . '/* ' . $absolutePath . "\n"; - $script .= '${IONICE}nice -n +19 rm -rf ' . $absolutePath . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . "\n"; + $script .= '{$IONICE}nice -n +19 rm -rf ' . $absolutePath . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . "\n"; $script .= 'fi' . "\n"; foreach ($templates as $template) { @@ -622,11 +622,11 @@ class AppServer { } $script .= 'FILEFOUND=(`find -mindepth 1 -type f \( -iname "*.' . implode('" -or -iname "*.', $copyFileExtensions) . '" \) | grep -v -E "$PATTERN"`)' . "\n"; - $script .= 'for FILTEREDFILES in ${FILEFOUND[@]}; do' . "\n"; + $script .= 'for FILTEREDFILES in {$FILEFOUND[@]}; do' . "\n"; $script .= 'FOLDERNAME=`dirname "$FILTEREDFILES"`' . "\n"; $script .= 'if ([[ `find "$FOLDERNAME" -maxdepth 0 -type d` ]] && [[ ! -d "' . $absoluteTargetTemplatePath . '$FOLDERNAME" ]]); then mkdir -p "' . $absoluteTargetTemplatePath . '$FOLDERNAME"; fi' . "\n"; $script .= 'if [ -f "' . $absoluteTargetTemplatePath . '$FILTEREDFILES" ]; then find "' . $absoluteTargetTemplatePath . '$FILTEREDFILES" -maxdepth 1 -type l -delete; fi' . "\n"; - $script .= 'if [ ! -f "' . $absoluteTargetTemplatePath . '$FILTEREDFILES" ]; then ${IONICE}cp "' . $absoluteSourceTemplatePath . '$FILTEREDFILES" "' . $absoluteTargetTemplatePath . '$FILTEREDFILES"; fi' . "\n"; + $script .= 'if [ ! -f "' . $absoluteTargetTemplatePath . '$FILTEREDFILES" ]; then {$IONICE}cp "' . $absoluteSourceTemplatePath . '$FILTEREDFILES" "' . $absoluteTargetTemplatePath . '$FILTEREDFILES"; fi' . "\n"; $script .= 'done' . "\n"; $script .= 'cp -sr ' . $absoluteSourceTemplatePath . '* ' . $absoluteTargetTemplatePath . ' > /dev/null 2>&1' . "\n"; @@ -640,15 +640,15 @@ class AppServer { $dirChmod = 750; $fileChmod = 640; } - $script .= '${IONICE}nice -n +19 find ' . $absolutePath . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $absolutePath . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) { - $script .= '${IONICE}nice -n +19 find ' . $absolutePath . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $absolutePath . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; } else { - $script .= '${IONICE}nice -n +19 find ' . $absolutePath . ' -type f -print0 | xargs -0 chmod ' . $fileChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $absolutePath . ' -type f -print0 | xargs -0 chmod ' . $fileChmod . "\n"; } - $script .= '${IONICE}nice -n +19 find -L ' . $absolutePath . ' -type l -delete' . "\n"; + $script .= '{$IONICE}nice -n +19 find -L ' . $absolutePath . ' -type l -delete' . "\n"; if ($standalone and isset($scriptName)) { $this->addLinuxScript($scriptName, $script); @@ -722,7 +722,7 @@ class AppServer { $script .= 'TARGET_FOLDER="`dirname ' . $spareFile . '`"' . "\n"; - $script .= 'if [ ! -d "../sparefiles/${TARGET_FOLDER}" ]; then mkdir -p "../sparefiles/${TARGET_FOLDER}"' . "\n"; + $script .= 'if [ ! -d "../sparefiles/{$TARGET_FOLDER}" ]; then mkdir -p "../sparefiles/{$TARGET_FOLDER}"' . "\n"; $script .= 'cp "' . $spareFile . '" "../sparefiles/' . $spareFile . '"' . "\n"; } @@ -756,7 +756,7 @@ class AppServer { $script .= $this->backUpSpareFiles($template, $spareFiles); - $script .= 'if [ -d "' . $template . '" ]; then ${IONICE}rm -rf "' . $template . '"; fi' . "\n"; + $script .= 'if [ -d "' . $template . '" ]; then {$IONICE}rm -rf "' . $template . '"; fi' . "\n"; $this->addLogline('app_server.log', 'Server template ' . $serverDir . $template . ' owned by user ' . $this->appServerDetails['userNameExecute'] . ' deleted'); $script .= $this->restoreSpareFiles($template); @@ -1628,7 +1628,7 @@ class AppServer { $startCommand = str_replace($replaceSettings['placeholder'], $replaceSettings['replacePlaceholderWith'], $startCommand); foreach (customColumns('G', $this->appServerDetails['id']) as $customColumn) { - $startCommand = str_replace("%${customColumn['name']}%", $customColumn['value'], $startCommand); + $startCommand = str_replace("%{$customColumn['name']}%", $customColumn['value'], $startCommand); } //If a template is set up for both OS, we might need to alter the start of the command @@ -1692,7 +1692,7 @@ class AppServer { $script .= $this->linuxStopApp(false, $scriptName); - $script .= '${IONICE}find -L ' . $serverDir . ' -type l -delete' . "\n"; + $script .= '{$IONICE}find -L ' . $serverDir . ' -type l -delete' . "\n"; $dirChmod = 700; $fileChmod = 600; @@ -1701,34 +1701,34 @@ class AppServer { $dirChmod = 750; $fileChmod = 640; - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) { - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n"; } else { - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; } } else { - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type d -print0 | xargs -0 chmod ' . $dirChmod . "\n"; if ($this->appServerDetails['template']['copyStartBinary'] == 'Y' and strlen($this->appServerDetails['template']['gameBinary']) > 0) { - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "' . $this->appServerDetails['template']['gameBinary'] . '" -print0 | xargs -0 chmod ' . $dirChmod . "\n"; } else { - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -type f ! -name "ShooterGameServer" -print0 | xargs -0 chmod ' . $fileChmod . "\n"; } // Remove files where they do not belong - $script .= '${IONICE}nice -n +19 find ' . $serverDir . ' -mindepth 1 -maxdepth 1 \( -type f -or -type l \) -delete' . "\n"; - $script .= '${IONICE}nice -n +19 find ' . $this->removeSlashes($this->appServerDetails['homeDir'] . '/' . $this->appServerDetails['userName']) . ' -mindepth 1 -maxdepth 1 \( -type f -or -type l \)'; + $script .= '{$IONICE}nice -n +19 find ' . $serverDir . ' -mindepth 1 -maxdepth 1 \( -type f -or -type l \) -delete' . "\n"; + $script .= '{$IONICE}nice -n +19 find ' . $this->removeSlashes($this->appServerDetails['homeDir'] . '/' . $this->appServerDetails['userName']) . ' -mindepth 1 -maxdepth 1 \( -type f -or -type l \)'; $script .= ' ! -name ".profile" ! -name ".bashrc" ! -name ".bash_logout" -delete' . "\n"; // Remove folders where they do not belong - $script .= '${IONICE}nice -n +19 find ' . $this->removeSlashes($this->appServerDetails['homeDir'] . '/' . $this->appServerDetails['userName']) . ' -mindepth 1 -maxdepth 1 -type d'; + $script .= '{$IONICE}nice -n +19 find ' . $this->removeSlashes($this->appServerDetails['homeDir'] . '/' . $this->appServerDetails['userName']) . ' -mindepth 1 -maxdepth 1 -type d'; $script .= ' ! -name ".steam" ! -name "pserver" ! -name "backup" ! -name "fdl_data" ! -name "server" -print0 | xargs -0 rm -rf' . "\n"; - $script .= '${IONICE}nice -n +19 find /home/' . $this->appMasterServerDetails['ssh2User'] . '/fdl_data -type f -user `whoami` ! -name "*.bz2" -delete' . "\n"; + $script .= '{$IONICE}nice -n +19 find /home/' . $this->appMasterServerDetails['ssh2User'] . '/fdl_data -type f -user `whoami` ! -name "*.bz2" -delete' . "\n"; } if ($this->appServerDetails['template']['steamgame'] == 'S') { @@ -1753,7 +1753,7 @@ class AppServer { $script .= '`)' . "\n"; - $script .= 'for BADFILE in ${FILESFOUND[@]}; do' . "\n"; + $script .= 'for BADFILE in {$FILESFOUND[@]}; do' . "\n"; $script .= 'chmod 666 $BADFILE > /dev/null 2>&1' . "\n"; $script .= 'rm -f $BADFILE > /dev/null 2>&1' . "\n"; $script .= 'if [ -f $BADFILE ]; then exit 0; fi' . "\n"; @@ -1761,19 +1761,19 @@ class AppServer { } if ($this->appMasterServerDetails['configBadTime'] > 0 and count($this->appMasterServerDetails['configBadFiles']) > 0) { - $script .= '${IONICE}find ' . $serverDir . ' -type f \( -iname "*.' . implode('" -or -iname "*.', $this->appMasterServerDetails['configBadFiles']) . '" \) -mtime +' . $this->appMasterServerDetails['configBadTime'] . ' -delete' . "\n"; + $script .= '{$IONICE}find ' . $serverDir . ' -type f \( -iname "*.' . implode('" -or -iname "*.', $this->appMasterServerDetails['configBadFiles']) . '" \) -mtime +' . $this->appMasterServerDetails['configBadTime'] . ' -delete' . "\n"; } if ($this->appMasterServerDetails['configDemoTime'] > 0) { - $script .= '${IONICE}find ' . $serverTemplateDir . ' -type f -name "*.dem" -mtime +' . $this->appMasterServerDetails['configDemoTime'] . ' -delete' . "\n"; + $script .= '{$IONICE}find ' . $serverTemplateDir . ' -type f -name "*.dem" -mtime +' . $this->appMasterServerDetails['configDemoTime'] . ' -delete' . "\n"; } if ($this->appMasterServerDetails['configLogTime'] > 0) { - $script .= '${IONICE}find ' . $serverTemplateDir . ' -type f -name "*.log" -mtime +' . $this->appMasterServerDetails['configLogTime'] . ' -delete' . "\n"; + $script .= '{$IONICE}find ' . $serverTemplateDir . ' -type f -name "*.log" -mtime +' . $this->appMasterServerDetails['configLogTime'] . ' -delete' . "\n"; } if ($this->appMasterServerDetails['configZtmpTime'] > 0) { - $script .= '${IONICE}find ' . $serverTemplateDir . ' -type f -name "*.ztmp" -mtime +' . $this->appMasterServerDetails['configZtmpTime'] . ' -delete' . "\n"; + $script .= '{$IONICE}find ' . $serverTemplateDir . ' -type f -name "*.ztmp" -mtime +' . $this->appMasterServerDetails['configZtmpTime'] . ' -delete' . "\n"; } $script .= 'cd ' . $this->appServerDetails['absolutePath'] . "\n"; @@ -1868,14 +1868,14 @@ class AppServer { $uploadScript = 'if [[ `which zip` ]]; then' . "\n"; $uploadScript .= 'if [ "$KEEP" == "" ]; then KEEP="-m"; fi' . "\n"; - $uploadScript .= '${IONICE}nice -n +19 zip -q $KEEP $DEMOPATH/$DEMO.zip $DEMOPATH/$DEMO' . "\n"; + $uploadScript .= '{$IONICE}nice -n +19 zip -q $KEEP $DEMOPATH/$DEMO.zip $DEMOPATH/$DEMO' . "\n"; $uploadScript .= 'ZIP="zip"' . "\n"; $uploadScript .= 'elif [[ `which bzip2` ]]; then' . "\n"; - $uploadScript .= '${IONICE}nice -n +19 bzip2 -s -q -9 $KEEP $DEMOPATH/$DEMO' . "\n"; + $uploadScript .= '{$IONICE}nice -n +19 bzip2 -s -q -9 $KEEP $DEMOPATH/$DEMO' . "\n"; $uploadScript .= 'ZIP="bz2"' . "\n"; $uploadScript .= 'fi' . "\n"; $uploadScript .= 'DEMOANDPATH="$DEMOPATH/$DEMO.$ZIP"' . "\n"; - $uploadScript .= 'wput -q --limit-rate=1024K --remove-source-files --tries 3 --basename="${DEMOPATH/\/\///}" "${DEMOANDPATH/\/\///}" "' . $this->appServerDetails['app']['uploadDir'] . '"' . "\n"; + $uploadScript .= 'wput -q --limit-rate=1024K --remove-source-files --tries 3 --basename="{$DEMOPATH/\/\///}" "{$DEMOANDPATH/\/\///}" "' . $this->appServerDetails['app']['uploadDir'] . '"' . "\n"; // 2 and 3 are one time run (manuel mode) if (in_array($this->appServerDetails['app']['upload'], array(2, 3))) { @@ -2213,7 +2213,7 @@ class AppServer { $script = $this->shellScriptHeader; $script .= 'rm -f ' . $scriptName . "\n"; - $script .= 'if [ -d "' . $serverDir . '" ]; then ${IONICE}rm -rf "' . $serverDir . '"; fi' . "\n"; + $script .= 'if [ -d "' . $serverDir . '" ]; then {$IONICE}rm -rf "' . $serverDir . '"; fi' . "\n"; $script .= $this->linuxAddApp(array($targetTemplate), false); @@ -2304,7 +2304,7 @@ class AppServer { $script .= 'find usermaps/ mods/ -type l -or -type f \( -iname "*.ff" -or -iname "*.iwd" \) 2> /dev/null | grep -v "' . $excludePattern . '" | while read FOUNDFILE; do' . "\n"; } - $script .= 'FILTEREDFILE=${FOUNDFILE//\.\//}' . "\n"; + $script .= 'FILTEREDFILE={$FOUNDFILE//\.\//}' . "\n"; $script .= 'if [[ ! `grep "$FILTEREDFILE" "' . $fdlFileList . '"` ]]; then' . "\n"; $script .= 'FILENAME=`basename $FILTEREDFILE`' . "\n"; @@ -2315,14 +2315,14 @@ class AppServer { $script .= 'FDLDATADIR=' . $fdlMasterFolder . '`dirname "$FILTEREDFILE"`' . "\n"; $script .= 'if [ ! -d $FDLDATADIR ]; then mkdir -p $FDLDATADIR; chmod 770 $FDLDATADIR; fi' . "\n"; $script .= 'FDLDATAFILENAME="$FDLDATADIR/$FILENAME"' . "\n"; - $script .= 'CHECKSUMNEW=`${IONICE}nice -n +19 md5sum "$ABSOLUTEFILTEREDFILE" | awk \'{print $1}\'`' . "\n"; + $script .= 'CHECKSUMNEW=`{$IONICE}nice -n +19 md5sum "$ABSOLUTEFILTEREDFILE" | awk \'{print $1}\'`' . "\n"; $script .= 'if [ -f "$FDLDATAFILENAME.stat" -a -f "$FDLDATAFILENAME.bz2" ]; then' . "\n"; $script .= 'CHECKSUMOLD=`head -n 1 "$FDLDATAFILENAME.stat" 2> /dev/null`' . "\n"; $script .= 'else' . "\n"; $script .= 'CHECKSUMOLD=""' . "\n"; $script .= 'fi' . "\n"; $script .= 'if [ "$CHECKSUMOLD" != "$CHECKSUMNEW" ]; then' . "\n"; - $script .= '${IONICE}nice -n +19 bzip2 -k -s -q -9 -f -c "$ABSOLUTEFILTEREDFILE" > "$FDLDATAFILENAME.bz2"' . "\n"; + $script .= '{$IONICE}nice -n +19 bzip2 -k -s -q -9 -f -c "$ABSOLUTEFILTEREDFILE" > "$FDLDATAFILENAME.bz2"' . "\n"; $script .= 'echo $CHECKSUMNEW > "$FDLDATAFILENAME.stat"' . "\n"; $script .= 'chmod 660 "$FDLDATAFILENAME.stat" "$FDLDATAFILENAME.bz2"' . "\n"; $script .= 'fi' . "\n"; @@ -2394,7 +2394,7 @@ class AppServer { $script .= 'if [[ `lsof -f -- "' . $backUpFile . '" 2>/dev/null` ]]; then continue; fi' . "\n"; $script .= 'if [ -f "' . $backUpFile . '" ]; then rm -f "' . $backUpFile . '"; fi' . "\n"; $script .= 'cd "' . $serverDir . '/$GAMETEMPLATE"' . "\n"; - $script .= '${IONICE}nice -n +19 tar cfj "' . $backUpFile . '" .' . "\n"; + $script .= '{$IONICE}nice -n +19 tar cfj "' . $backUpFile . '" .' . "\n"; if (strlen($ftpUploadString) > 0) { $script .= 'wput -q --limit-rate=4098 --basename="' . $backupDir . '" "' . $backUpFile . '" "' . $ftpUploadString . '"' . "\n"; @@ -2445,7 +2445,7 @@ class AppServer { $script .= 'if [ ! -d "' . $this->removeSlashes($serverDir . '/' . $template) . '" ]; then mkdir -p "' . $this->removeSlashes($serverDir . '/' . $template) . '"; fi' . "\n"; - $script .= '${IONICE}nice -n +19 tar -C "' . $this->removeSlashes($serverDir . '/' . $template) . '" -xjf "' . $this->removeSlashes($backupDir . '/' . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . '-' . $template . '.tar.bz2"') . "\n"; + $script .= '{$IONICE}nice -n +19 tar -C "' . $this->removeSlashes($serverDir . '/' . $template) . '" -xjf "' . $this->removeSlashes($backupDir . '/' . $this->appServerDetails['serverIP'] . '_' . $this->appServerDetails['port'] . '-' . $template . '.tar.bz2"') . "\n"; $script .= 'wget -q --no-check-certificate -O - ' . webhostdomain($resellerLockupID) . '/get_password.php?w=rb\\&shorten=`id -un`\\id=' . $this->appServerDetails['port'] . '\\&ip=' . $this->appServerDetails['serverIP'] . "\n"; $this->addLinuxScript($scriptName, $script); @@ -2515,7 +2515,7 @@ class AppServer { // While we keep on counting up, the mail is send only once to prevent spam if (($this->appMasterServerDetails['notified'] + 1) == $rSA['down_checks']) { - $query = ($resellerLockupID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`=${$resellerLockupID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); + $query = ($resellerLockupID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`={$$resellerLockupID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); $query->execute(); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { if ($row['mail_serverdown'] == 'Y') { diff --git a/stuff/methods/class_masterserver.php b/stuff/methods/class_masterserver.php index 6d3f494c..94c2c873 100644 --- a/stuff/methods/class_masterserver.php +++ b/stuff/methods/class_masterserver.php @@ -277,7 +277,7 @@ class masterServer { $this->shellScript .= '$SYNCCMD/masterserver/' . $shorten . ' ' . $this->masterserverDir . ' > ' . $updateLog . "\n"; $this->shellScript .= 'elif [ "$SYNCTOOL" == "wget" ]; then' . "\n"; $this->shellScript .= '$SYNCCMD/masterserver/' . $shorten . ' > ' . $updateLog . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $this->masterserverDir . $shorten . '/ -type f -name "*.listing" -delete' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $this->masterserverDir . $shorten . '/ -type f -name "*.listing" -delete' . "\n"; $this->shellScript .= 'fi' . "\n"; } else { @@ -292,21 +292,21 @@ class masterServer { private function houseKeeping ($absoluteGamePath) { // Workaround for another valve chaos. If the files exist, mapgroups will not work properly - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -maxdepth 2 -type f -name "subscribed_file_ids.txt" -o -name "subscribed_collection_ids.txt" -delete' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -maxdepth 2 -type f -name "subscribed_file_ids.txt" -o -name "subscribed_collection_ids.txt" -delete' . "\n"; // Chmods should be aligned or else the server install for customer will not work - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.0" -or -iname "*.1" -or -iname "*.2" -or -iname "*.3" -or -iname "*.3ds" -or -iname "*.4" -or -iname "*.5" -or -iname "*.6" -or -iname "*.7" -or -iname "*.8" -or -iname "*.9" -or -iname "*.amx" -or -iname "*.asi" -or -iname "*.asm" -or -iname "*.bin" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.bmp" -or -iname "*.BMP" -or -iname "*.bsp" -or -iname "*.bz2" -or -iname "*.c" -or -iname "*.cab" -or -iname "*.cache" -or -iname "*.cfg" -or -iname "*.cmake" -or -iname "*.col" -or -iname "*.conf" -or -iname "*.cpp" -or -iname "*.css" -or -iname "*.csv" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.cur" -or -iname "*.dat" -or -iname "*.db" -or -iname "*.dds" -or -iname "*.def" -or -iname "*.dff" -or -iname "*.dll" -or -iname "*.doc" -or -iname "*.dsp" -or -iname "*.dxf" -or -iname "*.dylib" -or -iname "*.edf" -or -iname "*.ekv" -or -iname "*.example" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.exe" -or -iname "*.exp" -or -iname "*.fgd" -or -iname "*.flt" -or -iname "*.fx" -or -iname "*.gam" -or -iname "*.Gbx" -or -iname "*.gif" -or -iname "*.h" -or -iname "*.hpp" -or -iname "*.htm" -or -iname "*.html" -or -iname "*.icns" -or -iname "*.ico" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.image" -or -iname "*.inc" -or -iname "*.inf" -or -iname "*.ini" -or -iname "*.installed" -or -iname "*.jpg" -or -iname "*.js" -or -iname "*.key" -or -iname "*.kv" -or -iname "*.lib" -or -iname "*.lmp" -or -iname "*.lst" -or -iname "*.lua" -or -iname "*.LUA" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.manifest" -or -iname "*.map" -or -iname "*.mapRACE" -or -iname "*.mdl" -or -iname "*.mix" -or -iname "*.mp3" -or -iname "*.nav" -or -iname "*.nod" -or -iname "*.nut" -or -iname "*.pak" -or -iname "*.pcx" -or -iname "*.pem" -or -iname "*.pl" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.png" -or -iname "*.properties" -or -iname "*.psd" -or -iname "*.pwn" -or -iname "*.rad" -or -iname "*.raw" -or -iname "*.rc" -or -iname "*.rec" -or -iname "*.res" -or -iname "*.rules" -or -iname "*.sc" -or -iname "*.scr" -or -iname "*.sfk" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.sln" -or -iname "*.so" -or -iname "*.spr" -or -iname "*.suo" -or -iname "*.swf" -or -iname "*.tar" -or -iname "*.tga" -or -iname "*.ttf" -or -iname "*.txd" -or -iname "*.txt" -or -iname "*.vbf" -or -iname "*.vcproj" -or -iname "*.vcs" -or -iname "*.vdf" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.vfe" -or -iname "*.vfont" -or -iname "*.vmf" -or -iname "*.vmt" -or -iname "*.vpk" -or -iname "*.vtf" -or -iname "*.wad" -or -iname "*.wav" -or -iname "*.wv" -or -iname "*.xml" -or -iname "*.xsc" -or -iname "*.yml" -or -iname "*.zip" \) -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f -name "srcds_*" -o -name "hlds_*" -o -name "*.run" -o -name "*.sh" -o -name "*.jar" -exec chmod 750 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f ! -perm -750 ! -perm -755 -exec chmod 640 {} \;' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type d -exec chmod 750 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.0" -or -iname "*.1" -or -iname "*.2" -or -iname "*.3" -or -iname "*.3ds" -or -iname "*.4" -or -iname "*.5" -or -iname "*.6" -or -iname "*.7" -or -iname "*.8" -or -iname "*.9" -or -iname "*.amx" -or -iname "*.asi" -or -iname "*.asm" -or -iname "*.bin" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.bmp" -or -iname "*.BMP" -or -iname "*.bsp" -or -iname "*.bz2" -or -iname "*.c" -or -iname "*.cab" -or -iname "*.cache" -or -iname "*.cfg" -or -iname "*.cmake" -or -iname "*.col" -or -iname "*.conf" -or -iname "*.cpp" -or -iname "*.css" -or -iname "*.csv" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.cur" -or -iname "*.dat" -or -iname "*.db" -or -iname "*.dds" -or -iname "*.def" -or -iname "*.dff" -or -iname "*.dll" -or -iname "*.doc" -or -iname "*.dsp" -or -iname "*.dxf" -or -iname "*.dylib" -or -iname "*.edf" -or -iname "*.ekv" -or -iname "*.example" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.exe" -or -iname "*.exp" -or -iname "*.fgd" -or -iname "*.flt" -or -iname "*.fx" -or -iname "*.gam" -or -iname "*.Gbx" -or -iname "*.gif" -or -iname "*.h" -or -iname "*.hpp" -or -iname "*.htm" -or -iname "*.html" -or -iname "*.icns" -or -iname "*.ico" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.image" -or -iname "*.inc" -or -iname "*.inf" -or -iname "*.ini" -or -iname "*.installed" -or -iname "*.jpg" -or -iname "*.js" -or -iname "*.key" -or -iname "*.kv" -or -iname "*.lib" -or -iname "*.lmp" -or -iname "*.lst" -or -iname "*.lua" -or -iname "*.LUA" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.manifest" -or -iname "*.map" -or -iname "*.mapRACE" -or -iname "*.mdl" -or -iname "*.mix" -or -iname "*.mp3" -or -iname "*.nav" -or -iname "*.nod" -or -iname "*.nut" -or -iname "*.pak" -or -iname "*.pcx" -or -iname "*.pem" -or -iname "*.pl" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.png" -or -iname "*.properties" -or -iname "*.psd" -or -iname "*.pwn" -or -iname "*.rad" -or -iname "*.raw" -or -iname "*.rc" -or -iname "*.rec" -or -iname "*.res" -or -iname "*.rules" -or -iname "*.sc" -or -iname "*.scr" -or -iname "*.sfk" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.sln" -or -iname "*.so" -or -iname "*.spr" -or -iname "*.suo" -or -iname "*.swf" -or -iname "*.tar" -or -iname "*.tga" -or -iname "*.ttf" -or -iname "*.txd" -or -iname "*.txt" -or -iname "*.vbf" -or -iname "*.vcproj" -or -iname "*.vcs" -or -iname "*.vdf" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f \( -iname "*.vfe" -or -iname "*.vfont" -or -iname "*.vmf" -or -iname "*.vmt" -or -iname "*.vpk" -or -iname "*.vtf" -or -iname "*.wad" -or -iname "*.wav" -or -iname "*.wv" -or -iname "*.xml" -or -iname "*.xsc" -or -iname "*.yml" -or -iname "*.zip" \) -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f -name "srcds_*" -o -name "hlds_*" -o -name "*.run" -o -name "*.sh" -o -name "*.jar" -exec chmod 750 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type f ! -perm -750 ! -perm -755 -exec chmod 640 {} \;' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find ' . $absoluteGamePath . ' -type d -exec chmod 750 {} \;' . "\n"; // Check for temp files belonging to the steam updater $this->shellScript .= 'ls ' . $absoluteGamePath . ' | while read dir; do' . "\n"; @@ -338,7 +338,7 @@ class masterServer { $this->shellScript .= 'SEARCH=1' . "\n"; $this->shellScript .= 'fi' . "\n"; $this->shellScript .= 'if [ "$SEARCH" == "1" ]; then' . "\n"; - $this->shellScript .= '${IONICE}nice -n +19 find $SEARCHFOLDERS -type f 2> /dev/null | grep -v "$PATTERN" | sed \'s/\.\///g\' | while read FILTEREDFILES; do' . "\n"; + $this->shellScript .= '{$IONICE}nice -n +19 find $SEARCHFOLDERS -type f 2> /dev/null | grep -v "$PATTERN" | sed \'s/\.\///g\' | while read FILTEREDFILES; do' . "\n"; $this->shellScript .= 'echo $FILTEREDFILES >> ' . $fastDownloadList . "\n"; $this->shellScript .= 'done' . "\n"; $this->shellScript .= 'if [ -f ' . $fastDownloadList . ' ]; then chmod 640 ' . $fastDownloadList . '; fi' . "\n"; @@ -411,7 +411,7 @@ class masterServer { $this->shellScript .= 'cd /home/' . $this->sshuser . '/masterserver/steamCMD/'. "\n"; - $this->shellScript .= 'taskset -c 0 ${IONICE}nice -n +19 ./steamcmd.sh +force_install_dir ' . $absoluteGamePath . ' +login '; + $this->shellScript .= 'taskset -c 0 {$IONICE}nice -n +19 ./steamcmd.sh +force_install_dir ' . $absoluteGamePath . ' +login '; if (strlen($this->steamAccount) > 0) { $this->shellScript .= $this->steamAccount . ' ' . $this->steamPassword; @@ -642,7 +642,7 @@ class masterServer { // While we keep on counting up, the mail is send only once to prevent spam if (($this->rootNotifiedCount + 1) == $rSA['down_checks']) { - $query = ($resellerLockupID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`=${$resellerLockupID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); + $query = ($resellerLockupID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`={$$resellerLockupID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); $query->execute(); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { if ($row['mail_serverdown'] == 'Y') { @@ -771,14 +771,14 @@ class masterServer { // When the logfile is missing the update is still running $this->shellScript .= 'if [ ! -f ' . $updateLog . ' ]; then' . "\n"; - $this->shellScript .= 'UPDATESTATUS="${UPDATESTATUS};' . $shorten . '=1"' . "\n"; + $this->shellScript .= 'UPDATESTATUS="{$UPDATESTATUS};' . $shorten . '=1"' . "\n"; $this->shellScript .= 'else' . "\n"; // If it exists and the update is not running, the update is finished $this->shellScript .= 'if [ "`ps fx | grep \'masterserver/' . $shorten . '\' | grep -v grep | head -n 1`" ]; then' . "\n"; - $this->shellScript .= 'UPDATESTATUS="${UPDATESTATUS};' . $shorten . '=1"' . "\n"; + $this->shellScript .= 'UPDATESTATUS="{$UPDATESTATUS};' . $shorten . '=1"' . "\n"; $this->shellScript .= 'else' . "\n"; - $this->shellScript .= 'UPDATESTATUS="${UPDATESTATUS};' . $shorten . '=0"' . "\n"; + $this->shellScript .= 'UPDATESTATUS="{$UPDATESTATUS};' . $shorten . '=0"' . "\n"; $this->shellScript .= 'fi' . "\n"; $this->shellScript .= 'fi' . "\n"; diff --git a/stuff/methods/class_ts3.php b/stuff/methods/class_ts3.php index 7d9e1f73..35d8e33a 100644 --- a/stuff/methods/class_ts3.php +++ b/stuff/methods/class_ts3.php @@ -85,7 +85,7 @@ class TS3 { $metaData = stream_get_meta_data($this->socket); } if ($this->debug == true) { - print "Raw query return: ${response}\r\n"; + print "Raw query return: {$response}\r\n"; } @list($databody, $errorcode) = explode('error id=', str_replace(array("\r", "\n"), '', $response)); diff --git a/stuff/methods/feeds_function.php b/stuff/methods/feeds_function.php index 9ba133fe..8b64b5cd 100644 --- a/stuff/methods/feeds_function.php +++ b/stuff/methods/feeds_function.php @@ -85,7 +85,7 @@ if (isset($newsInclude) and $newsInclude == true) { $theCount = 0; if (isset($printToConsole)) { - print "Getting Feed Updates for Steamgame with AppID ${lookUpAppID}\r\n"; + print "Getting Feed Updates for Steamgame with AppID {$lookUpAppID}\r\n"; } foreach ($json->appnews->newsitems as $item) { @@ -108,7 +108,7 @@ if (isset($newsInclude) and $newsInclude == true) { } else { if (isset($printToConsole)) { - print "Failed getting Feed Updates for Steamgame with AppID ${lookUpAppID}\r\n"; + print "Failed getting Feed Updates for Steamgame with AppID {$lookUpAppID}\r\n"; } } } @@ -203,7 +203,7 @@ if (isset($newsInclude) and $newsInclude == true) { if ($twitter == 'Y') { if (isset($printToConsole)) { - print "Getting Updates for Twitter Feed ${row2['loginName']}\r\n"; + print "Getting Updates for Twitter Feed {$row2['loginName']}\r\n"; } /** * Twitter API 1.1 @@ -248,7 +248,7 @@ if (isset($newsInclude) and $newsInclude == true) { } else { if (isset($printToConsole)) { - print "Getting Feed Updates for Feed ${row2['feedUrl']}\r\n"; + print "Getting Feed Updates for Feed {$row2['feedUrl']}\r\n"; } $port = 80; diff --git a/stuff/methods/functions.php b/stuff/methods/functions.php index 27c50953..0ae80407 100644 --- a/stuff/methods/functions.php +++ b/stuff/methods/functions.php @@ -1024,7 +1024,7 @@ if (!function_exists('passwordgenerate')) { global $sql; - $typeQuery = ($type != null) ? " AND `type`='${type}'" : ''; + $typeQuery = ($type != null) ? " AND `type`='{$type}'" : ''; $query = $sql->prepare("SELECT `type`,`affectedID` FROM `jobs` WHERE (`status` IS NULL OR `status`=1) AND `action`=? $typeQuery GROUP BY `type`,`affectedID`"); $query->execute(array($action)); @@ -1108,18 +1108,18 @@ if (!function_exists('passwordgenerate')) { $i++; } - $send = "POST /${file} HTTP/1.1\r\n"; + $send = "POST /{$file} HTTP/1.1\r\n"; } else { if (strlen($file) == 0) { $file = '/'; } - $send = "GET ${file} HTTP/1.1\r\n"; + $send = "GET {$file} HTTP/1.1\r\n"; } - $send .= "Host: ${domain}\r\n"; - $send .= "User-Agent: ${useragent}\r\n"; + $send .= "Host: {$domain}\r\n"; + $send .= "User-Agent: {$useragent}\r\n"; $send .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n"; if (isset($postData) and is_array($postParams) and count($postParams) > 0) { @@ -1427,7 +1427,7 @@ if (!function_exists('passwordgenerate')) { $query3->execute(array($row['customID'], $id)); $value = ($id == 0) ? '' : $query3->fetchColumn(); - $return[] = array('customID' => $row['customID'], 'menu' => $text, 'name' => $row['name'], 'length' => $row['length'], 'type' => $row['type'], 'input' => "", 'value' => $value); + $return[] = array('customID' => $row['customID'], 'menu' => $text, 'name' => $row['name'], 'length' => $row['length'], 'type' => $row['type'], 'input' => "", 'value' => $value); } } else if ($action == 'save') { @@ -1684,7 +1684,7 @@ $(function() { * @return string */ function getLoginHeader($valueOfTitle){ - return preg_replace('/(.+)[\s](.+)/i', '${1} $2', $valueOfTitle, -1, $count); + return preg_replace('/(.+)[\s](.+)/i', '{$1} $2', $valueOfTitle, -1, $count); } function parseHeaders($data) diff --git a/stuff/methods/functions_gs.php b/stuff/methods/functions_gs.php index b94b64bc..42018217 100644 --- a/stuff/methods/functions_gs.php +++ b/stuff/methods/functions_gs.php @@ -110,7 +110,7 @@ if (!function_exists('eacchange')) { $mysql_port = (port($mysql_port)) ? $mysql_port : 3306; - $eacSql = new PDO("mysql:host=${mysql_server};dbname=${mysql_db};port=${mysql_port}", $mysql_user, $mysql_password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); + $eacSql = new PDO("mysql:host={$mysql_server};dbname={$mysql_db};port={$mysql_port}", $mysql_user, $mysql_password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); if ($dbConnect['debug'] == 1) { $eacSql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); @@ -269,7 +269,7 @@ if (!function_exists('eacchange')) { $protocols = array(); // Protocol list code taken from https://github.com/Austinb/GameQ/blob/v2/examples/list.php - $protocols_path = GAMEQ_BASE . 'gameq/protocols/'; + $protocols_path = 'third_party/gameq/GameQ/Protocols'; // Grab the dir with all the classes available $dir = dir($protocols_path); diff --git a/stuff/methods/functions_ssh_exec.php b/stuff/methods/functions_ssh_exec.php index f4eb43e2..125635eb 100644 --- a/stuff/methods/functions_ssh_exec.php +++ b/stuff/methods/functions_ssh_exec.php @@ -118,7 +118,7 @@ if (!function_exists('ssh2_execute')) { } if ($notified == $rSA['down_checks']) { - $query = ($resellerID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`=${resellerID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); + $query = ($resellerID == 0) ? $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE `resellerid`=0 AND `accounttype`='a'") : $sql->prepare("SELECT `id`,`mail_serverdown` FROM `userdata` WHERE (`id`={$resellerID} AND `id`=`resellerid`) OR `resellerid`=0 AND `accounttype`='a'"); $query->execute(); while ($row2 = $query->fetch(PDO::FETCH_ASSOC)) { if ($row2['mail_serverdown'] == 'Y') { diff --git a/stuff/settings.php b/stuff/settings.php index 9cc6dff8..5c0acbc8 100644 --- a/stuff/settings.php +++ b/stuff/settings.php @@ -76,7 +76,7 @@ if (isset($debug) and $debug == 1) { $dbConnect['debug'] = 0; } try { - $dbConnect['connect']="${dbConnect['type']}:host=${dbConnect['host']};dbname=${dbConnect['db']};charset=${dbConnect['charset']}"; + $dbConnect['connect']="{$dbConnect['type']}:host={$dbConnect['host']};dbname={$dbConnect['db']};charset={$dbConnect['charset']}"; $sql = new \PDO($dbConnect['connect'], $dbConnect['user'], $dbConnect['pwd']); if ($dbConnect['debug'] == 1) { diff --git a/stuff/user/userpanel_gserver.php b/stuff/user/userpanel_gserver.php index 3908948c..f9f960e6 100644 --- a/stuff/user/userpanel_gserver.php +++ b/stuff/user/userpanel_gserver.php @@ -480,21 +480,21 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $oldServerTemplate = $row['servertemplate']; - $fps = ($row['userfps'] == 'Y' and $ui->id("fps_${switchID}", 4, 'post')) ? $ui->id("fps_${switchID}", 4, 'post') : $row['fps']; - $tic = ($row['usertick'] == 'Y' and $ui->id("tic_${switchID}", 4, 'post')) ? $ui->id("tic_${switchID}", 4, 'post') : $row['tic']; - $map = ($row['usermap'] == 'Y' and $ui->mapname("map_${switchID}", 'post')) ? $ui->mapname("map_${switchID}", 'post') : $row['map']; - $mapGroup = ($row['usermap'] == 'Y' and $ui->mapname("mapGroup_${switchID}", 'post')) ? $ui->mapname("mapGroup_${switchID}", 'post') : $row['mapGroup']; - $uploaddir = ($row['user_uploaddir'] == 'Y' and $row['upload'] > 1 and $row['upload'] < 4) ? $ui->url("uploaddir_${switchID}", 'post') : $row['decypteduploaddir']; - $serverTemplate = ($ui->id("servertemplate_${switchID}", 1, 'post')) ? $ui->id("servertemplate_${switchID}", 1, 'post') : 1; - $modcmd = $ui->escaped("mod_${switchID}", 'post'); - $workShop = ($ui->active("workShop_${switchID}", 'post')) ? $ui->active("workShop_${switchID}", 'post') : 'Y'; - $workshopCollection = $ui->id("workshopCollection_${switchID}", 10, 'post') ? $ui->id("workshopCollection_${switchID}", 10, 'post') : null; - $webapiAuthkey = $ui->w("webapiAuthkey_${switchID}", 32, 'post'); - $steamServerToken = $ui->w("steamServerToken_${switchID}", 32, 'post'); + $fps = ($row['userfps'] == 'Y' and $ui->id("fps_{$switchID}", 4, 'post')) ? $ui->id("fps_{$switchID}", 4, 'post') : $row['fps']; + $tic = ($row['usertick'] == 'Y' and $ui->id("tic_{$switchID}", 4, 'post')) ? $ui->id("tic_{$switchID}", 4, 'post') : $row['tic']; + $map = ($row['usermap'] == 'Y' and $ui->mapname("map_{$switchID}", 'post')) ? $ui->mapname("map_{$switchID}", 'post') : $row['map']; + $mapGroup = ($row['usermap'] == 'Y' and $ui->mapname("mapGroup_{$switchID}", 'post')) ? $ui->mapname("mapGroup_{$switchID}", 'post') : $row['mapGroup']; + $uploaddir = ($row['user_uploaddir'] == 'Y' and $row['upload'] > 1 and $row['upload'] < 4) ? $ui->url("uploaddir_{$switchID}", 'post') : $row['decypteduploaddir']; + $serverTemplate = ($ui->id("servertemplate_{$switchID}", 1, 'post')) ? $ui->id("servertemplate_{$switchID}", 1, 'post') : 1; + $modcmd = $ui->escaped("mod_{$switchID}", 'post'); + $workShop = ($ui->active("workShop_{$switchID}", 'post')) ? $ui->active("workShop_{$switchID}", 'post') : 'Y'; + $workshopCollection = $ui->id("workshopCollection_{$switchID}", 10, 'post') ? $ui->id("workshopCollection_{$switchID}", 10, 'post') : null; + $webapiAuthkey = $ui->w("webapiAuthkey_{$switchID}", 32, 'post'); + $steamServerToken = $ui->w("steamServerToken_{$switchID}", 32, 'post'); - if ($ui->id("anticheat_${switchID}", 1, 'post')) { + if ($ui->id("anticheat_{$switchID}", 1, 'post')) { - $anticheat=($ui->id("anticheat_${switchID}", 1, 'post')>0) ? $ui->id("anticheat_${switchID}", 1, 'post') : 1; + $anticheat=($ui->id("anticheat_{$switchID}", 1, 'post')>0) ? $ui->id("anticheat_{$switchID}", 1, 'post') : 1; if ($row['shorten'] == 'cstrike' or $row['shorten'] == 'czero') { diff --git a/stuff/user/userpanel_tickets.php b/stuff/user/userpanel_tickets.php index d1f7d04e..49e81ef0 100644 --- a/stuff/user/userpanel_tickets.php +++ b/stuff/user/userpanel_tickets.php @@ -365,7 +365,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { foreach ($selected as $get) { - $temp .= ($i == 0) ? "`state`='${get}'" : " OR `state`='${get}'"; + $temp .= ($i == 0) ? "`state`='{$get}'" : " OR `state`='{$get}'"; $selected[] = $get; diff --git a/third_party/gameq_v2/gameq/Autoloader.php b/third_party/gameq/GameQ - Copy/Autoloader.php similarity index 100% rename from third_party/gameq_v2/gameq/Autoloader.php rename to third_party/gameq/GameQ - Copy/Autoloader.php diff --git a/third_party/gameq_v2/gameq/buffer.php b/third_party/gameq/GameQ - Copy/Buffer.php similarity index 100% rename from third_party/gameq_v2/gameq/buffer.php rename to third_party/gameq/GameQ - Copy/Buffer.php diff --git a/third_party/gameq_v2/gameq/exception/Protocol.php b/third_party/gameq/GameQ - Copy/Exception/Protocol.php similarity index 100% rename from third_party/gameq_v2/gameq/exception/Protocol.php rename to third_party/gameq/GameQ - Copy/Exception/Protocol.php diff --git a/third_party/gameq_v2/gameq/exception/Query.php b/third_party/gameq/GameQ - Copy/Exception/Query.php similarity index 100% rename from third_party/gameq_v2/gameq/exception/Query.php rename to third_party/gameq/GameQ - Copy/Exception/Query.php diff --git a/third_party/gameq_v2/gameq/exception/Server.php b/third_party/gameq/GameQ - Copy/Exception/Server.php similarity index 100% rename from third_party/gameq_v2/gameq/exception/Server.php rename to third_party/gameq/GameQ - Copy/Exception/Server.php diff --git a/third_party/gameq_v2/gameq/filters/Base.php b/third_party/gameq/GameQ - Copy/Filters/Base.php similarity index 100% rename from third_party/gameq_v2/gameq/filters/Base.php rename to third_party/gameq/GameQ - Copy/Filters/Base.php diff --git a/third_party/gameq_v2/gameq/filters/Normalize.php b/third_party/gameq/GameQ - Copy/Filters/Normalize.php similarity index 100% rename from third_party/gameq_v2/gameq/filters/Normalize.php rename to third_party/gameq/GameQ - Copy/Filters/Normalize.php diff --git a/third_party/gameq_v2/gameq/filters/Secondstohuman.php b/third_party/gameq/GameQ - Copy/Filters/Secondstohuman.php similarity index 100% rename from third_party/gameq_v2/gameq/filters/Secondstohuman.php rename to third_party/gameq/GameQ - Copy/Filters/Secondstohuman.php diff --git a/third_party/gameq_v2/gameq/filters/Stripcolors.php b/third_party/gameq/GameQ - Copy/Filters/Stripcolors.php similarity index 100% rename from third_party/gameq_v2/gameq/filters/Stripcolors.php rename to third_party/gameq/GameQ - Copy/Filters/Stripcolors.php diff --git a/third_party/gameq_v2/gameq/filters/Test.php b/third_party/gameq/GameQ - Copy/Filters/Test.php similarity index 100% rename from third_party/gameq_v2/gameq/filters/Test.php rename to third_party/gameq/GameQ - Copy/Filters/Test.php diff --git a/third_party/gameq_v2/gameq/GameQ.php b/third_party/gameq/GameQ - Copy/GameQ.php similarity index 100% rename from third_party/gameq_v2/gameq/GameQ.php rename to third_party/gameq/GameQ - Copy/GameQ.php diff --git a/third_party/gameq_v2/gameq/Protocol.php b/third_party/gameq/GameQ - Copy/Protocol.php similarity index 100% rename from third_party/gameq_v2/gameq/Protocol.php rename to third_party/gameq/GameQ - Copy/Protocol.php diff --git a/third_party/gameq_v2/gameq/protocols/aa3.php b/third_party/gameq/GameQ - Copy/Protocols/Aa3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/aa3.php rename to third_party/gameq/GameQ - Copy/Protocols/Aa3.php diff --git a/third_party/gameq_v2/gameq/protocols/Aapg.php b/third_party/gameq/GameQ - Copy/Protocols/Aapg.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Aapg.php rename to third_party/gameq/GameQ - Copy/Protocols/Aapg.php diff --git a/third_party/gameq_v2/gameq/protocols/Arkse.php b/third_party/gameq/GameQ - Copy/Protocols/Arkse.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Arkse.php rename to third_party/gameq/GameQ - Copy/Protocols/Arkse.php diff --git a/third_party/gameq_v2/gameq/protocols/Arma.php b/third_party/gameq/GameQ - Copy/Protocols/Arma.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Arma.php rename to third_party/gameq/GameQ - Copy/Protocols/Arma.php diff --git a/third_party/gameq_v2/gameq/protocols/Arma3.php b/third_party/gameq/GameQ - Copy/Protocols/Arma3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Arma3.php rename to third_party/gameq/GameQ - Copy/Protocols/Arma3.php diff --git a/third_party/gameq_v2/gameq/protocols/armedassault2oa.php b/third_party/gameq/GameQ - Copy/Protocols/Armedassault2oa.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/armedassault2oa.php rename to third_party/gameq/GameQ - Copy/Protocols/Armedassault2oa.php diff --git a/third_party/gameq_v2/gameq/protocols/armedassault3.php b/third_party/gameq/GameQ - Copy/Protocols/Armedassault3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/armedassault3.php rename to third_party/gameq/GameQ - Copy/Protocols/Armedassault3.php diff --git a/third_party/gameq_v2/gameq/protocols/ase.php b/third_party/gameq/GameQ - Copy/Protocols/Ase.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ase.php rename to third_party/gameq/GameQ - Copy/Protocols/Ase.php diff --git a/third_party/gameq_v2/gameq/protocols/Atlas.php b/third_party/gameq/GameQ - Copy/Protocols/Atlas.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Atlas.php rename to third_party/gameq/GameQ - Copy/Protocols/Atlas.php diff --git a/third_party/gameq_v2/gameq/protocols/Avorion.php b/third_party/gameq/GameQ - Copy/Protocols/Avorion.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Avorion.php rename to third_party/gameq/GameQ - Copy/Protocols/Avorion.php diff --git a/third_party/gameq_v2/gameq/protocols/Barotrauma.php b/third_party/gameq/GameQ - Copy/Protocols/Barotrauma.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Barotrauma.php rename to third_party/gameq/GameQ - Copy/Protocols/Barotrauma.php diff --git a/third_party/gameq_v2/gameq/protocols/Batt1944.php b/third_party/gameq/GameQ - Copy/Protocols/Batt1944.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Batt1944.php rename to third_party/gameq/GameQ - Copy/Protocols/Batt1944.php diff --git a/third_party/gameq_v2/gameq/protocols/bf1942.php b/third_party/gameq/GameQ - Copy/Protocols/Bf1942.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/bf1942.php rename to third_party/gameq/GameQ - Copy/Protocols/Bf1942.php diff --git a/third_party/gameq_v2/gameq/protocols/bf2.php b/third_party/gameq/GameQ - Copy/Protocols/Bf2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/bf2.php rename to third_party/gameq/GameQ - Copy/Protocols/Bf2.php diff --git a/third_party/gameq_v2/gameq/protocols/bf3.php b/third_party/gameq/GameQ - Copy/Protocols/Bf3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/bf3.php rename to third_party/gameq/GameQ - Copy/Protocols/Bf3.php diff --git a/third_party/gameq_v2/gameq/protocols/bf4.php b/third_party/gameq/GameQ - Copy/Protocols/Bf4.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/bf4.php rename to third_party/gameq/GameQ - Copy/Protocols/Bf4.php diff --git a/third_party/gameq_v2/gameq/protocols/bfbc2.php b/third_party/gameq/GameQ - Copy/Protocols/Bfbc2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/bfbc2.php rename to third_party/gameq/GameQ - Copy/Protocols/Bfbc2.php diff --git a/third_party/gameq_v2/gameq/protocols/Bfh.php b/third_party/gameq/GameQ - Copy/Protocols/Bfh.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Bfh.php rename to third_party/gameq/GameQ - Copy/Protocols/Bfh.php diff --git a/third_party/gameq_v2/gameq/protocols/Blackmesa.php b/third_party/gameq/GameQ - Copy/Protocols/Blackmesa.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Blackmesa.php rename to third_party/gameq/GameQ - Copy/Protocols/Blackmesa.php diff --git a/third_party/gameq_v2/gameq/protocols/brink.php b/third_party/gameq/GameQ - Copy/Protocols/Brink.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/brink.php rename to third_party/gameq/GameQ - Copy/Protocols/Brink.php diff --git a/third_party/gameq_v2/gameq/protocols/Citadel.php b/third_party/gameq/GameQ - Copy/Protocols/Citadel.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Citadel.php rename to third_party/gameq/GameQ - Copy/Protocols/Citadel.php diff --git a/third_party/gameq_v2/gameq/protocols/cod.php b/third_party/gameq/GameQ - Copy/Protocols/Cod.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/cod.php rename to third_party/gameq/GameQ - Copy/Protocols/Cod.php diff --git a/third_party/gameq_v2/gameq/protocols/cod2.php b/third_party/gameq/GameQ - Copy/Protocols/Cod2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/cod2.php rename to third_party/gameq/GameQ - Copy/Protocols/Cod2.php diff --git a/third_party/gameq_v2/gameq/protocols/cod4.php b/third_party/gameq/GameQ - Copy/Protocols/Cod4.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/cod4.php rename to third_party/gameq/GameQ - Copy/Protocols/Cod4.php diff --git a/third_party/gameq_v2/gameq/protocols/Codmw2.php b/third_party/gameq/GameQ - Copy/Protocols/Codmw2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Codmw2.php rename to third_party/gameq/GameQ - Copy/Protocols/Codmw2.php diff --git a/third_party/gameq_v2/gameq/protocols/codmw3.php b/third_party/gameq/GameQ - Copy/Protocols/Codmw3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/codmw3.php rename to third_party/gameq/GameQ - Copy/Protocols/Codmw3.php diff --git a/third_party/gameq_v2/gameq/protocols/coduo.php b/third_party/gameq/GameQ - Copy/Protocols/Coduo.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/coduo.php rename to third_party/gameq/GameQ - Copy/Protocols/Coduo.php diff --git a/third_party/gameq_v2/gameq/protocols/codwaw.php b/third_party/gameq/GameQ - Copy/Protocols/Codwaw.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/codwaw.php rename to third_party/gameq/GameQ - Copy/Protocols/Codwaw.php diff --git a/third_party/gameq_v2/gameq/protocols/Conanexiles.php b/third_party/gameq/GameQ - Copy/Protocols/Conanexiles.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Conanexiles.php rename to third_party/gameq/GameQ - Copy/Protocols/Conanexiles.php diff --git a/third_party/gameq_v2/gameq/protocols/Contagion.php b/third_party/gameq/GameQ - Copy/Protocols/Contagion.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Contagion.php rename to third_party/gameq/GameQ - Copy/Protocols/Contagion.php diff --git a/third_party/gameq_v2/gameq/protocols/crysis.php b/third_party/gameq/GameQ - Copy/Protocols/Crysis.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/crysis.php rename to third_party/gameq/GameQ - Copy/Protocols/Crysis.php diff --git a/third_party/gameq_v2/gameq/protocols/crysis2.php b/third_party/gameq/GameQ - Copy/Protocols/Crysis2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/crysis2.php rename to third_party/gameq/GameQ - Copy/Protocols/Crysis2.php diff --git a/third_party/gameq_v2/gameq/protocols/crysiswars.php b/third_party/gameq/GameQ - Copy/Protocols/Crysiswars.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/crysiswars.php rename to third_party/gameq/GameQ - Copy/Protocols/Crysiswars.php diff --git a/third_party/gameq_v2/gameq/protocols/Cs15.php b/third_party/gameq/GameQ - Copy/Protocols/Cs15.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Cs15.php rename to third_party/gameq/GameQ - Copy/Protocols/Cs15.php diff --git a/third_party/gameq_v2/gameq/protocols/cs16.php b/third_party/gameq/GameQ - Copy/Protocols/Cs16.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/cs16.php rename to third_party/gameq/GameQ - Copy/Protocols/Cs16.php diff --git a/third_party/gameq_v2/gameq/protocols/Cs2d.php b/third_party/gameq/GameQ - Copy/Protocols/Cs2d.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Cs2d.php rename to third_party/gameq/GameQ - Copy/Protocols/Cs2d.php diff --git a/third_party/gameq_v2/gameq/protocols/cscz.php b/third_party/gameq/GameQ - Copy/Protocols/Cscz.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/cscz.php rename to third_party/gameq/GameQ - Copy/Protocols/Cscz.php diff --git a/third_party/gameq_v2/gameq/protocols/csgo.php b/third_party/gameq/GameQ - Copy/Protocols/Csgo.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/csgo.php rename to third_party/gameq/GameQ - Copy/Protocols/Csgo.php diff --git a/third_party/gameq_v2/gameq/protocols/css.php b/third_party/gameq/GameQ - Copy/Protocols/Css.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/css.php rename to third_party/gameq/GameQ - Copy/Protocols/Css.php diff --git a/third_party/gameq_v2/gameq/protocols/Dal.php b/third_party/gameq/GameQ - Copy/Protocols/Dal.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Dal.php rename to third_party/gameq/GameQ - Copy/Protocols/Dal.php diff --git a/third_party/gameq_v2/gameq/protocols/dayz.php b/third_party/gameq/GameQ - Copy/Protocols/Dayz.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/dayz.php rename to third_party/gameq/GameQ - Copy/Protocols/Dayz.php diff --git a/third_party/gameq_v2/gameq/protocols/dayzmod.php b/third_party/gameq/GameQ - Copy/Protocols/Dayzmod.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/dayzmod.php rename to third_party/gameq/GameQ - Copy/Protocols/Dayzmod.php diff --git a/third_party/gameq_v2/gameq/protocols/dod.php b/third_party/gameq/GameQ - Copy/Protocols/Dod.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/dod.php rename to third_party/gameq/GameQ - Copy/Protocols/Dod.php diff --git a/third_party/gameq_v2/gameq/protocols/dods.php b/third_party/gameq/GameQ - Copy/Protocols/Dods.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/dods.php rename to third_party/gameq/GameQ - Copy/Protocols/Dods.php diff --git a/third_party/gameq_v2/gameq/protocols/doom3.php b/third_party/gameq/GameQ - Copy/Protocols/Doom3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/doom3.php rename to third_party/gameq/GameQ - Copy/Protocols/Doom3.php diff --git a/third_party/gameq_v2/gameq/protocols/Dow.php b/third_party/gameq/GameQ - Copy/Protocols/Dow.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Dow.php rename to third_party/gameq/GameQ - Copy/Protocols/Dow.php diff --git a/third_party/gameq_v2/gameq/protocols/Eco.php b/third_party/gameq/GameQ - Copy/Protocols/Eco.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Eco.php rename to third_party/gameq/GameQ - Copy/Protocols/Eco.php diff --git a/third_party/gameq_v2/gameq/protocols/Egs.php b/third_party/gameq/GameQ - Copy/Protocols/Egs.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Egs.php rename to third_party/gameq/GameQ - Copy/Protocols/Egs.php diff --git a/third_party/gameq_v2/gameq/protocols/et.php b/third_party/gameq/GameQ - Copy/Protocols/Et.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/et.php rename to third_party/gameq/GameQ - Copy/Protocols/Et.php diff --git a/third_party/gameq_v2/gameq/protocols/etqw.php b/third_party/gameq/GameQ - Copy/Protocols/Etqw.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/etqw.php rename to third_party/gameq/GameQ - Copy/Protocols/Etqw.php diff --git a/third_party/gameq_v2/gameq/protocols/ffe.php b/third_party/gameq/GameQ - Copy/Protocols/Ffe.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ffe.php rename to third_party/gameq/GameQ - Copy/Protocols/Ffe.php diff --git a/third_party/gameq_v2/gameq/protocols/ffow.php b/third_party/gameq/GameQ - Copy/Protocols/Ffow.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ffow.php rename to third_party/gameq/GameQ - Copy/Protocols/Ffow.php diff --git a/third_party/gameq_v2/gameq/protocols/fof.php b/third_party/gameq/GameQ - Copy/Protocols/Fof.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/fof.php rename to third_party/gameq/GameQ - Copy/Protocols/Fof.php diff --git a/third_party/gameq_v2/gameq/protocols/gamespy.php b/third_party/gameq/GameQ - Copy/Protocols/Gamespy.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/gamespy.php rename to third_party/gameq/GameQ - Copy/Protocols/Gamespy.php diff --git a/third_party/gameq_v2/gameq/protocols/gamespy2.php b/third_party/gameq/GameQ - Copy/Protocols/Gamespy2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/gamespy2.php rename to third_party/gameq/GameQ - Copy/Protocols/Gamespy2.php diff --git a/third_party/gameq_v2/gameq/protocols/gamespy3.php b/third_party/gameq/GameQ - Copy/Protocols/Gamespy3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/gamespy3.php rename to third_party/gameq/GameQ - Copy/Protocols/Gamespy3.php diff --git a/third_party/gameq_v2/gameq/protocols/gamespy4.php b/third_party/gameq/GameQ - Copy/Protocols/Gamespy4.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/gamespy4.php rename to third_party/gameq/GameQ - Copy/Protocols/Gamespy4.php diff --git a/third_party/gameq_v2/gameq/protocols/gmod.php b/third_party/gameq/GameQ - Copy/Protocols/Gmod.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/gmod.php rename to third_party/gameq/GameQ - Copy/Protocols/Gmod.php diff --git a/third_party/gameq_v2/gameq/protocols/Grav.php b/third_party/gameq/GameQ - Copy/Protocols/Grav.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Grav.php rename to third_party/gameq/GameQ - Copy/Protocols/Grav.php diff --git a/third_party/gameq_v2/gameq/protocols/Gta5m.php b/third_party/gameq/GameQ - Copy/Protocols/Gta5m.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Gta5m.php rename to third_party/gameq/GameQ - Copy/Protocols/Gta5m.php diff --git a/third_party/gameq_v2/gameq/protocols/Gtan.php b/third_party/gameq/GameQ - Copy/Protocols/Gtan.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Gtan.php rename to third_party/gameq/GameQ - Copy/Protocols/Gtan.php diff --git a/third_party/gameq_v2/gameq/protocols/Gtar.php b/third_party/gameq/GameQ - Copy/Protocols/Gtar.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Gtar.php rename to third_party/gameq/GameQ - Copy/Protocols/Gtar.php diff --git a/third_party/gameq_v2/gameq/protocols/Had2.php b/third_party/gameq/GameQ - Copy/Protocols/Had2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Had2.php rename to third_party/gameq/GameQ - Copy/Protocols/Had2.php diff --git a/third_party/gameq_v2/gameq/protocols/Halo.php b/third_party/gameq/GameQ - Copy/Protocols/Halo.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Halo.php rename to third_party/gameq/GameQ - Copy/Protocols/Halo.php diff --git a/third_party/gameq_v2/gameq/protocols/Hl1.php b/third_party/gameq/GameQ - Copy/Protocols/Hl1.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Hl1.php rename to third_party/gameq/GameQ - Copy/Protocols/Hl1.php diff --git a/third_party/gameq_v2/gameq/protocols/hl2dm.php b/third_party/gameq/GameQ - Copy/Protocols/Hl2dm.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/hl2dm.php rename to third_party/gameq/GameQ - Copy/Protocols/Hl2dm.php diff --git a/third_party/gameq_v2/gameq/protocols/Hll.php b/third_party/gameq/GameQ - Copy/Protocols/Hll.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Hll.php rename to third_party/gameq/GameQ - Copy/Protocols/Hll.php diff --git a/third_party/gameq_v2/gameq/protocols/http.php b/third_party/gameq/GameQ - Copy/Protocols/Http.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/http.php rename to third_party/gameq/GameQ - Copy/Protocols/Http.php diff --git a/third_party/gameq_v2/gameq/protocols/Hurtworld.php b/third_party/gameq/GameQ - Copy/Protocols/Hurtworld.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Hurtworld.php rename to third_party/gameq/GameQ - Copy/Protocols/Hurtworld.php diff --git a/third_party/gameq_v2/gameq/protocols/insurgency.php b/third_party/gameq/GameQ - Copy/Protocols/Insurgency.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/insurgency.php rename to third_party/gameq/GameQ - Copy/Protocols/Insurgency.php diff --git a/third_party/gameq_v2/gameq/protocols/Insurgencysand.php b/third_party/gameq/GameQ - Copy/Protocols/Insurgencysand.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Insurgencysand.php rename to third_party/gameq/GameQ - Copy/Protocols/Insurgencysand.php diff --git a/third_party/gameq_v2/gameq/protocols/Jediacademy.php b/third_party/gameq/GameQ - Copy/Protocols/Jediacademy.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Jediacademy.php rename to third_party/gameq/GameQ - Copy/Protocols/Jediacademy.php diff --git a/third_party/gameq_v2/gameq/protocols/Jedioutcast.php b/third_party/gameq/GameQ - Copy/Protocols/Jedioutcast.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Jedioutcast.php rename to third_party/gameq/GameQ - Copy/Protocols/Jedioutcast.php diff --git a/third_party/gameq_v2/gameq/protocols/Justcause2.php b/third_party/gameq/GameQ - Copy/Protocols/Justcause2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Justcause2.php rename to third_party/gameq/GameQ - Copy/Protocols/Justcause2.php diff --git a/third_party/gameq_v2/gameq/protocols/Justcause3.php b/third_party/gameq/GameQ - Copy/Protocols/Justcause3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Justcause3.php rename to third_party/gameq/GameQ - Copy/Protocols/Justcause3.php diff --git a/third_party/gameq_v2/gameq/protocols/killingfloor.php b/third_party/gameq/GameQ - Copy/Protocols/Killingfloor.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/killingfloor.php rename to third_party/gameq/GameQ - Copy/Protocols/Killingfloor.php diff --git a/third_party/gameq_v2/gameq/protocols/Killingfloor2.php b/third_party/gameq/GameQ - Copy/Protocols/Killingfloor2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Killingfloor2.php rename to third_party/gameq/GameQ - Copy/Protocols/Killingfloor2.php diff --git a/third_party/gameq_v2/gameq/protocols/Kingpin.php b/third_party/gameq/GameQ - Copy/Protocols/Kingpin.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Kingpin.php rename to third_party/gameq/GameQ - Copy/Protocols/Kingpin.php diff --git a/third_party/gameq_v2/gameq/protocols/l4d.php b/third_party/gameq/GameQ - Copy/Protocols/L4d.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/l4d.php rename to third_party/gameq/GameQ - Copy/Protocols/L4d.php diff --git a/third_party/gameq_v2/gameq/protocols/l4d2.php b/third_party/gameq/GameQ - Copy/Protocols/L4d2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/l4d2.php rename to third_party/gameq/GameQ - Copy/Protocols/L4d2.php diff --git a/third_party/gameq_v2/gameq/protocols/Lhmp.php b/third_party/gameq/GameQ - Copy/Protocols/Lhmp.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Lhmp.php rename to third_party/gameq/GameQ - Copy/Protocols/Lhmp.php diff --git a/third_party/gameq_v2/gameq/protocols/m2mp.php b/third_party/gameq/GameQ - Copy/Protocols/M2mp.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/m2mp.php rename to third_party/gameq/GameQ - Copy/Protocols/M2mp.php diff --git a/third_party/gameq_v2/gameq/protocols/minecraft.php b/third_party/gameq/GameQ - Copy/Protocols/Minecraft.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/minecraft.php rename to third_party/gameq/GameQ - Copy/Protocols/Minecraft.php diff --git a/third_party/gameq_v2/gameq/protocols/Minecraftpe.php b/third_party/gameq/GameQ - Copy/Protocols/Minecraftpe.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Minecraftpe.php rename to third_party/gameq/GameQ - Copy/Protocols/Minecraftpe.php diff --git a/third_party/gameq_v2/gameq/protocols/Miscreated.php b/third_party/gameq/GameQ - Copy/Protocols/Miscreated.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Miscreated.php rename to third_party/gameq/GameQ - Copy/Protocols/Miscreated.php diff --git a/third_party/gameq_v2/gameq/protocols/Modiverse.php b/third_party/gameq/GameQ - Copy/Protocols/Modiverse.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Modiverse.php rename to third_party/gameq/GameQ - Copy/Protocols/Modiverse.php diff --git a/third_party/gameq_v2/gameq/protocols/mohaa.php b/third_party/gameq/GameQ - Copy/Protocols/Mohaa.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/mohaa.php rename to third_party/gameq/GameQ - Copy/Protocols/Mohaa.php diff --git a/third_party/gameq_v2/gameq/protocols/Mordhau.php b/third_party/gameq/GameQ - Copy/Protocols/Mordhau.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Mordhau.php rename to third_party/gameq/GameQ - Copy/Protocols/Mordhau.php diff --git a/third_party/gameq_v2/gameq/protocols/mta.php b/third_party/gameq/GameQ - Copy/Protocols/Mta.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/mta.php rename to third_party/gameq/GameQ - Copy/Protocols/Mta.php diff --git a/third_party/gameq_v2/gameq/protocols/mumble.php b/third_party/gameq/GameQ - Copy/Protocols/Mumble.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/mumble.php rename to third_party/gameq/GameQ - Copy/Protocols/Mumble.php diff --git a/third_party/gameq_v2/gameq/protocols/nmrih.php b/third_party/gameq/GameQ - Copy/Protocols/Nmrih.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/nmrih.php rename to third_party/gameq/GameQ - Copy/Protocols/Nmrih.php diff --git a/third_party/gameq_v2/gameq/protocols/ns2.php b/third_party/gameq/GameQ - Copy/Protocols/Ns2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ns2.php rename to third_party/gameq/GameQ - Copy/Protocols/Ns2.php diff --git a/third_party/gameq_v2/gameq/protocols/Of.php b/third_party/gameq/GameQ - Copy/Protocols/Of.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Of.php rename to third_party/gameq/GameQ - Copy/Protocols/Of.php diff --git a/third_party/gameq_v2/gameq/protocols/Openttd.php b/third_party/gameq/GameQ - Copy/Protocols/Openttd.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Openttd.php rename to third_party/gameq/GameQ - Copy/Protocols/Openttd.php diff --git a/third_party/gameq_v2/gameq/protocols/Pixark.php b/third_party/gameq/GameQ - Copy/Protocols/Pixark.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Pixark.php rename to third_party/gameq/GameQ - Copy/Protocols/Pixark.php diff --git a/third_party/gameq_v2/gameq/protocols/Postscriptum.php b/third_party/gameq/GameQ - Copy/Protocols/Postscriptum.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Postscriptum.php rename to third_party/gameq/GameQ - Copy/Protocols/Postscriptum.php diff --git a/third_party/gameq_v2/gameq/protocols/Projectrealitybf2.php b/third_party/gameq/GameQ - Copy/Protocols/Projectrealitybf2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Projectrealitybf2.php rename to third_party/gameq/GameQ - Copy/Protocols/Projectrealitybf2.php diff --git a/third_party/gameq_v2/gameq/protocols/quake2.php b/third_party/gameq/GameQ - Copy/Protocols/Quake2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/quake2.php rename to third_party/gameq/GameQ - Copy/Protocols/Quake2.php diff --git a/third_party/gameq_v2/gameq/protocols/quake3.php b/third_party/gameq/GameQ - Copy/Protocols/Quake3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/quake3.php rename to third_party/gameq/GameQ - Copy/Protocols/Quake3.php diff --git a/third_party/gameq_v2/gameq/protocols/quake4.php b/third_party/gameq/GameQ - Copy/Protocols/Quake4.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/quake4.php rename to third_party/gameq/GameQ - Copy/Protocols/Quake4.php diff --git a/third_party/gameq_v2/gameq/protocols/Quakelive.php b/third_party/gameq/GameQ - Copy/Protocols/Quakelive.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Quakelive.php rename to third_party/gameq/GameQ - Copy/Protocols/Quakelive.php diff --git a/third_party/gameq_v2/gameq/protocols/redorchestra2.php b/third_party/gameq/GameQ - Copy/Protocols/Redorchestra2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/redorchestra2.php rename to third_party/gameq/GameQ - Copy/Protocols/Redorchestra2.php diff --git a/third_party/gameq_v2/gameq/protocols/Redorchestraostfront.php b/third_party/gameq/GameQ - Copy/Protocols/Redorchestraostfront.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Redorchestraostfront.php rename to third_party/gameq/GameQ - Copy/Protocols/Redorchestraostfront.php diff --git a/third_party/gameq_v2/gameq/protocols/Rf2.php b/third_party/gameq/GameQ - Copy/Protocols/Rf2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Rf2.php rename to third_party/gameq/GameQ - Copy/Protocols/Rf2.php diff --git a/third_party/gameq_v2/gameq/protocols/Risingstorm2.php b/third_party/gameq/GameQ - Copy/Protocols/Risingstorm2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Risingstorm2.php rename to third_party/gameq/GameQ - Copy/Protocols/Risingstorm2.php diff --git a/third_party/gameq_v2/gameq/protocols/rust.php b/third_party/gameq/GameQ - Copy/Protocols/Rust.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/rust.php rename to third_party/gameq/GameQ - Copy/Protocols/Rust.php diff --git a/third_party/gameq_v2/gameq/protocols/samp.php b/third_party/gameq/GameQ - Copy/Protocols/Samp.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/samp.php rename to third_party/gameq/GameQ - Copy/Protocols/Samp.php diff --git a/third_party/gameq_v2/gameq/protocols/Sco.php b/third_party/gameq/GameQ - Copy/Protocols/Sco.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Sco.php rename to third_party/gameq/GameQ - Copy/Protocols/Sco.php diff --git a/third_party/gameq_v2/gameq/protocols/Serioussam.php b/third_party/gameq/GameQ - Copy/Protocols/Serioussam.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Serioussam.php rename to third_party/gameq/GameQ - Copy/Protocols/Serioussam.php diff --git a/third_party/gameq_v2/gameq/protocols/Sevendaystodie.php b/third_party/gameq/GameQ - Copy/Protocols/Sevendaystodie.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Sevendaystodie.php rename to third_party/gameq/GameQ - Copy/Protocols/Sevendaystodie.php diff --git a/third_party/gameq_v2/gameq/protocols/Ship.php b/third_party/gameq/GameQ - Copy/Protocols/Ship.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Ship.php rename to third_party/gameq/GameQ - Copy/Protocols/Ship.php diff --git a/third_party/gameq_v2/gameq/protocols/sof2.php b/third_party/gameq/GameQ - Copy/Protocols/Sof2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/sof2.php rename to third_party/gameq/GameQ - Copy/Protocols/Sof2.php diff --git a/third_party/gameq_v2/gameq/protocols/soldat.php b/third_party/gameq/GameQ - Copy/Protocols/Soldat.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/soldat.php rename to third_party/gameq/GameQ - Copy/Protocols/Soldat.php diff --git a/third_party/gameq_v2/gameq/protocols/source.php b/third_party/gameq/GameQ - Copy/Protocols/Source.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/source.php rename to third_party/gameq/GameQ - Copy/Protocols/Source.php diff --git a/third_party/gameq_v2/gameq/protocols/Spaceengineers.php b/third_party/gameq/GameQ - Copy/Protocols/Spaceengineers.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Spaceengineers.php rename to third_party/gameq/GameQ - Copy/Protocols/Spaceengineers.php diff --git a/third_party/gameq_v2/gameq/protocols/Squad.php b/third_party/gameq/GameQ - Copy/Protocols/Squad.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Squad.php rename to third_party/gameq/GameQ - Copy/Protocols/Squad.php diff --git a/third_party/gameq_v2/gameq/protocols/Starmade.php b/third_party/gameq/GameQ - Copy/Protocols/Starmade.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Starmade.php rename to third_party/gameq/GameQ - Copy/Protocols/Starmade.php diff --git a/third_party/gameq_v2/gameq/protocols/Stormworks.php b/third_party/gameq/GameQ - Copy/Protocols/Stormworks.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Stormworks.php rename to third_party/gameq/GameQ - Copy/Protocols/Stormworks.php diff --git a/third_party/gameq_v2/gameq/protocols/Swat4.php b/third_party/gameq/GameQ - Copy/Protocols/Swat4.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Swat4.php rename to third_party/gameq/GameQ - Copy/Protocols/Swat4.php diff --git a/third_party/gameq_v2/gameq/protocols/teamspeak2.php b/third_party/gameq/GameQ - Copy/Protocols/Teamspeak2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/teamspeak2.php rename to third_party/gameq/GameQ - Copy/Protocols/Teamspeak2.php diff --git a/third_party/gameq_v2/gameq/protocols/teamspeak3.php b/third_party/gameq/GameQ - Copy/Protocols/Teamspeak3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/teamspeak3.php rename to third_party/gameq/GameQ - Copy/Protocols/Teamspeak3.php diff --git a/third_party/gameq_v2/gameq/protocols/teeworlds.php b/third_party/gameq/GameQ - Copy/Protocols/Teeworlds.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/teeworlds.php rename to third_party/gameq/GameQ - Copy/Protocols/Teeworlds.php diff --git a/third_party/gameq_v2/gameq/protocols/terraria.php b/third_party/gameq/GameQ - Copy/Protocols/Terraria.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/terraria.php rename to third_party/gameq/GameQ - Copy/Protocols/Terraria.php diff --git a/third_party/gameq_v2/gameq/protocols/tf2.php b/third_party/gameq/GameQ - Copy/Protocols/Tf2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/tf2.php rename to third_party/gameq/GameQ - Copy/Protocols/Tf2.php diff --git a/third_party/gameq_v2/gameq/protocols/Theforrest.php b/third_party/gameq/GameQ - Copy/Protocols/Theforrest.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Theforrest.php rename to third_party/gameq/GameQ - Copy/Protocols/Theforrest.php diff --git a/third_party/gameq_v2/gameq/protocols/Tibia.php b/third_party/gameq/GameQ - Copy/Protocols/Tibia.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Tibia.php rename to third_party/gameq/GameQ - Copy/Protocols/Tibia.php diff --git a/third_party/gameq_v2/gameq/protocols/tshock.php b/third_party/gameq/GameQ - Copy/Protocols/Tshock.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/tshock.php rename to third_party/gameq/GameQ - Copy/Protocols/Tshock.php diff --git a/third_party/gameq_v2/gameq/protocols/unreal2.php b/third_party/gameq/GameQ - Copy/Protocols/Unreal2.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/unreal2.php rename to third_party/gameq/GameQ - Copy/Protocols/Unreal2.php diff --git a/third_party/gameq_v2/gameq/protocols/Unturned.php b/third_party/gameq/GameQ - Copy/Protocols/Unturned.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Unturned.php rename to third_party/gameq/GameQ - Copy/Protocols/Unturned.php diff --git a/third_party/gameq_v2/gameq/protocols/Urbanterror.php b/third_party/gameq/GameQ - Copy/Protocols/Urbanterror.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Urbanterror.php rename to third_party/gameq/GameQ - Copy/Protocols/Urbanterror.php diff --git a/third_party/gameq_v2/gameq/protocols/ut.php b/third_party/gameq/GameQ - Copy/Protocols/Ut.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ut.php rename to third_party/gameq/GameQ - Copy/Protocols/Ut.php diff --git a/third_party/gameq_v2/gameq/protocols/ut2004.php b/third_party/gameq/GameQ - Copy/Protocols/Ut2004.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ut2004.php rename to third_party/gameq/GameQ - Copy/Protocols/Ut2004.php diff --git a/third_party/gameq_v2/gameq/protocols/ut3.php b/third_party/gameq/GameQ - Copy/Protocols/Ut3.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ut3.php rename to third_party/gameq/GameQ - Copy/Protocols/Ut3.php diff --git a/third_party/gameq_v2/gameq/protocols/Valheim.php b/third_party/gameq/GameQ - Copy/Protocols/Valheim.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Valheim.php rename to third_party/gameq/GameQ - Copy/Protocols/Valheim.php diff --git a/third_party/gameq_v2/gameq/protocols/ventrilo.php b/third_party/gameq/GameQ - Copy/Protocols/Ventrilo.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/ventrilo.php rename to third_party/gameq/GameQ - Copy/Protocols/Ventrilo.php diff --git a/third_party/gameq_v2/gameq/protocols/Vrising.php b/third_party/gameq/GameQ - Copy/Protocols/Vrising.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Vrising.php rename to third_party/gameq/GameQ - Copy/Protocols/Vrising.php diff --git a/third_party/gameq_v2/gameq/protocols/warsow.php b/third_party/gameq/GameQ - Copy/Protocols/Warsow.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/warsow.php rename to third_party/gameq/GameQ - Copy/Protocols/Warsow.php diff --git a/third_party/gameq_v2/gameq/protocols/Won.php b/third_party/gameq/GameQ - Copy/Protocols/Won.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Won.php rename to third_party/gameq/GameQ - Copy/Protocols/Won.php diff --git a/third_party/gameq_v2/gameq/protocols/Wurm.php b/third_party/gameq/GameQ - Copy/Protocols/Wurm.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Wurm.php rename to third_party/gameq/GameQ - Copy/Protocols/Wurm.php diff --git a/third_party/gameq_v2/gameq/protocols/Zomboid.php b/third_party/gameq/GameQ - Copy/Protocols/Zomboid.php similarity index 100% rename from third_party/gameq_v2/gameq/protocols/Zomboid.php rename to third_party/gameq/GameQ - Copy/Protocols/Zomboid.php diff --git a/third_party/gameq_v2/gameq/query/Core.php b/third_party/gameq/GameQ - Copy/Query/Core.php similarity index 100% rename from third_party/gameq_v2/gameq/query/Core.php rename to third_party/gameq/GameQ - Copy/Query/Core.php diff --git a/third_party/gameq_v2/gameq/query/Native.php b/third_party/gameq/GameQ - Copy/Query/Native.php similarity index 100% rename from third_party/gameq_v2/gameq/query/Native.php rename to third_party/gameq/GameQ - Copy/Query/Native.php diff --git a/third_party/gameq_v2/gameq/result.php b/third_party/gameq/GameQ - Copy/Result.php similarity index 100% rename from third_party/gameq_v2/gameq/result.php rename to third_party/gameq/GameQ - Copy/Result.php diff --git a/third_party/gameq_v2/gameq/Server.php b/third_party/gameq/GameQ - Copy/Server.php similarity index 100% rename from third_party/gameq_v2/gameq/Server.php rename to third_party/gameq/GameQ - Copy/Server.php diff --git a/third_party/gameq_v2/GameQ.php b/third_party/gameq_v2/GameQ.php deleted file mode 100644 index 1a461153..00000000 --- a/third_party/gameq_v2/GameQ.php +++ /dev/null @@ -1,877 +0,0 @@ -. - */ - -/* - * Init some stuff - */ -// Figure out where we are so we can set the proper references -define('GAMEQ_BASE', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR); - -// Define the autoload so we can require files easy -spl_autoload_register(array('GameQ', 'auto_load')); - -/** - * Base GameQ Class - * - * This class should be the only one that is included when you use GameQ to query - * any games servers. All necessary sub-classes are loaded as needed. - * - * Requirements: See wiki or README for more information on the requirements - * - PHP 5.2+ (Recommended 5.3+) - * * Bzip2 - http://www.php.net/manual/en/book.bzip2.php - * * Zlib - http://www.php.net/manual/en/book.zlib.php - * - * @author Austin Bischoff - */ -class GameQ -{ - /* - * Constants - */ - const VERSION = '2.0.1'; - - /* - * Server array keys - */ - const SERVER_TYPE = 'type'; - const SERVER_HOST = 'host'; - const SERVER_ID = 'id'; - const SERVER_OPTIONS = 'options'; - - /* Static Section */ - protected static $instance = NULL; - - /** - * Create a new instance of this class - */ - public static function factory() - { - // Create a new instance - self::$instance = new self(); - - // Return this new instance - return self::$instance; - } - - /** - * Attempt to auto-load a class based on the name - * - * @param string $class - * @throws GameQException - */ - public static function auto_load($class) - { - try - { - // Transform the class name into a path - $file = str_replace('_', '/', strtolower($class)); - - // Find the file and return the full path, if it exists - if ($path = self::find_file($file)) - { - // Load the class file - require $path; - - // Class has been found - return TRUE; - } - - // Class is not in the filesystem - return FALSE; - } - catch (Exception $e) - { - throw new GameQException($e->getMessage(), $e->getCode(), $e); - die; - } - } - - /** - * Try to find the file based on the class passed. - * - * @param string $file - */ - public static function find_file($file) - { - $found = FALSE; // By default we did not find anything - - // Create a partial path of the filename - $path = GAMEQ_BASE.$file.'.php'; - - // Is a file so we can include it - if(is_file($path)) - { - $found = $path; - } - - return $found; - } - - /* Dynamic Section */ - - /** - * Defined options by default - * - * @var array() - */ - protected $options = array( - 'debug' => FALSE, - 'timeout' => 3, // Seconds - 'filters' => array(), - - // Advanced settings - 'stream_timeout' => 200000, // See http://www.php.net/manual/en/function.stream-select.php for more info - 'write_wait' => 500, // How long (in micro-seconds) to pause between writting to server sockets, helps cpu usage - ); - - /** - * Array of servers being queried - * - * @var array - */ - protected $servers = array(); - - /** - * Holds the list of active sockets. This array is automaically cleaned as needed - * - * @var array - */ - protected $sockets = array(); - - /** - * Make new class and check for requirements - * - * @throws GameQException - * @return boolean - */ - public function __construct() - { - // @todo: Add PHP version check? - } - - /** - * Get an option's value - * - * @param string $option - */ - public function __get($option) - { - return isset($this->options[$option]) ? $this->options[$option] : NULL; - } - - /** - * Set an option's value - * - * @param string $option - * @param mixed $value - * @return boolean - */ - public function __set($option, $value) - { - $this->options[$option] = $value; - - return TRUE; - } - - /** - * Chainable call to __set, uses set as the actual setter - * - * @param string $var - * @param mixed $value - * @return GameQ - */ - public function setOption($var, $value) - { - // Use magic - $this->{$var} = $value; - - return $this; // Make chainable - } - - /** - * Set an output filter. - * - * @param string $name - * @param array $params - * @return GameQ - */ - public function setFilter($name, $params = array()) - { - // Create the proper filter class name - $filter_class = 'GameQ_Filters_'.$name; - - try - { - // Pass any parameters and make the class - $this->options['filters'][$name] = new $filter_class($params); - } - catch (GameQ_FiltersException $e) - { - // We catch the exception here, thus the filter is not applied - // but we issue a warning - error_log($e->getMessage(), E_USER_WARNING); - } - - return $this; // Make chainable - } - - /** - * Remove a global output filter. - * - * @param string $name - * @return GameQ - */ - public function removeFilter($name) - { - unset($this->options['filters'][$name]); - - return $this; // Make chainable - } - - /** - * Add a server to be queried - * - * Example: - * $this->addServer(array( - * // Required keys - * 'type' => 'cs', - * 'host' => '127.0.0.1:27015', '127.0.0.1' or 'somehost.com:27015' - * Port not required, but will use the default port in the class which may not be correct for the - * specific server being queried. - * - * // Optional keys - * 'id' => 'someServerId', // By default will use pased host info (i.e. 127.0.0.1:27015) - * 'options' => array('timeout' => 5), // By default will use global options - * )); - * - * @param array $server_info - * @throws GameQException - * @return boolean|GameQ - */ - public function addServer(Array $server_info=NULL) - { - // Check for server type - if(!key_exists(self::SERVER_TYPE, $server_info) || empty($server_info[self::SERVER_TYPE])) - { - throw new GameQException("Missing server info key '".self::SERVER_TYPE."'"); - return FALSE; - } - - // Check for server host - if(!key_exists(self::SERVER_HOST, $server_info) || empty($server_info[self::SERVER_HOST])) - { - throw new GameQException("Missing server info key '".self::SERVER_HOST."'"); - return FALSE; - } - - // Check for server id - if(!key_exists(self::SERVER_ID, $server_info) || empty($server_info[self::SERVER_ID])) - { - // Make an id so each server has an id when returned - $server_info[self::SERVER_ID] = $server_info[self::SERVER_HOST]; - } - - // Check for options - if(!key_exists(self::SERVER_OPTIONS, $server_info) - || !is_array($server_info[self::SERVER_OPTIONS]) - || empty($server_info[self::SERVER_OPTIONS])) - { - // Default the options to an empty array - $server_info[self::SERVER_OPTIONS] = array(); - } - - // Define these - $server_id = $server_info[self::SERVER_ID]; - $server_ip = '127.0.0.1'; - $server_port = FALSE; - - // We have an IPv6 address (and maybe a port) - if(substr_count($server_info[self::SERVER_HOST], ':') > 1) - { - // See if we have a port, input should be in the format [::1]:27015 or similar - if(strstr($server_info[self::SERVER_HOST], ']:')) - { - // Explode to get port - $server_addr = explode(':', $server_info[self::SERVER_HOST]); - - // Port is the last item in the array, remove it and save - $server_port = array_pop($server_addr); - - // The rest is the address, recombine - $server_ip = implode(':', $server_addr); - - unset($server_addr); - } - - // Just the IPv6 address, no port defined - else - { - $server_ip = $server_info[self::SERVER_HOST]; - } - - // Now let's validate the IPv6 value sent, remove the square brackets ([]) first - if(!filter_var(trim($server_ip, '[]'), FILTER_VALIDATE_IP, array( - 'flags' => FILTER_FLAG_IPV6, - ))) - { - throw new GameQException("The IPv6 address '{$server_ip}' is invalid."); - return FALSE; - } - } - - // IPv4 - else - { - // We have a port defined - if(strstr($server_info[self::SERVER_HOST], ':')) - { - list($server_ip, $server_port) = explode(':', $server_info[self::SERVER_HOST]); - } - - // No port, just IPv4 - else - { - $server_ip = $server_info[self::SERVER_HOST]; - } - - // Validate the IPv4 value, if FALSE is not a valid IP, maybe a hostname. Try to resolve - if(!filter_var($server_ip, FILTER_VALIDATE_IP, array( - 'flags' => FILTER_FLAG_IPV4, - ))) - { - // When gethostbyname() fails it returns the original string - // so if ip and the result from gethostbyname() are equal this failed. - if($server_ip === gethostbyname($server_ip)) - { - throw new GameQException("The host '{$server_ip}' is unresolvable to an IP address."); - return FALSE; - } - } - } - - // Create the class so we can reference it properly later - $protocol_class = 'GameQ_Protocols_'.ucfirst($server_info[self::SERVER_TYPE]); - - // Create the new instance and add it to the servers list - $this->servers[$server_id] = new $protocol_class( - $server_ip, - $server_port, - array_merge($this->options, $server_info[self::SERVER_OPTIONS]) - ); - - return $this; // Make calls chainable - } - - /** - * Add multiple servers at once - * - * @param array $servers - * @return GameQ - */ - public function addServers(Array $servers=NULL) - { - // Loop thru all the servers and add them - foreach($servers AS $server_info) - { - $this->addServer($server_info); - } - - return $this; // Make calls chainable - } - - /** - * Clear all the added servers. Creates clean instance. - * - * @return GameQ - */ - public function clearServers() - { - // Reset all the servers - $this->servers = array(); - $this->sockets = array(); - - return $this; // Make Chainable - } - - /** - * Make all the data requests (i.e. challenges, queries, etc...) - * - * @return multitype:Ambigous - */ - public function requestData() - { - // Data returned array - $data = array(); - - // Init the query array - $queries = array( - 'multi' => array( - 'challenges' => array(), - 'info' => array(), - ), - 'linear' => array(), - ); - - // Loop thru all of the servers added and categorize them - foreach($this->servers AS $server_id => $instance) - { - // Check to see what kind of server this is and how we can send packets - if($instance->packet_mode() == GameQ_Protocols::PACKET_MODE_LINEAR) - { - $queries['linear'][$server_id] = $instance; - } - else // We can send this out in a multi request - { - // Check to see if we should issue a challenge first - if($instance->hasChallenge()) - { - $queries['multi']['challenges'][$server_id] = $instance; - } - - // Add this instance to do info query - $queries['multi']['info'][$server_id] = $instance; - } - } - - // First lets do the faster, multi queries - if(count($queries['multi']['info']) > 0) - { - $this->requestMulti($queries['multi']); - } - - // Now lets do the slower linear queries. - if(count($queries['linear']) > 0) - { - $this->requestLinear($queries['linear']); - } - - // Now let's loop the servers and process the response data - foreach($this->servers AS $server_id => $instance) - { - // Lets process this and filter - $data[$server_id] = $this->filterResponse($instance); - } - - // Send back the data array, could be empty if nothing went to plan - return $data; - } - - /* Working Methods */ - - /** - * Apply all set filters to the data returned by gameservers. - * - * @param GameQ_Protocols $protocol_instance - * @return array - */ - protected function filterResponse(GameQ_Protocols $protocol_instance) - { - // Let's pull out the "raw" data we are going to filter - $data = $protocol_instance->processResponse(); - - // Loop each of the filters we have attached - foreach($this->options['filters'] AS $filter_name => $filter_instance) - { - // Overwrite the data with the "filtered" data - $data = $filter_instance->filter($data, $protocol_instance); - } - - return $data; - } - - /** - * Process "linear" servers. Servers that do not support multiple packet calls at once. So Slow! - * This method also blocks the socket, you have been warned!! - * - * @param array $servers - * @return boolean - */ - protected function requestLinear($servers=array()) - { - // Loop thru all the linear servers - foreach($servers AS $server_id => $instance) - { - // First we need to get a socket and we need to block because this is linear - if(($socket = $this->socket_open($instance, TRUE)) === FALSE) - { - // Skip it - continue; - } - - // Socket id - $socket_id = (int) $socket; - - // See if we have challenges to send off - if($instance->hasChallenge()) - { - // Now send off the challenge packet - fwrite($socket, $instance->getPacket('challenge')); - - // Read in the challenge response - $instance->challengeResponse(array(fread($socket, 4096))); - - // Now we need to parse and apply the challenge response to all the packets that require it - $instance->challengeVerifyAndParse(); - } - - // Invoke the beforeSend method - $instance->beforeSend(); - - // Grab the packets we need to send, minus the challenge packet - $packets = $instance->getPacket('!challenge'); - - // Now loop the packets, begin the slowness - foreach($packets AS $packet_type => $packet) - { - // Add the socket information so we can retreive it easily - $this->sockets = array( - $socket_id => array( - 'server_id' => $server_id, - 'packet_type' => $packet_type, - 'socket' => $socket, - ) - ); - - // Write the packet - fwrite($socket, $packet); - - // Get the responses from the query - $responses = $this->sockets_listen(); - - // Lets look at our responses - foreach($responses AS $socket_id => $response) - { - // Save the response from this packet - $instance->packetResponse($packet_type, $response); - } - } - } - - // Now close all the socket(s) and clean up any data - $this->sockets_close(); - - return TRUE; - } - - /** - * Process the servers that support multi requests. That means multiple packets can be sent out at once. - * - * @param array $servers - * @return boolean - */ - protected function requestMulti($servers=array()) - { - // See if we have any challenges to send off - if(count($servers['challenges']) > 0) - { - // Now lets send off all the challenges - $this->sendChallenge($servers['challenges']); - - // Now let's process the challenges - // Loop thru all the instances - foreach($servers['challenges'] AS $server_id => $instance) - { - $instance->challengeVerifyAndParse(); - } - } - - // Send out all the query packets to get data for - $this->queryServerInfo($servers['info']); - - return TRUE; - } - - /** - * Send off needed challenges and get the response - * - * @param array $instances - * @return boolean - */ - protected function sendChallenge(Array $instances=NULL) - { - // Loop thru all the instances we need to send out challenges for - foreach($instances AS $server_id => $instance) - { - // Make a new socket - if(($socket = $this->socket_open($instance)) === FALSE) - { - // Skip it - continue; - } - - // Now write the challenge packet to the socket. - fwrite($socket, $instance->getPacket(GameQ_Protocols::PACKET_CHALLENGE)); - - // Add the socket information so we can retreive it easily - $this->sockets[(int) $socket] = array( - 'server_id' => $server_id, - 'packet_type' => GameQ_Protocols::PACKET_CHALLENGE, - 'socket' => $socket, - ); - - // Let's sleep shortly so we are not hammering out calls rapid fire style hogging cpu - usleep($this->write_wait); - } - - // Now we need to listen for challenge response(s) - $responses = $this->sockets_listen(); - - // Lets look at our responses - foreach($responses AS $socket_id => $response) - { - // Back out the server_id we need to update the challenge response for - $server_id = $this->sockets[$socket_id]['server_id']; - - // Now set the proper response for the challenge because we will need it later - $this->servers[$server_id]->challengeResponse($response); - } - - // Now close all the socket(s) and clean up any data - $this->sockets_close(); - - return TRUE; - } - - /** - * Query the server for actual server information (i.e. info, players, rules, etc...) - * - * @param array $instances - * @return boolean - */ - protected function queryServerInfo(Array $instances=NULL) - { - // Loop all the server instances - foreach($instances AS $server_id => $instance) - { - // Invoke the beforeSend method - $instance->beforeSend(); - - // Get all the non-challenge packets we need to send - $packets = $instance->getPacket('!challenge'); - - if(count($packets) == 0) - { - // Skip nothing else to do for some reason. - continue; - } - - // Now lets send off the packets - foreach($packets AS $packet_type => $packet) - { - // Make a new socket - if(($socket = $this->socket_open($instance)) === FALSE) - { - // Skip it - continue; - } - - // Now write the packet to the socket. - fwrite($socket, $packet); - - // Add the socket information so we can retreive it easily - $this->sockets[(int) $socket] = array( - 'server_id' => $server_id, - 'packet_type' => $packet_type, - 'socket' => $socket, - ); - - // Let's sleep shortly so we are not hammering out calls raipd fire style - usleep($this->write_wait); - } - } - - // Now we need to listen for packet response(s) - $responses = $this->sockets_listen(); - - // Lets look at our responses - foreach($responses AS $socket_id => $response) - { - // Back out the server_id - $server_id = $this->sockets[$socket_id]['server_id']; - - // Back out the packet type - $packet_type = $this->sockets[$socket_id]['packet_type']; - - // Save the response from this packet - $this->servers[$server_id]->packetResponse($packet_type, $response); - } - - // Now close all the socket(s) and clean up any data - $this->sockets_close(); - - return TRUE; - } - - /* Sockets/streams stuff */ - - /** - * Open a new socket based on the instance information - * - * @param GameQ_Protocols $instance - * @param bool $blocking - * @throws GameQException - * @return boolean|resource - */ - protected function socket_open(GameQ_Protocols $instance, $blocking=FALSE) - { - // Create the remote address - $remote_addr = sprintf("%s://%s:%d", $instance->transport(), $instance->ip(), $instance->port()); - - // Create context - $context = stream_context_create(array( - 'socket' => array( - 'bindto' => '0:0', // Bind to any available IP and OS decided port - ), - )); - - // Create the socket - if(($socket = @stream_socket_client($remote_addr, $errno = NULL, $errstr = NULL, $this->timeout, STREAM_CLIENT_CONNECT, $context)) !== FALSE) - { - // Set the read timeout on the streams - stream_set_timeout($socket, $this->timeout); - - // Set blocking mode - stream_set_blocking($socket, $blocking); - } - else // Throw an error - { - // Check to see if we are in debug mode, if so throw the exception - if($this->debug) - { - throw new GameQException(__METHOD__." Error creating socket to server {$remote_addr}. Error: ".$errstr, $errno); - } - - // We didnt create so we need to return false. - return FALSE; - } - - unset($context, $remote_addr); - - // return the socket - return $socket; - } - - /** - * Listen to all the created sockets and return the responses - * - * @return array - */ - protected function sockets_listen() - { - // Set the loop to active - $loop_active = TRUE; - - // To store the responses - $responses = array(); - - // To store the sockets - $sockets = array(); - - // Loop and pull out all the actual sockets we need to listen on - foreach($this->sockets AS $socket_id => $socket_data) - { - // Append the actual socket we are listening to - $sockets[$socket_id] = $socket_data['socket']; - } - - // Init some variables - $read = $sockets; - $write = NULL; - $except = NULL; - - // Check to see if $read is empty, if so stream_select() will throw a warning - if(empty($read)) - { - return $responses; - } - - // This is when it should stop - $time_stop = microtime(TRUE) + $this->timeout; - - // Let's loop until we break something. - while ($loop_active && microtime(TRUE) < $time_stop) - { - // Now lets listen for some streams, but do not cross the streams! - $streams = stream_select($read, $write, $except, 0, $this->stream_timeout); - - // We had error or no streams left, kill the loop - if($streams === FALSE || ($streams <= 0)) - { - $loop_active = FALSE; - break; - } - - // Loop the sockets that received data back - foreach($read AS $socket) - { - // See if we have a response - if(($response = stream_socket_recvfrom($socket, 8192)) === FALSE) - { - continue; // No response yet so lets continue. - } - - // Check to see if the response is empty, if so we are done - // @todo: Verify that this does not affect other protocols, added for Minequery - // Initial testing showed this change did not affect any of the other protocols - if(strlen($response) == 0) - { - // End the while loop - $loop_active = FALSE; - break; - } - - // Add the response we got back - $responses[(int) $socket][] = $response; - } - - // Because stream_select modifies read we need to reset it each - // time to the original array of sockets - $read = $sockets; - } - - // Free up some memory - unset($streams, $read, $write, $except, $sockets, $time_stop, $response); - - return $responses; - } - - /** - * Close all the open sockets - */ - protected function sockets_close() - { - // Loop all the existing sockets, valid or not - foreach($this->sockets AS $socket_id => $data) - { - fclose($data['socket']); - unset($this->sockets[$socket_id]); - } - - return TRUE; - } -} - -/** - * GameQ Exception Class - * - * Thrown when there is any kind of internal configuration error or - * some unhandled or unexpected error or response. - * - * @author Austin Bischoff - */ -class GameQException extends Exception {} diff --git a/third_party/gameq_v2/LICENSE b/third_party/gameq_v2/LICENSE deleted file mode 100644 index 94a9ed02..00000000 --- a/third_party/gameq_v2/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - (at your option) 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 . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/third_party/gameq_v2/README.md b/third_party/gameq_v2/README.md deleted file mode 100644 index 66a2045a..00000000 --- a/third_party/gameq_v2/README.md +++ /dev/null @@ -1,44 +0,0 @@ -Information -=========== -GameQ is a PHP program that allows you to query multiple types of multiplayer game servers at the same time. - -GameQ v2 is based off of the original GameQ PHP program from http://gameq.sourceforge.net/. That project was no longer being supported. - -Requirements -============ -* PHP 5.2 (Recommended 5.3, 5.4) - -Extras you might need: -* Bzip2 - Used for A2S compressed responses (http://www.php.net/manual/en/book.bzip2.php) -* Zlib - Used for AA3 (before version 3.2) compressed responses (http://www.php.net/manual/en/book.zlib.php) - -Example -======= -Usage & Examples: https://github.com/Austinb/GameQ/wiki/Usage-&-examples-v2 - -Quick and Dirty: - - $gq = new GameQ(); - $gq->addServer(array( - 'id' => 'my_server', - 'type' => 'css', // Counter-Strike: Source - 'host' => '127.0.0.1:27015', - )); - - $results = $gq->requestData(); // Returns an array of results - - print_r($results); - -Want more? Check out the wiki page or /examples for more. - -ChangeLog -========= -See https://github.com/Austinb/GameQ/commits/v2 for an incremental list of changes - -License -======= -See LICENSE for more information - -Donations -========= -If you like this project and use it a lot please feel free to donate here: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VAU2KADATP5PU. diff --git a/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php b/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php index b1cb41bb..a24afcd9 100644 --- a/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php +++ b/third_party/hybridauth/Hybrid/thirdparty/OpenID/LightOpenID.php @@ -735,7 +735,7 @@ class LightOpenID $this->aliases[$alias] = 'http://axschema.org/' . $field; if (empty($counts[$alias])) $counts[$alias] = 0; $counts[$alias] += 1; - ${$type}[] = $alias; + {$$type}[] = $alias; } } foreach ($this->aliases as $alias => $ns) { diff --git a/third_party/hybridauth/Hybrid_v3/Thirdparty/OpenID/LightOpenID.php b/third_party/hybridauth/Hybrid_v3/Thirdparty/OpenID/LightOpenID.php index 7b2d8bde..4b92e525 100644 --- a/third_party/hybridauth/Hybrid_v3/Thirdparty/OpenID/LightOpenID.php +++ b/third_party/hybridauth/Hybrid_v3/Thirdparty/OpenID/LightOpenID.php @@ -925,7 +925,7 @@ class LightOpenID $counts[$alias] = 0; } $counts[$alias] += 1; - ${$type}[] = $alias; + {$$type}[] = $alias; } } foreach ($this->aliases as $alias => $ns) { diff --git a/third_party/phpseclib/Net/SFTP/Stream.php b/third_party/phpseclib/Net/SFTP/Stream.php index d2c4425d..13722e91 100644 --- a/third_party/phpseclib/Net/SFTP/Stream.php +++ b/third_party/phpseclib/Net/SFTP/Stream.php @@ -179,7 +179,7 @@ class Stream if ($host[0] == '$') { $host = substr($host, 1); - global ${$host}; + global {$$host}; if (($$host instanceof SFTP) === false) { return false; }