hi there,
It will not go through as the javascript fails from having 2 loginform's present on an xcart page (the original Login Form along with the new Login Form). I have amended the code so that it acts separately (loginform2)
PHP Code:
<FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform2">
{if $login eq ""}<a href="secure_login.php">{$lng.lbl_log_in}</a> {/if}
{if $login ne ""}<a href="javascript: document.loginform2.submit();">Log out</a>{/if}
<span class="whitefont">|</span> {if $login eq ""}<a href="register.php">{$lng.lbl_register}</a> {/if}
{if $login ne ""} <a href="register.php">Profile</a> {/if}
<span class="whitefont">|</span> <a href="cart.php"> {$lng.lbl_view_cart}</a>
<span class="whitefont">|</span> <a href="cart.php?mode=checkout">{$lng.lbl_checkout}</a>
<INPUT type="hidden" name="mode" value="logout">
<INPUT type="hidden" name="redirect" value="customer">
</FORM>
Edit: Although no ideas where this code came from as it looks like it has a few errors in places. I wouldn't use this code without sorting what the purpose of the form is for (ie. it has no input to login with and might as well use direct links), the INPUTs aren't in the right place at the right time.
Hope this helps.