{lib(base_photo_upload.php)}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=gbk" />
<title>{cfg:(sys,site_name)}</title>
<link rel="stylesheet" type="text/css" href="../img/css.css"/>
<script src="{$web_url}/plus/js/init.php?act=init_js"></script>
<script src="{$web_url}/images/js/common.js"></script>
<script src="{$web_url}/images/js/ajax.js"></script>
<style>
body{width:460px;text-align:left;padding-left:20px}
.me_li1{float:left;width:450px;margin-top:20px}
.me_li2{float:left;width:450px;line-height:22px;color:#666666;margin-top:20px}
</style>
<script>
function me_chklen(){
	var obj_x=document.getElementById("id_photo_desc");
	var obj_y=document.getElementById("id_len");
	var lng_val=255-obj_x.value.length;
	if(lng_val<0){
		lng_val=0;
		obj_x.value=obj_x.value.substr(0,255);
	}
	obj_y.innerHTML=lng_val;
}
function me_savedesc(){
	yj_ajax_post(document.myform,function(data){
		var obj_msg=get_json_obj(data);
		if(!obj_msg.isnull){
			alert(obj_msg.msg);
		}else{
			alert("保存发生错误，请稍后再试");
		}
	});

}
</script>
</head>
<body>
{if($get_act=="save")}
	{if($this_msg=="")}
		<script>
			parent.window.location.reload();
		</script>
	{else}
		<div class="me_li3">{$this_msg}</div>
	{/if}
{else if($get_act=="desc")}
	<form name="myform" method="post" action="?">
	<input type="hidden" name="app" value="base_photo_upload">
	<input type="hidden" name="id" value="{$get_id}">
	<input type="hidden" name="act" value="savedesc">
	<input type="hidden" name="isajax" value="1">
	<div class="me_li1" style="line-height:23px"><textarea name="photo_desc" id="id_photo_desc" style="width:400px;height:80px" onkeyup="me_chklen();">{$photo_desc}</textarea><br>您还可以输入<span id="id_len" style="color:#ff0000">255</span>个字符<br><br><input type="button" name="subok" value="保存" class="btn_67" onclick="me_savedesc();"></div>
	</form>
{else}
	<form name="myform" method="post" action="?" enctype="multipart/form-data">
	<input type="hidden" name="app" value="base_photo_upload">
	<input type="hidden" name="index" value="{$get_index}">
	<input type="hidden" name="act" value="save">
	<div class="me_li1">照片：<input type="file" name="file_1" id="file_1">&nbsp;<input type="submit" name="subok" value="上 传" class="btn_67"></div>
	<div class="me_li2">
	<b>温馨提示： </b><br>
	1、照片支持格式：{$this_allowpic}。<br>
	2、每张照片大小不要超过{$this_allowsize}。<br>
	3、请勿上传：非本人、戴墨镜、侧面、背影、与现年龄不符、多人合影、裸露、军装照和带有政治色彩的照片，否则将予以删除。<br>
	</div>
	</form>
{/if}
</body>
</html>