<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]--> 
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]--> 
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]--> 
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]--> 
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]--> 
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
 <head>
    <title>PHPOA协同办公软件</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="template/style2015/content/css/bootstrapadd.min.css" />
		<link rel="stylesheet" type="text/css" href="template/style2015/content/css/bootstrap-modal.css" />
		        <link rel="stylesheet" type="text/css" href="template/style2015/content/css/bootstrap.css"> 
				<link rel="stylesheet" type="text/css" href="template/style2015/bootstrap/css/bootstrap-datetimepicker.css"> 
        <link rel="stylesheet" type="text/css" href="template/style2015/content/css/base.css">
		<link rel="stylesheet" type="text/css" href="template/style2015/content/css/style2015.css">
		<script type="text/javascript" src="template/style2015/content/js/jquery.min.js"></script>
		<script type="text/javascript" src="template/style2015/content/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="template/style2015/content/js/bootstrap-modal.js"></script>
		<script type="text/javascript" src="template/style2015/content/js/bootstrap-modalmanager.js"></script>
		<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
</head>
<body class="body-wrap">
<div class="tabbable work-nav">
				<ul id="myTab" class="nav nav-tabs">
					<li><a href="admin.php?ac=humanlist&fileurl=<?php echo $fileurl?>&type=<?php echo $type?>"><?php echo $human_type_name;?>管理</a></li>
					<li  class="active"><a href="#"><?php echo $human_type_name.$_title;?></a></li>
					
				</ul>
</div>
<script Language="JavaScript"> 
function CheckForm()
{
   <? if($blog['id']==''){?>
   if(document.save.number.value=="")
   { alert("流水单号不能为空！");
     document.save.number.focus();
     return (false);
   }
   if(document.save.userid.value=="")
   { alert("单位员工不能为空！");
     document.save.userid.focus();
     return (false);
   }
   <? }?>
<?
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE.DB_JT."human_form where type1='".$type."'  ORDER BY id Asc");
	while ($row = $db->fetch_array($query)) {
		if($row["confirmation"]=='1'){
?>

if(document.save.<?php echo $row["inputname"]?>.value=="")
   { alert("<?php echo $row["formname"]?>不能为空！");
     document.save.<?php echo $row["inputname"]?>.focus();
     return (false);
   }
   
<?php
	}
}
?>
   return true;
}
function sendForm()
{
   if(CheckForm())
      document.save.submit();
}
</script>
<form name="save" method="post" action="?ac=humanadd&do=addsave&fileurl=<?php echo $fileurl?>&type=<?php echo $type?>">
	<input type="hidden" name="savetype" value="add" />
	<input type="hidden" name="filenumber" value="<?php echo $filenumber?>" />
	<input type="hidden" name="id" value="<?php echo $blog['id']?>" />
<div class="search_area">
        <div class="form-search form-search-top" style="text-align:left;padding-left:10px;"><? if($blog['id']==''){?>
                       No： <input name="number" type="text" class="BigInput" id="number" style="width: 100px;" value="<?php echo get_date('YmdHis',PHP_TIME)?>" maxlength="100" />
	单位员工：<?php
	 get_pubuser(1,"user","","+选择人员",120,20);
	 ?>
	 <?php }else{?>
	 No： <?php echo $blog['number']?>
	单位员工：<?php echo $blog['username']?>
	 <?php }?>
           <button type="button" onClick="sendForm();" style="margin-left:40px;margin-right:15px;" class="btn btn-danger">保存并返回</button>
			<button type="button" style="margin-left:15px;" onClick="window.location.href='admin.php?ac=humanlist&fileurl=<?php echo $fileurl?>&type=<?php echo $type?>'" class="btn">返回</button>
        </div>
</div>


<div style="position:absolute; left:0px;overflow:auto;height:82%;width:100%;padding-top:10px;">
<div  id='form' class="table-responsive" style="width: 1000px;margin: 10px auto;">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
	text-align: center;
	background-color: #dcdcdc;
}
.text_table{
	background-color: #FFFFFF;
	
}
.table_bg{
	border-collapse: 1px;
    border-spacing: 1px;
	background-color:#DDDED5;
}
.table_bg1{
	border-collapse: 0px;
    border-spacing: 0px;
	border-left:1px solid #DDDED5;
	border-right:1px solid #DDDED5;
}
.title{
	font-family: "微软雅黑", "宋体";
	font-size: 32px;
	color: #069DD5;
	line-height: 60px;
	letter-spacing: 2px;
}
.text_td {
	font-family: Arial, "微软雅黑", "宋体";
	font-size: 14px;
	line-height: 35px;
	height:35px;
	color: #68584e;
	padding-right: 6px;
	padding-left: 6px;
}
.text_td_1 {
	width:110px;
	background-color:#F7F8EE;
}
.text_value {
	font-family: Arial, "微软雅黑", "宋体";
	font-size: 14px;
	line-height: 25px;
	height:35px;
	color: #069DD5;
	padding-right: 6px;
	padding-left: 6px;
	background-color:#FFFFFF;
	text-align:left;
}
.text_title {
	font-family: Arial, "微软雅黑", "宋体";
	font-size: 16px;
	line-height: 25px;
	height:40px;
	color: #68584e;
	padding-left: 20px;
	background-color:#E8E8E3;
	text-align:left;
}
.text_no {
	font-family: Arial, "微软雅黑", "宋体";
	font-size: 16px;
	line-height: 25px;
	height:35px;
	color: #68584e;
	padding-right: 6px;
	padding-left: 6px;
	background-color:#F7F8EE;
}
</style>
<table width="1002" border="0" align="center" class="table_bg1"><tr><td class="text_title">基本信息</td></tr></table>
<table width="1002" border="0" align="center" class="table_bg">

  <tr>
  <?php
  global $db;
  $num = $db->result("SELECT COUNT(*) AS num FROM ".DB_TABLEPRE.DB_JT."human_form where type1='".$type."' and inputtype!=2 ORDER BY id Asc");
  $query = $db->query("SELECT * FROM ".DB_TABLEPRE.DB_JT."human_form where type1='".$type."' and inputtype!=2 ORDER BY id Asc");
  $n=0;
  while ($row = $db->fetch_array($query)) {
	  $n++;
	  $html.='<td class="text_td text_td_1">';
	  if($row["confirmation"]=='1'){
		$html.='<font color=red>*</font>';
	  }
	  $value=get_human_db($blog['id'],$row["inputname"]);
	  $html.=''.$row["formname"].'</td>';
	  $html.='<td class="text_value">';
	  if($row['type']=='0'){
			if($row["inputtype"]=='1'){
				$html.= get_human_input($row["inputname"],$w,$h,$value);
			}elseif($row["inputtype"]=='2'){
				$html.= get_human_textarea($row["inputname"],$w,$h,$value);
			}elseif($row["inputtype"]=='3'){
				$html.= get_human_radio($row["inputname"],$row["inputvaluenum"],$value);
			}elseif($row["inputtype"]=='4'){
				$html.= get_human_checkbox($row["inputname"],$row["inputvaluenum"],$value);		
			}elseif($row["inputtype"]=='5'){
				$html.= get_human_select($row["inputname"],$row["inputvaluenum"],$value,$w,$h);	
			}
	 }elseif($row["type"]=='1'){
		$html.= '<input type="text" id="'.$row["inputname"].'" name="'.$row["inputname"].'" class="span3" style="width:'.$w.'px;height:'.$h.'px;line-height:'.$h.'px;font-size:14px;margin-top:6px;" value="'.$value.'" />';
		$html.= '<a href="#" onClick="';
		$html.= "window.open ('admin.php?ac=uploadadd&fileurl=public&name=".$row["inputname"]."', ";
		$html.= "'".$row["inputname"]."', 'height=200, width=480, top=0, left=0, toolbar=no, ";
		$html.= "menubar=no, scrollbars=yes, resizable=no,location=no, status=no'";
		$html.= ')">+图片上传</a>';
	}elseif($row["type"]=='2'){
		$html.= '<input type="text" id="'.$row["inputname"].'" name="'.$row["inputname"].'" class="span3" style="width:'.$w.'px;height:'.$h.'px;line-height:'.$h.'px;font-size:14px;margin-top:6px;" value="'.$value.'" />';
		$html.= '<a href="#" onClick="';
		$html.= "window.open ('admin.php?ac=uploadadd&fileurl=public&name=".$row["inputname"]."', ";
		$html.= "'".$row["inputname"]."', 'height=200, width=480, top=0, left=0, toolbar=no, ";
		$html.= "menubar=no, scrollbars=yes, resizable=no,location=no, status=no'";
		$html.= ')">+附件上传</a>';
	}elseif($row["type"]=='3'){
		$html.= get_human_date($row["inputname"],$value);
	}elseif($row["type"]=='4'){
		$dep= "<input type='text'  id='".$row["inputname"]."' name='".$row["inputname"]."' style='width:".$w."px;height:".$h."px;background-color:#F5F5F5;color:#006600;margin-top:6px;' value='".$value."' readonly />";
        $dep.= '<a href="#" onClick="window.open ';
		$dep.="('admin.php?ac=dep_radio&fileurl=public&inputname=".$row["inputname"]."', '".$row["inputname"]."', 'height=500, width=500, top=50, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')";
		$dep.='">+选择部门</a>';
		$html.= $dep;
	}elseif($row["type"]=='5'){
		//return get_pubuser(1,$row["inputname"],"","+选择人员",$w,$h);
	   $user= "<input type='text' id='".$row["inputname"]."' name='".$row["inputname"]."' style='width:".$w."px;height:".$h."px;background-color:#F5F5F5;color:#006600;margin-top:6px;' value='".$value."' readonly />";
       $user.='<a href="javascript:;" onClick="window.open (';
	   $user.="'admin.php?ac=user_radio&fileurl=public&inputname=".$row["inputname"]."', '".$row["inputname"]."', 'height=500, width=500, top=50, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no'";
	   $user.=')">+选择人员</a>';
	   $html.= $user;
	}
	  
	  $html.='</td>';
	  if($n%2==0){
		  $html.= '</tr><tr>';
	  }
  }
  if($num%2!=0){
	 $html.='<td class="text_td text_td_1"></td>';
	 $html.='<td class="text_value"></td>';
  }
  echo $html;
  ?>
  
  </tr>
  <?php
   $html='';
   $query = $db->query("SELECT * FROM ".DB_TABLEPRE."human_form where type1='".$type."' and inputtype=2 ORDER BY id Asc");
	while ($row = $db->fetch_array($query)) {
		if($row["h"]=='' || $row["h"]=='0'){
			if($_CONFIG->config_data('configwork')=='1'){
				$h='200';
			}else{
				$h='100';
			}
		}
		$value=get_human_db($blog['id'],$row["inputname"]);
		$html.= '<tr>
			<td class="text_td text_td_1">';
			if($row["confirmation"]=='1'){
				$html.='<font color=red>*</font>';
			}
			$html.=''.$row["formname"].'</td>
			<td colspan="3" class="text_value" style="padding-top: 10px;padding-bottom: 10px;">'.get_human_textarea($row["inputname"],$w,$h,$value).'</td>
		  </tr>';
	}
   echo $html;
  
  ?>
	  
	  
</table>
</div>

<!--<div id="attchment">
<div class="content-attchment" id="content-attchment">
			<div class="attchment-title-block">
				<span class="attchment-public">流程附件管理</span>
			</div>
<table class="TableList small" align="center" width="100%">
		<tr class="TableLine1" style="line-height:30px;">
			<td colspan='4' align="left" style="padding-left:40px;background:#fdfaf3;" id="filetitle">还没有附件！</td>
		</tr>
<tbody id="filevalue">

</tbody>	
				</table>
<table class="TableBlock no-top-border" align="center" width="100%" height="45">
      
    <tr height="35">
	  <td nowrap class="TableContent" width="70" align="center" style="background:#fdfaf3;">
	  <input type="hidden" name="annexurlid" id="annexurlid" oninput="filenumber_show();"  onpropertychange="filenumber_show();" />
		<button type="button" onClick="window.open ('admin.php?ac=uploadadd&fileurl=public&name=annexurlid&filenumber=1000&officetype=3', 'newwindow', 'height=200, width=480, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')" action="cancel_concern" class="btn btn-primary">上传附件</button>    </td>
      <td class="TableData">
       

      </td>
            <td nowrap class="TableContent" width="90" align="center" >
    	 </td>
      <td class="TableData">
         
	  </td>
	       </tr>

</table>
	</div>
</div> -->


</div>




</form>



</body>
</html>
