$SW = 2;
$OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\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,
'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 {
);
// Get categories
- $result = SQL_QUERY("SELECT id, cat FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort`", __FUNCTION__, __LINE__);
+ $result = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort` ASC",
+ __FUNCTION__, __LINE__);
+
+ // Do we have entries?
if (SQL_NUMROWS($result) > 0) {
// ... and begin loading stuff
while ($content = SQL_FETCHARRAY($result)) {
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
- `userid`=%s AND `status`='CONFIRMED' AND `receive_mails` > 0".runFilterChain('exclude_users', $mode)."
+ `userid`=%s AND
+ `status`='CONFIRMED' AND
+ `receive_mails` > 0".runFilterChain('exclude_users', $mode)."
LIMIT 1",
array(bigintval($ucat)), __FUNCTION__, __LINE__);