diff --git a/confirm.php b/confirm.php index c4115b5..71eb2f1 100644 --- a/confirm.php +++ b/confirm.php @@ -1,6 +1,13 @@
'.PHP_EOL); - foreach($_POST['goodRoles'] as $selectedOption) { + foreach($_POST['goodRoles'] as removeBrackets($selectedOption)) { fwrite($rolefile, ''.$_POST['gconvars'].'
+ '.removeBrackets($_POST['gconvars'].'
Rolespecific Convars:
- '.$_POST['cconvars'].'
"';
+ '.removeBrackets($_POST['cconvars']).'
"';
fwrite($rolefile, $f_convars.PHP_EOL);
@@ -70,23 +77,23 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
#
#The Steam URL to your addon
- $f_steam = $_POST['steam'];
- fwrite($rolefile, '$steam = '.$f_steam.PHP_EOL);
+ $f_steam = removeBrackets($_POST['steam']);
+ fwrite($rolefile, '$steam = "'.$f_steam.'"'.PHP_EOL);
#The Source URL to your addon
- $f_source = $_POST['source'];
- fwrite($rolefile, '$source = '.$f_source.PHP_EOL);
+ $f_source = removeBrackets($_POST['source']);
+ fwrite($rolefile, '$source = "'.$f_source.'"'.PHP_EOL);
#Creator of the Addon
- $f_author = $_POST['creator'];
- fwrite($rolefile, '$author = '.$f_author.PHP_EOL);
+ $f_author = removeBrackets($_POST['creator']);
+ fwrite($rolefile, '$author = "'.$f_author.'"'.PHP_EOL);
#Creatorlink
- $f_authorurl = $_POST['creatorurl'];
- fwrite($rolefile, '$authorurl = '.$f_authorurl.PHP_EOL);
+ $f_authorurl = removeBrackets($_POST['creatorurl']);
+ fwrite($rolefile, '$authorurl = "'.$f_authorurl.'"'.PHP_EOL);
# Credittext (can use the above variables)
- $f_ctext = $_POST['credits'];
- fwrite($rolefile, '$ctext = '.$f_ctext);
+ $f_ctext = removeBrackets($_POST['credits']);
+ fwrite($rolefile, '$ctext = "'.$f_ctext.'"'.PHP_EOL);
-fwrite($rolefile, PHP_EOL.'?>');
+fwrite($rolefile, '?>');
fclose($rolefile);
} else {
echo 'INVALID ROLENAME';