<? include('include.php');//包含信息?>
<? include('excel/excel/reader.php');//包含信息?>
<?
//header('charset: gb2312;');
ob_end_clean();//清除缓冲区,避免乱码
$title="图书资料对应金盘软件";
header("Content-type:application/vnd.ms-excel.numberformat:@;charset=gb2312");
header("Content-Disposition:attachment; filename=".$title.".xls");
echo "<table>";
echo "<tr>";
echo "<td style='vnd.ms-excel.numberformat:@'>ISBN010a</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>题名200a</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>责任者200f</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>出版者210c</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>出版日期210d</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>索书号690a</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>版次205a</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>单价010d</td>";
echo "</tr>";
$csql="select $tbdbookinfo.* from $tbdbookinfo where isout=2 order by spbm desc";
$result=$db->query($csql);
$i=0;
 while($arr=$db->result_query($result))
 {
$i++;
$spbm=$arr['spbm'];
$bookname=$arr['bookname'];
$isbn=$arr['isbn'];
$cbs=$arr['cbs'];
$cbsj=$arr['cbsj'];
$ssh=$arr['ssh'];
$author=$arr['author'];
$price=$arr['price'];
$cfjh=$arr['cfjh'];
$tsfl=$arr['tsfl'];
$cszl=$arr['cszl'];
$kjsl=$arr['kjsl'];
$jwname=$arr['jwname'];
$flname=$arr['flname'];
echo "<tr>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$isbn."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$bookname."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$author."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$cbs."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$cbsj."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$ssh."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>1</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$price."</td>";


echo "</tr>";

/*
echo "<tr>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$xi."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$bookname."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$isbn."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$price."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$jwname."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$cbs."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$cszl."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$kjsl."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$csmy."</td>";
echo "<td style='vnd.ms-excel.numberformat:@'>".$gys[$tgys]."</td>";
echo "</tr>";
*/
}
echo "</table>";

//将已导出的数据状态全部更改为3，则下一次导出时不再导出此部分数据，限金盘软件
$csql="update $tbdbookinfo set isout=3";
$result=$db->query($csql);
///////////////////////////////////////////////////////////////////////////////////////////


exit;
?>