<!DOCTYPE html><html>
<head>
<title>信息添加编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<link rel="stylesheet" type="text/css" href="template/default/content/css/style.css">
<style type="text/css">
#container{
	min-width:100%;
	min-height:400px;
}
</style>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
<?php
$xy=explode('/',$row['xy']);
?>
<script>
function init() {
    var center = new qq.maps.LatLng(<?php echo $xy[0];?>);
    var map = new qq.maps.Map(document.getElementById("container"), {
        center: center,
        zoom: 13
    });
    var infoWin = new qq.maps.InfoWindow({
        map: map
    });
    var latlngs = [
        new qq.maps.LatLng(<?php echo $xy[0];?>),
        new qq.maps.LatLng(<?php echo $xy[1];?>)
    ];

    for(var i = 0;i < latlngs.length; i++) {
        (function(n){
            var marker = new qq.maps.Marker({
                position: latlngs[n],
                map: map
            });
            qq.maps.event.addListener(marker, 'click', function() {
                infoWin.open();
				if(n==1){
					var ch='上班';
				}else{
					var ch='下班';
				}
                infoWin.setContent('<div style="text-align:center;white-space:'+
                'nowrap;margin:10px;">'+ch+'</div>');
                infoWin.setPosition(latlngs[n]);
            });
        })(i);
    }
}
</script>
</head>
<body class="bodycolor" onload="init()">
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="small" style='margin-top:30px;'>
  <tr>
    <td class="Big"><img src="template/default/content/images/notify_new.gif" align="absmiddle"><span class="big3"> 考勤信息查看
	&nbsp;&nbsp;&nbsp;&nbsp;
	<span style="font-size:12px; float:right; margin-right:20px;">
	<a href="admin.php?ac=<?php echo $ac?>&fileurl=<?php echo $fileurl?>" style="font-size:12px;"><<返回列表页</a></span>
    </td>
  </tr>
</table>

<form name="save" method="post" action="?ac=<?php echo $ac?>&fileurl=<?php echo $fileurl?>&do=views">
	<input type="hidden" name="view" value="edit" />
	<input type="hidden" name="id" value="<?php echo $blog['id']?>" />
	
	<table class="TableBlock" border="0" width="90%" align="center" style="border-bottom:#4686c6 solid 0px;">
	
		<tr>
			<td nowrap class="TableContent" width="150">姓名：</td>
			  <td class="TableData"><?php echo $row['name']?></td>
	    </tr>
		
		<tr>
			<td nowrap class="TableContent" width="150">考勤时间：</td>
			  <td class="TableData"><?php
$sdate=explode(' ',$row['sdate']);
$edate=explode(' ',$row['edate']);
echo substr($sdate[1], 0, -3).'至'.substr($edate[1], 0, -3);
?></td>
	    </tr>
		
		<tr>
			<td nowrap class="TableContent" width="150">时长：</td>
			  <td class="TableData"><?php
if($row['latedate']!=0){
	echo '迟到：'.attendance_date($row['latedate']);
}
if($row['ledate']!=0){
	echo '<br>早退：'.attendance_date($row['ledate']);
}
?></td>
	    </tr>
		
		<tr>
			<td nowrap class="TableContent" width="150">状态：</td>
			  <td class="TableData"><?php
if($row['latedate']!=0){
	echo '<font color=red>迟到</font>';
}
if($row['ledate']!=0){
	echo '/<font color=red>早退</font>';
}
if($row['ledate']==0 && $row['latedate']==0){
	echo '正常';
}
?></td>
	    </tr>
		<tr>
			<td nowrap class="TableContent" width="150">备注：</td>
			  <td class="TableData"><?php echo trim($row['note'])?></td>
	    </tr>
		<tr>
			<td nowrap class="TableContent" width="150">位置：</td>
			  <td class="TableData"><?php echo trim($row['addr'])?></td>
	    </tr>
		
		<tr>
			<td colspan="2" nowrap class="TableData">
	        <div id="container"></div></td>
	    </tr>
	</table>

  
</form>

</body>
</html>
