Compare commits
No commits in common. "5b272d27613215a14363a1f3e5f507e20bf0ba53" and "65fce1ec67be3d5f125dff97a76f4caad97f2b97" have entirely different histories.
5b272d2761
...
65fce1ec67
48
confirm.php
48
confirm.php
@ -1,26 +1,25 @@
|
|||||||
<body>
|
<body>
|
||||||
<html>
|
<html>
|
||||||
<?php
|
<?php
|
||||||
if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
|
if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'])){
|
||||||
echo 'VALID FILENAME';
|
echo 'VALID FILENAME';
|
||||||
|
|
||||||
$language = $_POST['language'];
|
$language = $_POST['language'];
|
||||||
$rolefile = fopen("roles/".$language."/".$_POST['rolename'].".php", "w");
|
$rolefile = "roles/".$language."/".$_POST['rolename'].".php";
|
||||||
|
|
||||||
|
fopen($rolefile, "w");
|
||||||
#Initialisation
|
|
||||||
fwrite($rolefile, '<?php'.PHP_EOL);
|
|
||||||
#
|
#
|
||||||
# COLORS
|
# COLORS
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Text Color
|
||||||
|
$f_tcolor = $_POST['textcol'];
|
||||||
|
fwrite($rolefile, $f_tcolor);
|
||||||
# This is the color defined by https://materializecss.com/color.html
|
# This is the color defined by https://materializecss.com/color.html
|
||||||
$f_color = $_POST['rolecolor']." ".$_POST['rolestrength']."-".$_POST['rolemod'];
|
$f_color = $_POST['rolecolor']." ".$_POST['rolestrength']."-".$_POST['rolemod'];
|
||||||
fwrite($rolefile, '$color = "'.$f_color.'"'.PHP_EOL);
|
fwrite($rolefile, $f_color);
|
||||||
|
|
||||||
|
|
||||||
# Text Color
|
|
||||||
$f_tcolor = $_POST['tcolor'];
|
|
||||||
fwrite($rolefile, '$tcolor = '.$f_tcolor.PHP_EOL);
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -29,11 +28,10 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
|
|||||||
|
|
||||||
#The Name of the Role
|
#The Name of the Role
|
||||||
$f_name = $_POST['rolename'];
|
$f_name = $_POST['rolename'];
|
||||||
fwrite($rolefile, '$name = '.$f_name.PHP_EOL);
|
fwrite($rolefile, $f_name);
|
||||||
|
|
||||||
#The Description of the Role, HTML conform :)
|
#The Description of the Role, HTML conform :)
|
||||||
$f_description = $_POST['roledesc'];
|
$f_description = $_POST['roledesc'];
|
||||||
fwrite($rolefile,'$description = '. $f_description.PHP_EOL);
|
fwrite($rolefile, $f_description);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -44,15 +42,14 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
|
|||||||
|
|
||||||
#How To play
|
#How To play
|
||||||
$f_howtoplay = $_POST['howtoplay'];
|
$f_howtoplay = $_POST['howtoplay'];
|
||||||
fwrite($rolefile, '$howtoplay = '.$f_howtoplay.PHP_EOL);
|
fwrite($rolefile, $f_howtoplay);
|
||||||
|
|
||||||
#With what roles does this role play best?
|
#With what roles does this role play best?
|
||||||
fwrite($rolefile, '$playsbestwith = "<ul>'.PHP_EOL);
|
fwrite($rolefile, '$playsbestwith = "<ul>');
|
||||||
|
|
||||||
foreach($_POST['goodRol es'] as $selectedOption) {
|
foreach($_POST['goodRol es'] as $selectedOption) {
|
||||||
fwrite($rolefile, '<li>'.$selectedOption.'</li>'.PHP_EOL);
|
fwrite($rolefile, '<li>'.$selectedOption.'</li>');
|
||||||
};
|
};
|
||||||
fwrite($rolefile, '</ul>;"'.PHP_EOL);
|
fwrite($rolefile, '<</ul>"');
|
||||||
|
|
||||||
|
|
||||||
#Convars
|
#Convars
|
||||||
@ -62,7 +59,7 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
|
|||||||
Rolespecific Convars:
|
Rolespecific Convars:
|
||||||
<code>'.$_POST['cconvars'].'</code>"';
|
<code>'.$_POST['cconvars'].'</code>"';
|
||||||
|
|
||||||
fwrite($rolefile, $f_convars.PHP_EOL);
|
fwrite($rolefile, $f_convars);
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -71,22 +68,21 @@ if (preg_match('/^[\/\w\-. ]+$/', $_POST['rolename'].'.php')){
|
|||||||
|
|
||||||
#The Steam URL to your addon
|
#The Steam URL to your addon
|
||||||
$f_steam = $_POST['steam'];
|
$f_steam = $_POST['steam'];
|
||||||
fwrite($rolefile, '$steam = '.$f_steam.PHP_EOL);
|
fwrite($rolefile, $f_steam);
|
||||||
#The Source URL to your addon
|
#The Source URL to your addon
|
||||||
$f_source = $_POST['source'];
|
$f_source = $_POST['source'];
|
||||||
fwrite($rolefile, '$source = '.$f_source.PHP_EOL);
|
fwrite($rolefile, $f_source);
|
||||||
|
|
||||||
#Creator of the Addon
|
#Creator of the Addon
|
||||||
$f_author = $_POST['creator'];
|
$f_author = $_POST[''];
|
||||||
fwrite($rolefile, '$author = '.$f_author.PHP_EOL);
|
fwrite($rolefile, $f_author);
|
||||||
#Creatorlink
|
#Creatorlink
|
||||||
$f_authorurl = $_POST['creatorurl'];
|
$f_authorurl = $_POST[''];
|
||||||
fwrite($rolefile, '$authorurl = '.$f_authorurl.PHP_EOL);
|
fwrite($rolefile, $f_authorurl);
|
||||||
# Credittext (can use the above variables)
|
# Credittext (can use the above variables)
|
||||||
$f_ctext = $_POST['credits'];
|
$f_ctext = $_POST['credits'];
|
||||||
fwrite($rolefile, '$ctext = '.$f_ctext);
|
fwrite($rolefile, $f_ctext);
|
||||||
|
|
||||||
fwrite($rolefile, PHP_EOL.'?>');
|
|
||||||
fclose($rolefile);
|
fclose($rolefile);
|
||||||
} else {
|
} else {
|
||||||
echo 'INVALID ROLENAME';
|
echo 'INVALID ROLENAME';
|
||||||
|
14
create.php
14
create.php
@ -88,7 +88,7 @@
|
|||||||
<label>Select Strength</label>
|
<label>Select Strength</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field col s3">
|
<div class="input-field col s3">
|
||||||
<select id="tcolor" name="tcolor" onchange="updateCard()">
|
<select id="tcolor" name="textcol" onchange="updateCard()">
|
||||||
<option value="" disabled selected>Textcolor</option>
|
<option value="" disabled selected>Textcolor</option>
|
||||||
<option value="black-text">Black</option>
|
<option value="black-text">Black</option>
|
||||||
<option value="white-text">White</option>
|
<option value="white-text">White</option>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<select id="goodRoles" name="goodRoles[]" onchange="updateCard()" multiple="multiple">
|
<select id="goodRoles" name="goodRoles" onchange="updateCard()" multiple>
|
||||||
<option value="" disabled> Choose your option </option>
|
<option value="" disabled> Choose your option </option>
|
||||||
<?php
|
<?php
|
||||||
$files = glob("roles/en/*.php");
|
$files = glob("roles/en/*.php");
|
||||||
@ -131,16 +131,6 @@
|
|||||||
<label for="convars">Paste your role specific convars</label>
|
<label for="convars">Paste your role specific convars</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="input-field col s6">
|
|
||||||
<input name="creator" id="creator" type="text" onkeyup="updateCard()">
|
|
||||||
<label for="creator">Steam Creator</label>
|
|
||||||
</div>
|
|
||||||
<div class="input-field col s6">
|
|
||||||
<input name="creatorurl" id="creatorurl" type="text" onkeyup="updateCard()">
|
|
||||||
<label for="creatorurl">Steeam Creator Link</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<textarea id="credits" name="credits" onkeyup="updateCard()" class="materialize-textarea"></textarea>
|
<textarea id="credits" name="credits" onkeyup="updateCard()" class="materialize-textarea"></textarea>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user