|
发表于 2018-6-1 10:56
来自手机
|
显示全部楼层
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<title>安全审核</title>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Aspose.Cell ">
<link id=Main-File rel=Main-File href="../032913124442.html">
<link rel=File-List href=filelist.xml>
<link rel=Edit-Time-Data href=editdata.mso>
<!--[if !mso]>
<style>
v\\:* {behavior:url(#default#VML);}
o\\:* {behavior:url(#default#VML);}
x\\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<link rel=Stylesheet href=stylesheet.css>
<style>
.pic {
display:block;
height:120pt;
width:124pt;
}
</style>
<style>
<!--table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{
mso-header-data:"";
mso-footer-data:"";
margin:0.75in 0.7in 0.75in 0.7in;
mso-header-margin:0.3in;
mso-footer-margin:0.3in;
mso-page-orientation:Portrait;
}
-->
</style>
<![if !supportTabStrip]><script language="JavaScript">
<!--
function fnUpdateTabs()
{
if (parent.window.g_iIEVer>=4) {
if (parent.document.readyState=="complete"
&& parent.frames['frTabs'].document.readyState=="complete")
parent.fnSetActiveSheet(0);
else
window.setTimeout("fnUpdateTabs();",150);
}
}
if (window.name!="frSheet")
// window.location.replace("../032913124442.html");
else
// fnUpdateTabs();
//-->
</script>
<![endif]>
<!--[if gte mso 9]><xml>
<x:WorksheetOptions>
<x:StandardWidth>2304</x:StandardWidth>
<x:Print>
<x:ValidPrinterInfo/>
<x:PaperSizeIndex>9</x:PaperSizeIndex>
<x:HorizontalResolution>300</x:HorizontalResolution>
<x:VerticalResolution>300</x:VerticalResolution>
</x:Print>
<x:Selected/>
</x:WorksheetOptions>
</xml><![endif]-->
</head>
<body link=blue vlink=purple >
<?php
// 序号,考生姓名,性别,考点,考号,考场,候考室,考生号,测试日期,候考入场,测试时间,照片名称
//员工花名册 ) 工号,单位,班组,姓名,职务/工种
$_GET["table"]="员工花名册";
$file='excel.db';
$db=new PDO('sqlite:'.$file);
$field_list="工号,单位,班组,姓名,[职务/工种]";
$fields=explode(",",$field_list);
//print_r($fields);
for($x=0;$x<sizeof($fields);$x++){
$str="<?php echo \$result[\$j]['".$fields[$x]."']; ?>";
//echo "<br>";
//echo htmlentities($str);
}
//die();
$sql=" SELECT ";
$sql.= $field_list;
$sql.=" FROM ";
$sql.=$_GET["table"];
$sql.=" LIMIT ";
$sql.=" 500";
$sql.=";";
$result=$db->query($sql)->fetchAll(PDO::FETCH_ASSOC);
//表体
for($j=0; $j<sizeof($result); $j++)
{
?>
<div class="wrapper" style="position:relative;float:left;margin:15pt;">
<table border=0 cellpadding=0 cellspacing=0 width=359 style='border-collapse:
collapse;>
<col width=72 span=3 style='width:54pt'>
<col width=12 style='mso-width-source:userset;width:9pt'>
<col width=131 style='mso-width-source:userset;width:118pt'>
<tr height=34 style='mso-height-source:userset;height:26.1pt' id='r0'>
<td colspan=3 id='tc0' height=34 class=x82 style='border-right:2px solid windowtext;border-bottom:2px solid windowtext;height:26.1pt;overflow:hidden;' >密闭舱室进入证<br>ENTER TANK BADGE</td>
<td class=x65 width=12 style='width:9pt;' ></td>
<td class=x66 width=131 style='width:98.25pt;' ></td>
</tr>
<tr height=39 style='mso-height-source:userset;height:29.8pt' id='r1'>
<td height=39 class=x67 style='height:29.8pt;' >单位</td>
<td colspan=2 id='tc1' class=x83 style='border-right:2px solid windowtext;border-bottom:1px solid windowtext;' ><?php echo $result[$j]['单位']; ?></td>
<td class=x70></td>
<td class=x71>安全审核</td>
</tr>
<tr height=22 style='mso-height-source:userset;height:16.7pt' id='r2'>
<td height=22 class=x67 style='height:16.7pt;' >班组</td>
<td colspan=2 id='tc2' class=x84 style='border-right:2px solid windowtext;border-bottom:1px solid windowtext;' ><?php echo $result[$j]['班组']; ?>
</td>
<td class=x70></td>
<td class=x74>盖章</td>
</tr>
<tr height=22 style='mso-height-source:userset;height:16.7pt' id='r3'>
<td height=22 class=x67 style='height:16.7pt;' >姓名</td>
<td colspan=2 id='tc3' class=x84 style='border-right:2px solid windowtext;border-bottom:1px solid windowtext;' ><?php echo $result[$j]['姓名']; ?>
</td>
<td class=x70></td>
<td class=x75></td>
</tr>
<tr height=32 style='mso-height-source:userset;height:24.55pt' id='r4'>
<td height=32 class=x67 style='height:24.55pt;' >职务/工种</td>
<td colspan=2 id='tc4' class=x84 style='border-right:2px solid windowtext;border-bottom:1px solid windowtext;' ><?php echo $result[$j]['职务/工种']; ?></td>
<td class=x70></td>
<td class=x76>2018年有效</td>
</tr>
<tr height=34 style='mso-height-source:userset;height:26.1pt' id='r5'>
<td colspan=2 id='tc5' height=34 class=x85 style='border-right:1px solid windowtext;border-bottom:1px solid windowtext;height:26.1pt;' ><img class="pic" src='
<?php $host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = '/';
echo "http://$host$uri/";?>
workID/pic/<?php echo $result[$j]['姓名']; ?>.jpg'></td>
<td class=x79>特证<br>S.L</td>
<td class=x80></td>
<td class=x81></td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=12 style='width:9pt'></td>
<td width=131 style='width:98.25pt'></td>
</tr>
<![endif]>
</table>
</div>
<script language = 'javascript' type='text/javascript'>
function ChangeColspanHiddenData()
{
var node;
var ids=["tc3","tc0","tc1","tc4","tc5","tc2"];
var spans=["2","3","2","2","2","2"];
for (var i = 0;i < ids.length; i++)
{
node=document.getElementById(ids[i]);
node.colSpan=spans[i];
}
}
ChangeColspanHiddenData();
</script>
<?php
}
?>
</body>
</html>
就是代码啊。。。 |
|