<? if (!isset($_SESSION)) //判斷是否已經開啟SESSION
{
session_start();//開起SESSION
$mAccount=$_SESSION['mAccount'];
$mId=$_SESSION['mId'];
}
putenv("NLS_LANG=TRADITIONAL CHINESE_TAIWAN.AL32UTF8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../member/style/all_take_show.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="../jQuery/jquery-1.2.6.js"></script>		
<title>JUME(Join You And Me)揪咪揪團活動網</title>

</head>
<body>
<div  id="header">
<? include("../member/header2.php"); 
   include("../db.php");
   $aId=$_GET["aId"];
   $dtoday=date("Y-m-d");
?>
</div>
<div id="content" align="center">
<div id="raisedetail">
<div id="back" align="right"><a href="../activity/activity_show.php"><? echo "<img src='../member/images/back_activity.png' border='0'>" ;?></a></div>
<table id="temp" align="center">

<?

     echo"<tr>
	 		<th  class='title'>揪團名稱</th>
			<th  class='title'>揪團狀態</th>
     		<th  class='title'>主揪</th>
     		<th  class='title'>集合地點</th>
	 		<th  class='title'>集合時間</th>
     		<th  class='title'>目前<br>參加人數</th>
	 	</tr>";   
		
			$str = oci_parse($conn,"select rId,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
            oci_execute($str);
$i=1;
    
	 while(list($rId,$rPlace,$rTime,$rDate,$mId,$rState)=oci_fetch_row($str)){
	 
	 $str_1 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$mId'") or die('Insert error');
            oci_execute($str_1);

	 $row=oci_fetch_object($str_1);
	 
	  $str_2 = oci_parse($conn,"select * from  TAKES left outer join RAISE on TAKES.RID=RAISE.RID where TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_2);

	 $str_3=oci_fetch_all($str_2);	  
	 echo "<tr>
	 <td width='110' ><a href='../raise/show_raise_detail.php?rId=$rId'>第$i團</a></td>
	 <td align='center' width='80'>";if($rState=='0'){echo"此團流團";}
	 else if($rState=='1'){echo"此團可參加";}
	 else if($rState=='2'){echo"此團已滿";}	 
	 echo"</td>
	 <td width='80'><a href='../member/show_member_detail?mId=$mId'>";
	
	
	 echo"$row->MACCOUNT</a></td>
	 <td width='200'>$rPlace</td>
	 <td width='130'>$rDate	$rTime".點."</td>
	 <td width='60'>$str_3".人."</td>";
	 
	 }
	 
?>

</table>
</div><!--end of id=raisedetail-->
</div>
<div id="footer">   
  <div id="footer-in" align="center">
<p>版權資訊</p>
    <p>國立中山大學  資訊管理學系  揪咪揪團網 <a href="mailto:jumemis@yahoo.com.tw">揪咪團隊<img src="../mail/send email.gif" border="0"/></a> 版權所有  Taiwan All Rights Reserved</p> 
  </div><!-- end #footer-in -->
</div><!-- end #footer -->
</body>
</html>
