Example #1
0
    } elseif ($user->data['email_notify'] == 0) {
        $amount = "always";
    } else {
        $amount = $user->data['email_notify'];
    }
    //$formarray['rows'][$i]['items'] = "label|name|type|value";
    $formarray['action'] = $_SERVER['PHP_SELF'];
    //$formarray['rows'][0]['items'] = "Username:|username|text|" . $_POST['username'];
    $formarray['rows'][0]['items'] = "Name:|realname|text|" . $realname;
    $formarray['rows'][1]['items'] = "New password:|passwordx|password";
    $formarray['rows'][2]['items'] = "Re-enter:|password2|password";
    $formarray['rows'][3]['items'] = "Email:|email|text|" . $email;
    $formarray['rows'][4]['label'] = "Name format:";
    $formarray['rows'][4]['type'] = "select";
    $formarray['rows'][4]['name'] = "name_format";
    $formarray['rows'][4]['value'] = get_name_format(1, true);
    $formarray['rows'][4]['selected'] = $nformat;
    $formarray['rows'][5]['type'] = "checkbox";
    $formarray['rows'][5]['label'] = "Notify by email:";
    $formarray['rows'][5]['name'] = "email_notify";
    $formarray['rows'][5]['checked'] = $checked;
    $formarray['rows'][5]['value'] = 1;
    $formarray['rows'][6]['items'] = "Notify amount:|amount|text|" . $amount;
    $formarray['rows'][7]['items'] = "Current pass:|curpassword|password";
    $formarray['rows'][8]['items'] = "|mode|hidden|validate";
    $formarray['rows'][9]['items'] = "||submit|Change!";
    echo create_form_html($formarray);
    unset($formarray);
}
print_footer($user, 6);
?>
Example #2
0
function print_profile_html($profile, $ownuid)
{
    $itemhtml .= n(4) . "<fieldset>\n";
    $itemhtml .= n(6) . "<ul class=\"pageitem\">\n";
    $itemhtml .= n(8) . "<li class=\"textbox\"><span class=\"header\">Profile</span></li>\n";
    if ($profile['activated'] == 1) {
        $itemhtml .= n(8) . "<li class=\"textbox\">Username: "******"</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Name: " . $profile['realname'] . "</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Email: " . $profile['email'] . "</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Registered user: yes</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Registration date: " . $profile['regdate'] . "</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Last login date: " . $profile['lastlogin'] . "</li>\n";
    } else {
        $itemhtml .= n(8) . "<li class=\"textbox\">Name: " . $profile['realname'] . "</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Email: " . $profile['email'] . "</li>\n";
        $itemhtml .= n(8) . "<li class=\"textbox\">Registered user: no</li>\n";
    }
    if ($profile['user_id'] == $ownuid) {
        $itemhtml .= n(8) . "<li class=\"textbox\">Display names as: " . get_name_format($profile['name_format']) . "</li>\n";
        if ($profile['email_notify'] == 0) {
            $enotify = "always";
        } elseif ($profile['email_notify'] == -1) {
            $enotify = "none";
        } else {
            $enotify = "Expenses of " . number_format($profile['email_notify'], DECIMALS, DSEP, TSEP) . " or more.";
        }
        $itemhtml .= n(8) . "<li class=\"textbox\">Email notification: {$enotify}</li>\n";
    }
    /*
        foreach ($profile as $key => $value) {
        if ($key != "password" && $key != "confirmation" && $key != "user_id") {
        if ($key == 'activated' && $hideactive == false)  $itemhtml .= n(8) . "<li class=\"textbox\">Registered user: yes</li>\n";
        else $itemhtml .= n(8) . "<li class=\"textbox\">$key: $value</li>\n";
        }
        } */
    $itemhtml .= n(6) . "</ul>\n";
    $itemhtml .= n(4) . "</fieldset>\n";
    echo $itemhtml;
}