2 Star 2 Fork 4

Tody_Guo/php_issue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
export-2003.php 3.25 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
include 'inc/conn.php';
$p_new_lines = array("\r\n", "\n", "\r","\r\n", "<p>","</p>","<br>","</br>","<br/>","<br />");
$p_change_line_in_excel_cell = '<br style="mso-data-placement:same-cell;" />';
header ("Content-type:application/vnd.ms-excel");
header ("Content-Disposition:filename=BIOS_EC_Table.xls");
echo "<table border='1'>";
echo "<tr><td align='center' colspan='15'><font size='5'>BIOS/EC/IMAGE版本管控表格</font></td></tr>";
echo "<tr style='font-size: 20px;height: 40px;'>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>编号</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>机种</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>BIOS版本</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>EC版本</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>BIOS日期</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>客户</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>出货系统</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>触摸屏FW</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>3G FW</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>TV FW</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>管控人员</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>验证日期</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>品保人员</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>测试日期</font></td>";
echo " <td align='center' bgcolor='#538dd5'><font color='ffffff'>备注</font></td>";
echo "</tr>";
$db = new mysql();
$sql = "select * from eng_version_control_table ORDER BY build_date DESC";
$db->query($sql);
$num = $db->db_num_rows();
if ($num == 0)
echo "No data was found!";
for($i=0; $i<$num; $i++){
$row = $db->fetch_assoc();
$j=$i+1;
echo "<tr><td align='center'>$j</td><td align='center'>".
htmlspecialchars_decode($row['Model_name'])."</td><td align='center'> ".
htmlspecialchars_decode($row['BIOS_version'])."</td><td align='center'> ".
htmlspecialchars_decode($row['EC_version'])."</td><td align='center'>".
htmlspecialchars_decode($row['Bios_release_date'])."</td><td align='center'>".
htmlspecialchars_decode($row['Customer'])."</td><td align='center'>".
htmlspecialchars_decode($row['System_type'])."</td><td align='center'>".
htmlspecialchars_decode($row['TSP_FW'])."</td><td align='center'>".
htmlspecialchars_decode($row['3G_FW'])."</td><td align='center'>".
htmlspecialchars_decode($row['TV_FW'])."</td><td align='center'>".
htmlspecialchars_decode($row['Owner'])."</td><td align='center'>".
substr(htmlspecialchars_decode($row['Build_Date']),0,10)."</td><td align='center'>".
htmlspecialchars_decode($row['Q_op'])."</td><td align='center'>".
substr(htmlspecialchars_decode($row['Q_check_date']),0,10)."</td><td align='left'>".
str_replace($p_new_lines, $p_change_line_in_excel_cell, htmlspecialchars_decode($row['REMARK']))."</td></tr>";
}
echo "</table>";
$db->close();
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/tody_guo/php_issue.git
git@gitee.com:tody_guo/php_issue.git
tody_guo
php_issue
php_issue
master

搜索帮助