<!--{if !$inajax}-->
	{subtemplate header}
	<div id="nav"><a href="$indexname">$bbname</a> &raquo; {lang board_message}</div>
	
	<div id="wrap" class="wrap s_clear">
		<div class="msgfix">
			<div class="showmessage">
				<h1>$bbname {lang board_message}</h1>
				<p>{lang nopermission}</p>
				
				<!--{if $show_message}--><p><b>$show_message</b></p><!--{/if}-->
				<!--{if $discuz_uid}--><p>{lang nopermission_loggedin}</p>
				<!--{else}-->
				<div style="padding-top: 10px;">
					<hr class="shadowline" />
					<form method="post" name="login" id="loginform" class="gateform" onsubmit="{if $pwdsafety}pwmd5('password3');{/if}pwdclear = 1;" action="logging.php?action=login&loginsubmit=yes">
						<input type="hidden" name="formhash" value="{FORMHASH}" />
						<table cellspacing="0" cellpadding="0" class="formtable">
							<tr>
								<th>
									<select name="loginfield" id="loginfield">
										<option value="username">{lang username}</option>
										<option value="uid">{lang uid}</option>
									</select>
								</th>
								<td><input type="text" name="username" autocomplete="off" size="36" class="txt" tabindex="1" value="" /></td>
							</tr>
							<tr>
								<th><label for="password3">{lang password}</label></th>
								<td><input type="password" id="password3" name="password" onkeypress="detectcapslock(event, this)" size="36" class="txt" tabindex="2" /></td>
							</tr>
							<tr>
								<th><label for="questionid">{lang security_question}</label></th>
								<td>
									<select id="questionid" name="questionid" tabindex="3">
										<option value="0">{lang security_question}</option>
										<option value="1">{lang security_question_1}</option>
										<option value="2">{lang security_question_2}</option>
										<option value="3">{lang security_question_3}</option>
										<option value="4">{lang security_question_4}</option>
										<option value="5">{lang security_question_5}</option>
										<option value="6">{lang security_question_6}</option>
										<option value="7">{lang security_question_7}</option>
									</select>
								</td>
							</tr>
							<tr>
								<th><label for="answer">{lang security_answer}</label></th>
								<td><input type="text" name="answer" id="answer" autocomplete="off" size="36" class="txt" tabindex="4" /></td>
							</tr>
							<!--{if $seccodecheck}-->
							<tr>
								<th>{eval $seccheckfloat = 2;}</th>
								<td>
								<div id="seccodelayer" style="position:relative">{template seccheck}</div>
								</td>
							</tr>
							<!--{/if}-->
							<tr>
								<th>&nbsp;</th>
								<td>
									<a class="right" href="$regname" onclick="floatwin('open_register', this.href, 600, 400, '600,0');return false;">$reglinkname</a>
									<button class="submit" type="submit" name="loginsubmit" value="true" tabindex="6">{lang login}</button>
									<input type="checkbox" class="checkbox" name="cookietime" id="cookietime" tabindex="5" value="2592000" $cookietimecheck /> <label for="cookietime">{lang login_permanent}</label>
								</td>
							</tr>
						</table>
					</form>
				</div>
				<!--{/if}-->
			</div>
		</div>
	</div>
	{subtemplate footer}
<!--{else}-->
	{template header}
	<script type="text/javascript">
	
	function ajaxerror() {
		<!--{if !$discuz_uid}-->
			alert('$show_message');
		<!--{else}-->
			alert('{lang nopermission_loggedin}');
		<!--{/if}-->
	}
	
	ajaxerror();
	
	</script>
	{template footer}
<!--{/if}-->

