X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fregister_functions.php;h=efc9e4b2efd22617d60547a6505b5b68abe0accb;hb=d897dae9f3b01f17fb59f2b96ba067b1a0f417b0;hp=99af2efc60c7ba22d6f82a729c13617e7ef71202;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 99af2efc60..efc9e4b2ef 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -1,7 +1,7 @@ \n"; while ($content = SQL_FETCHARRAY($result)) { - // Is the array element not set? - if (!isPostRequestElementSet('cat', $content['id'])) { - // Then set it - setRequestPostElement('cat', array($content['id'] => '')); - } // END - if - // Prepare array for the template $content = array( 'sw' => $SW, @@ -104,6 +98,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { 'id' => $content['id'], ); + // Mark categories if ((postRequestElement('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!isPostRequestElementSet('cat', $content['id'])))) { $content['def_y'] = ' checked="checked"'; } else { @@ -147,10 +142,13 @@ function FILTER_REGISTER_MUST_FILLOUT ($content) { $result = SQL_QUERY("SELECT `field_name`, `field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC", __FUNCTION__, __LINE__); + // Walk through all entries while ($row = SQL_FETCHARRAY($result)) { + // Must the user fill out this element? $value = ''; if ($row['field_required'] == 'Y') $value = " (*)"; - // @TODO Rewrite these constants + + // Add it $content['must_fillout_'.strtolower($row['field_name']).''] = $value; } // END - while