WebDev

EhPortal => EhPortal Support => Topic started by: Fuji on May 03, 2023, 09:45:03 PM

Title: submit box
Post by: Fuji on May 03, 2023, 09:45:03 PM
want to be able to have the ppl to fill out a form

example:

game name: goes here in a box
steam id:  goes here in a box
email:     goes here in a box

submit
Title: Re: submit box
Post by: Chen Zhen on May 09, 2023, 06:33:06 PM
Hello Fuji,

Some simple PHP + HTML can accomplish this task.
What is the database table & columns to save the data or do you want to access it from $modSettings?
Title: Re: submit box
Post by: Chen Zhen on May 09, 2023, 07:57:59 PM

Here is a basic PHP block with your request:

global $context, $txt, $settings;
$steam_text = array(
'name' => 'Game Name',
'id' => 'Steam ID',
'email' =>'Email',
'submit' => 'Submit'
);
$check = isset($_POST['steam_gamename']) || isset($_POST['steam_userid']) || isset($_POST['steam_email']) ? true : false;
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $check) {
// filter the inputs
foreach($_POST as $k => $v)
{
$v = trim($v);
$v = preg_replace('/\s+/', '', $v);
$v = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK);
$_POST[$k] = $v;
}

$_SESSION['steam_gamename'] = isset($_POST['steam_gamename']) ? $_POST['steam_gamename'] : (!empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '');
$_SESSION['steam_userid'] = isset($_POST['steam_userid']) ? $_POST['steam_userid'] : (!empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '');
$_SESSION['steam_email'] = isset($_POST['steam_email']) ? filter_var($_POST['steam_email'], FILTER_SANITIZE_EMAIL) : (!empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '');

// add code to save your variables to the database...
}

echo '
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/sha1.js"></script>
<div style="display: flex; justify-content: flex-start;">
<form action="', htmlspecialchars($_SERVER['PHP_SELF']), '" name="steam_postpage" method="post" accept-charset="', $context['character_set'], '">
<div class="ehPortal_table">
<div class="ehPortal_row">
<div class="ehPortal_cell sp_left">
<label for="steam_gamename">', $steam_text['name'], ':</label>
<div style="display: inline;">
<input type="text" id="steam_gamename" name="steam_gamename" size="6" style="width:100%;" value="', !empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '', '" />
</div>
</div>
</div>
<div class="ehPortal_row">
<div class="ehPortal_cell sp_left"><label for="steam_userid">', $steam_text['id'], ':</label>
<div style="display: inline;">
<input type="text" name="steam_userid" id="steam_userid" size="6" style="width:100%;" value="', !empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '', '" />
</div>
</div>
</div>
<div class="ehPortal_row">
<div class="ehPortal_cell sp_left"><label for="steam_email">', $steam_text['email'], ':</label>
<div style="display: inline;">
<input type="text" name="steam_email" id="steam_email" size="6" style="width:100%;" value="', !empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '', '" />
</div>
</div>
</div>
<div class="ehPortal_row">
<div class="ehPortal_cell" style="padding-top: 0.2rem;">
<input type="submit" value="', $steam_text['submit'], '" class="button_submit" />
</div>
</div>
</div>
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
</form>
</div>';



You can add your own database query to save the data.
Title: Re: submit box
Post by: Fuji on May 09, 2023, 10:57:34 PM
I did your code i get this error

Parse error: syntax error, unexpected identifier " ", expecting ")" in /usr/www/ckdod/public/Sources/Subs-Portal.php(1276) : eval()'d code on line 5
Title: Re: submit box
Post by: Chen Zhen on May 11, 2023, 06:46:55 PM
You're likely not copying all the code because that block works fine.
Use the "expand" link and then the "select" link at the top of the code box.
After that right click & copy the highlighted code into the clipboard then paste it in a PHP block on your forum.
Title: Re: submit box
Post by: Fuji on May 11, 2023, 08:26:47 PM
that was it , but its only in a block format i get error when i try to add in to a page
Title: Re: submit box
Post by: Chen Zhen on May 11, 2023, 11:03:41 PM

It's working fine for me on a PHP page.
Remember to set the drop-down to PHP for it.

You'll need to adjust its style for a wide page view for when its viewed on a desktop/laptop.
Title: Re: submit box
Post by: Chen Zhen on May 11, 2023, 11:40:08 PM
Actually the issue you're having with errors is due to a bug in EhPortal.
With the most recent update I neglected to test preview for blocks & pages which is causing the error.
The code is good but don't use preview to test it until I release a fixed version of EhPortal this weekend.

Try this code without using "preview":


global $context, $txt, $settings;
$sideBlock = false;

if (!empty($sideBlock))
    list($justify, $inputSize) = array('flex-start', '6');
else
    list($justify, $inputSize) = array('space-around', '20');

$steam_text = array(
    'name' => 'Game Name',
    'id' => 'Steam ID',
    'email' =>'Email',
    'submit' => 'Submit'
);
$check = isset($_POST['steam_gamename']) || isset($_POST['steam_userid']) || isset($_POST['steam_email']) ? true : false;
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $check) {
    // filter the inputs
    foreach($_POST as $k => $v)
    {
        $v = trim($v);
        $v = preg_replace('/\s+/', '', $v);
        $v = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK);
        $_POST[$k] = $v;
    }

    $_SESSION['steam_gamename'] = isset($_POST['steam_gamename']) ? $_POST['steam_gamename'] : (!empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '');
    $_SESSION['steam_userid'] = isset($_POST['steam_userid']) ? $_POST['steam_userid'] : (!empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '');
    $_SESSION['steam_email'] = isset($_POST['steam_email']) ? filter_var($_POST['steam_email'], FILTER_SANITIZE_EMAIL) : (!empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '');

    // add code to save your variables to the database...
}

echo '
                                    <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/sha1.js"></script>
                                        <div style="display: flex; justify-content: ' . $justify . ';">
                                        <form action="', htmlspecialchars($_SERVER['PHP_SELF']), '" name="steam_postpage" method="post" accept-charset="', $context['character_set'], '">
                                            <div class="ehPortal_table">
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_gamename">', $steam_text['name'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" id="steam_gamename" name="steam_gamename" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_userid">', $steam_text['id'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" name="steam_userid" id="steam_userid" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_email">', $steam_text['email'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" name="steam_email" id="steam_email" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div style="display: flex; justify-content: ' . $justify . ';" class="ehPortal_cell" style="padding-top: 0.2rem;">
                                                        <input type="submit" value="', $steam_text['submit'], '" class="button_submit" />
                                                    </div>
                                                </div>
                                            </div>
                                            <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
                                        </form>
                                    </div>';




You can change the $sideBlock boolean to true or false depending on what block or page this is being used for.

Title: Re: submit box
Post by: Chen Zhen on May 13, 2023, 09:13:34 PM
Here is a fix for that PHP code concerning the form URL so it will work in blocks and pages...


global $context, $txt, $settings;
$sideBlock = false;

if (!empty($sideBlock))
    list($justify, $inputSize) = array('flex-start', '6');
else
    list($justify, $inputSize) = array('space-around', '20');

$steam_text = array(
    'name' => 'Game Name',
    'id' => 'Steam ID',
    'email' =>'Email',
    'submit' => 'Submit'
);
$check = isset($_POST['steam_gamename']) || isset($_POST['steam_userid']) || isset($_POST['steam_email']) ? true : false;
$filters = array('steam_gamename', 'steam_userid', 'steam_email');
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $check) {
    // filter the inputs
    foreach($_POST as $k => $v)
    {
        if (in_array($k, $filters, true)) {
            $v = trim($v);
            $v = preg_replace('/\s+/', '', $v);
            $v = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK);
            $_POST[$k] = $v;
        }
    }

    $_SESSION['steam_gamename'] = isset($_POST['steam_gamename']) ? $_POST['steam_gamename'] : (!empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '');
    $_SESSION['steam_userid'] = isset($_POST['steam_userid']) ? $_POST['steam_userid'] : (!empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '');
    $_SESSION['steam_email'] = isset($_POST['steam_email']) ? filter_var($_POST['steam_email'], FILTER_SANITIZE_EMAIL) : (!empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '');

    // add code to save your variables to the database...
}

echo '
                                    <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/sha1.js"></script>
                                        <div style="display: flex; justify-content: ' . $justify . ';">
                                        <form action="', htmlspecialchars($url), '" name="steam_postpage" method="post" accept-charset="', $context['character_set'], '">
                                            <div class="ehPortal_table">
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_gamename">', $steam_text['name'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" id="steam_gamename" name="steam_gamename" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_userid">', $steam_text['id'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" name="steam_userid" id="steam_userid" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div class="ehPortal_cell sp_left">
                                                        <label style="display: flex; justify-content: ' . $justify . ';" for="steam_email">', $steam_text['email'], ':</label>
                                                        <div style="display: inline;">
                                                            <input type="text" name="steam_email" id="steam_email" size="' . $inputSize . '" style="width:100%;" value="', !empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '', '" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="ehPortal_row">
                                                    <div style="display: flex; justify-content: ' . $justify . ';" class="ehPortal_cell" style="padding-top: 0.2rem;">
                                                        <input type="submit" value="', $steam_text['submit'], '" class="button_submit" />
                                                    </div>
                                                </div>
                                            </div>
                                            <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
                                        </form>
                                    </div>';




I'm still working on why this particular code crashes a portal page "preview".
It seems to work ok for a PHP block preview so it's a bug somewhere in EhPortal that I have to find.
Thanks for asking your question as it made me realize there is an issue with portal page previews.
Title: Re: submit box
Post by: Chen Zhen on May 17, 2023, 10:18:24 PM

The preview for pages should be fixed now with the new release which is available from the download section.
Title: Re: submit box
Post by: Fuji on May 23, 2023, 11:09:08 PM
thats working now but it doesn't submit to anywhere
Title: Re: submit box
Post by: Chen Zhen on May 24, 2023, 11:31:52 PM

// add code to save your variables to the database...

You didn't request anything specific other than a submit box in a portal page.
I don't know what you want to do with the data.. I just gave you a means to collect it.
Title: Re: submit box
Post by: Fuji on May 25, 2023, 09:08:28 PM
be able to i guess save it or send it to a place like a file
Title: Re: submit box
Post by: Chen Zhen on May 26, 2023, 06:45:20 PM
It can easily be set up to save the data into the settings database table.
I can have it run a check if the username exists or not & require the proper password for an existing login.
The password can be hashed using PHP's password_hash() and the view hidden for the input.
I'll rig it up this weekend.

What are you going to do with it once it's saved?
Having it login to an external server will take more if that's your intent.
Title: Re: submit box
Post by: Fuji on May 27, 2023, 08:19:42 PM
save to the website somewhere or just a file its for scrims we do for old game day of defeat
Title: Re: submit box
Post by: Chen Zhen on May 28, 2023, 08:41:50 PM

Do you want the input boxes to be disabled for SMF guests but to remember the data for a user that is logged in if they had entered the info in the past?
Title: Re: submit box
Post by: Chen Zhen on May 29, 2023, 11:30:43 PM

Try this out....

if (!function_exists('create_db_table_steamblock')) {
function create_db_table_steamblock()
{
global $smcFunc;

if (check_table_exists_steamblock('steam_users_datablock'))
return false;

$smcFunc['db_create_table']('{db_prefix}steam_users_datablock',
array(
array(
'name' => 'id_user',
'type' => 'int',
'size' => '10',
'auto' => false,
),
array(
'name' => 'steam_gamename',
'type' => 'varchar',
'size' => 191,
'default' => '',
),
array(
'name' => 'steam_userid',
'type' => 'varchar',
'size' => 191,
'default' => '',
),
array(
'name' => 'steam_email',
'type' => 'varchar',
'size' => 191,
'default' => '',
),
),
array(
array(
'type' => 'primary',
'columns' => array('id_user')
),
),
array(),
'ignore'
);
}
}
if (!function_exists('check_table_exists_steamblock')) {
function check_table_exists_steamblock($table)
{
global $smcFunc, $db_prefix;

if ($smcFunc['db_list_tables'](false, $db_prefix . $table))
return true;

return false;
}
}

global $context, $user_info, $smcFunc, $txt, $settings;
$sideBlock = false;
$steamblockId = '_php01';
db_extend('packages');
if (!empty($sideBlock))
list($justify, $inputSize) = array('flex-start', '6');
else
list($justify, $inputSize) = array('space-around', '20');

$steam_text = array(
'name' => 'Game Name',
'id' => 'Steam ID',
'email' =>'Email',
'submit' => 'Submit',
'change' => 'Change',
'confirm_submit' => 'Submit new Steam data?',
'confirm_change' => 'Remove old Steam data?',
'missing_data_msg' => !$user_info['is_guest'] ? '<div style="width: 100%;overflow: hidden;text-align: center;box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.034), 0 6.7px 5.3px rgba(0, 0, 0, 0.048), 0 12.5px 10px rgba(0, 0, 0, 0.06), 0 22.3px 17.9px rgba(0, 0, 0, 0.072), 0 41.8px 33.4px rgba(0, 0, 0, 0.086), 0 100px 80px rgba(0, 0, 0, 0.12);">Enter your Steam data</div>' : '',
);
$steamblockOnce = true;
$missingData = !empty($_SESSION['steam_gamename']) && !empty($_SESSION['steam_userid']) && !empty($_SESSION['steam_email']) ? false : true;
$check = isset($_POST['steam_gamename' . $steamblockId]) || isset($_POST['steam_userid' . $steamblockId]) || isset($_POST['steam_email' . $steamblockId]) || isset($_POST['steam_reset' . $steamblockId]) ? true : false;
$filters = array('steam_gamename', 'steam_userid', 'steam_email');
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
$url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$disabled = $user_info['is_guest'] ? ' disabled' : '';
if (!$user_info['is_guest']) {
if ($missingData) {
create_db_table_steamblock();
$request =  $smcFunc['db_query']('','
SELECT id_user, steam_gamename, steam_userid, steam_email
FROM {db_prefix}steam_users_datablock
WHERE id_user = {int:userid}
LIMIT 1',
array(
'userid' => intval($user_info['id']),
)
);
while ($rowx = $smcFunc['db_fetch_assoc']($request)) {
list($_SESSION['steam_gamename'], $_SESSION['steam_userid'], $_SESSION['steam_email']) = array($rowx['steam_gamename'], $rowx['steam_userid'], $rowx['steam_email']);
}

$smcFunc['db_free_result']($request);
$missingData = !empty($_SESSION['steam_gamename']) && !empty($_SESSION['steam_userid']) && !empty($_SESSION['steam_email']) ? false : true;
}
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $check && !$user_info['is_guest']) {
foreach($_POST as $k => $v)
{
if (in_array($k, $filters, true)) {
$v = trim($v);
$v = preg_replace('/\s+/', '', $v);
$v = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK);
$_POST[$k] = $v;
}
}

if (isset($_POST['steam_reset' . $steamblockId]) && $_POST['steam_reset' . $steamblockId] == 'reset') {
list($_SESSION['steam_gamename'], $_SESSION['steam_userid'], $_SESSION['steam_email'], $missingData) = array('', '', '', false);
create_db_table_steamblock();
$smcFunc['db_query']('','
DELETE FROM {db_prefix}steam_users_datablock
WHERE id_user = {int:userid}',
array(
'userid' => intval($user_info['id']),
),
);
}
else {
$_SESSION['steam_gamename'] = isset($_POST['steam_gamename' . $steamblockId]) ? $_POST['steam_gamename' . $steamblockId] : (!empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '');
$_SESSION['steam_userid'] = isset($_POST['steam_userid' . $steamblockId]) ? $_POST['steam_userid' . $steamblockId] : (!empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '');
$_SESSION['steam_email'] = isset($_POST['steam_email' . $steamblockId]) ? filter_var($_POST['steam_email' . $steamblockId], FILTER_SANITIZE_EMAIL) : (!empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '');
foreach (array('steam_gamename', 'steam_userid', 'steam_email') as $input)
$_SESSION[$input] = trim($_SESSION[$input]);
}

// you can hash some of the the steam data if you decide to add a password
$missingData = !empty($_SESSION['steam_gamename']) && !empty($_SESSION['steam_userid']) && !empty($_SESSION['steam_email']) ? false : true;
if (!$missingData) {
create_db_table_steamblock();
$smcFunc['db_query']('','
DELETE FROM {db_prefix}steam_users_datablock
WHERE id_user = {int:userid}',
array(
'userid' => intval($user_info['id']),
),
);
$smcFunc['db_insert']('',
'{db_prefix}steam_users_datablock',
array(
'id_user' => 'int',
'steam_gamename' => 'string',
'steam_userid' => 'string',
'steam_email' => 'string',
),
array(
intval($user_info['id']),
$_SESSION['steam_gamename'],
$_SESSION['steam_userid'],
$_SESSION['steam_email']
),
array('id_user')
);
}
}
echo '
<script>
function steam_reset_confirmation' . $steamblockId . '() {
if (confirm("' . (!empty($missingData) ? $steam_text['confirm_submit'] : $steam_text['confirm_change']) . '") == true) {
document.getElementById("steam_postpage' . $steamblockId . '").submit();
}
else {
return false;
}
}
function ehsteam_onmouseover' . $steamblockId . '(buttonover) {
buttonover.style.backgroundImage = "linear-gradient(to right, #A9A9A9, #F8F8F8)";
buttonover.style.cursor = "pointer";
return false;
}
function ehsteam_onmouseout' . $steamblockId . '(buttonout) {
buttonout.style.backgroundImage = "linear-gradient(to left, #A9A9A9, #F8F8F8)";
buttonout.style.cursor = "normal";
return false;
}
</script>';

if (!empty($missingData)) {
echo '
<div style="display: flex; justify-content: ' . $justify . ';">
<form action="', htmlspecialchars($url), '" id="steam_postpage' . $steamblockId . '" name="steam_postpage' . $steamblockId . '" method="post" accept-charset="', $context['character_set'], '">
<div style="display: table;">
<div style="display: table-row;">
<div style="display: table-cell;" class="sp_left">
<label style="display: flex; justify-content: ' . $justify . ';" for="steam_gamename' . $steamblockId . '">', $steam_text['name'], ':</label>
<div style="display: inline;">' . (empty($_SESSION['steam_gamename']) ? '
<input' . $disabled . ' required placeholder="' . $steam_text['name'] . '" pattern=".*\S.*" type="text" class="steam_gamename" id="steam_gamename' . $steamblockId . '" name="steam_gamename' . $steamblockId . '" size="' . $inputSize . '" style="display: flex;align-items: center;width:100%;font: inherit;padding: 0.25rem 0.5rem;border: 0.125rem solid hsl(30, 76%, 10%);outline: none;" value="' . (!empty($_SESSION['steam_gamename']) ? $_SESSION['steam_gamename'] : '') . '" />' : $_SESSION['steam_gamename']) . '
</div>
</div>
</div>
<div style="display: table-row;">
<div style="display: table-cell;" class="sp_left">
<label style="display: flex; justify-content: ' . $justify . ';" for="steam_userid' . $steamblockId . '">', $steam_text['id'], ':</label>
<div style="display: inline;">' . (empty($_SESSION['steam_userid']) ? '
<input' . $disabled . ' required placeholder="' . $steam_text['id'] . '" pattern=".*\S.*" type="text" class="steam_userid" name="steam_userid' . $steamblockId . '" id="steam_userid' . $steamblockId . '" size="' . $inputSize . '" style="display: flex;align-items: center;width:100%;font: inherit;padding: 0.25rem 0.5rem;border: 0.125rem solid hsl(30, 76%, 10%);outline: none;" value="' . (!empty($_SESSION['steam_userid']) ? $_SESSION['steam_userid'] : '') . '" />' : $_SESSION['steam_userid']) . '
</div>
</div>
</div>
<div style="display: table-row;">
<div style="display: table-cell;" class="sp_left">
<label style="display: flex; justify-content: ' . $justify . ';" for="steam_email' . $steamblockId . '">', $steam_text['email'], ':</label>
<div style="display: inline;">' . (empty($_SESSION['steam_email']) ? '
<input' . $disabled . ' required placeholder="' . $steam_text['email'] . '" pattern=".*\S.*" type="text" class="steam_email" name="steam_email' . $steamblockId . '" id="steam_email' . $steamblockId . '" size="' . $inputSize . '" style="display: flex;align-items: center;width:100%;font: inherit;padding: 0.25rem 0.5rem;border: 0.125rem solid hsl(30, 76%, 10%);outline: none;" value="' . (!empty($_SESSION['steam_email']) ? $_SESSION['steam_email'] : '') . '" />' : $_SESSION['steam_email']) . '
</div>
</div>
</div>
<div style="display: table-row;">
<div style="display: table-cell;" class="sp_left" style="padding-top: 0.2rem;">
<input' . $disabled . ' style="background-image: linear-gradient(to left, #A9A9A9, #F8F8F8);" onmouseout="ehsteam_onmouseout' . $steamblockId . '(this)" onmouseover="ehsteam_onmouseover' . $steamblockId . '(this)" onclick="steam_reset_confirmation' . $steamblockId . '()" id="steamReset' . $steamblockId. '" type="button" value="' . $steam_text['submit'] . '" class="button_submit" />
</div>
</div>
</div>
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>
</div>
<div style="padding: 0.2rem 0rem 0.2rem 0rem;" class="alert">' . (!empty($missingData) ? $steam_text['missing_data_msg'] : '') . '</div>';
}
else {
echo '
<div style="overflow: hidden;display: flex; justify-content: ' . $justify . ';">
<form action="', htmlspecialchars($url), '" id="steam_postpage' . $steamblockId . '" name="steam_postpage' . $steamblockId . '" method="post" accept-charset="', $context['character_set'], '">
<div>
<div>
<div>
<div style="display: flex; justify-content: ' . $justify . ';">', $steam_text['name'], ':</div>
<div id="steam_gamename' . $steamblockId . '" style="display: inline;">' . $_SESSION['steam_gamename'] . '</div>
</div>
</div>
<div>
<div>
<div style="display: flex; justify-content: ' . $justify . ';">', $steam_text['id'], ':</div>
<div id="steam_userid' . $steamblockId . '" style="display: inline;">' . $_SESSION['steam_userid'] . '</div>
</div>
</div>
<div>
<div>
<div style="display: flex; justify-content: ' . $justify . ';">', $steam_text['email'], ':</div>
<div id="steam_email' . $steamblockId . '" style="display: inline;">' . $_SESSION['steam_email'] . '</div>
</div>
</div>
<div>
<div style="display: flex; justify-content: ' . $justify . ';" class="ehPortal_cell" style="padding-top: 0.2rem;">
<input' . $disabled . ' id="steamReset' . $steamblockId. '" style="background-image: linear-gradient(to left, #A9A9A9, #F8F8F8);" onmouseout="ehsteam_onmouseout' . $steamblockId . '(this)" onmouseover="ehsteam_onmouseover' . $steamblockId . '(this)" onclick="steam_reset_confirmation' . $steamblockId . '()" type="button" value="' . $steam_text['change'] . '" class="button_submit" />
</div>
</div>
</div>
<input type="hidden" id="steam_reset' . $steamblockId . '" name="steam_reset' . $steamblockId . '" value="reset" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>
</div>
<div style="padding: 0.2rem 0rem 0.2rem 0rem;" class="alert">' . (!empty($missingData) ? $steam_text['missing_data_msg'] : '') . '</div>';
}
EhPortal 1.39.6 © 2024, WebDev