<!-- include '../header' -->

<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.queue.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/fileprogress.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/swfuplad2/handlers.js"></script>

<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/setting.js"></script>

<script type="text/javascript">

		var swfu;
		var diplomaSwf;
		var CertificateSwf;
		
		window.onload = function() {
			var settings = {
					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
					upload_url: "/settingCredentialInfoTypeDo/professionalTitle",	// Relative to the SWF file
					
					file_size_limit : "8 MB",
					file_types : "*.jpg;*.gif;*.png",
 					file_types_description : "*.jpg;*.gif;*.png",
					file_upload_limit : 8,
					file_queue_limit : 1,
					custom_settings : {
						progressTarget : "fsUploadProgress",
						cancelButtonId : "btnCancel"
					},
					debug: true,

					// Button settings
					button_image_url: "<?= WEB_SITE_GLOBAL ?>images/btn-normal1.jpg",	// Relative to the Flash file
					button_width: "200",
					button_height: "40",
					button_placeholder_id: "spanButtonPlaceHolder",

					// The event handler functions are defined in handlers.js
					file_queued_handler : fileQueued,
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,
					upload_start_handler : uploadStart,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadSuccessProfessionalTitle,
					upload_complete_handler : uploadComplete,
					queue_complete_handler : queueComplete	// Queue plugin event
				};

				swfu = new SWFUpload(settings);
			
			
			var diplomaSettings = {
					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
					upload_url: "/settingCredentialInfoTypeDo/diploma",	// Relative to the SWF file
					
					file_size_limit : "8 MB",
					file_types : "*.jpg;*.gif;*.png",
					file_types_description : "*.jpg;*.gif;*.png",
					file_upload_limit : 8,
					file_queue_limit : 1,
					custom_settings : {
						progressTarget : "fsUploadProgress",
						cancelButtonId : "btnCancel"
					},
					debug: false,

					button_image_url: "<?= WEB_SITE_GLOBAL ?>images/btn-normal1.jpg",	// Relative to the Flash file
					
					button_width: "200",
					button_height: "40",
					button_placeholder_id: "spanButtonDiploma",
					
					// The event handler functions are defined in handlers.js
					file_queued_handler : fileQueued,
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,
					upload_start_handler : uploadStart,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadSuccessDiploma,
					upload_complete_handler : uploadComplete,
					queue_complete_handler : queueComplete	// 上传完成后，提示上传成功多少文件
				};
			diplomaSwf=new SWFUpload(diplomaSettings);
	
			var CertificateSettings = {
					flash_url : "<?= WEB_SITE_GLOBAL ?>js/swfuplad2/swfupload.swf",
					upload_url: "/settingCredentialInfoTypeDo/certificate",	// Relative to the SWF file
					
					file_size_limit : "8 MB",
					file_types : "*.jpg;*.gif;*.png",
					file_types_description : "*.jpg;*.gif;*.png",
					file_upload_limit : 8,
					file_queue_limit : 1,
					custom_settings : {
						progressTarget : "fsUploadProgress",
						cancelButtonId : "btnCancel"
					},
					debug: false,

					button_image_url: "<?= WEB_SITE_GLOBAL ?>images/btn-normal1.jpg",	// Relative to the Flash file

					button_width: "200",
					button_height: "40",
					button_placeholder_id: "spanButtonCertificate",

					file_queued_handler : fileQueued,
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,
					upload_start_handler : uploadStart,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadSuccessCertificate,
					upload_complete_handler : uploadComplete,
					queue_complete_handler : queueComplete	// 上传完成后，提示上传成功多少文件
				};
			CertificateSwf=new SWFUpload(CertificateSettings);
			
			
			
	     };
	</script>

<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include '../menu' -->
				</ul>
			</div>
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<!-- include 'settingMenu' -->
				</div>
			</div>
			
			
			<div class="adminContent autoHeight">
				<div class="subNav">
		    	<ul class="navTabs">
					  <li ><a href="/settingEmployeeInfo">基本信息</a></li>
					  <li class="active" ><a href="#">证件信息</a></li>
					  <li><a href="/settingFinanceInfo">财务信息</a></li>
					</ul>
				</div>
				
				
				<!--证件信息-->
				<div class="saeaList" style="width:900px">
				<form method="post" action="/settingCredentialInfoDo" enctype="multipart/form-data"  >
				<input type="hidden" name="sidKey" id='sidKey'  value="{{staff.sidKey}}">
				
				
				<input type="hidden" id="professionalTitle" name="professionalTitle" value="">
				<input type="hidden" id="diploma" name="diploma"   value="">
				<input type="hidden" id="certificate" name="certificate"   value="">
				
					<table class="table table-bordered table-condensed">
						<tr>
							<th class="taC" width="150"><b class="colRed">* </b>身份证号码</th>
							<td <!-- if empty({{staff.IDcards}}) --> class="alert-warning" <!-- endif --> colspan="3"><input type="text" name="IDcards" value="{{staff.IDcards}}"></td>
						</tr>
						<tr>
							<th class="taC" width="150"><b class="colRed">* </b>身份证有效期</th>
							<td <!-- if {{staff.IDcardsValidity}}=='0000-00-00' --> class="alert-warning" <!-- endif --> colspan="3">
							<input type="date" name="IDcardsValidity" value="{{staff.IDcardsValidity}}"></td>
						</tr>
						<tr>
							<th class="taC" width="150"><b class="colRed">* </b>正面（国徽）</th>
							<td width="260"><input type="file" name="IDcardsImgA">
							</td>
							<td colspan="2" <!-- if empty({{staff.IDcardsImgA}}) --> class="alert-warning" <!-- endif -->>
								<p>
									<!-- if !{{empty(staff.IDcardsImgA)}} -->
									正面（国徽） <a href="{{staff.IDcardsImgA}}" target="_blank">查看</a>
									<!-- endif -->
								</p>
							</td>
						</tr>
						<tr>
							<th class="taC" width="150"><b class="colRed">* </b>反面（照片）</th><td width="260"><input type="file" name="IDcardsImgB"></td>
							<td colspan="2" <!-- if empty({{staff.IDcardsImgB}}) --> class="alert-warning" <!-- endif -->>
								<p>
								<!-- if !{{empty(staff.IDcardsImgB)}} -->
									正面（照片） <a href="{{staff.IDcardsImgB}}" target="_blank">查看</a>
									<!-- endif -->
									 
								</p>
							</td>
						</tr>
					</table>
					
					
					
					<table class="table table-bordered table-condensed">
						<tr>
							<th class="taC" width="150"><b class="colRed">* </b>毕业证书</th><td width="260">
							
							<div class="controls">
			            	<span id="spanButtonCertificate"></span>			
			            	</div>
							
							
							</td>
							<td colspan="2" <!-- if empty({{staff.certificate}})||{{staff.certificate}}=='[]' --> class="alert-warning" <!-- endif --> >
								
									<!-- if !{{empty(staff.certificate)}} -->
									<!-- loop staff.certificateArray -->
									<p>
									毕业证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a>
									<a href="/delCredentialType/certificate/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
									</p>
									<!-- endloop -->
									<!-- endif -->
								
								
							</td>
						</tr>
						<tr>
							<th class="taC" width="150">学位证书</th><td width="260">
							
							
						<div class="controls">
			            	<span id="spanButtonDiploma"></span>	
			            </div>
						
							
							
							</td>
							<td colspan="2">
								
									<!-- if !{{empty(staff.diploma)}} -->
									<!-- loop staff.diplomaArray -->
									<p>
									学位证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a>
									<a href="/delCredentialType/diploma/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
									</p>
									<!-- endloop -->
									<!-- endif -->
								
								
							</td>
						</tr>
						
						
						
						<tr>
							<th class="taC" width="150">职称证书</th><td width="260">
							
						<!-- flash 上传 -->
						<div class="controls">
			            	<span id="spanButtonPlaceHolder"></span>			
			            </div>
						
							<td colspan="2">
							
							<!-- if !{{empty(staff.professionalTitle)}} -->
							<!-- loop staff.professionalTitleArray -->
								<p>
									职称证书 <a href="{{staff.webSite}}{{certificateArray' value}}" target="_blank">查看</a> 
									<a href="/delCredentialType/professionalTitle/{{certificateArray' value}}" data-toggle="modal" role="button" title="删除职称证书1">删除</a>
								</p>
								<!-- endloop -->
							<!-- endif -->	
								
								
								
							</td>
						</tr>
					</table>
					
					<!-- flash上传提示 -->
					<input id="btnCancel" type="button" value="取消所有上传" style="display:none" onclick="swfu.cancelQueue();" disabled="disabled">		
					<span class="fieldset flash" id="fsUploadProgress"></span>
					<span id="divStatus">0 个文件已上传</span>
					
					
					
					<div class="control-group">
						<div class="controls">
							<button type="submit" class="button">确认上传</button>
						</div>
					</div>
					
					</form>
				</div>
				
				

			</div>
		</div>
	</div>
	
<script type="text/javascript">autoFlashHeight();</script>
</body>
