{assign var="title" value=$smarty.const._TPL_PROFILE_TITLE}
{include file="header.html"}
{include file="error.inc.html"}

<div id="content">		
        <div class="indent-main">
            <div class="container">
                <div class="col-1 maxheight">
                	<div class="box maxheight">
                        <div class="border-top maxheight">
                            <div class="border-bottom maxheight">
                                <div class="border-right maxheight">
                                    <div class="border-left maxheight">
                                        <div class="corner-top-right maxheight">
                                            <div class="corner-top-left maxheight">
                                                <div class="corner-bottom-left maxheight">
                                                    <div class="corner-bottom-right maxheight"> 
                                                        <div class="indent-box">
                                                            <img alt="" src="{$config.root_surl}/templates/images//1page_title1.gif" class="title" /><br />
                    <div class="container tail">
                                                            	
              <table><tr><td><!-- right top links -->
<a href="{$config.root_url}/logout.php">#_TPL_MEMBER_LOGOUT#</a></td>
<td><a href="{$config.root_url}/profile.php">#_TPL_MEMBER_CH_PSWD#</a></td>
<td><a href="{$config.root_url}/checks.php?id={$smarty.session._amember_id}">Checks</a></td>
<td><a href="{$config.root_url}/contacts.php?id={$smarty.session._amember_id}">Contacts</a></td>
<td><a href="{$config.root_url}/report.php?id={$smarty.session._amember_id}">Report</a></td>
{foreach from=$member_links item=t key=u}
<a href="{$u|escape}">{$t}</a><br />
{/foreach}
</td></tr></table>
<form name="signup" method="post" action="{$smarty.server.PHP_SELF|escape}">
<table class="vedit">

{if $fields_to_change.login}
<tr>
    <th style='width: 40%'>#_TPL_PROFILE_USERNAME#<br />
    <div class="small">#_TPL_PROFILE_ANOTHERUSRNM#</div></th>
    <td>
        <input type="text" name="login" value="{$user.login|escape}" size="15" />
    </td>
</tr>
{/if}

{if $fields_to_change.name_f}
<tr>
    <th style='width: 40%'>#_TPL_PROFILE_FLNAME#<br /></th>
    <td nowrap="nowrap">
       <input type="text" name="name_f" value="{$user.name_f|escape}" size="15" />
       <input type="text" name="name_l" value="{$user.name_l|escape}" size="15" />
    </td>
</tr>
{/if}

{if $fields_to_change.email}
<tr>
    <th style='width: 40%'>#_TPL_PROFILE_EMAIL#</th>
    <td><input type="text" name="email" value="{$user.email|escape}" size="25" />
    </td>
</tr>
{/if}

{if $fields_to_change.pass0}
<tr>
    <th>#_TPL_PROFILE_CHPWD#<br />
    <div class="small">#_TPL_PROFILE_BLANK#</div></th>
    <td><input type="password" name="pass0" value="{$user.pass0|escape}" size="15" />
    </td>
</tr>

<tr>
    <th><b>#_TPL_PROFILE_CONFPWD#</b><br />
    <div class="small">#_TPL_PROFILE_BLANK#</div></th>
    <td><input type="password" name="pass1" value="{$user.pass1|escape}" size="15" />
    </td>
</tr>
{/if}

{$additional_fields_html}

{if $fields_to_change.street}
<tr>
    <th>#_TPL_PROFILE_STREET#</th>
    <td><input type="text" name="street" value="{$user.street|escape}" size="30" />
    </td>
</tr>
{/if}
{if $fields_to_change.city}
<tr>
    <th>#_TPL_PROFILE_CITY#</th>
    <td><input type="text" name="city" value="{$user.city|escape}" size="15" />
    </td>
</tr>
{/if}
{if $fields_to_change.country}
<tr>
    <th>#_TPL_PROFILE_COUNTRY#</th>
    <td><select name="country" id="f_country" size="1">
         {country_options selected=$user.country}
    </select></td>
</tr>
{/if}    
{if $fields_to_change.state}
<tr>
    <th>#_TPL_PROFILE_STATE#</th>
    <td>
    <input type="text" name="state" id="t_state" size="30"
        value="{$user.state|escape}"
        {if count($state_options)>1}disabled="true" style='display: none;' {/if}
        />
    <select name="state" id="f_state" size="1"
        {if count($state_options)<=1}disabled="true" style='display: none;'{/if}
        >        
    {html_options options=$state_options selected=$user.state}
    </select>
    
    </td>
</tr>
{/if}
{if $fields_to_change.zip}
<tr>
    <th>#_TPL_PROFILE_ZIP#</th>
    <td><input type="text" name="zip" value="{$user.zip|escape}" size="8" />
    </td>
</tr>
{/if}

{if $fields_to_change.unsubscribed}
<tr>
    <th><b>#_TPL_PROFILE_UNSUBSCR#</b><br />
    <div class="small">#_TPL_PROFILE_NOEMAIL#</div><br />
    </th>
    <td>
    <input type="hidden"   name="unsubscribed" value="0" />
    <input type="checkbox" name="unsubscribed" value="1" {if $user.unsubscribed eq "1"}checked{/if} />
    #_TPL_PROFILE_CHECKBOX#
    </td>
</tr>
{/if}    

</table>
<br />
<input type="hidden" name="do_save" value="1" />
<input type="submit" value="#_TPL_PROFILE_SAVEBUT#" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="&nbsp;&nbsp;&nbsp;&nbsp;#_TPL_PROFILE_BACKBUT#&nbsp;&nbsp;&nbsp;&nbsp;" onclick="window.location.href='{$config.root_url}/member.php'" />
</form>

<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.select.js?smarty"></script>

{include file="js.country_state.js"}


                                                                <br class="clear" />
                                                            </div>
                                                            
                                                           
                                                           <!-- -->
                                                        </div>                                     
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

{include file="footer.html"}
