<!--<?php
print <<<EOT
-->
<style type="text/css">
.t{margin-top:8px;border:4px solid $forumcolortwo;}
.t table tr td{padding:.8em 0 .8em 1em;}
.t table tr th{text-align:right;font-weight:normal;}
.t table{border:2px solid $tablecolor;}
.t .h{padding-left:1em;}
</style>
<div class="bdbA">
	<div id="breadcrumbs">
		<a class="crumbs-item gray3" href="$db_bfn" title="$db_bbsname">$db_bbsname</a><span class="crumbs-item gray3"><i> </i>活動中心</span><span class="crumbs-item current"><i> </i><strong><a href="read.php?tid=$tid">$act[tsubject]</a></strong></span>
	</div>
</div>

<div class="t f_one" style="margin-top:8px">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<tr><th class="h">活動標題︰</th><th class="h" style="text-align:left;">
<!--
EOT;
if($admincheck){print<<<EOT
-->
<span style="float:right;"><a href="active.php?tid=$tid&action=cancle&verify=$verifyhash" onclick="return checkset(this)" style="color:red;">[ 取消活動 ]</a></span>
<!--
EOT;
}print<<<EOT
-->
<a href="read.php?tid=$tid">$act[tsubject]</a>
<!--
EOT;
if ($act['strendtime'] < $timestamp) {print<<<EOT
-->
<span style="color:red;">（活動已結束）</span>
<!--
EOT;
}print<<<EOT
-->
</th></tr>
<tr>
	<th width="30%">活動時間︰</th>
	<td>$act[starttime] &nbsp;-&nbsp; $act[endtime]</td>
</tr>
<tr>
	<th>活動地點︰</th>
	<td>$act[location]</td>
</tr>
<tr>
	<th>人數限制︰</th>
	<td>$act[num]</td>
</tr>
<tr>
	<th >已確認參加人數︰</th>
	<td>$act_y 人，[共計報名︰$act_total]</td>
</tr>
<tr>
	<th>性別要求︰</th>
<!--
EOT;
if($act[sexneed]=='1'){ print <<<EOT
-->
	<td>僅限男性</td>
<!--
EOT;
}elseif($act[sexneed]=='2'){ print <<<EOT
-->
	<td>僅限女性</td>
<!--
EOT;
}else{ print <<<EOT
-->
	<td>男女不限</td>
<!--
EOT;
} print <<<EOT
-->
</tr>
<tr>
	<th>活動費用︰</th>
	<td>$act[costs] 元</td>
</tr>
<tr>
	<th>報名截止日期︰</th>
	<td>$act[deadline]</td>
</tr>
<tr>
	<th>活動相關內容︰</th>
	<td>$act[content]</td>
</tr>
</table></div>
<!--
EOT;
if($action=='apply'){ print <<<EOT
-->
<form action="active.php" method="post">
<div class="t f_one">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<tr><th class="h">活動申請</th><th class="h"></th></tr>
<tr>
	<th width="30%">聯系方式︰</th>
	<td><input type="text" class="input" name="contact" /> &nbsp;Tel、QQ、Email 等</td>
</tr>
<tr>
	<th>留言︰</th>
	<td><textarea name="message" rows="5" wrap="hard" cols="60"></textarea></td>
</tr>
<tr>
	<th></th>
	<td><input class="btn" type="submit" value="提 交" /></td>
</tr>
</table></div>
<input type="hidden" name="action" value="apply" />
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="step" value="2" />
<input type="hidden" name="tid" value="$tid" />
</form>
<!--
EOT;
}elseif($action=='view'){ print <<<EOT
-->
<form action="active.php" method="post">
<input type="hidden" name="verify" value="$verifyhash" />
<div class="t">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><th class="h" colspan="8" style="text-align:left;">活動成員</th></tr>
<tr class="tr2 tac">
	<th width="8%" style="text-align:center;">序號</th>
	<th width="12%" style="text-align:center;">姓名</th>
	<th width="6%" style="text-align:center;">性別</th>
	<th width="12%" style="text-align:center;">狀態</th>
	<th width="18%" style="text-align:center;">申請時間</th>
	<th width="12%" style="text-align:center;">聯系方式</th>
	<th width="*" style="text-align:center;">留言</th>
<!--
EOT;
if($admincheck){ print <<<EOT
-->
	<td width="5%" style="text-align:center;"></td>
<!--
EOT;
} print <<<EOT
-->
</tr>
<!--
EOT;
$i=0;
foreach($actdb as $key=>$value){
$i++;
print <<<EOT
-->
<tr class="tac">
	<td>$i</td>
	<td><a href="u.php?action=show&uid=$value[winduid]">$value[username]</a></td>
<!--
EOT;
if($value[gender]==1){ print <<<EOT
-->
	<td>男</td>
<!--
EOT;
}elseif($value[gender]==2){ print <<<EOT
-->
	<td>女</td>
<!--
EOT;
}else{ print <<<EOT
-->
	<td>保密</td>
<!--
EOT;
}if($value[state]==1){ print <<<EOT
-->
	<td><font color="blue">已審核</font></td>
<!--
EOT;
}elseif($value[state]==2){ print <<<EOT
-->
	<td><font color="red">已拒絕</font></td>
<!--
EOT;
}else{ print <<<EOT
-->
	<td>未審核</td>
<!--
EOT;
}print <<<EOT
-->
	<td>$value[applydate]</td>
	<td>$value[contact]</td>
	<td>$value[message]</td>
<!--
EOT;
if($admincheck){ print <<<EOT
-->
	<td><input type="checkbox" name="selid[]" value="$value[id]" /></td>
<!--
EOT;
} print <<<EOT
-->
</tr>
<!--
EOT;
} print <<<EOT
-->
</table></div>$pages
<input type="hidden" name="tid" value="$tid" />
<!--
EOT;
if($admincheck){ print <<<EOT
-->
<div style="text-align:center;margin-bottom:25px;">
管理選項︰<input type="radio" name="action" value="pass" checked />批準
<input type="radio" name="action" value="unpass" />拒絕<br><br>
<input class="btn" type='button' name='chkall' value='全 選' onclick='CheckAll(this.form)' />
<input class="btn" type='submit' value='提 交' /></div>
<!--
EOT;
}else{ print <<<EOT
-->
<div style="text-align:center;margin-bottom:25px;"><input type="hidden" name="action" value="exit" />
<input class="btn" type='submit' value='取消參加' /></div>
<!--
EOT;
} print <<<EOT
-->
</form>
<script language=JavaScript>
function CheckAll(form){
	for (var i=0;i<form.elements.length-5;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
function checkset(obj){
	if (!confirm("您確認要取消該活動嗎？")) {
		return false;
	}
	location.href = obj.href;
}
</script>
<!--
EOT;
}
?>