<!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">
<base href='{echo:$siteDomain;/}' />
<title></title>
<base href='{echo:$siteDomain;/}' />
<link rel="stylesheet" type="text/css" href="skin/default/jooyea/css/iframe.css">
<script type='text/javascript' src='servtools/ajax_client/ajax.js'></script>
<script type='text/javascript' src="skin/default/js/jooyea.js"></script>
<script type="text/javascript">
function change_photo_callback(content){
	var return_text=content;
	var return_text=return_text.replace(/[\s\n\r]/g,"");
	if(return_text==""){
	$("def_photo_info").innerHTML="{echo:lp{a_pht_inf};/}";}
	else{$("def_photo_info").innerHTML=return_text;}
	$("def_photo_info").style.display="";
	$("photo_info").style.display="none";
}
function change_photo(){
	var photo_id=$("photo_id").value;
	var photo_information_value=$("information_value").value;
	var change_photo=new Ajax();
	change_photo.getInfo("do.php?act=event_im_photo&photo_id={echo:$photo_id;/}&event_id={echo:$event_id;/}","post","app","photo_id="+photo_id+"&information_value="+photo_information_value,function(c){change_photo_callback(c);});
}

function change_state(){
	var return_text=$("def_photo_info").innerHTML;
	var return_text=return_text.replace(/[\s\n\r]/g,"");
	if(return_text=="{echo:lp{a_pht_inf};/}"){
		var information="";
	}else{
		var information=return_text;
	}
	$("information_value").value=information;
	$("def_photo_info").style.display="none";
	$("photo_info").style.display="";
}

function chancel(){
	$("def_photo_info").style.display="";
	$("photo_info").style.display="none";
}

function Get_mouse_pos(obj){
	var event=getEvent();
	if(navigator.appName=='Microsoft Internet Explorer'){
		return event.offsetX;
	}else if(navigator.appName=='Netscape'){
		return event.pageX-obj.offsetLeft;
	}
}
</script>
</head>
<body id="iframecontent">
	<div class="create_button"><a href="javascript:window.history.go(-1)">{echo:lp{ef_back};/}</a></div>
  <h2 class="app_event">{echo:lp{ef_activity};/}</h2>
  <div class="tabs">
    <ul class="menu">
		<li><a href="modules.php?app=event_space&event_id={echo:$event_id;/}" hidefocus="true">{echo:lp{ef_activity};/}</a></li>
		<li><a href="modules.php?app=event_member&event_id={echo:$event_id;/}" hidefocus="true">{echo:lp{ef_member};/}</a></li>
		<li class="active"><a href="modules.php?app=event_list_photo&event_id={echo:$event_id;/}" hidefocus="true">{echo:lp{ef_photo};/}</a></li>
    </ul>
  </div>
{sta:if($photo_row)[exc]}
	<div class="iframe_contentbox">
		<div class="photo_showbox">
			<div class="sub_box">
				<div class="photo_name"><span>《{echo:filt_word($photo_row['photo_name']);/}》{echo:lp{ef_come_from};/}：{echo:$photo_row['user_name'];/}</span></div>
				<div class="photo_uploadtime">{echo:str_replace("{date}",$photo_row['add_time'],lp{a_send_time});/}</div>
				<div class="photo_view">
					<img id='{echo:$t_event_photo;/}:{echo:$photo_row["photo_id"];/}' style='display:none;max-width:470' onerror="parent.pic_error(this)" onmousemove='turnover(this);' />
					<img id='show_ajax' src='skin/default/jooyea/images/loading.gif' />
				</div>
				
				{sta:if($photo_row['photo_information']!='' && $status < 3)[exc]}
				<div id='def_photo_info'>{echo:filt_word($photo_row['photo_information']);/}</div>
				{end:if/}
				
				{sta:if($status>=3)[exc]}
				<div class='photo_intro'>
					<input class="med-text" type='hidden' name='photo_id' id='photo_id' value={echo:$photo_id;/} />
					<div id='def_photo_info' onmouseover="this.style.backgroundColor='#ffffce';this.style.borderColor='#efcf7b';" onmouseout="this.style.backgroundColor='#fffbff';this.style.borderColor='#ececec';" onclick="change_state();">{echo:filt_word($photo_inf);/}</div>
					<div id='photo_info' style='display:none;text-align:center;'>
						<textarea class="med-textarea" cols='40' rows='2' name='information_value' id='information_value'></textarea><br />
						<input type='button' value='{echo:lp{ef_b_con};/}' class='small-btn' onclick='change_photo()' />
						<input type='button' value='{echo:lp{ef_b_del};/}' class='small-btn' onclick='chancel()' />
					</div>
				</div>
				{end:if/}
				
				<div class="photo_operate">
					{sta:if($status>=3)[exc]}
					<a href="javascript:void(0);" onclick="change_state();">{echo:lp{a_set_info};/}</a>
					{end:if/}
					<a href="{echo:$photo_row['photo_src'];/}" target="_blank">{echo:lp{a_see_pic};/}</a>
					<a href="modules.php?app=event_list_photo&event_id={echo:$event_id;/}">{echo:lp{a_bak_list};/}</a>
				</div>
				
			</div>
		</div>
	</div>
{end:if/}

<div id="face_list_menu" class="emBg" style="display:none;z-index:100;"></div>

{sta:if($photo_row)[exc]}
	<script type='text/javascript'>
		var img_obj=$('{echo:$t_event_photo;/}:{echo:$photo_row["photo_id"];/}');
		var ajax_obj=$('show_ajax');
		var show_img=new Image;
		show_img.src='{echo:$photo_row["photo_src"];/}';
		var time_id=window.setTimeout("test_img_complete()",200);
		var show_width={echo:$img_info[0];/}>470?470:{echo:$img_info[0];/};
		function test_img_complete(){
			if(show_img.complete==true){
				img_obj.src='{echo:$photo_row["photo_src"];/}';
				img_obj.width=show_width;
				img_obj.style.display='';
				ajax_obj.style.display='none';
				window.clearTimeout(time_id);
			}else{
				var time_id=window.setTimeout("test_img_complete()",200);
			}
		}
		function turnover(obj){
			var move_x=Get_mouse_pos(obj);
			if(move_x >= show_width/2){
				obj.style.cursor="URL(skin/default/jooyea/images/next.cur),auto";
				obj.title='{echo:lp{a_page_down};/}';
				obj.onclick=function(){location.href="modules.php?app=event_show_photo&event_id={echo:$event_id;/}&photo_id={echo:$photo_id;/}&prev_next=next&user_id={echo:$url_uid;/}"};
			}else{
				obj.style.cursor="URL(skin/default/jooyea/images/pre.cur),auto";
				obj.title='{echo:lp{a_page_up};/}';
				obj.onclick=function(){location.href="modules.php?app=event_show_photo&event_id={echo:$event_id;/}&photo_id={echo:$photo_id;/}&prev_next=prev&user_id={echo:$url_uid;/}"};
			}
		}
	</script>
{end:if/}

<div class="guide_info {echo:$show_error;/}">{echo:lp{a_ine};/}</div>
<div class="guide_info {echo:$show_content;/}">{echo:lp{a_add_pvw};/}</div>

</body>
</html>