{*********************************************************
* Copyright (c) 2009 PHPLDTemplates.com
* Theme Author: http://www.PHPLDTemplates.com
* Theme URL: http://www.phpldtemplates.com/2009/07/free-phpld-template-dbs-3/
* 
* Report bug: Please email contact @ PHPLDTemplates.com
* License: Free, provided user keeps the footer links intake. Not to be resold.
* More free phpld templates are available at http://www.PHPLDTemplates.com
* 
**********************************************************}
{capture name="title"} - {l}User Management{/l}{/capture}
{capture assign="in_page_title"}{l}User Management{/l}{/capture}

{include file="header.tpl"}
{include file="top_bar.tpl"}

{strip}
{if $thank_you}
<table class="formPage" align="center">
   <tr>
      <td>
         <h3>{l}Information{/l}</h3>
      </td>
   </tr>
   <tr>
      <td>
         {l}Thank you for registering. Your account has been created. You may now log in and submit links.{/l}
      </td>
   </tr>
</table>
{elseif $confirmed}
<h3>{l}Information{/l}</h3>
<table border="0" class="formPage" align="center">
   <tr>
      <td>
         {l}Thank you for confirming your email. Your account has been activated. You may now log in with your username and password.{/l}
      </td>
   </tr>
</table>
{elseif $user_logged}
<table class="formPage" align="center">
   <tr>
      <td>
         <h3>{l}User Area{/l}</h3>
      </td>
   </tr>
   <tr>
      <td>
		{if $profileUpdate}
			<p>{l}Profile updated{/l}</p>
		{/if}
		<p><a href="{$smarty.const.DOC_ROOT}/index.php?uid={$regular_user_details.ID}" title="{l}Browse personal links{/l}">{l}My Submissions{/l}</a></p>
		<p><a href="{$smarty.const.DOC_ROOT}/profile.php?mode=edit" title="{l}Edit Profile{/l}">{l}Edit Profile{/l}</a></p>
      </td>
   </tr>
</table>

{elseif $agreement_terms}
<table border="0" class="formPage" align="center">
   <tr>
      <td>
         <h3>{l}Registration Agreement Terms{/l}</h3>
      </td>
   </tr>
   <tr>
      <td>
         While the administrators and editors of this directory will attempt to remove or edit any generally objectionable material as quickly as possible, it is not allways possible to review every submission. Therefore you acknowledge that all items submitted to this online resource express the views and opinions of the submitter and not the administrators, editors or webmaster (except for posts by these people) and hence will not be held liable.
<br /><br />
         You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all submitted items is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and editors of this link directory have the right to remove, edit or move any link at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent, the webmaster, administrator and editors cannot be held responsible for any cracking attempt that may lead to the data being compromised.
<br /><br />
         This directory uses sessions to store information. These do not contain any of the information you have entered above; they serve only to improve your viewing and submit pleasure. The e-mail address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).
<br /><br />
         By clicking Register below you agree to be bound by these conditions.
      </td>
   </tr>
   <tr>
      <td>
         <a href="{$smarty.const.DOC_ROOT}/profile.php?mode=register&amp;agreed=true" title="{l}I Agree to these terms{/l}">{l}I Agree to these terms{/l}</a>
      </td>
   </tr>
   <tr>
      <td>
         <a href="{$smarty.const.DOC_ROOT}/profile.php?mode=register&amp;agreed=false" title="{l}I Do Not Agree to these terms{/l}">{l}I Do Not Agree to these terms{/l}</a>
      </td>
   </tr>
</table>

{elseif $confirm eq 1}
   {if $password_recovered eq 1}
   <table class="formPage" align="center">
      <tr>
         <td>
            <h3>{l}Information{/l}</h3>
         </td>
      </tr>
      <tr>
         <td>
            {l}You can now login with your new password.{/l}
         </td>
      </tr>
   </table>

   {elseif $password_recovered eq 0}
   <table class="formPage" align="center">
      <tr>
         <td>
            <h3>{l}Information{/l}</h3>
         </td>
      </tr>
      <tr>
         <td class="err">
            {l}An error occured while saving your new password.{/l}
         </td>
      </tr>
   </table>
   {/if}

{elseif $send_password eq 1}
   {if $email_status eq 1 or $wrong_user_details eq 1}
      <table class="formPage" align="center">
      <tr>
         <td>
            <h3>{l}Information{/l}</h3>
         </td>
      </tr>
      <tr>
         <td class="{if $email_sent eq 'sent'}msg{else}err{/if}">
            {if $email_sent eq 'sent'}
               {l}Please check your email to confirm your new password request.{/l}
            {elseif $email_sent eq 'error'}
               {l}An error occurred while sending the email.{/l}
               {if $email_error_msg}<br />{$email_error_msg}{/if}
            {elseif $wrong_user_details}
               {l}The details you supplied do not match any registered user.{/l}
            {else}
               {l}Unknown error.{/l}
            {/if}
         </td>
      </tr>
   </table>
   {else}
   <form method="post" action="">
   <table class="formPage" align="center">
      <tr>
         <td colspan="2">
            <h3>{l}Recover Password{/l}</h3>
         </td>
      </tr>
      <tr>
         <td class="label"><span class='req'>*</span>{l}Login{/l}:</td>
         <td class="field">
            <input type="text" name="LOGIN" value="{$LOGIN}" size="20" maxlength="{$smarty.const.USER_LOGIN_MAX_LENGTH}" class="text" />
            {validate form="profile" id="v_LOGIN" message=$smarty.capture.field_char_required}
            {validate form="profile" id="v_LOGIN_LENGTH" message=$smarty.capture.invalid_length|replace:'#MIN#':$smarty.const.USER_LOGIN_MIN_LENGTH|replace:'#MAX#':$smarty.const.USER_LOGIN_MAX_LENGTH}
         </td>
      </tr>
      <tr>
         <td class="label"><span class='req'>*</span>{l}Email{/l}:</td>
         <td class="field">
            <input type="text" name="EMAIL" value="{$EMAIL}" size="20" maxlength="255" class="text" />
            {validate form="profile" id="v_EMAIL" message=$smarty.capture.invalid_email}
            {validate form="profile" id="v_EMAIL_BANNED" message=$smarty.capture.email_banned}
         </td>
      </tr>
      {if $smarty.const.VISUAL_CONFIRM}
      <tr>
         <td class="label">
            <span class='req'>*</span>{l}Confirmation code{/l}
            <p class="small">{l}This helps prevent automated registrations.{/l}</p>
         </td>
         <td class="field">
            <input id="IMAGEHASH" name="IMAGEHASH" type="hidden" value="{$imagehash}" />
            <input id="CAPTCHA" name="CAPTCHA" type="text" value="" size="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" maxlength="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" class="text" />
            {validate form="profile" id="v_CAPTCHA" message=$smarty.capture.invalid_code}<br />
            <img src="{$smarty.const.DOC_ROOT}/captcha.php?imagehash={$imagehash}" class="captcha" alt="{l}Visual Confirmation Security Code{/l}" title="{l}Visual Confirmation Security Code{/l}" />
         </td>
      </tr>
      {/if}
      <tr>
         <td>&nbsp;</td>
         <td><input type="submit" name="submit" value="Submit" class="btn" /></td>
      </tr>
   </table>
   </form>
   {/if}

{elseif $user_registration eq 1 or $user_edit eq 1}
<form method="post" action="">
<table class="formPage" align="center">
   {if $profileUpdate}
   <tr>
      <td class="msg" colspan="2">{l}Profile updated{/l}</td>
   </tr>
   {/if}
   <tr>
      <td colspan="2">
         <h3>{l}Registration Information{/l}</h3>
      </td>
   </tr>
{if $user_registration eq 1}
   <tr>
      <td class="label"><span class='req'>*</span>{l}Login{/l}:</td>
      <td class="field">
         <input type="text" name="LOGIN" value="{$LOGIN}" size="20" maxlength="{$smarty.const.USER_LOGIN_MAX_LENGTH}" class="text" />
         {validate form="profile" id="v_LOGIN" message=$smarty.capture.field_char_required}
         {validate form="profile" id="v_LOGIN_LENGTH" message=$smarty.capture.invalid_length|replace:'#MIN#':$smarty.const.USER_LOGIN_MIN_LENGTH|replace:'#MAX#':$smarty.const.USER_LOGIN_MAX_LENGTH}
         {validate form="profile" id="v_LOGIN_U" message=$smarty.capture.login_not_unique}
      </td>
   </tr>
{/if}
   <tr>
      <td class="label"><span class='req'>*</span>{l}Name{/l}:</td>
      <td class="field">
         <input type="text" name="NAME" value="{$NAME}" size="20" maxlength="{$smarty.const.USER_NAME_MAX_LENGTH}" class="text" />
         {validate form="profile" id="v_NAME" message=$smarty.capture.field_char_required}
         {validate form="profile" id="v_NAME_LENGTH" message=$smarty.capture.invalid_length|replace:'#MIN#':$smarty.const.USER_NAME_MIN_LENGTH|replace:'#MAX#':$smarty.const.USER_NAME_MAX_LENGTH}
      </td>
   </tr>
   <tr>
      <td class="label"><span class='req'>*</span>{l}Password{/l}:</td>
      <td class="field">
         <input type="password" name="PASSWORD" value="" size="20" maxlength="{$smarty.const.USER_PASSWORD_MAX_LENGTH}" class="text" />
         {validate form="profile" id="v_PASSWORD" message=$smarty.capture.field_pass_required}
         {validate form="profile" id="v_PASSWORD_LENGTH" message=$smarty.capture.invalid_length|replace:'#MIN#':$smarty.const.USER_PASSWORD_MIN_LENGTH|replace:'#MAX#':$smarty.const.USER_PASSWORD_MAX_LENGTH}
      </td>
   </tr>
   <tr>
      <td class="label"><span class='req'>*</span>{l}Confirm Password{/l}:</td>
      <td class="field">
         <input type="password" name="PASSWORDC" value="" size="20" maxlength="{$smarty.const.USER_PASSWORD_MAX_LENGTH}" class="text" />
         {validate form="profile" id="v_PASSWORDC" message=$smarty.capture.password_not_match}
      </td>
   </tr>
   <tr>
      <td class="label"><span class='req'>*</span>{l}Language{/l}:</td>
      <td class="field">
         {html_options options=$languages selected=$LANGUAGE name="LANGUAGE"}
         {validate form="profile" id="v_LANGUAGE" message=$smarty.capture.field_required}
      </td>
   </tr>
   <tr>
      <td class="label"><span class='req'>*</span>{l}Email{/l}:</td>
      <td class="field">
         <input type="text" name="EMAIL" value="{$EMAIL|escape}" size="20" maxlength="255" class="text" />
         {validate form="profile" id="v_EMAIL" message=$smarty.capture.invalid_email}
         {validate form="profile" id="v_EMAIL_U" message=$smarty.capture.email_not_unique}
         {validate form="profile" id="v_EMAIL_BANNED" message=$smarty.capture.email_banned}
      </td>
   </tr>
{if $user_registration eq 0 AND $ALLOW_AUTHOR_INFO eq 1}
   <tr>
      <td colspan="2">
         <h3>{l}Optional Info For About Page{/l}</h3>
      </td>
   </tr>
  <!-- author avatar related -->

  {if $ALLOW_AVATARS eq 1}
   <tr>
     <td class="label"><label for="IMG">{l}Upload Personal Photo{/l}:</label></td>
     <td class="smallDesc">
            <input type="file" name="IMG" value="{$IMG}" class="text"/><br />
            {*validate form="profile" id="V_IMG" message="File must be either JPG, GIF or PNG" type="image/pjpeg, image/jpeg, image/gif, image/png, image/x-png"*} <br/>
     </td>
  </tr>
  <tr>
     <td class="label"><label for="DESCRIPTION">{l}Current Photo{/l}:</label></td>
     <td class="smallDesc">
            {if $AUTH_IMG}
            <img src="{$AUTH_IMG}">{else}None{/if}
     </td>
   </tr>
   {/if}
    <!-- end -->

   <tr>
      <td class="label">
         {l}Post Articles Anonymously{/l}:
         
      </td>
      <td class="field">
         {html_options options=$yesno selected=$ANONYMOUS name="ANONYMOUS"}<br />
		<p class="small">{l}This will keep your name off of the articles page,{/l}<BR />{l}but admins will still know who wrote each article.{/l}</p>
      </td>
   </tr>
   <tr>
      <td class="label">{l}Author's Info{/l}:</td>
      <td class="field">
         <textarea name="INFO" rows="3" cols="37" class="text" {formtool_count_chars name="INFO" limit="255" alert=true}>{$INFO|escape|trim}</textarea>
         {validate form="profile" id="v_INFO_LENGTH" message="<span class=\"errForm\">This field has a maximum of 255 characters limit.</span>"}
         <br />
         {l}Limit{/l}: <input type="text" name="INFO_limit" size="4" class="limit_field" readonly="readonly" value="{$InfoLimit|trim}" />
      </td>
   </tr>
   <tr>
      <td class="label">{l}Author's Website Name{/l}:</td>
      <td class="field">
         <input type="text" name="WEBSITE_NAME" value="{$WEBSITE_NAME|escape|trim}" size="40" maxlength="255" class="text"/>
      </td>
   </tr>
   <tr>
      <td class="label">{l}Author's Website URL{/l}:</td>
      <td class="field">
         <input type="text" name="WEBSITE" value="{if !$WEBSITE}http://{else}{$WEBSITE|escape|trim}{/if}" size="40" maxlength="255" class="text"/>
         {validate form="profile" id="v_URL_BANNED" message=$smarty.capture.domain_banned}
      </td>
   </tr>
   <tr>
      <td colspan="2">
         <h3></h3>
      </td>
   </tr>
{/if}
   {if $smarty.const.VISUAL_CONFIRM}
      <tr>
         <td class="label">
            <span class='req'>*</span>{l}Confirmation code{/l}
            <p class="small">{l}This helps prevent automated registrations.{/l}</p>
         </td>
         <td class="field">
            <input id="IMAGEHASH" name="IMAGEHASH" type="hidden" value="{$imagehash}" />
            <input id="CAPTCHA" name="CAPTCHA" type="text" value="" size="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" maxlength="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" class="text" />
            {validate form="profile" id="v_CAPTCHA" message=$smarty.capture.invalid_code}<br />
            <img src="{$smarty.const.DOC_ROOT}/captcha.php?imagehash={$imagehash}" class="captcha" alt="{l}Visual Confirmation Security Code{/l}" title="{l}Visual Confirmation Security Code{/l}" />
         </td>
      </tr>
   {/if}
   <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="Register" class="btn" /></td>
   </tr>
</table>
</form>
{/if}

{include file="footer.tpl"}
{/strip}

