<HTML>
<HEAD>
<TITLE>欢迎使用助手 -
<?php echo $KHM; ?></TITLE>
<style type="text/css">
body {
background-color: #fff;
margin: 0px;
font-family: Lucida Grande, Verdana, Sans-serif;
font-size: 14px;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
text-decoration: none;
font-weight: normal;
}
a:visited {
color: #003399;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: #000;
text-decoration: none;
background-color: transparent;
}
#content {
border-top:1px solid #000;
margin: 0px 40px 0 40px;
padding: 0;
}
#content p {
margin: 10px 20px 12px 0;
}
#content h1 {
color: #333;
background-color: #efefef;
font-weight: normal;
font-size: 22px;
margin: 0 0 15px 0;
padding: 3px 2px 3px 10px;
}
#content h2 {
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
color: #444;
font-size: 16px;
font-weight: bold;
margin: 24px 0 2px 0;
padding: 5px 0 6px 0;
}
#content h3 {
background-color: transparent;
color: #333;
font-size: 14px;
font-weight: bold;
margin: 4px 0 12px 0;
padding: 0 0 0 0;
}
#content table tr td h3 {
background-color: transparent;
color: #333;
font-size: 14px;
font-weight: bold;
margin: 22px 0 12px 0;
padding: 0 0 0 0;
}
#content h4 {
background-color: transparent;
color: #444;
font-size: 14px;
font-weight: bold;
margin: 22px 0 0 0;
padding: 0 0 0 0;
}
#content img {
margin: auto;
padding: 0;
}
#content code {
font-family: Monaco, Verdana, Sans-serif;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#content pre {
font-family: Monaco, Verdana, Sans-serif;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#content .path {
background-color: #EBF3EC;
border: 1px solid #99BC99;
color: #005702;
text-align: center;
margin: 0 0 14px 0;
padding: 5px 10px 5px 8px;
}
#content dfn {
font-family: Lucida Grande, Verdana, Geneva, Sans-serif;
color: #00620C;
font-weight: bold;
font-style: normal;
}
#content var {
font-family: Lucida Grande, Verdana, Geneva, Sans-serif;
color: #8F5B00;
font-weight: bold;
font-style: normal;
}
#content samp {
font-family: Lucida Grande, Verdana, Geneva, Sans-serif;
color: #480091;
font-weight: bold;
font-style: normal;
}
#content kbd {
font-family: Lucida Grande, Verdana, Geneva, Sans-serif;
color: #A70000;
font-weight: bold;
font-style: normal;
}
#content ul {
list-style-image: url(images/arrow.gif);
padding: 0 0 0 18px;
margin: 8px 0 12px 0;
}
#content li {
padding: 0;
margin: 0 0 6px 0;
}
#content li p {
margin-left: 0;
margin-right: 0;
}
#content .tableborder {
border: 1px solid #999;
}
#content th {
font-weight: bold;
text-align: left;
font-size: 12px;
background-color: #666;
color: #fff;
padding: 4px;
}
#content .td {
font-weight: normal;
font-size: 12px;
padding: 6px;
background-color: #f3f3f3;
}
#content .tdpackage {
font-weight: normal;
font-size: 12px;
}
#content .important {
background: #FBE6F2;
border: 1px solid #D893A1;
color: #333;
margin: 10px 0 5px 0;
padding: 10px;
}
#content .important p {
margin: 6px 0 8px 0;
padding: 0;
}
#content .important .leftpad {
margin: 6px 0 8px 0;
padding-left: 20px;
}
#content .critical {
background: #FBE6F2;
border: 1px solid #E68F8F;
color: #333;
margin: 10px 0 5px 0;
padding: 10px;
}
#content .critical p {
margin: 5px 0 6px 0;
padding: 0;
}
</style>
</HEAD>
<BODY>
<div id="content">
<h1>助手 -
<?php echo $KHM; ?>
<h2>当前位置:
<?php echo $DQWZ.'('.$_REQUEST['n'].'年'.$_REQUEST['y'].'月)' ?></h2>
<h3>其他位置:
<?php echo $QTWZ ?></h3>
<code><strong>操作提示:</strong> 可以通过点击左侧的编号进行数据修改</code>
<?php
$num_results = $DBRES->num_rows();
if( $num_results == 0 ) {
echo '<div class="zs_ts">...指定年月的表没有数据</div>';
}
else {
$sum_c7 = 0.00;
$sum_c10 = 0.00;
$sum_c13 = 0.00;
$sum_c16 = 0.00;
$sum_c19 = 0.00;
$sum_c22 = 0.00;
$sum_c25 = 0.00;
$sum_c28 = 0.00;
$sum_c31 = 0.00;
echo '<div class="zs_ts">...'.$_REQUEST['n'] .'年'.$_REQUEST['y'].'月 报表如下</div>';
echo '<div class="zs_ts">...<A HREF="#hj">查看合计数</A>,<A HREF="#" name="ys">页首位置</A>,<a href="./hlb_dy_jl.php?n='.$_REQUEST['n'] .'&y='.$_REQUEST['y'].'" target="_blank">打印a表</A>,<a href="./hlb_dy_hl.php?n='.$_REQUEST['n'] .'&y='.$_REQUEST['y'].'" target="_blank">打印b表</A></div>';
if ( isset($_REQUEST['id']) ) {
echo '<div class="zs_ts">...<A HREF="#'.$_REQUEST['id'].'">查看最近修改的数据</A></div>';
}
?>
<TABLE>
<?php
for($i = 0 ; $i< $num_results;$i++) {
$row = $result->fetch_assoc();
if ($i == 0 || $i%15==0) {
?>
<TR class="odd">
<TD rowspan="3">编号</TD>
<TD rowspan="3">名称</TD>
<TD rowspan="3">规格</TD>
<TD rowspan="3">单位</TD>
<TD rowspan="3">账册
编号</TD>
<TD rowspan="2" colspan="3">上期库存</TD>
<TD rowspan="2" colspan="3">本期进料</TD>
<TD rowspan="2" colspan="3">本期估价进料</TD>
<TD rowspan="2" colspan="3">本期耗用</TD>
<TD rowspan="1" colspan="12">本期耗用明晰</TD>
<TD rowspan="2" colspan="3">本期结余</TD>
</TR>
<TR class="odd">
<TD colspan="3">车间:消</TD>
<TD colspan="3">车间:冷</TD>
<TD colspan="3">车间:金</TD>
<TD colspan="3">车间:电</TD>
</TR>
<TR class="odd">
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
<TD>数量</TD>
<TD>金额</TD>
<TD>单价</TD>
</TR>
<?php
}
if ($i%2) {
echo '<TR class="oddq2">';
}
else {
echo '<TR class="even">';
}
?>
<TD>
<a href= "./hlb_bbbj.php?todo=bbbj&n=
<?php echo $_REQUEST['n'].'&y='.$_REQUEST['y'].'&id='.$row['c1'] ?>
" name="
<?php echo $row['c1'] ?>">
<?php echo $row['c1'] ?> </a>
</TD>
<TD>
<?php echo $row['c2'] ?></TD>
<TD>
<?php echo $row['c3'] ?></TD>
<TD>
<?php echo $row['c4'] ?></TD>
<TD>
<?php echo $row['c5'] ?></TD>
<TD>
<?php echo $row['c6'] ?></TD>
<TD>
<?php echo $row['c7'] ?></TD>
<TD>
<?php echo $row['c8'] ?></TD>
<TD>
<?php echo $row['c9'] ?></TD>
<TD>
<?php echo $row['c10'] ?></TD>
<TD>
<?php echo $row['c11'] ?></TD>
<TD>
<?php echo $row['c12'] ?></TD>
<TD>
<?php echo $row['c13'] ?></TD>
<TD>
<?php echo $row['c14'] ?></TD>
<TD>
<?php echo $row['c15'] ?></TD>
<TD>
<?php echo $row['c16'] ?></TD>
<TD>
<?php echo $row['c17'] ?></TD>
<TD>
<?php echo $row['c18'] ?></TD>
<TD>
<?php echo $row['c19'] ?></TD>
<TD>
<?php echo $row['c20'] ?></TD>
<TD>
<?php echo $row['c21'] ?></TD>
<TD>
<?php echo $row['c22'] ?></TD>
<TD>
<?php echo $row['c23'] ?></TD>
<TD>
<?php echo $row['c24'] ?></TD>
<TD>
<?php echo $row['c25'] ?></TD>
<TD>
<?php echo $row['c26'] ?></TD>
<TD>
<?php echo $row['c27'] ?></TD>
<TD>
<?php echo $row['c28'] ?></TD>
<TD>
<?php echo $row['c29'] ?></TD>
<TD>
<?php echo $row['c30'] ?></TD>
<TD>
<?php echo $row['c31'] ?></TD>
<TD>
<?php echo $row['c32'] ?></TD>
</TR>
<?php
$sum_c7 += $row['c7'];
$sum_c10 += $row['c10'];
$sum_c13 += $row['c13'];
$sum_c16 += $row['c16'];
$sum_c19 += $row['c19'];
$sum_c22 += $row['c22'];
$sum_c25 += $row['c25'];
$sum_c28 += $row['c28'];
$sum_c31 += $row['c31'];
}
?>
<TR class="odd">
<TD></TD>
<TD><A HREF="#" name="hj">合计</A></TD>
<TD></TD>
<TD></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c7) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c10) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c13) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c16) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c19) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c22) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c25) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c28) ?></TD>
<TD></TD>
<TD></TD>
<TD>
<?php echo sprintf('%01.2f',$sum_c31) ?></TD>
<TD></TD>
</TR>
</TABLE>
<A HREF="#ys">返回页首</A>
<?php
}
?>
</div>
</BODY>
</HTML>