<!--<?php
print <<<EOT
-->
<style type="text/css">
.t table tr th{text-align:right;font-weight:normal;}
</style>
<div id="breadCrumb">
<img src="$imgpath/$stylepath/thread/home.gif" class="cp breadHome" /><em class="breadEm"></em><a href="$db_bfn" title="$db_bbsname">$db_bbsname</a><em>&gt;</em>活動中心<em>&gt;</em><a href="read.php?tid=$tid">$act[tsubject]</a>
</div>
<div class="t f_one">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
<tr><td class="h" colspan="2">
<!--
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
-->
</td></tr>
<tr class="tr3">
	<th width="30%">活動時間:</th>
	<td>$act[starttime] &nbsp;-&nbsp; $act[endtime]</td>
</tr>
<tr class="tr3">
	<th>活動地點:</th>
	<td>$act[location]</td>
</tr>
<tr class="tr3">
	<th>人數限制:</th>
	<td>$act[num]</td>
</tr>
<tr class="tr3">
	<th>已確認參加人數:</th>
	<td>$act_y 人，[共計報名:$act_total]</td>
</tr>
<tr class="tr3">
	<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 class="tr3">
	<th>活動費用:</th>
	<td>$act[costs] 元</td>
</tr>
<tr class="tr3">
	<th>報名截止日期:</th>
	<td>$act[deadline]</td>
</tr>
<tr class="tr3">
	<th>活動相關內容:</th>
	<td>$act[content]</td>
</tr>
	<td colspan="2" style="height:8px;"></td>
</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><td class="h" colspan="2">活動申請</td></tr>
<tr class="tr3">
	<th width="30%">聯系方式︰</th>
	<td><input type="text" class="input" name="contact" /> &nbsp;Tel、QQ、電子郵箱 等</td>
</tr>
<tr class="tr3">
	<th>留言︰</th>
	<td><textarea name="message" rows="5" wrap="hard" cols="60"></textarea></td>
</tr>
<tr class="tr3">
	<th></th>
	<td><input class="btn" type="submit" value="提 交" /></td>
</tr>
<tr>
	<td colspan="2" style="height:8px;"></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 tr3">
	<td>$i</td>
	<td><a href="{$db_userurl}$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>
<div class="cc">$pages</div>
<input type="hidden" name="tid" value="$tid" />
<!--
EOT;
if($admincheck){ print <<<EOT
-->
<div style="text-align:center;margin-bottom:8px;">
管理選項:<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:8px;"><input type="hidden" name="action" value="exit" />
<input class="btn" type='submit' value='取消參加' /></div>
<!--
EOT;
} print <<<EOT
-->
</form>
<script>
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;
}
?>