{include file='header.tpl' p="general"} 

<br />
<table width="886" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="150" valign="top">
	<div id="reg_box">
	<h3 class="captions">{$lang.genre}</h3>
		<div id="list_cats">
		{list_categories}		
		</div>
	</div>
	<br />
	<div id="reg_box">
	<h3 class="captions">{$lang.members}</h3>
	{if $logged_in == '1'}
	{include file='loggedin_body.tpl'} 
	{else}
	{include file='login_body.tpl'} 
	{/if}
	</div>	
	</td>
    <td valign="top">
	<div id="content_index">
	<h1 class="h1_default">{$lang.update_profile}</h1>
		{if $success == 1}
		<h2>{$lang.ep_msg1}</h2>
		<div class="confirm_send"><a href="{$smarty.const._URL}/edit_profile.{$smarty.const._FEXT}">{$lang.proceed}</a></div>
		 
			{if $changed_pass == 1}
				<meta http-equiv="refresh" content="5;URL={$smarty.const._URL}" />
				<div class="confirm_send">
					{$lang.ep_msg2}
				</div>
			{/if}
		{else}
		 {if $errors.failure != ''}
		 	<span class="small-warning">{$errors.failure}</span>
		 {/if}
		<form name="register-form" method="POST" action="{$form_action}">
		<table width="100%" border="0" cellspacing="1" cellpadding="5">
		  <tr>
		    <td colspan="2" valign="top"><h2>{$lang.about_me}</h2></td>
		    </tr>
		  <tr>
			<td colspan="2" valign="top">
			<small>{$lang.ep_msg3}<br /></small>
			  <textarea name="aboutme" cols="50" rows="10" class="inputtext">{if isset($smarty.post.aboutme)}{$inputs.aboutme}{elseif isset($userdata.about)}{$userdata.about}{/if}</textarea>		    </td>
			</tr>
		  <tr>
			<td colspan="2"><h2>{$lang.change_pass}</h2></td>
		  </tr>
		  <tr>
			<td width="36%">{$lang.existing_pass}:</td>
			<td width="64%"><input name="pass" type="password" maxlength="32" class="inputtext" /><br />
			{if $errors.pass != ''}<span class="small-warning">{$lang.ep_msg4}</span>{/if}</td>
		  </tr>
		  <tr>
			<td><strong>{$lang.new_pass}</strong>:</td>
			<td><input name="new_pass" type="password" maxlength="32" class="inputtext" /><br />
			<small>{$lang.ep_msg5}</small>			</td>
		  </tr>
		  <tr>
			<td colspan="2"><h2>{$lang.other_info}</h2></td>
		  </tr>
		  <tr>
			<td {if $errors.email != ''} class="input-warning" {/if}>{$lang.your_email}:</td>
			<td><input type="text" name="email" class="inputtext" {if isset($smarty.post.email)}value="{$inputs.email}"{else}value="{$userdata.email}"{/if} /><br /><span class="small-warning">{$errors.email}</span></td>
		  </tr>		  
		  <tr>
			<td width="36%">{$lang.your_name}:</td>
			<td width="64%"><input name="name" type="text" class="inputtext" {if isset($smarty.post.name)}value="{$inputs.name}"{else}value="{$userdata.name}"{/if} /><br />		  </tr>
		  <tr>
			<td>{$lang.gender}:</td>
    		<td>
			<select name="gender">
			<option value="male" {if $inputs.gender == 'male'}selected="selected"{/if}>{$lang.male}</option>
			<option value="female"{if $inputs.gender == 'female'}selected="selected"{/if}>{$lang.female}</option>
			</select>
		</td>			
		  </tr>
		  <tr>
			<td {if $errors.country != ''} class="input-warning" {/if}>{$lang.country}:</td>
			<td>
				{if $show_countries_list}
				<select name="country" size="1" >
				<option value="-1">{$lang.select}</option>
					{foreach from=$countries_list key=k item=v}
					<option value="{$k}" {if $smarty.post.country == $k}selected{elseif $userdata.country == $k}selected{/if}>{$v}</option>
					{/foreach}
				</select>
				<br /><span class="small-warning">{$errors.country}</span>
				{/if}	</td>
		  </tr>
		  <tr>
		  	<td>{$lang.my_favorites}:			</td>
			<td>
				<input name="favorite" type="radio" value="1" {if isset($smarty.post.favorite) && $smarty.post.favorite == 1}checked{elseif $userdata.favorite == 1}checked{/if}/> {$lang.public} 
				<input name="favorite" type="radio" value="0" {if isset($smarty.post.favorite) && $smarty.post.favorite == 0}checked{elseif $userdata.favorite == 0}checked{/if}/> {$lang.private}			</td>
		  </tr>
		  <tr>
		    <td colspan="2" class="input-warning" {if $errors.website != ''} {/if}><h2>{$lang.profile_socialfootprint}</h2></td>
		    </tr>
		  <tr>
			<td {if $errors.website != ''} class="input-warning" {/if}>{$lang.profile_social_website}:</td>
			<td><input type="text" name="website" class="inputtext" {if isset($smarty.post.website)}value="{$inputs.website}"{else}value="{$userdata.website}"{/if} />
			<br /><span class="small-warning">{$errors.website}</span></td>
		  </tr>	
		  <tr>
			<td {if $errors.facebook != ''} class="input-warning" {/if}>{$lang.profile_social_fb}:</td>
			<td><input type="text" name="facebook" class="inputtext" {if isset($smarty.post.facebook)}value="{$inputs.facebook}"{else}value="{$userdata.facebook}"{/if} />
			<br /><span class="small-warning">{$errors.facebook}</span></td>
		  </tr>	
		  <tr>
			<td {if $errors.twitter != ''} class="input-warning" {/if}>{$lang.profile_social_twitter}:</td>
			<td><input type="text" name="twitter" class="inputtext" {if isset($smarty.post.twitter)}value="{$inputs.twitter}"{else}value="{$userdata.twitter}"{/if} />
			<br /><span class="small-warning">{$errors.twitter}</span></td>
		  </tr>	
		  <tr>
			<td {if $errors.lastfm != ''} class="input-warning" {/if}>{$lang.profile_social_lastfm}:</td>
			<td><input type="text" name="lastfm" class="inputtext" {if isset($smarty.post.lastfm)}value="{$inputs.lastfm}"{else}value="{$userdata.lastfm}"{/if} />
			<br /><span class="small-warning">{$errors.lastfm}</span></td>
		  </tr>	
		  <tr>
			<td>&nbsp;</td>
			<td><input type="submit" name="save" value="{$lang.submit_save}" class="inputbutton" /></td>
		  </tr>
		</table>
		</form>
		{/if}
	</div>
	</td>
    <td width="250" valign="top">
	<div id="top_videos">
	<h3 class="captions">{$lang.top_m_videos}</h3>
	{$top_videos}
	</div>
	</td>
  </tr>
</table>
{include file='footer.tpl'} 