<? 
putenv("NLS_LANG=TRADITIONAL CHINESE_TAIWAN.AL32UTF8");
if (!isset($_SESSION)) //判斷是否已經開啟SESSION
{
session_start();//開起SESSION
$maccount=$_SESSION['mAccount'];
$mid=$_SESSION['mId'];
}

if($_SESSION['mAccount']==''){
require_once("../function.php");
url_session($Id='',$c='');

}
require_once("../function.php");
url_session($Id='',$c='');

?>
<!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" />
<title>JUME(Join You And Me)揪咪揪團活動網</title>
<?

if($_SESSION['mId']!=''){
echo "<link rel=\"stylesheet\" href=\"../thick/jraise_thickbox.css\" type=\"text/css\" media=\"screen\" />
<style type=\"text/css\" media=\"all\">@import \"../thick/jraise_thickbox.css\";</style>";
}

?>
<link rel="stylesheet" href="../member/style/activity_show.css"  type="text/css" media="screen" />
<link rel="stylesheet" href="../tab/themes/flora/activityshow.all.css" type="text/css" media="screen" />

<script type="text/javascript" src="../jQuery/jquery-1.2.6.js"></script>		
<script type="text/javascript" src="../tab/ui/ui.core.js"></script>			
<script type="text/javascript" src="../tab/ui/ui.tabs.js"></script>
<?
if($_SESSION['mId']!='')
echo "<script type=\"text/javascript\" src=\"../thick/thickbox.js\"></script>";
?>
<script type="text/javascript">
$(document).ready(function(){
$("#tabsEx1 > ul").tabs
({fxAutoHeight: true });
});


	function checklogin(url_link) {

	var u=url_link;

	
	
	$.ajax({
   type: "POST",
   url: "../chk_login.php",
   data: {chk:'chk'},
   success: function(response) {
         if (response!='') {
	   alert(response);
	
  		}else{
		
			location.href=u;
		}
  }


   });	
 }
		





</script>
<style>

.actitle {
                letter-spacing:4px;
				font-weight:bold;
				font-family:"新細明體";
				font-size:14px;
				color: #413607;
				background-color: #f9f2a9;
		        border-buttom:none;
				padding: 10px;
               }
.taketitle {
                letter-spacing:4px;
				font-weight:bold;
				font-family:"新細明體";
				font-size:12px;
				color: #554917;
				background-color: #f6d553;
		        border-buttom:none;
				padding: 10px;
               }
.more{
             	font-family:"新細明體";
				font-size:12px;
				color: #413607;
}	

/*
#fragment-0 table {
				  
                  }
#fragment-0 td {
                 border-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }
*/
		   
#fragment-1 table {
				  
                  }
#fragment-1 td {
                 border-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }


#fragment-2 table {
				  
                  }
#fragment-2 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }

#fragment-3 table {
				  
                  }
#fragment-3 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }
#fragment-4 th {
                letter-spacing:4px;
				font-weight:bold;
				font-family:"新細明體";
				font-size:14px;
				color: #413607;
				background-color: #ebf36a;
		        border-buttom:none;
				padding: 10px;
               }
#fragment-4 table {
				  
                  }
#fragment-4 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }

#fragment-5 table {
				  
                  }
#fragment-5 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }


#fragment-6 table {
				  
                  }
#fragment-6 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }

#fragment-7 table {
				  
                  }
#fragment-7 td {
                 boder-top:1px solid #393113;
		         border-right:none;
				 font-size:110%;
				 padding:8px;
				 background-color:#ffffff;
				 border-buttom:none;
               }

</style>
 </head>
<body >
<div  id="header">
<? include("../member/header2.php"); ?>
</div>

<div id="content">
<div id="showdetail">
  <div id="tabsEx1" class="tab"> 
        <br><br><br>
   <?  if($maccount!='')
	  {
	 echo "<div align=right ><a href='add_activity.php'><img src='../member/images/new_activity.png'  border='0'/></a></div>"; 
	  }?>   
    <ul style="height: 30px;"> 
	    <!--<li ><a href="#fragment-0"><span>橋牌大賽</span></a></li>-->
        <li ><a href="#fragment-1"><span>購&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;物</span></a></li> 
        <li ><a href="#fragment-2"><span>娛&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;樂</span></a></li> 
	    <li ><a href="#fragment-3"><span>美&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;食</span></a></li> 
	    <li ><a href="#fragment-4"><span>旅&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;遊</span></a></li> 
        <li ><a href="#fragment-5"><span>運&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;動</span></a></li> 
        <li ><a href="#fragment-6"><span>文&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;藝</span></a></li>
		<li ><a href="#fragment-7"><span>歷史活動</span></a></li>  
	</ul>
    
<!--
<div id="fragment-0" class="fragment" align="center"> 

<?
//橋牌大賽
/*
include("../db.php");
$dtoday=date("Y-m-d");
$bridge=mysql_query("select rId,rTitle,rDate,mId,rLimit_1,rState from raise where aId='2' order by rId ");
$num_bri=mysql_num_rows($bridge);
if($num_bri!='0'){
echo"<table border='1' width='100%' id='temp'><tr>報名隊伍";
if($_SESSION['mId']==''){
	echo "<a href='#' onclick=\"checklogin('../raise/add_raise.php?aId=2');\"><img src='../member/images/raise_group.png'  border='0'/></a>";
	
	}else{
	
	$att=mysql_num_rows(mysql_query("select * from raise where aId='2' and mId='$mid'"));
	if($att==0){
		echo "<a href='#' onclick=\"checklogin('../raise/add_raise.php?aId=2');\"><img src='../member/images/raise_group.png'  border='0'/></a>";
		}
	
	
	}


$i=0;
	while(list($rId,$rTitle,$rDate,$rmId,$rLimit_1,$rState)=mysql_fetch_row($bridge)){
		echo"<td width='150'>隊伍名稱：<a href=../raise/show_raise_detail.php?rId=$rId>$rTitle</a><br>";
		$leader=mysql_query("select mId,mAccount,nickname,mPath from member where mId='$rmId'");
			list($mId,$mAccount,$nickname,$mPath)=mysql_fetch_row($leader);
				echo"主揪：<a href=../member/show_member_detail.php?mId=$mId>$mAccount";
				if($mPath!=''){echo"<img src='../member/$mPath' width='30' height='30' border='0'></a><br>";}
				else{echo"<img src='../member/mpic/User.png' width='30' height='30' border='0'></a><br>";}
					$chk_friend=chk_add_fr($mid,$rmId);
	if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId && $chk_friend=='ok'){
	?>
	<a href="../friend/friend.php?height=100&width=350&frmId=<?=$rmId ?>" class="thickbox" title="加<?=$mAccount ?>為好友"><img src="../images/add.png" height=		
    	"30" width="30" border="0"></a>
	<?
	}
	if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}
				echo"<br>";
				
		
		echo"<div align='center'>";
		if($rmId==$mid){//判斷是否為主揪
		
			if($rState=='0')//判斷流團 流團
				{echo"<img src='../member/images/raise_cancle.png'/>";}
			else if($rState=='2')//人數已滿
				{echo"<img src='../member/images/raise_full.png'>";}
			else if($rState=='1')//沒流團
				{
				if($dtoday<=$rDate){//集合日期大於今天
					echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
				else{//揪團過期
				echo"<img src='../member/images/raise_dead.png' />";
}
				}
		    
			
		}		else{//非主揪
			  $join=mysql_query("select * from take where take.mId='$mid' and take.rId='$rId'");//是否有參加者
			  $num_join=mysql_num_rows($join);
			  
			if($num_join=='0'){//無參加者
				
				if($rState=='0')//判斷流團 流團
					{echo"<img src='../member/images/raise_cancle.png'/>";}
				else if($rState=='2')//人數已滿
					{echo"<img src='../member/images/raise_full.png'>";}
				else if($rState=='1'){//沒流團
					if($dtoday<=$rDate){//集合日期大於今天
						echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0' /></a>";}
					else//揪團過期
				{echo"<img src='../member/images/raise_dead.png'/>";}
				}
				

			}
			else{//已參加
				if($rState=='0')//判斷流團 流團
					{echo"<img src='../member/images/raise_cancle.png'/>";}
				else if($rState=='2')//人數已滿
					{echo"<img src='../member/images/raise_full.png'>";}
				else if($rState=='1'){//沒流團
					if($dtoday<=$rDate){//集合日期大於今天
						echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
					else{//揪團過期
						echo"<img src='../member/images/raise_dead.png' />";}

				}
			}
		}
    echo"</div></td>"; $i++;
	
	if($i==4){echo "</tr>";} 
	if($i==4){echo "<tr>";$i=0;}
	}

	echo"</table>";
}
else{echo"目前還未有報名隊伍<br><a href='#' onclick=checklogin('../raise/add_raise.php?aId=33'); >
					<img src='../member/images/raise_group.png'  border='0'/></a>";}
*/
?>

</div>-->
	  
     <div id="fragment-1" class="fragment" align="center"> 
      <?
	  //shopping

$dtoday=date("Y-m-d");
$str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=1 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);
if($row_3!=0){

oci_execute($str3);
for($a=0;$a<5;$a++){
 

if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			$num_48=oci_fetch_all($str_48,$results);
			if($num_48!='0'){
			oci_execute($str_48);
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
			
				
				$row_10=oci_fetch_all($str4,$results);
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
				oci_execute($str4);
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  				if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}		
						
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}
  	 


 ?>   
 </div> 

    <div id="fragment-2" class="fragment" align="center"> 
       <?
	   //party
$str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=2 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);

if($row_3!='0'){
oci_execute($str3);
for($a=0;$a<5;$a++){
if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			$num_48=oci_fetch_all($str_48,$results);
			if($num_48!='0'){
			 oci_execute($str_48);
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
			   
				
				$row_10=oci_fetch_all($str4,$results);
				
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
				   oci_execute($str4);
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  						
				if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}		
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}

?>
   
    </div> 
	 <div id="fragment-3" class="fragment" align="center"> 
       <?
	   //food
 $str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=3 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);
if($row_3!='0'){
oci_execute($str3);
for($a=0;$a<5;$a++){
if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			$num_48=oci_fetch_all($str_48,$results);
			if($num_48!='0'){
			 oci_execute($str_48);
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
			   
				
				$row_10=oci_fetch_all($str4,$results);
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
				oci_execute($str4);
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  						
						if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}

?>
   
    </div> 
	 <div id="fragment-4" class="fragment" cellspacing="0" align="center"> 
       <?
       //travel
 $str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=4 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);
if($row_3!='0'){
oci_execute($str3);
for($a=0;$a<5;$a++){
if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			$num_48=oci_fetch_all($str_48,$results);
			if($num_48!='0'){
			oci_execute($str_48);
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
	
				
				$row_10=oci_fetch_all($str4,$results);
				 oci_execute($str4);
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  						
				if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}		
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}
?>
  
    </div> 
	 <div id="fragment-5" class="fragment" align="center"> 
<?
//sport
 $str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=5 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);
if($row_3!='0'){
oci_execute($str3);
for($a=0;$a<5;$a++){
if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			$num_48=oci_fetch_all($str_48,$results);
			if($num_48!='0'){
			oci_execute($str_48);
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
				
				$row_10=oci_fetch_all($str4,$results);
				 oci_execute($str4);
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  						
					if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}	
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}
?>
  
    </div> 
	 <div id="fragment-6" class="fragment" align="center"> 
   <?
   //education
$str3 = oci_parse($conn,"SELECT DISTINCT ACTIVITY.AID, ACTIVITY.ATIME, ACTIVITY.END_DATE,  ACTIVITY.ANAME, ACTIVITY.TID FROM ACTIVITY LEFT OUTER JOIN RAISE ON ACTIVITY.AID = RAISE.AID WHERE ACTIVITY.END_DATE>= '$dtoday' and ACTIVITY.TID=7 ORDER BY ACTIVITY.AID desc") or die('Insert error');
oci_execute($str3);

$row_3=oci_fetch_all($str3,$results);
if($row_3!='0'){
oci_execute($str3);
for($a=0;$a<5;$a++){
if(list($aId,$start_date,$end_date,$aName,$aType)=oci_fetch_row($str3)){
			echo"<table width='100%' border='2' id='temp'>
 			<tr><th width='150' class='actitle'>活動名稱</th>
 			<th width='100' class='actitle'>活動日期</th>
 			
 			</tr>
			<tr>
    		<td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
			$str_48 = oci_parse($conn,"select PPATH from PICTURE where AID='$aId'") or die('Insert error');
            oci_execute($str_48);
			if($num_48!='0'){
				while(list($pPath)=oci_fetch_row($str_48))
				{
					echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";
				}
			}
			else{
				echo"<img src='../activity/picture/picture/original.png' width='90' height='80' border='0'>";
			}
			echo"</td>
				<td align='left'>$start_date~$end_date</td>
				
				</tr>
				<tr>";
				$str4 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID,RSTATE from RAISE where AID='$aId'") or die('Insert error');
               oci_execute($str4);
			  
				
				$row_10=oci_fetch_all($str4,$results);
				 oci_execute($str4);
   				echo"<th colspan='3' align='left' class='taketitle'>$aName".的揪團."	目前有$row_10".團."</th></tr><tr>";
   				for($z=0;$z<3;$z++){
   					if(list($rId,$rPlace,$rTime,$rDate,$rmId,$rState)=oci_fetch_row($str4)){
              $str5 = oci_parse($conn,"select MACCOUNT from MEMBER where MID='$rmId'") or die('Insert error');
               oci_execute($str5);
        				 
						list($mAccount)=oci_fetch_row($str5);
						echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
						主揪:<a href=../member/show_member_detail.php?mId=$rmId>$mAccount";
  						
					if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}	
	
	echo"<br>						集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."<div align='center'>";
  						if($rmId==$mid)//是主揪
						{
							if($rState=='0')//判斷流團 流團
								{echo"<img src='../member/images/raise_cancle.png'/>";}
							else if($rState=='2')//人數已滿
								{echo"<img src='../member/images/raise_full.png'>";}
							else if($rState=='1')//沒流團
								{
								if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}
								else{//揪團過期
									echo"<img src='../member/images/raise_dead.png' />";}
							}
						}
						else{//主揪以外的會員
						
						$str_47 = oci_parse($conn,"select * from TAKES where TAKES.MID='$mid' and TAKES.RID='$rId'") or die('Insert error');
            oci_execute($str_47);
			$row_47=oci_fetch_all($str_47,$results);
						
						   
						  	if($row_47=='0'){//沒參加揪團
						   		if($rState=='1'){
									if($dtoday<=$rDate){//集合日期大於今天
										echo"<a href='../raise/join_raise.php?height=300&width=500&rId=$rId' class=\"thickbox\" title=\"參加會員'$mAccount'揪的團\"><img src='../member/images/go_raise.png'  border='0'/> </a>";
											}
									else//揪團過期
										{echo"<img src='../member/images/raise_dead.png'/>";}
								}
								else if($rState=='2'){echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='0'){echo"<img src='../member/images/raise_cancle.png'/>";}
							}
						    else//已參加
							{			
								if($rState=='0')//判斷流團 流團
									{echo"<img src='../member/images/raise_cancle.png'/>";}
								else if($rState=='2')//人數已滿
									{echo"<img src='../member/images/raise_full.png'/>";}
								else if($rState=='1'){//沒流團
									if($dtoday<=$rDate){//集合日期大於今天
									echo"<a href='../raise/show_raise_detail.php?rId=$rId'><img src='../member/images/join_yet.png' border='0'>";}//會員已經參加該揪團
									else{//揪團過期
										echo"<img src='../member/images/raise_dead.png' />";}

								}
							}
						}
						
						echo"</div></td>";
					}
			
					 else{echo"<td align='left'><a href='#' onclick=checklogin('../raise/add_raise.php?aId=$aId'); >
					<img src='../member/images/raise_group.png'  border='0'/></a></td>";}
			  	} 			

  
				if($row_10 >'3')
				{
					echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More
							</a></th>";
				}
				echo"</table><br>";
				
		    }

		}
		if($num_48>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=1'><img src='../member/images/more_info.png'  
				border='0'/></a></div>";}
     }
	 else{echo"<div align='center'>目前沒有此類活動!!</div>";}
?>
   
    </div> 
 <div id="fragment-7" class="fragment" align="center"> 
   <?
   //history
   $str22 = oci_parse($conn,"select distinct ACTIVITY.AID,ACTIVITY.ATIME,ACTIVITY.END_DATE,ACTIVITY.ANAME from ACTIVITY left outer join RAISE on ACTIVITY.AID=RAISE.AID where ACTIVITY.END_DATE <'$dtoday' order by ACTIVITY.aId desc") or die('Insert error');
oci_execute($str22);

$row=oci_fetch_object($str22);
   

$row_22=oci_fetch_all($str22,$results);
	if($row_22!=''){
		for($g=0;$g<5;$g++){ 
		oci_execute($str22);
  			if(list($aId,$start_date,$end_date,$aPlace,$aName,$aType)=oci_fetch_row($str22)){

 echo"<table width='100%' border='2' id='temp'>
 <tr><th width='150' class='actitle'>活動名稱</th>
 <th width='100' class='actitle'>活動日期</th>

 </tr>
 <tr>
    <td align='left'><a href=../activity/activity_show_detail.php?aId=$aId>$aName";
       $str_49 = oci_parse($conn,"select PICRURE.PPATH from ACTIVITY natural join PICTURE where ACTIVITY.AID='$aId'") or die('Insert error');
oci_execute($str_49);
	
				while(list($pPath)=oci_fetch_row($str_49)){
				if($pPath!=''){echo"<img src='../activity/$pPath' width='90' height='80' border='0'>";}
				else{echo"<img src='../activity/picture/original.png' width='90' height='80' border='0'>";}}
	echo"</td>
    <td align='left'>$start_date~$end_date</td>
 
  </tr>
 <tr>";
 $str23 = oci_parse($conn,"select RID,RPLACE,RTIME,RDATE,MID from RAISE where AID='$aId'") or die('Insert error');
oci_execute($str23);
 
 
   $row_16=oci_fetch_all($str23);
 echo"<th colspan=3' align='left' class='taketitle'>$aName".的揪團."		目前有$row_16".團."</th></tr><tr>";
 oci_execute($str23);
   for($z=0;$z<3;$z++){
   if(list($rId,$rTitle,$rPlace,$rTime,$rDate,$mId)=oci_fetch_row($str23)){
    $str24 = oci_parse($conn,"select MACCOUNT,MPATH from MEMBER where MID='$mId'") or die('Insert error');
oci_execute($str24);
	
  
     
		list($mAccount,$mPath)=oci_fetch_row($str24);
 		 echo"<td align='left'><a href=../raise/show_raise_detail.php?rId=$rId>第".($z+1)."團</a><br>
 		 主揪:<a href=../member/show_member_detail.php?mId=$mId>$mAccount";
 		 
 		 
	
	if($_SESSION['mId']!=''&&$_SESSION['mId']!=$rmId){
		
	echo "<a href='../raise/send.php?height=260&width=350&mId=$rmId ' class=\"thickbox\" title=\"傳送訊息給$mAccount\">
			<img src='../images/messenge.png' border='0'></a>";
		
		
		}
		 echo"<br>集合地點:$rPlace<br>集合時間:$rDate	$rTime".點."</td>";
  }
  else{
  echo"<td align='left'><img src='../member/images/activity_cancle.png'></td>";

  }
 
  } if($row_16>'3'){echo"</tr><th colspan='3' align='right' class='more'><a href='../activity/all_take_show.php?aId=$aId'>>>More</a></th>";}echo"</table><br>";}}

   if($row_22>'5'){echo"<div align='right'><a href='/activity/all_act_show.php?aType=7'><img src='../member/images/more_info.png'  border='0'/></a></div>";
   	}
   }
	 else{echo"<div align='center'>目前沒有歷史活動!!</div>";}
?>  
    </div> 

</div>
</div>	
</div><!--end content-->
<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 -->
</div><!-- end div#wrapper -->
</body>
</html>
