From 53dd162e9127b926a41d3179f3693540a07be989 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 4 Apr 2022 16:38:47 +0200 Subject: [PATCH] Needs some validation fixing but then it works! --- confirm.php | 50 +++++++++++++++++++++++++++----------------------- create.php | 14 ++++++++++++-- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/confirm.php b/confirm.php index 2f36e7a..c4115b5 100644 --- a/confirm.php +++ b/confirm.php @@ -1,25 +1,26 @@ '); - foreach($_POST['goodRol es'] as $selectedOption) { - fwrite($rolefile, '
  • '.$selectedOption.'
  • '); + fwrite($rolefile, '$playsbestwith = ""'); + fwrite($rolefile, ';"'.PHP_EOL); #Convars @@ -59,7 +62,7 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'])){ Rolespecific Convars: '.$_POST['cconvars'].'"'; - fwrite($rolefile, $f_convars); + fwrite($rolefile, $f_convars.PHP_EOL); # @@ -68,21 +71,22 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'])){ #The Steam URL to your addon $f_steam = $_POST['steam']; - fwrite($rolefile, $f_steam); + fwrite($rolefile, '$steam = '.$f_steam.PHP_EOL); #The Source URL to your addon $f_source = $_POST['source']; - fwrite($rolefile, $f_source); + fwrite($rolefile, '$source = '.$f_source.PHP_EOL); #Creator of the Addon - $f_author = $_POST['']; - fwrite($rolefile, $f_author); + $f_author = $_POST['creator']; + fwrite($rolefile, '$author = '.$f_author.PHP_EOL); #Creatorlink - $f_authorurl = $_POST['']; - fwrite($rolefile, $f_authorurl); + $f_authorurl = $_POST['creatorurl']; + fwrite($rolefile, '$authorurl = '.$f_authorurl.PHP_EOL); # Credittext (can use the above variables) $f_ctext = $_POST['credits']; - fwrite($rolefile, $f_ctext); + fwrite($rolefile, '$ctext = '.$f_ctext); +fwrite($rolefile, PHP_EOL.'?>'); fclose($rolefile); } else { echo 'INVALID ROLENAME'; diff --git a/create.php b/create.php index 752cf58..654380f 100644 --- a/create.php +++ b/create.php @@ -88,7 +88,7 @@
    - @@ -104,7 +104,7 @@
    - Paste your role specific convars
    +
    +
    + + +
    +
    + + +
    +