<!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=gb2312" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=false;"  />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>个人会员中心</title>
<meta name="author" content="骑士CMS" />
<meta name="copyright" content="74cms.com" />
<link href="../css/common.css" rel="stylesheet" type="text/css" />
<link href="../css/user.css" rel="stylesheet" type="text/css" />
<link href="../css/user_personal.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery.js" type='text/javascript' ></script>
<script src="{#$QISHI.main_domain#}data/cache_classify.js" type='text/javascript' charset="utf-8"></script>
<script src="../js/jquery.common.js" type='text/javascript' ></script>
<script type="text/javascript">
$(document).ready(function()
{
	//打开顶部菜单
	$("#topmenu_sub").click( function () { 
		$("#topmenu").slideToggle("fast");
	});
	 // 创建简历弹出框
	  function showFloatBox() {
	    $("body").prepend("<div class=\"menu_bg_layer\"></div>");
	    $(".menu_bg_layer").height($(document).height());
	    $(".menu_bg_layer").css({ width: $(document).width(), position: "absolute",left:"0", top:"0","z-index":"1","background-color":"#000000"});
	    $(".menu_bg_layer").css("opacity",0.3);
	  }
 
	  // 开始年份点击
	  $("#startyear_menu").click(function(){
	    showFloatBox();
	    $("#menuStartYear").css({ top: ($(window).height() - $('#menuStartYear').outerHeight())/2 + $(document).scrollTop() });
	    $("#menuStartYear").show();
	    $("#menuStartYear li").click(function(){
	      $("#startyear").html($(this).attr("title"));
	      $("#startyear").attr("data",$(this).attr("title"));
	      $("#menuStartYear").hide();
	      $(".menu_bg_layer").remove();
	    });
	  });
    
  	  // 开始月份点击
	  $("#startmonth_menu").click(function(){
	    showFloatBox();
	    $("#menuStartMonth").css({ top: ($(window).height() - $('#menuStartMonth').outerHeight())/2 + $(document).scrollTop() });
	    $("#menuStartMonth").show();
	    $("#menuStartMonth li").click(function(){
	      $("#startmonth").html($(this).attr("title"));
	      $("#startmonth").attr("data",$(this).attr("title"));
	      $("#menuStartMonth").hide();
	      $(".menu_bg_layer").remove();
	    });
	  });

	  // 结束年份点击
	  $("#endyear_menu").click(function(){
	    showFloatBox();
	    $("#menuEndtYear").css({ top: ($(window).height() - $('#menuEndtYear').outerHeight())/2 + $(document).scrollTop() });
	    $("#menuEndtYear").show();
	    $("#menuEndtYear li").click(function(){
	      $("#endyear").html($(this).attr("title"));
	      $("#endyear").attr("data",$(this).attr("title"));
	      $("#menuEndtYear").hide();
	      $(".menu_bg_layer").remove();
	    });
	  });
  
	  // 结束月份点击
	  $("#endmonth_menu").click(function(){
	    showFloatBox();
	    $("#menuEndMonth").css({ top: ($(window).height() - $('#menuEndMonth').outerHeight())/2 + $(document).scrollTop() });
	    $("#menuEndMonth").show();
	    $("#menuEndMonth li").click(function(){
	      $("#endmonth").html($(this).attr("title"));
	      $("#endmonth").attr("data",$(this).attr("title"));
	      $("#menuEndMonth").hide();
	      $(".menu_bg_layer").remove();
	    });
	  });
	  // 关闭弹出框
	  $(".choose_close").click(function(event) {
	    $(this).parent().hide();
	    $(".menu_bg_layer").remove();
	  });
	// 提交 表单
	$("#work_submit").click(function(){
		var resume_work="{#$resume_work#}";
		if(resume_work){
		var id = "{#$resume_work.id#}";
		}
		var pid = {#$smarty.get.pid#};
		var companyname =$("input[name='companyname']").val();
		var jobs =$("input[name='jobs']").val();
		var startyear =$("#startyear").attr("data");
		var startmonth =$("#startmonth").attr("data");
		var endyear =$("#endyear").attr("data");
		var endmonth =$("#endmonth").attr("data");
		var achievements =$("textarea[name='achievements']").val();
		$.post("?act=resume_work_save",{id:id,pid:pid,companyname:companyname,jobs:jobs,startyear:startyear,startmonth:startmonth,endyear:endyear,endmonth:endmonth,achievements:achievements},function(data){
			if(data=="ok"){
				alert("添加成功");
				window.location.href="?act=resume_work_list&pid="+pid+"";
			}else if(data=="err"){
				alert("添加失败");
			}else{
				alert(data);
			}
		})
	});
	//阻止input在手机上弹出键盘
	$(".edit_work_exp_samll_input").focus(function() {
		e.stopPropagation(); 
	});
});
</script>
</head>
<body>
<div class=""></div>
<div class="sub_head_top">
	<div class="title">工作经验</div>
	<div class="back" id="pageback"><img src="../images/18.jpg" alt="#"   border="0"/></div>  
	<div class="menu" id="topmenu_sub"><a href="#"><img src="../images/2.jpg"  border="0"/></a></div>
</div>


<!--快捷按钮 -->
<div class="topnav" id="topmenu">
  <div class="list" onclick='window.location.href="../index.php";'>
    <div class="box"><img src="../images/9.jpg"  border="0"/><br />首页</div>
  </div>
  <div class="list" onclick='window.location.href="../wap-jobs-list.php";'>
    <div class="box"><img src="../images/11.jpg"  border="0"/><br />搜职位</div>
  </div>
  <div class="list" onclick='window.location.href="../wap-resume-list.php";'>
    <div class="box"><img src="../images/12.jpg"  border="0"/><br />搜简历</div>
  </div>
  <div class="list" onclick='window.location.href="../wap-news-list.php";'>
    <div class="box"><img src="../images/13.jpg"  border="0"/><br />看资讯</div>
  </div>
  <div class="clear"></div>
</div>
<!--快捷按钮 -->


<!-- 编辑工作经验页面 -->
<form action="?act=resume_work_save" id="Form1" method="post">
	<table class="edit_work_exp">
		<tbody>
			<tr>
				<td class="edit_work_exp_l">公司名称</td>
				<td class="edit_work_exp_r"><input type="text" name="companyname" id="" class="edit_work_exp_input" value="{#$resume_work.companyname#}"/></td>
			</tr>
			<tr>
				<td class="edit_work_exp_l">职位名称</td>
				<td class="edit_work_exp_r"><input type="text" name="jobs" id="" class="edit_work_exp_input" value="{#$resume_work.jobs#}"/></td>
			</tr>
			<tr>
				<td class="edit_work_exp_l">开始时间</td>
				<td class="edit_work_exp_r">
					<label id="startyear_menu"><div data="{#$resume_work.startyear#}" name="startyear" id="startyear" class="edit_work_exp_samll_input">{#$resume_work.startyear#}</div>年<img src="../images/35.gif" alt="" /></label> 
					<label id="startmonth_menu"><div data="{#$resume_work.startmonth#}" name="startmonth" id="startmonth" class="edit_work_exp_samll_input">{#$resume_work.startmonth#}</div>月<img src="../images/35.gif" alt="" /></label>
				</td>
				<div class="menu choose_menu" id="menuStartYear" style="display:none;position:absolute;z-index:1;">
		            <div class="menu_title">开始年份</div>
            		<div class="choose_close"></div>
		            <ul></ul>
		        </div>  
		        <div class="menu choose_menu" id="menuStartMonth" style="display:none;position:absolute;z-index:1;">
		            <div class="menu_title">开始月份</div>
            		<div class="choose_close"></div>
		            <ul>
		            	<li title="1">1</li>
              			<li title="2">2</li>
              			<li title="3">3</li>
              			<li title="4">4</li>
              			<li title="5">5</li>
              			<li title="6">6</li>
              			<li title="7">7</li>
              			<li title="8">8</li>
              			<li title="9">9</li>
              			<li title="10">10</li>
              			<li title="11">11</li>
              			<li title="12">12</li>
		            </ul>
		        </div> 
			</tr>
			<tr>
				<td class="edit_work_exp_l">结束时间</td>
				<td class="edit_work_exp_r">
					<label id="endyear_menu"><div data="{#$resume_work.endyear#}" name="endyear" id="endyear" class="edit_work_exp_samll_input">{#$resume_work.endyear#}</div>年<img src="../images/35.gif" alt="" /></label> 
					<label id="endmonth_menu"><div data="{#$resume_work.endmonth#}" name="endmonth" id="endmonth" class="edit_work_exp_samll_input">{#$resume_work.endmonth#}</div>月<img src="../images/35.gif" alt="" /></label>
				</td>
		       	<div class="menu choose_menu" id="menuEndtYear" style="display:none;position:absolute;z-index:1;">
		            <div class="menu_title">结束年份</div>
            		<div class="choose_close"></div>
		            <ul></ul>
		        </div>
		        <div class="menu choose_menu" id="menuEndMonth" style="display:none;position:absolute;z-index:1;">
		            <div class="menu_title">结束月份</div>
            		<div class="choose_close"></div>
		            <ul>
		            	<li title="1">1</li>
              			<li title="2">2</li>
              			<li title="3">3</li>
              			<li title="4">4</li>
              			<li title="5">5</li>
              			<li title="6">6</li>
              			<li title="7">7</li>
              			<li title="8">8</li>
              			<li title="9">9</li>
              			<li title="10">10</li>
              			<li title="11">11</li>
              			<li title="12">12</li>
		            </ul>
		        </div> 
			</tr>
			<script type="text/javascript">
				  // 开始和结束年份填充
				  var myDate = new Date();
				  var y = myDate.getFullYear();
				  var ymin = y-35;
				  var yearHtm = "";
				  for (i=y; i>=ymin; i--) {
				    yearHtm+="<li title=\""+i+"\">"+i+"</li>";
				  }
				  $("#menuStartYear ul").html(yearHtm);
				  $("#menuEndtYear ul").html(yearHtm);
			</script>
			<tr>
				<td class="edit_work_exp_l">工作职责</td>
				<td class="edit_work_exp_r">
					<textarea name="achievements" id="">{#$resume_work.achievements#}</textarea>
				</td>
			</tr>
		</tbody>
	</table>
</form>
<div class="edit_work_exp_but_group">
	<div class="edit_exp_save_but"><a id="work_submit">保存</a></div>
	<div class="edit_exp_cancel_but" onclick="window.location.href='?act=resume_work_list&pid={#$smarty.get.pid#}'" style="cursor: pointer;"><a>取消</a></div>
	<div class="clear"></div>
</div>
<!-- footer -->
{#include file="wap/footer.htm"#}
</body>
</html>
