$val_req = Sql_Fetch_Row_Query("select value from {$tables['user_attribute']} where userid = {$id} and attributeid = {$row['id']}");
    $row["value"] = $val_req[0];
    if ($row["type"] == "date") {
        printf('<input style="attributeinput" type=hidden name="dateattribute[%d]" value="%s">', $row["id"], $row["name"]);
        $novalue = trim($row["value"]) == "" ? "checked" : "";
        printf('<tr><td>%s<!--%s--></td><td>%s&nbsp; Not set: <input type=checkbox name="%s_novalue" %s></td></tr>' . "\n", stripslashes($row["name"]), $row["value"], $date->showInput($row["name"], "", $row["value"]), normalize(stripslashes($row["name"])), $novalue);
    } elseif ($row["type"] == "checkbox") {
        $checked = $row["value"] == "on" ? "checked" : "";
        printf('<tr><td>%s</td><td><input style="attributeinput" type=hidden name="cbattribute[%d]" value="%d"><input style="attributeinput" type=checkbox name="attribute[%d]" value="on" %s></td></tr>' . "\n", stripslashes($row["name"]), $row["id"], $row["id"], $row["id"], $checked);
    } elseif ($row["type"] == "checkboxgroup") {
        printf("<tr><td valign=top>%s</td><td>%s</td></tr>\n", stripslashes($row["name"]), UserAttributeValueCbGroup($id, $row["id"]));
    } elseif ($row["type"] == "textarea") {
        printf('<tr><td valign=top>%s</td><td><textarea name="attribute[%d]" rows="10" cols="40" wrap=virtual>%s</textarea></td></tr>', stripslashes($row["name"]), $row["id"], htmlspecialchars($row["value"]));
    } else {
        if ($row["type"] != "textline" && $row["type"] != "hidden") {
            printf("<tr><td>%s</td><td>%s</td></tr>\n", stripslashes($row["name"]), UserAttributeValueSelect($id, $row["id"]));
        } else {
            printf('<tr><td>%s</td><td><input style="attributeinput" type=text name="attribute[%d]" value="%s" size=30></td></tr>' . "\n", $row["name"], $row["id"], htmlspecialchars($row["value"]));
        }
    }
}
if ($access != "view") {
    print '<tr><td colspan=2><input type=submit name=change value="' . $GLOBALS['I18N']->get('Save Changes') . '"></td></tr>';
}
print '</table>';
if (isBlackListed($user["email"])) {
    print '<h3>' . $GLOBALS['I18N']->get('User is blacklisted. No emails will be sent to this user') . '</h3>';
}
print "<h3>" . $GLOBALS['I18N']->get('Mailinglist Membership') . ":</h3>";
print "<table border=1><tr>";
$req = Sql_Query("select * from {$tables["list"]} {$subselect_where} order by listorder,name");
Example #2
0
           <tr><td valign="top" class="dataname">%s</td><td>%s</td>
           </tr>', stripslashes($row['name']), UserAttributeValueCbGroup($id, $row['id']));
        } elseif ($row['type'] == 'textarea') {
            $userdetailsHTML .= sprintf('
           <tr><td valign="top" class="dataname">%s</td><td><textarea name="attribute[%d]" rows="10" cols="40" class="wrap virtual">%s</textarea></td>
           </tr>', stripslashes($row['name']), $row['id'], htmlspecialchars(stripslashes($row['value'])));
        } elseif ($row['type'] == 'avatar') {
            $userdetailsHTML .= sprintf('<tr><td valign="top" class="dataname">%s</td><td>', stripslashes($row['name']));
            if ($row['value']) {
                $userdetailsHTML .= sprintf('<img src="./?page=avatar&amp;user=%d&amp;avatar=%s" /><br/>', $id, $row['id']);
            }
            $userdetailsHTML .= sprintf('<input type="file" name="attribute[%d]" /><br/>MAX: %d Kbytes</td>
           </tr>', $row['id'], MAX_AVATAR_SIZE / 1024);
        } else {
            if ($row['type'] != 'textline' && $row['type'] != 'hidden') {
                $userdetailsHTML .= sprintf("<tr><td class='dataname'>%s</td><td>%s</td></tr>\n", stripslashes($row['name']), UserAttributeValueSelect($id, $row['id']));
            } else {
                $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td><input class="attributeinput" type="text" name="attribute[%d]" value="%s" size="30" /></td></tr>' . "\n", $row['name'], $row['id'], htmlspecialchars(stripslashes($row['value'])));
            }
        }
    }
}
if ($access != 'view') {
    $userdetailsHTML .= '<tr><td colspan="2" class="bgwhite"><input class="submit" type="submit" name="change" value="' . $GLOBALS['I18N']->get('Save Changes') . '" /></td></tr>';
}
$userdetailsHTML .= '</table>';
if (isBlackListed($user['email'])) {
    $userdetailsHTML .= '<h3>' . s('Subscriber is blacklisted. No emails will be sent to this email address.') . '</h3>';
}
$mailinglistsHTML .= '<h3>' . $GLOBALS['I18N']->get('Mailinglist membership') . ':</h3>';
// a dummy entry, to make the array show up in POST even if all checkboxes are unchecked