<!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></title>
<base href='{echo:$siteDomain;/}' />
<link rel="stylesheet" type="text/css" href="skin/default/jooyea/css/iframe.css">
<script type='text/javascript' src="skin/default/js/jooyea.js"></script>
<script type="text/javascript" src="servtools/imgfix.js"></script>
<SCRIPT language=JavaScript src="servtools/ajax_client/ajax.js"></SCRIPT>
<script type='text/javascript'>parent.hiddenDiv();</script>
<script language="JavaScript">
function join_action(event_id,allow_fellow,template){
	var is_class='';
	template=template.replace(/<br>/gi,'\r\n');
	var fellow_class='content_none';
	var template_class='content_none';
	var diag = new parent.Dialog();
	diag.Width = 320;
	diag.Height = 150;
	diag.Top="50%";
	diag.Left="50%";
	diag.Title = "{echo:lp{ef_fill_in_reg_info};/}";
	if(allow_fellow==1){
		fellow_class='';
		is_class='content_none';
	}
	if(template){
		template_class='';
		is_class='content_none';
	}
	diag.InnerHtml= '<div class="report_notice"><div class='+is_class+'>{echo:lp{ef_confirm_participate};/}</div><div class='+fellow_class+'>{echo:lp{ef_carry_number};/}<input id="fellow" name="fellow" size="2" value="0" />{echo:lp{ef_carrying_tips};/}</div><div class='+template_class+'>{echo:lp{ef_reg_info};/}{echo:lp{ef_reg_info_Tips};/}<textarea id="template">'+template+'</textarea></div></div>';
	diag.OKEvent = function(){join_event(event_id,parent.document.getElementById('fellow').value,parent.document.getElementById('template').value);diag.close();};
	diag.show();
}

function join_event(event_id,fellow,template){
	var event_add=new Ajax();
	event_add.getInfo("do.php?act=event_join","post","app","event_id="+event_id+"&fellow="+fellow+"&template="+template,function(c){parent.Dialog.alert(c);location.href="modules.php?app=event_space&event_id="+event_id}); 
}


function edit_apply_action(event_id,allow_fellow,template,my_template,fellow){
	var is_return=1;
	var fellow_class='content_none';
	var template_class='content_none';
	var diag = new parent.Dialog();
	diag.Width = 320;
	diag.Height = 150;
	diag.Top="50%";
	diag.Left="50%";
	diag.Title = "{echo:lp{ef_update_reg_info};/}";
	if(allow_fellow=='1'){
		fellow_class='';
		is_return=0;
	}
	if(template){
		template_class='';
		my_template=my_template?my_template:template;
		is_return=0;
	}
	if(is_return){
		parent.Dialog.alert('{echo:lp{ef_this_no_reg_info};/}');return;
	}
	diag.InnerHtml= '<div class="report_notice"><div class='+fellow_class+'>{echo:lp{ef_carry_number};/}<input id="fellow" name="fellow" size="2" value="'+fellow+'" />{echo:lp{ef_carrying_tips};/}</div><div class='+template_class+'>{echo:lp{ef_reg_info};/}{echo:lp{ef_reg_info_Tips};/}<textarea id="template">'+ my_template.replace(/<br>/gi,'\r\n') +'</textarea></div></div>';
	diag.OKEvent = function(){event_edit_apply(event_id,parent.document.getElementById('fellow').value,parent.document.getElementById('template').value);diag.close();};
	diag.show();
}
function event_edit_apply(event_id,fellow,template){
	var event_add=new Ajax();
	event_add.getInfo("do.php?act=event_edit_apply","post","app","event_id="+event_id+"&fellow="+fellow+"&template="+template,function(c){parent.Dialog.alert(c);location.href="modules.php?app=event_space&event_id="+event_id}); 
}


function event_exit(event_id){
	var event_add=new Ajax();
	event_add.getInfo("do.php","get","app","act=event_exit&event_id="+event_id,function(c){if(c!="") parent.Dialog.alert(c);location.href="modules.php?app=event_space&event_id="+event_id}); 
}
function event_follow_cancel(event_id){
	var event_follow=new Ajax();
	event_follow.getInfo("do.php","get","app","act=event_follow_cancel&event_id="+event_id,function(c){if(c!="") parent.Dialog.alert(c);location.href="modules.php?app=event_space&event_id="+event_id}); 
}
</script>
</head>

<body id="iframecontent">
{sta:if($is_self=='Y')[exc]}
<div class="create_button"><a href="modules.php?app=event_list&mod=all" hidefocus="true">{echo:lp{ef_all_activity};/}</a></div>
{end:if/}
{sta:if($status>2 && $is_self=='Y')[exc]}
<div class="create_button">
	<a href="modules.php?app=event_upload_photo&event_id={echo:$event_id;/}" hidefocus="true">{echo:lp{ef_upload_photo};/}</a>
</div>
{end:if/}
<h2 class="app_event">{echo:lp{ef_activity};/}</h2>
{sta:if($is_show)[exc]}
<div class="tabs">
	<ul class="menu">
		<li class="active"><a href="modules.php?app=event_space&event_id={echo:$event_id;/}&user_id={echo:$userid;/}" hidefocus="true">{echo:lp{ef_activity};/}</a></li>
		<li><a href="modules.php?app=event_member&event_id={echo:$event_id;/}&user_id={echo:$userid;/}" hidefocus="true">{echo:lp{ef_member};/}</a></li>
		<li><a href="modules.php?app=event_list_photo&event_id={echo:$event_id;/}&user_id={echo:$userid;/}" hidefocus="true">{echo:lp{ef_photo};/}</a></li>
	</ul>
</div>

	<div class="evt_box">
		<div class="evt_ico"><a href="{echo:$event_row['poster'];/}" hidefocus="true" target="_blank"><img height="150" onerror="this.src='uploadfiles/event/default_event_poster.jpg';" src="{echo:$event_row['poster_thumb'];/}" /></a></div>
        <div class="evt_cnt">
            <table cellpadding="0" cellspacing="0" width="100%">
            	<tr>
                	<th>{echo:lp{ef_sponsor};/}:</th><td>{echo:$event_row['user_name'];/}</td>
                </tr>
                <tr>
                	<th>{echo:lp{ef_activity_type};/}:</th><td>{echo:event_type($dbo,$event_row['type_id']);/}</td>
                </tr>
                <tr>
                	<th>{echo:lp{ef_activity_location};/}:</th><td>{echo:get_manage_reside($event_row['province'],$event_row['city']);/} {echo:$event_row['location'];/}</dd></td></tr>
                <tr>
                	<th>{echo:lp{ef_activity_time};/}:</th><td>{echo:date('m月d日 H:i',$event_row['start_time']);/} - {echo:date('m月d日 H:i',$event_row['end_time']);/}</td>
                </tr>
                <tr>
                	<th>{echo:lp{ef_closing};/}:</th><td>{echo:date('m月d日 H:i',$event_row['deadline']);/}</td>
                </tr>
                <tr>
                	<th>{echo:lp{ef_activity_number};/}:</th><td>{echo:event_limit_num($event_row['limit_num'],$event_row['member_num']);/}</td>
                </tr>
                <tr>
                	<th>{echo:lp{ef_need_review};/}:</th><td>{echo:$event_row['public']==0?"不需要":"需要";/}</td>
                </tr>
            </table>
            <ul>
                <li>{echo:$event_row['view_num'];/} {echo:lp{ef_people_select};/}</li><li>{echo:$event_row['member_num'];/} {echo:lp{ef_people_participate};/}</li><li>{echo:$event_row['follow_num'];/} {echo:lp{ef_people_attention};/}</li>
            </ul>
            <p class="evt_state">{echo:$is_join_event;/} {echo:$is_doing_event;/}</p>
            <ul class="buttons">
            {sta:if($is_doing)[exc]}
						{sta:if($is_join>1)[exc]}
							{sta:if($event_row['allow_invite']=='1')[exc]}
							<li><a class="regular-btn" href="modules.php?app=event_invite&event_id={echo:$event_id;/}">{echo:lp{ef_invite_friends};/}</a></li>
							{end:if/}
							{sta:if($event_row['allow_fellow']=='1' || $event_row['template'])[exc]}
              <li><a class="regular-btn" href="javascript:void(0);"onclick="edit_apply_action({echo:$event_id;/},{echo:$event_row['allow_fellow'];/},'{echo:$event_row['template'];/}','{echo:$user_row['template'];/}',{echo:$user_row['fellow'];/});">{echo:lp{ef_reg_info};/}</a></li>
							{end:if/}
							<li><a class="regular-btn" href="javascript:void(0);" onclick="if(confirm('{echo:lp{ef_confirm_exit};/}')){event_exit({echo:$event_id;/});}">{echo:lp{ef_exit_activity};/}</a></li>
						{end:if/}
						{sta:if($is_join==1)[exc]}
              <li><a class="regular-btn" href="javascript:void(0);" onclick="join_action({echo:$event_id;/},{echo:$event_row['allow_fellow'];/},'{echo:$event_row['template'];/}');">{echo:lp{ef_participate_activity};/}</a></li>
              <li><a class="regular-btn" href="javascript:void(0);" onclick="if(confirm('{echo:lp{ef_confirm_cancel};/}')){event_follow_cancel({echo:$event_id;/});}">{echo:lp{ef_cancel_concern};/}</a></li>
						{end:if/}
						{sta:if($is_join==='0')[exc]}
							{sta:if($event_row['allow_fellow']=='1' || $event_row['template'])[exc]}
              <li><a class="regular-btn" href="javascript:void(0);"onclick="edit_apply_action({echo:$event_id;/},{echo:$event_row['allow_fellow'];/},'{echo:$event_row['template'];/}','{echo:$user_row['template'];/}',{echo:$user_row['fellow'];/});">{echo:lp{ef_reg_info};/}</a></li>
							{end:if/}
              <li><a class="regular-btn" href="javascript:void(0);" onclick="if(confirm('{echo:lp{ef_confirm_exit};/}')){event_exit({echo:$event_id;/});}">{echo:lp{ef_exit_activity};/}</a></li>
						{end:if/}
						{sta:if(!$is_join && $is_join!=='0' && $ses_uid)[exc]}
							<li><a class="regular-btn" href="javascript:void(0);" onclick="join_action({echo:$event_id;/},{echo:$event_row['allow_fellow'];/},'{echo:$event_row['template'];/}');">{echo:lp{ef_participate_activity};/}</a></li>
							<li><a class="regular-btn" href="do.php?act=event_follow&event_id={echo:$event_id;/}">{echo:lp{ef_attention_activity};/}</a></li>
						{end:if/}
					{end:if/}
					{sta:if($is_self=='Y' && $is_join>=3)[exc]}
						<li><a class="regular-btn" href="modules.php?app=event_info&event_id={echo:$event_id;/}">{echo:lp{ef_activity_management};/}</a></li>
					{end:if/}
            </ul>
            
        </div>
<div class="rs_head">{echo:lp{ef_activity_introduction};/}</div>
<div class="evt_detail">{echo:$event_row['detail'];/}</div>
<div class="rs_head">
	<a class="right" href="modules.php?app=event_member&event_id={echo:$event_id;/}&user_id={echo:$userid;/}">{echo:lp{ef_more};/}</a>{echo:lp{ef_activity_members};/}
</div>

{sta:foreach($event_members as $rs)[loop]}
<div class="group_user_list">
    <a class="avatar" href="home.php?h={echo:$rs['user_id'];/}" target="_blank">
        <img src="{echo:$rs['user_ico'];/}" onerror="parent.pic_error(this)" width="50px" height="50px" title="{echo:$rs['user_name'];/}" alt="{echo:$rs['user_name'];/}" />
    </a>
  <div><a href="home.php?h={echo:$rs['user_id'];/}" target="_blank">{echo:sub_str($rs['user_name'],5,true);/}</a></div>
</div>
{end:foreach/}

<div class="rs_head">
	<a class="right" href="modules.php?app=event_list_photo&event_id={echo:$event_id;/}&user_id={echo:$userid;/}">{echo:lp{ef_more};/}</a>{echo:lp{ef_album};/}
</div>

{sta:foreach($photo_rs as $rs)[loop]}
<div class="evt_album">
	<a href="modules.php?app=event_show_photo&event_id={echo:$event_id;/}&photo_id={echo:$rs['photo_id'];/}&user_id=user_id={echo:$url_uid;/}">
		<img src="{echo:$rs['photo_thumb_src'];/}" onerror="parent.pic_error(this)" title="{echo:$rs['photo_name'];/}" alt="{echo:$rs['photo_name'];/}" />
	</a>
</div>
{end:foreach/}

<div class="rs_head">{echo:lp{ef_message};/}</div><div class="tleft ml20">

<div class="comment">
	
	<div id='show_7_{echo:$event_row["event_id"];/}'>
	  <script type='text/javascript'>parent.get_mod_com(7,{echo:$event_row['event_id'];/},0,20);</script>
	</div>
	
	{sta:if($ses_uid!='')[exc]}
		<div class="reply">
			<img class="figure" src="{echo:get_sess_userico();/}" />
			<p><textarea type="text" maxlength="150" onkeyup="return isMaxLen(this)" id="reply_7_{echo:$event_row['event_id'];/}_input"></textarea></p>
			<div class="replybt">
				<input class="left button" onclick="parent.restore_com({echo:$event_row['user_id'];/},7,{echo:$event_row['event_id'];/});show('face_list_menu',200)" type="submit" name="button" id="button" value="{echo:lp{ef_reply};/}" />
				<a id="reply_a_{echo:$event_row['event_id'];/}_input" class="right" href="javascript:void(0);" onclick="showFace(this,'face_list_menu','reply_7_{echo:$event_row['event_id'];/}_input');">{echo:lp{ef_expression};/}</a>
			</div>
			<div class="clear"></div>
		</div>
	{end:if/}

</div>
{end:if/}
</div>
{sta:if(!$is_show)[exc]}
<div class="guide_info" >
	{echo:$error_str;/} 
</div>
{end:if/}
<!-- face begin -->
<div id="face_list_menu" class="emBg" style="display:none;z-index:100;"></div>
<!-- face end -->

</body>
</html>