<script language="javascript" type="text/javascript" src="[% webpath %]/js/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    plugins : "preview,searchreplace",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,sub,sup,formatselect,hr,|,justifyleft,justifycenter,justifyright,justifyfull",
    theme_advanced_buttons2 : "bullist,numlist,|,link,unlink,anchor,|,undo,redo,search,replace,|,cleanup,help,preview",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    extended_valid_elements : "hr[class|width|size|noshade]",
    force_br_newlines : true,
    force_p_newlines : false,
    convert_urls : false
});
</script>



<h2>User Details</h2>

[% IF data %]
<div class="box">
[% IF thanks %]<p>[% thanks %][% END %]
<p>Fields marked * are mandatory fields and must be completed.
<p>
<b>Please take the time to complete your details, as it helps others to identify you, especially if
you're able to coming along to any of The Scooter Dos in person. that other attendees know who you
are. Note that only the details as seen in the preview box at the bottom of the page, will be
visible on the website.
</b></div>

<form method="post" action="[% cgipath %]/pages.cgi">
<input type="hidden" name="act" value="user-pass" />
<input type="hidden" name="userid" value="[% data.userid %]" />
<p align="center"><input type="submit" name="submit" value="CHANGE PASSWORD" />
</form>

[% IF errmess %]
<div class="box">
<p class="alert">There are invalid or missing fields, as noted by the &empty; symbol.
</div>
[% END %]

<form method="post" action="[% cgipath %]/pages.cgi" enctype="multipart/form-data">
<input type="hidden" name="act" value="user-amend" />
<input type="hidden" name="userid" value="[% data.userid %]" />
<input type="hidden" name="imageid" value="[% data.imageid %]" />

<div class="box">
    <table width="100%">
    <tr><td width="90">Email *</td>
        <td width="10" class="alert">[% data.email_err %]</td>
        <td><input type="text" name="email" value="[% data.email %]" size="40" />
            <br />Your email address will NOT be publically visible or passed to any third party.
            It is required, as this will be your login and will be used to send you a site password.</td>
    </tr>
    <tr><td>Display Name *</td>
        <td class="alert">[% data.realname_err %]</td>
        <td><input type="text" name="realname" value="[% data.realname %]" size="40" /></td>
    </tr>
    <tr><td>Tag</td>
        <td class="alert">[% data.nickname_err %]</td>
        <td><input type="text" name="nickname" value="[% data.nickname %]" size="20" /><br />
            If entered, your moniker will take precedence over your name for online presentation.
        </td>
    </tr>
    <tr><td>About Me</td>
        <td class="alert">[% data.aboutme_err %]</td>
        <td><textarea name="aboutme" rows="10" cols="45">[% data.aboutme %]</textarea></td>
    </tr>
    <tr><td>Web Page</td>
        <td class="alert">[% data.url_err %]</td>
        <td><input type="text" name="url" value="[% data.url %]" size="50" /></td>
    </tr>
    <tr><td>Avatar</td>
        <td class="alert">[% data.image_err %]</td>
        <td><input type="file" name="image" /><br/>
            <img src="[% webpath %]/[% data.link %]" alt="[% data.name %]"/></td>
    </tr>
    </table>
</div>

<p align="center"><input type="submit" name="submit" value="UPDATE" />
</form>

<h2>Preview</h2>

<div class="box">
    <table width="100%">
    <tr><td><b>[% preview.realname %]</b>
            [% IF preview.link %]<br /><img src='[% webpath %]/[% preview.link %]' alt='[% preview.tag %]'/>[% END %]
            [% IF preview.nickname %]<br />[% preview.nickname %][% END %]
            <br />Posted: [% userposts %] times
        </td>
        <td>[% IF preview.aboutme %]<p>[% preview.aboutme %][% END %]
            [% IF preview.url %]<p>My Web Page: <a href="[% preview.url %]">[% preview.url %]</a>[% END %]
        </td>
    </tr>
    </table>
</div>

[% ELSE %]

<div class="box"><p>User not found.</div>

[% END %]
