<script type="text/javascript">
	function checkform(theform) {
		if (theform.contact.value == '') {
			alert('{lang activiy_linkman_input}');
			theform.contact.focus();
			return false;
		} else if (theform.contact.value.length > 200) {
			alert('{lang activiy_linkman_more}');
			theform.contact.focus();
			return false;
		} else if (theform.message.value.length > 200) {
			alert('{lang activiy_guest_more}');
			theform.message.focus();
			return false;
		}
		return true;
	}
</script>
<form name="activity" method="post" action="misc.php?action=activityapplies&fid=$fid&tid=$tid" onSubmit="return checkform(this)">
<input type="hidden" name="formhash" value="{FORMHASH}">
<div class="block topblock">
	<h3>
		<!--{if CURSCRIPT == 'viewthread'}--><a target="_blank" href="misc.php?action=activityapplylist&tid=$tid" class="more">[{lang activity_join_list}]</a><!--{/if}-->
		{lang activity_name}:$thread[subject]
	</h3>
	<table cellpadding="0" cellspacing="0" border="0" class="threadspacial">
		<tr>
			<th>{lang activiy_sort}:</th>
			<td>$activity[class]</td>
		</tr>
		<tr>
			<th>{lang activity_starttime}:</th>
			<td>
				<!--{if $activity['starttimeto']}-->
					{lang activity_start_between}
				<!--{else}-->
					$activity[starttimefrom]
				<!--{/if}-->
			</td>
		</tr>
		<tr>
			<th>{lang activity_space}:</th>
			<td>$activity[place]</td>
		</tr>
		<tr>
			<th>{lang activity_payment}:</th>
			<td>{lang activity_about_payment}</td>
		</tr>
		<tr>
			<th>{lang gender}:</th>
			<td>
				<!--{if $activity['gender'] == 1}-->
					{lang male}
				<!--{elseif $activity['gender'] == 2}-->
					{lang female}
				<!--{else}-->
					 {lang unlimited}
				<!--{/if}-->
			</td>
		</tr>
<!--{if $activity['number']}-->
		<tr>
			<th>{lang activity_about_member}:</th>
			<td>$activity[number] {lang activity_member_unit}</td>
		</tr>
<!--{/if}-->
		<tr>
			<th>{lang activity_already}:</th>
			<td>$applynumbers {lang activity_member_unit}</td>
		</tr>
<!--{if $activity['expiration']}-->
		<tr>
			<th>{lang activity_totime}:</th>
			<td>$activity[expiration]</td>
		</tr>
<!--{/if}-->
<!--{if $discuz_uid && CURSCRIPT == 'viewthread'}-->
	<!--{if !$activityclose}-->
		<!--{if $applied}-->
			<tr>
				<td colspan="2" align="center">
					<!--{if !$isverified}-->{lang activity_wait}<!--{else}-->{lang activity_join_audit}<!--{/if}-->
				</td>
			</tr>
		<!--{else}-->
			<tr>
				<th>{lang activity_paytype}:</th>
				<td><input class="radio" type="radio" value="0" name="payment" checked> {lang activity_pay_myself} <input class="radio" type="radio" value="1" name="payment"> {lang activity_would_payment} <input name="payvalue" size="3"> {lang payment_unit}</td>
			</tr>
			<tr>
				<th>{lang activity_linkman}</th>
				<td><input type="text" name="contact" style="width:80%" maxlength="200"></td>
			</tr>
			<tr>
				<th>{lang leaveword}:</th>
				<td><input type="text" name="message" style="width:80%" maxlength="200"></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input class="button" type="submit" name="activitysubmit" value="{lang activity_my_join}"></td>
			</tr>
		<!--{/if}-->
	<!--{elseif $applied && $isverified}-->
		<tr class="bottom"><td class="altbg1"></td><td class="altbg2">{lang activity_already_join}</td></tr>
	<!--{/if}-->
<!--{/if}-->
</table></div>
</form>
<br>
<!--{if CURSCRIPT == 'viewthread' && $applylist}-->
	<div class="spaceborder" style="width: {TABLEWIDTH}">
	<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" align="center">
	<tr class="header">
	<td align="center" width="10%">{lang activity_join_members}</td><!--{if $discuz_uid == $thread['authorid']}--><td align="center">{lang activity_linkman}</td><!--{/if}--><td align="center">{lang leaveword}</td><td align="center" width="10%">{lang activity_payment}</td><td align="center" width="10%">{lang activity_jointime}</td><td align="center" width="10%">{lang status}</td>
	</tr>
	<!--{loop $applylist $apply}-->
		<tr class="row" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
		<td align="center"><a target="_blank" href="space.php?uid=$apply[uid]">$apply[username]</a></td>
		<!--{if $discuz_uid == $thread['authorid']}--><td align="center" style="word-break: break-all">$apply[contact]</td><!--{/if}-->
		<td align="center" style="word-break: break-all">$apply[message]</td>
		<td align="center"><!--{if $apply['payment'] >= 0}-->$apply[payment] {lang payment_unit}<!--{else}-->{lang activity_self}<!--{/if}--></td>
		<td align="center">$apply[dateline]</td>
		<td align="center"><!--{if $apply['verified']}-->{lang activity_allow_join}<!--{else}--><a target="_blank" href="misc.php?action=activityapplylist&tid=$tid">{lang activity_cant_audit}</a><!--{/if}--></td>
		</tr>
	<!--{/loop}-->
	</table></div>
	<br>
<!--{/if}-->