
<tr><td height=50><a href="<?=$g4[path]?>/bbs/board.php?bo_table=static&wr_id=3&page=0""><b><u>고장 현황</u></b></a></td></tr>
<tr>
    <td height=30 style="color:#888;">
<?
//현재 재고
$i=0;


	$query4 = "select  wr_10, wr_link1, wr_subject  from g4_write_dsetup     ";
		$result4 = sql_query($query4);
		while($row  = sql_fetch_array($result4)) {

			$device[$i] = $row[wr_subject];
			$solved[$i] = $row[wr_link1];
			$break[$i] = $row[wr_10];
			$unsolved[$i] = $break[$i] - $solved[$i]; 
		
			$i++;
		}
?>





<table class="t_ex2">

	<tr><th  class='c1'  >&nbsp;장비&nbsp;</th>
		<?

	for($i=0; $i < count($device); $i++) {

		echo "<th class='c1' width=7% align=center> ".$device[$i]." </th>";
	}
?>

<tr ><td   class='c1'>&nbsp;고장&nbsp;</td>
<?
	for($i=0; $i <count($device); $i++) {
	
		
if($break[$i] == "") $break[$i] =0;
		echo "<td  class='c2' width=7% align=right> ".number_format($break[$i])."&nbsp;</td>";
			}
?>
</tr>
<tr ><td   class='c1'>&nbsp;수리중&nbsp;</td>
<?
	for($i=0; $i <count($device); $i++) {
	
		
if($unsolved[$i] == "") $unsolved[$i] =0;
		echo "<td  class='c4' width=7% align=right> <font  color='red'>".number_format($unsolved[$i])."</font>&nbsp;</td>";
			}
?>
</tr>
</table>



    </td>
</tr>